diff --git a/.circleci/config.yml b/.circleci/config.yml index 17a37c5d3c..adc592c1c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -175,10 +175,83 @@ jobs: key: remixdesktop-windows-deps-{{ checksum "apps/remixdesktop/yarn.lock" }} paths: - apps/remixdesktop/node_modules + - persist_to_workspace: + root: apps/remixdesktop + paths: + - "release" + # see https://docs.digicert.com/en/software-trust-manager/ci-cd-integrations/script-integrations/github-integration-ksp.html + sign-remixdesktop-windows: + executor: win/default # executor type + working_directory: ~/remix-project + steps: + - checkout + - attach_workspace: + at: . + - run: + name: "Certificate-Setup" + shell: powershell.exe + command: | + cd C:\ + New-Item C:\CERT_FILE.p12.b64 + Set-Content -Path C:\CERT_FILE.p12.b64 -Value $env:SM_CLIENT_CERT_FILE_B64 + certutil -decode CERT_FILE.p12.b64 Certificate_pkcs12.p12 + cat Certificate_pkcs12.p12 + - restore_cache: + name: Restore smtools-windows-x64.msi + keys: + - dl-smtools-windows-x64.msi + - run: + name: "Client-Tool-Download" + shell: powershell.exe + command: | + cd C:\ + if (Test-Path 'c:\smtools-windows-x64.msi') { + echo 'File exists, skipping download...' + } else { + echo 'Downloading smtools-windows-x64.msi ...' + curl.exe -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:$env:SM_API_KEY" -o smtools-windows-x64.msi + } + - save_cache: + key: dl-smtools-windows-x64.msi + paths: + - c:\smtools-windows-x64.msi + - run: + name: "Client-Tool-Setup" + shell: powershell.exe + command: | + cd C:\ + msiexec.exe /i smtools-windows-x64.msi /quiet /qn | Wait-Process + & $env:SSM\smksp_cert_sync.exe + & $env:SSM\smctl.exe healthcheck + - run: + name: "Find Signtool" + shell: powershell.exe + command: | + Get-ChildItem -Path 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit' -Filter signtool.exe -Recurse + - run: + name: "Signtool-Signing" + shell: powershell.exe + command: | + & $env:Signtool sign /sha1 $env:SM_CODE_SIGNING_CERT_SHA1_HASH /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 $env:RemixSetupExe + - run: + name: "Signtool-Verification" + shell: powershell.exe + command: | + $verify_output = $(& $env:Signtool verify /v /pa $env:RemixSetupExe) + echo ${verify_output} + if (!$verify_output.Contains("Number of files successfully Verified: 1")) { + echo 'Verification failed' + exit 1 + } - store_artifacts: - path: apps/remixdesktop/release/ + path: ~/remix-project/release/ destination: remixdesktop-windows - + environment: + SM_CLIENT_CERT_FILE: 'C:\Certificate_pkcs12.p12' + Signtool: 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe' + SSM: 'C:\Program Files\DigiCert\DigiCert One Signing Manager Tools' + RemixSetupExe: 'C:\Users\circleci\remix-project\release\Remix IDE.exe' + build-remixdesktop-mac: macos: xcode: 14.2.0 @@ -315,16 +388,25 @@ jobs: - run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules - run: mkdir node_modules/hardhat && wget https://unpkg.com/hardhat/console.sol -O node_modules/hardhat/console.sol - run: ls -la ./dist/apps/remix-ide/assets/js - - run: yarn run selenium-install || yarn run selenium-install + - run: yarn run selenium-install --singleDriverInstall=firefox - when: condition: equal: [ "chrome", << parameters.browser >> ] steps: + - run: mkdir -p node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - - run: - name: Start Selenium - command: yarn run selenium - background: true + - run: + name: run selenium + command: yarn selenium-standalone start --singleDriverStart=chrome + background: true + - when: + condition: + equal: [ "firefox", << parameters.browser >> ] + steps: + - run: + name: run selenium + command: yarn selenium-standalone start --singleDriverStart=firefox + background: true - run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >> << parameters.jobsize >> << parameters.job >> - store_test_results: path: ./reports/tests @@ -366,11 +448,12 @@ jobs: - run: unzip ./persist/dist.zip - run: unzip ./persist/plugin-<< parameters.plugin >>.zip - run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules - - run: yarn run selenium-install || yarn run selenium-install + - run: yarn run selenium-install --singleDriverInstall=firefox + - run: mkdir -p node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: name: Start Selenium - command: yarn run selenium + command: yarn run selenium --singleDriverStart=chrome background: true - run: ./apps/remix-ide/ci/browser_test_plugin.sh << parameters.plugin >> - store_test_results: @@ -452,6 +535,9 @@ workflows: - build-remixdesktop-windows: requires: - build-desktop + - sign-remixdesktop-windows: + requires: + - build-remixdesktop-windows - build-remixdesktop-linux: requires: - build-desktop diff --git a/.github/workflows/pr-reminder.yml b/.github/workflows/pr-reminder.yml index 8e00ba0b32..532a7555b1 100644 --- a/.github/workflows/pr-reminder.yml +++ b/.github/workflows/pr-reminder.yml @@ -14,4 +14,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} - freeze-date: '2024-01-29T18:00:00Z' + freeze-date: '2024-02-26T18:00:00Z' diff --git a/Dockerfile.dev b/Dockerfile.dev index 91fe2eab31..0a32c9a0d0 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,4 +1,4 @@ -# This dockerfile is to build each branch seperately (for dev purposes) +# This dockerfile is to build each branch separately (for dev purposes) FROM node:10 # Create Remix user, don't use root! # RUN yes | adduser --disabled-password remix && mkdir /app diff --git a/apps/circuit-compiler/src/app/components/feedback.tsx b/apps/circuit-compiler/src/app/components/feedback.tsx index 5b61794281..9fe7bc3d23 100644 --- a/apps/circuit-compiler/src/app/components/feedback.tsx +++ b/apps/circuit-compiler/src/app/components/feedback.tsx @@ -45,8 +45,7 @@ export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openEr
handleAskGPT(response) } />
@@ -54,7 +53,6 @@ export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openEr
{ handleAskGPT(response) }} />
diff --git a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx index 48e57fab31..3edf89cc20 100644 --- a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx +++ b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx @@ -3,7 +3,7 @@ import { FeedbackAlertProps } from '../types' import { RenderIf } from '@remix-ui/helper' import {CopyToClipboard} from '@remix-ui/clipboard' -export function FeedbackAlert ({ message, location, askGPT }: FeedbackAlertProps) { +export function FeedbackAlert ({ message, askGPT }: FeedbackAlertProps) { const [ showAlert, setShowAlert] = useState(true) const handleCloseAlert = () => { @@ -14,9 +14,6 @@ export function FeedbackAlert ({ message, location, askGPT }: FeedbackAlertProps <> { message } - - { location } -
@@ -24,7 +21,10 @@ export function FeedbackAlert ({ message, location, askGPT }: FeedbackAlertProps - ASK GPT + { + e.stopPropagation() + askGPT() + }}>ASK GPT
diff --git a/apps/circuit-compiler/src/app/services/circomPluginClient.ts b/apps/circuit-compiler/src/app/services/circomPluginClient.ts index 0c22068125..9f01635edb 100644 --- a/apps/circuit-compiler/src/app/services/circomPluginClient.ts +++ b/apps/circuit-compiler/src/app/services/circomPluginClient.ts @@ -21,7 +21,7 @@ export class CircomPluginClient extends PluginClient { constructor() { super() - this.methods = ['init', 'parse', 'compile', 'generateR1cs'] + this.methods = ['init', 'parse', 'compile', 'generateR1cs', 'resolveDependencies'] createClient(this) this.internalEvents = new EventManager() this.onload() @@ -298,7 +298,7 @@ export class CircomPluginClient extends PluginClient { } } else { if (depPath) { - // resolves relative dependecies for .deps folder + // resolves relative dependencies for .deps folder path = pathModule.resolve(depPath.slice(0, depPath.lastIndexOf('/')), include) path = path.replace('https:/', 'https://') if (path.indexOf('/') === 0) path = path.slice(1) diff --git a/apps/circuit-compiler/src/app/types/index.ts b/apps/circuit-compiler/src/app/types/index.ts index add4806427..fc78c3a237 100644 --- a/apps/circuit-compiler/src/app/types/index.ts +++ b/apps/circuit-compiler/src/app/types/index.ts @@ -72,7 +72,6 @@ export type CompilerReport = { export type FeedbackAlertProps = { message: string, - location: string, askGPT: () => void } diff --git a/apps/circuit-compiler/src/snarkjs.min.js b/apps/circuit-compiler/src/snarkjs.min.js index 03f31e305f..cba6f4b5fc 100644 --- a/apps/circuit-compiler/src/snarkjs.min.js +++ b/apps/circuit-compiler/src/snarkjs.min.js @@ -1,4 +1,4 @@ -var snarkjs=function(t){"use strict";const a=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function e(t,a){return a&&10!=a?16==a?"0x"==t.slice(0,2)?BigInt(t):BigInt("0x"+t):void 0:BigInt(t)}const o=e;function i(t){const e=t.toString(16);return 4*(e.length-1)+a[parseInt(e[0],16)]}function n(t){return BigInt(t)>BigInt(a)}const r=c,d=s;function u(t){return(BigInt(t)&BigInt(1))==BigInt(1)}function _(t){let a=BigInt(t);const e=[];for(;a;)a&BigInt(1)?e.push(1):e.push(0),a>>=BigInt(1);return e}function g(t){if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(t)}function f(t,a){return BigInt(t)+BigInt(a)}function h(t,a){return BigInt(t)-BigInt(a)}function p(t){return-BigInt(t)}function m(t,a){return BigInt(t)*BigInt(a)}function L(t,a){return BigInt(t)**BigInt(a)}function b(t,a){return BigInt(t)/BigInt(a)}function w(t,a){return BigInt(t)%BigInt(a)}function y(t,a){return BigInt(t)==BigInt(a)}function A(t,a){return BigInt(t)>BigInt(a)}function C(t,a){return BigInt(t)>=BigInt(a)}function F(t,a){return BigInt(t)&BigInt(a)}function x(t,a,e,o){const i="0000000"+e.toString(16),n=new Uint32Array(t.buffer,t.byteOffset+a,o/4),l=1+(4*(i.length-7)-1>>5);for(let t=0;t>5);for(let t=0;tn[n.length-a-1]=t.toString(16).padStart(8,"0"))),e(n.join(""),16)}function E(t,a,o){o=o||t.byteLength,a=a||0;const i=new DataView(t.buffer,t.byteOffset+a,o),n=new Array(o/4);for(let t=0;t>=BigInt(1)}return e},bits:_,toNumber:g,toArray:function(t,a){const e=[];let o=BigInt(t);for(a=BigInt(a);o;)e.unshift(Number(o%a)),o/=a;return e},add:f,sub:h,neg:p,mul:m,square:function(t){return BigInt(t)*BigInt(t)},pow:L,exp:function(t,a){return BigInt(t)**BigInt(a)},abs:function(t){return BigInt(t)>=0?BigInt(t):-BigInt(t)},div:b,mod:w,eq:y,neq:function(t,a){return BigInt(t)!=BigInt(a)},lt:function(t,a){return BigInt(t)=0;e--)i=t.square(i),o[e]&&(i=t.mul(i,a));return i}function z(t){if(t.m%2==1)if(y(w(t.p,4),1))if(y(w(t.p,8),1))if(y(w(t.p,16),1))!function(t){t.sqrt_q=L(t.p,t.m),t.sqrt_s=0,t.sqrt_t=h(t.sqrt_q,1);for(;!u(t.sqrt_t);)t.sqrt_s=t.sqrt_s+1,t.sqrt_t=b(t.sqrt_t,2);let a=t.one;for(;t.eq(a,t.one);){const e=t.random();t.sqrt_z=t.pow(e,t.sqrt_t),a=t.pow(t.sqrt_z,2**(t.sqrt_s-1))}t.sqrt_tm1d2=b(h(t.sqrt_t,1),2),t.sqrt=function(t){const a=this;if(a.isZero(t))return a.zero;let e=a.pow(t,a.sqrt_tm1d2);const o=a.pow(a.mul(a.square(e),t),2**(a.sqrt_s-1));if(a.eq(o,a.negone))return null;let i=a.sqrt_s,n=a.mul(t,e),l=a.mul(n,e),c=a.sqrt_z;for(;!a.eq(l,a.one);){let t=a.square(l),o=1;for(;!a.eq(t,a.one);)t=a.square(t),o++;e=c;for(let t=0;t>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<16|t[i]>>>16&65535)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<12|t[e]>>>20&4095)>>>0,t[a]=t[a]+t[e]>>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<8|t[i]>>>24&255)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<7|t[e]>>>25&127)>>>0}class M{constructor(t){t=t||[0,0,0,0,0,0,0,0],this.state=[1634760805,857760878,2036477234,1797285236,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],0,0,0,0],this.idx=16,this.buff=new Array(16)}nextU32(){return 16==this.idx&&this.update(),this.buff[this.idx++]}nextU64(){return f(m(this.nextU32(),4294967296),this.nextU32())}nextBool(){return 1==(1&this.nextU32())}update(){for(let t=0;t<16;t++)this.buff[t]=this.state[t];for(let a=0;a<10;a++)T(t=this.buff,0,4,8,12),T(t,1,5,9,13),T(t,2,6,10,14),T(t,3,7,11,15),T(t,0,5,10,15),T(t,1,6,11,12),T(t,2,7,8,13),T(t,3,4,9,14);var t;for(let t=0;t<16;t++)this.buff[t]=this.buff[t]+this.state[t]>>>0;this.idx=0,this.state[12]=this.state[12]+1>>>0,0==this.state[12]&&(this.state[13]=this.state[13]+1>>>0,0==this.state[13]&&(this.state[14]=this.state[14]+1>>>0,0==this.state[14]&&(this.state[15]=this.state[15]+1>>>0)))}}var U={};function Q(t){let a=new Uint8Array(t);if(void 0!==globalThis.crypto)globalThis.crypto.getRandomValues(a);else for(let e=0;e>>0;return a}let k=null;function R(){return k||(k=new M(function(){const t=Q(32),a=new Uint32Array(t.buffer),e=[];for(let t=0;t<8;t++)e.push(a[t]);return e}()),k)}class N{constructor(t,a,e){this.F=a,this.G=t,this.opMulGF=e;let o=a.sqrt_t||a.t,i=a.sqrt_s||a.s,n=a.one;for(;a.eq(a.pow(n,a.half),a.one);)n=a.add(n,a.one);this.w=new Array(i+1),this.wi=new Array(i+1),this.w[i]=this.F.pow(n,o),this.wi[i]=this.F.inv(this.w[i]);let l=i-1;for(;l>=0;)this.w[l]=this.F.square(this.w[l+1]),this.wi[l]=this.F.square(this.wi[l+1]),l--;this.roots=[],this._setRoots(Math.min(i,15))}_setRoots(t){for(let a=t;a>=0&&!this.roots[a];a--){let t=this.F.one;const e=1<>1,c=$(t,a,e-1,o,2*i),s=$(t,a,e-1,o+i,2*i),r=new Array(n);for(let a=0;a>this.one,this.bitLength=i(this.p),this.mask=(this.one<>this.one;this.nqr=this.two;let e=this.pow(this.nqr,a);for(;!this.eq(e,this.negone);)this.nqr=this.nqr+this.one,e=this.pow(this.nqr,a);for(this.s=0,this.t=this.negone;(this.t&this.one)==this.zero;)this.s=this.s+1,this.t=this.t>>this.one;this.nqr_to_t=this.pow(this.nqr,this.t),z(this),this.FFT=new N(this,this,this.mul.bind(this)),this.fft=this.FFT.fft.bind(this.FFT),this.ifft=this.FFT.ifft.bind(this.FFT),this.w=this.FFT.w,this.wi=this.FFT.wi,this.shift=this.square(this.nqr),this.k=this.exp(this.nqr,2**this.s)}e(t,a){let e;if(a?16==a&&(e=BigInt("0x"+t)):e=BigInt(t),e<0){let t=-e;return t>=this.p&&(t%=this.p),this.p-t}return e>=this.p?e%this.p:e}add(t,a){const e=t+a;return e>=this.p?e-this.p:e}sub(t,a){return t>=a?t-a:this.p-a+t}neg(t){return t?this.p-t:t}mul(t,a){return t*a%this.p}mulScalar(t,a){return t*this.e(a)%this.p}square(t){return t*t%this.p}eq(t,a){return t==a}neq(t,a){return t!=a}lt(t,a){return(t>this.half?t-this.p:t)<(a>this.half?a-this.p:a)}gt(t,a){return(t>this.half?t-this.p:t)>(a>this.half?a-this.p:a)}leq(t,a){return(t>this.half?t-this.p:t)<=(a>this.half?a-this.p:a)}geq(t,a){return(t>this.half?t-this.p:t)>=(a>this.half?a-this.p:a)}div(t,a){return this.mul(t,this.inv(a))}idiv(t,a){if(!a)throw new Error("Division by zero");return t/a}inv(t){if(!t)throw new Error("Division by zero");let a=this.zero,e=this.p,o=this.one,i=t%this.p;for(;i;){let t=e/i;[a,o]=[o,a-t*o],[e,i]=[i,e-t*i]}return a=this.p?e-this.p:e}bor(t,a){const e=(t|a)&this.mask;return e>=this.p?e-this.p:e}bxor(t,a){const e=(t^a)&this.mask;return e>=this.p?e-this.p:e}bnot(t){const a=t^this.mask;return a>=this.p?a-this.p:a}shl(t,a){if(Number(a)=this.p?e-this.p:e}{const e=this.p-a;return Number(e)>e:this.zero}}shr(t,a){if(Number(a)>a;{const e=this.p-a;if(Number(e)=this.p?a-this.p:a}return 0}}land(t,a){return t&&a?this.one:this.zero}lor(t,a){return t||a?this.one:this.zero}lnot(t){return t?this.zero:this.one}sqrt_old(t){if(t==this.zero)return this.zero;if(this.pow(t,this.negone>>this.one)!=this.one)return null;let a=this.s,e=this.nqr_to_t,o=this.pow(t,this.t),i=this.pow(t,this.add(this.t,this.one)>>this.one);for(;o!=this.one;){let t=this.square(o),n=1;for(;t!=this.one;)n++,t=this.square(t);let l=e;for(let t=0;tthis.p>>this.one&&(i=this.neg(i)),i}normalize(t,a){if((t=BigInt(t,a))<0){let a=-t;return a>=this.p&&(a%=this.p),this.p-a}return t>=this.p?t%this.p:t}random(){const t=2*this.bitLength/8;let a=this.zero;for(let e=0;ethis.half&&10==a){e="-"+(this.p-t).toString(a)}else e=t.toString(a);return e}isZero(t){return t==this.zero}fromRng(t){let a;do{a=this.zero;for(let e=0;e=this.p);return a=a*this.Ri%this.p,a}fft(t){return this.FFT.fft(t)}ifft(t){return this.FFT.ifft(t)}toRprLE(t,a,e){x(t,a,e,8*this.n64)}toRprBE(t,a,e){I(t,a,e,8*this.n64)}toRprBEM(t,a,e){return this.toRprBE(t,a,this.mul(this.R,e))}toRprLEM(t,a,e){return this.toRprLE(t,a,this.mul(this.R,e))}fromRprLE(t,a){return B(t,a,this.n8)}fromRprBE(t,a){return E(t,a,this.n8)}fromRprLEM(t,a){return this.mul(this.fromRprLE(t,a),this.Ri)}fromRprBEM(t,a){return this.mul(this.fromRprBE(t,a),this.Ri)}toObject(t){return t}}var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K={bigInt2BytesLE:function(t,a){const e=Array(a);let o=BigInt(t);for(let t=0;t>=8n;return e},bigInt2U32LE:function(t,a){const e=Array(a);let o=BigInt(t);for(let t=0;t>=32n;return e},isOcamNum:function(t){return!!Array.isArray(t)&&(3==t.length&&("number"==typeof t[0]&&("number"==typeof t[1]&&!!Array.isArray(t[2]))))}},H=function(t,a,e,o,i,n,l){const c=t.addFunction(a);c.addParam("base","i32"),c.addParam("scalar","i32"),c.addParam("scalarLength","i32"),c.addParam("r","i32"),c.addLocal("i","i32"),c.addLocal("b","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(e));c.addCode(s.if(s.i32_eqz(s.getLocal("scalarLength")),[...s.call(l,s.getLocal("r")),...s.ret([])])),c.addCode(s.call(n,s.getLocal("base"),r)),c.addCode(s.call(l,s.getLocal("r"))),c.addCode(s.setLocal("i",s.getLocal("scalarLength"))),c.addCode(s.block(s.loop(s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.setLocal("b",s.i32_load8_u(s.i32_add(s.getLocal("scalar"),s.getLocal("i")))),...function(){const t=[];for(let a=0;a<8;a++)t.push(...s.call(i,s.getLocal("r"),s.getLocal("r")),...s.if(s.i32_ge_u(s.getLocal("b"),s.i32_const(128>>a)),[...s.setLocal("b",s.i32_sub(s.getLocal("b"),s.i32_const(128>>a))),...s.call(o,s.getLocal("r"),r,s.getLocal("r"))]));return t}(),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.br(0))))},Z=function(t,a){const e=8*t.modules[a].n64,o=t.addFunction(a+"_batchInverse");o.addParam("pIn","i32"),o.addParam("inStep","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addParam("outStep","i32"),o.addLocal("itAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(e));o.addCode(i.setLocal("itAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("itAux"),i.i32_mul(i.i32_add(i.getLocal("n"),i.i32_const(1)),i.i32_const(e))))),o.addCode(i.call(a+"_one",i.getLocal("itAux")),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux")),i.call(a+"_mul",i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux"))),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("itOut",i.i32_add(i.getLocal("pOut"),i.i32_mul(i.i32_sub(i.getLocal("n"),i.i32_const(1)),i.getLocal("outStep")))),i.call(a+"_inverse",i.getLocal("itAux"),i.getLocal("itAux")),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),[...i.call(a+"_copy",i.getLocal("itAux"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_zero",i.getLocal("itOut"))],[...i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),n),...i.call(a+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_mul",i.getLocal("itAux"),n,i.getLocal("itOut"))]),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itOut",i.i32_sub(i.getLocal("itOut"),i.getLocal("outStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.br(0)))),o.addCode(i.i32_store(i.i32_const(0),i.getLocal("itAux")))};var W=function(t,a,e,o,i,n){void 0===n&&(n=oa?1:-1}function tt(t){return t*t}function at(t){return t%2n!==0n}function et(t){return t%2n===0n}function ot(t){return t<0n}function it(t){return t>0n}function nt(t){return ot(t)?t.toString(2).length-1:t.toString(2).length}function lt(t){return t<0n?-t:t}function ct(t){return 1n===lt(t)}function st(t,a){for(var e,o,i,n=0n,l=1n,c=a,s=lt(t);0n!==s;)e=c/s,o=n,i=c,n=l,c=s,l=o-e*l,s=i-e*s;if(!ct(c))throw new Error(t.toString()+" and "+a.toString()+" are not co-prime");return-1===X(n,0n)&&(n+=a),ot(t)?-n:n}function rt(t,a,e){if(0n===e)throw new Error("Cannot take modPow with modulus 0");var o=1n,i=t%e;for(ot(a)&&(a*=-1n,i=st(i,e));it(a);){if(0n===i)return 0n;at(a)&&(o=o*i%e),a/=2n,i=tt(i)%e}return o}function dt(t,a){return 0n!==a&&(!!ct(a)||(0===function(t,a){return(t=t>=0n?t:-t)===(a=a>=0n?a:-a)?0:t>a?1:-1}(a,2n)?et(t):t%a===0n))}function ut(t,a){for(var e,o,i,n=function(t){return t-1n}(t),l=n,c=0;et(l);)l/=2n,c++;t:for(o=0;o>1&&o>1,t>>1)))),a.addCode(e.setLocal(s,e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(c,e.i64_add(e.i64_and(e.getLocal(c),e.i64_const(4294967295)),e.i64_and(e.getLocal(r),e.i64_const(4294967295))))),a.addCode(e.setLocal(s,e.i64_add(e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32))),e.getLocal(d))))),a.addCode(e.i64_store32(e.getLocal("r"),4*t,e.getLocal(c))),a.addCode(e.setLocal(r,e.getLocal(s)),e.setLocal(d,e.i64_shr_u(e.getLocal(r),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*i*2-4,e.getLocal(r)))}(),function(){const a=t.addFunction(o+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(o+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){!function(){const a=t.addFunction(o+"__mul1");a.addParam("px","i32"),a.addParam("y","i64"),a.addParam("pr","i32"),a.addLocal("c","i64");const e=a.getCodeBuilder();a.addCode(e.setLocal("c",e.i64_mul(e.i64_load32_u(e.getLocal("px"),0,0),e.getLocal("y")))),a.addCode(e.i64_store32(e.getLocal("pr"),0,0,e.getLocal("c")));for(let t=1;t>1n,p=t.alloc(c,gt.bigInt2BytesLE(h,c)),m=h+1n,L=t.alloc(c,gt.bigInt2BytesLE(m,c));t.modules[s]={pq:d,pR2:u,n64:n,q:i,pOne:_,pZero:g,pePlusOne:L};let b=2n;if(yt(i))for(;wt(b,h,i)!==f;)b+=1n;let w=0,y=f;for(;!At(y)&&0n!==y;)w++,y>>=1n;const A=t.alloc(c,gt.bigInt2BytesLE(y,c)),C=wt(b,y,i),F=t.alloc(gt.bigInt2BytesLE((C<>1n,I=t.alloc(c,gt.bigInt2BytesLE(x,c));return t.exportFunction(r+"_copy",s+"_copy"),t.exportFunction(r+"_zero",s+"_zero"),t.exportFunction(r+"_isZero",s+"_isZero"),t.exportFunction(r+"_eq",s+"_eq"),function(){const a=t.addFunction(s+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.ret(e.call(r+"_eq",e.getLocal("x"),e.i32_const(_))))}(),function(){const a=t.addFunction(s+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_add",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_sub",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_add",e.getLocal("r"),e.i32_const(d),e.getLocal("r")))))}(),function(){const a=t.addFunction(s+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_sub",e.i32_const(g),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.alloc(l*l*8),e=t.addFunction(s+"_mReduct");e.addParam("t","i32"),e.addParam("r","i32"),e.addLocal("np32","i64"),e.addLocal("c","i64"),e.addLocal("m","i64");const o=e.getCodeBuilder(),n=Number(0x100000000n-bt(i,0x100000000n));e.addCode(o.setLocal("np32",o.i64_const(n)));for(let t=0;t=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(f))),[f,h]=[h,f],a.addCode(e.setLocal(h,e.i64_shr_u(e.getLocal(f),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(f))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(h)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32"),a.addLocal("c0","i64"),a.addLocal("c1","i64"),a.addLocal("c0_old","i64"),a.addLocal("c1_old","i64"),a.addLocal("np32","i64");for(let t=0;t>1&&o>1,t>>1)))),a.addCode(e.setLocal(f,e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(g,e.i64_add(e.i64_and(e.getLocal(g),e.i64_const(4294967295)),e.i64_and(e.getLocal(h),e.i64_const(4294967295))))),a.addCode(e.setLocal(f,e.i64_add(e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32))),e.getLocal(p)))));for(let o=Math.max(1,t-l+1);o<=t&&o=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(g))),a.addCode(e.setLocal(h,e.getLocal(f)),e.setLocal(p,e.i64_shr_u(e.getLocal(h),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(h))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(p)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.i32_const(u),e.getLocal("r")))}(),function(){const a=t.alloc(2*c),e=t.addFunction(s+"_fromMontgomery");e.addParam("x","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(r+"_copy",o.getLocal("x"),o.i32_const(a))),e.addCode(o.call(r+"_zero",o.i32_const(a+c))),e.addCode(o.call(s+"_mReduct",o.i32_const(a),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.call(r+"_gte",o,e.i32_const(L)))}(),function(){const a=t.addFunction(s+"_sign");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(r+"_isZero",e.getLocal("x")),e.ret(e.i32_const(0))),e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.if(e.call(r+"_gte",o,e.i32_const(L)),e.ret(e.i32_const(-1))),e.ret(e.i32_const(1)))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),e.getLocal("r"))),a.addCode(e.call(r+"_inverseMod",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),a.addCode(e.call(s+"_toMontgomery",e.getLocal("r"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_one");a.addParam("pr","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_copy",e.i32_const(_),e.getLocal("pr")))}(),function(){const a=t.addFunction(s+"_load");a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32"),a.addLocal("p","i32"),a.addLocal("l","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c)),i=t.alloc(c),n=e.i32_const(i);a.addCode(e.call(r+"_zero",e.getLocal("r")),e.setLocal("i",e.i32_const(c)),e.setLocal("p",e.getLocal("scalar")),e.block(e.loop(e.br_if(1,e.i32_gt_u(e.getLocal("i"),e.getLocal("scalarLen"))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",e.getLocal("p"),o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(c))),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(c))),e.br(0))),e.setLocal("l",e.i32_rem_u(e.getLocal("scalarLen"),e.i32_const(c))),e.if(e.i32_eqz(e.getLocal("l")),e.ret([])),e.call(r+"_zero",n),e.setLocal("j",e.i32_const(0)),e.block(e.loop(e.br_if(1,e.i32_eq(e.getLocal("j"),e.getLocal("l"))),e.i32_store8(e.getLocal("j"),i,e.i32_load8_u(e.getLocal("p"))),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(1))),e.setLocal("j",e.i32_add(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",n,o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_load",e.getLocal("scalar"),e.getLocal("scalarLen"),o),e.call(s+"_toMontgomery",o,o),e.call(s+"_mul",e.getLocal("x"),o,e.getLocal("r")))}(),ht(t,s),pt(t,s+"_batchToMontgomery",s+"_toMontgomery",c,c),pt(t,s+"_batchFromMontgomery",s+"_fromMontgomery",c,c),pt(t,s+"_batchNeg",s+"_neg",c,c),mt(t,s+"_batchAdd",s+"_add",c,c),mt(t,s+"_batchSub",s+"_sub",c,c),mt(t,s+"_batchMul",s+"_mul",c,c),t.exportFunction(s+"_add"),t.exportFunction(s+"_sub"),t.exportFunction(s+"_neg"),t.exportFunction(s+"_isNegative"),t.exportFunction(s+"_isOne"),t.exportFunction(s+"_sign"),t.exportFunction(s+"_mReduct"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_squareOld"),t.exportFunction(s+"_fromMontgomery"),t.exportFunction(s+"_toMontgomery"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_one"),t.exportFunction(s+"_load"),t.exportFunction(s+"_timesScalar"),ft(t,s+"_exp",c,s+"_mul",s+"_square",r+"_copy",s+"_one"),t.exportFunction(s+"_exp"),t.exportFunction(s+"_batchInverse"),yt(i)&&(!function(){const a=t.addFunction(s+"_sqrt");a.addParam("n","i32"),a.addParam("r","i32"),a.addLocal("m","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c)),n=e.i32_const(t.alloc(c)),l=e.i32_const(t.alloc(c)),r=e.i32_const(t.alloc(c)),d=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.call(s+"_zero",e.getLocal("r")))),e.setLocal("m",e.i32_const(w)),e.call(s+"_copy",e.i32_const(F),i),e.call(s+"_exp",e.getLocal("n"),e.i32_const(A),e.i32_const(c),n),e.call(s+"_exp",e.getLocal("n"),e.i32_const(I),e.i32_const(c),l),e.block(e.loop(e.br_if(1,e.call(s+"_eq",n,o)),e.call(s+"_square",n,r),e.setLocal("i",e.i32_const(1)),e.block(e.loop(e.br_if(1,e.call(s+"_eq",r,o)),e.call(s+"_square",r,r),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(1))),e.br(0))),e.call(s+"_copy",i,d),e.setLocal("j",e.i32_sub(e.i32_sub(e.getLocal("m"),e.getLocal("i")),e.i32_const(1))),e.block(e.loop(e.br_if(1,e.i32_eqz(e.getLocal("j"))),e.call(s+"_square",d,d),e.setLocal("j",e.i32_sub(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.setLocal("m",e.getLocal("i")),e.call(s+"_square",d,i),e.call(s+"_mul",n,i,n),e.call(s+"_mul",l,d,l),e.br(0))),e.if(e.call(s+"_isNegative",l),e.call(s+"_neg",l,e.getLocal("r")),e.call(s+"_copy",l,e.getLocal("r"))))}(),function(){const a=t.addFunction(s+"_isSquare");a.addParam("n","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.i32_const(1))),e.call(s+"_exp",e.getLocal("n"),e.i32_const(p),e.i32_const(c),i),e.call(s+"_eq",i,o))}(),t.exportFunction(s+"_sqrt"),t.exportFunction(s+"_isSquare")),t.exportFunction(s+"_batchToMontgomery"),t.exportFunction(s+"_batchFromMontgomery"),s};const xt=Ft,{bitLength:It}=J;var Bt=function(t,a,e,o,i){const n=BigInt(a),l=Math.floor((It(n-1n)-1)/64)+1,c=8*l,s=e||"f1";if(t.modules[s])return s;t.modules[s]={n64:l};const r=i||"int",d=xt(t,n,o,r),u=t.modules[d].pR2,_=t.modules[d].pq,g=t.modules[d].pePlusOne;return function(){const a=t.alloc(c),e=t.addFunction(s+"_mul");e.addParam("x","i32"),e.addParam("y","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(d+"_mul",o.getLocal("x"),o.getLocal("y"),o.i32_const(a))),e.addCode(o.call(d+"_mul",o.i32_const(a),o.i32_const(u),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_inverseMod",e.getLocal("x"),e.i32_const(_),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_gte",e.getLocal("x"),e.i32_const(g)))}(),t.exportFunction(d+"_add",s+"_add"),t.exportFunction(d+"_sub",s+"_sub"),t.exportFunction(d+"_neg",s+"_neg"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_isNegative"),t.exportFunction(d+"_copy",s+"_copy"),t.exportFunction(d+"_zero",s+"_zero"),t.exportFunction(d+"_one",s+"_one"),t.exportFunction(d+"_isZero",s+"_isZero"),t.exportFunction(d+"_eq",s+"_eq"),s};const Et=H,vt=Z,St=K;var Pt=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64,n=t.modules[o].q;return t.modules[e]={n64:2*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.ret(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_copy",c,r))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("y"),d=l.i32_add(l.getLocal("y"),l.i32_const(i)),u=l.getLocal("r"),_=l.i32_add(l.getLocal("r"),l.i32_const(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,r,g),l.call(o+"_mul",s,d,f),l.call(o+"_add",c,s,h),l.call(o+"_add",r,d,p),l.call(o+"_mul",h,p,h),l.call(a,f,u),l.call(o+"_add",g,u,u),l.call(o+"_add",g,f,_),l.call(o+"_sub",h,_,_))}(),function(){const a=t.addFunction(e+"_mul1");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_mul",l,s,r),n.call(o+"_mul",c,s,d))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,s,u),l.call(o+"_add",c,s,_),l.call(a,s,g),l.call(o+"_add",c,g,g),l.call(a,u,f),l.call(o+"_add",f,u,f),l.call(o+"_mul",_,g,r),l.call(o+"_sub",r,f,r),l.call(o+"_add",u,u,d))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_add",l,s,d),n.call(o+"_add",c,r,u))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_sub",l,s,d),n.call(o+"_sub",c,r,u))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_neg",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_conjugate");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_toMontgomery",l,s),n.call(o+"_toMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_fromMontgomery",l,s),n.call(o+"_fromMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_eq",l,s),n.call(o+"_eq",c,r)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,u),l.call(o+"_square",s,_),l.call(a,_,g),l.call(o+"_sub",u,g,g),l.call(o+"_inverse",g,f),l.call(o+"_mul",c,f,r),l.call(o+"_mul",s,f,d),l.call(o+"_neg",d,d))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),s),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),r))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l))),n.ret(n.call(o+"_isNegative",c)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_mul1"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_conjugate"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),vt(t,e),Et(t,e+"_exp",2*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),function(){const a=t.addFunction(e+"_sqrt");a.addParam("a","i32"),a.addParam("pr","i32");const l=a.getCodeBuilder(),c=l.i32_const(t.alloc(St.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),s=l.i32_const(t.alloc(St.bigInt2BytesLE((BigInt(n||0)-1n)/2n,i))),r=l.getLocal("a"),d=l.i32_const(t.alloc(2*i)),u=l.i32_const(t.alloc(2*i)),_=l.i32_const(t.alloc(2*i)),g=t.alloc(2*i),f=l.i32_const(g),h=l.i32_const(g),p=l.i32_const(g+i),m=l.i32_const(t.alloc(2*i)),L=l.i32_const(t.alloc(2*i));a.addCode(l.call(e+"_one",f),l.call(e+"_neg",f,f),l.call(e+"_exp",r,c,l.i32_const(i),d),l.call(e+"_square",d,u),l.call(e+"_mul",r,u,u),l.call(e+"_conjugate",u,_),l.call(e+"_mul",_,u,_),l.if(l.call(e+"_eq",_,f),l.unreachable()),l.call(e+"_mul",d,r,m),l.if(l.call(e+"_eq",u,f),[...l.call(o+"_zero",h),...l.call(o+"_one",p),...l.call(e+"_mul",f,m,l.getLocal("pr"))],[...l.call(e+"_one",L),...l.call(e+"_add",L,u,L),...l.call(e+"_exp",L,s,l.i32_const(i),L),...l.call(e+"_mul",L,m,l.getLocal("pr"))]))}(),function(){const a=t.addFunction(e+"_isSquare");a.addParam("a","i32"),a.setReturnType("i32");const o=a.getCodeBuilder(),l=o.i32_const(t.alloc(St.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),c=o.getLocal("a"),s=o.i32_const(t.alloc(2*i)),r=o.i32_const(t.alloc(2*i)),d=o.i32_const(t.alloc(2*i)),u=t.alloc(2*i),_=o.i32_const(u);a.addCode(o.call(e+"_one",_),o.call(e+"_neg",_,_),o.call(e+"_exp",c,l,o.i32_const(i),s),o.call(e+"_square",s,r),o.call(e+"_mul",c,r,r),o.call(e+"_conjugate",r,d),o.call(e+"_mul",d,r,d),o.if(o.call(e+"_eq",d,_),o.ret(o.i32_const(0))),o.ret(o.i32_const(1)))}(),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_sqrt"),t.exportFunction(e+"_isSquare"),t.exportFunction(e+"_isNegative"),e};const qt=H,Ot=Z;var Gt=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64;return t.modules[e]={n64:3*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.ret(n.i32_and(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_copy",l,r),n.call(o+"_copy",c,d),n.call(o+"_copy",s,u))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("y"),u=l.i32_add(l.getLocal("y"),l.i32_const(i)),_=l.i32_add(l.getLocal("y"),l.i32_const(2*i)),g=l.getLocal("r"),f=l.i32_add(l.getLocal("r"),l.i32_const(i)),h=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i)),F=l.i32_const(t.alloc(i)),x=l.i32_const(t.alloc(i)),I=l.i32_const(t.alloc(i)),B=l.i32_const(t.alloc(i)),E=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,d,p),l.call(o+"_mul",s,u,m),l.call(o+"_mul",r,_,L),l.call(o+"_add",c,s,b),l.call(o+"_add",d,u,w),l.call(o+"_add",c,r,y),l.call(o+"_add",d,_,A),l.call(o+"_add",s,r,C),l.call(o+"_add",u,_,F),l.call(o+"_add",p,m,x),l.call(o+"_add",p,L,I),l.call(o+"_add",m,L,B),l.call(o+"_mul",C,F,g),l.call(o+"_sub",g,B,g),l.call(a,g,g),l.call(o+"_add",p,g,g),l.call(o+"_mul",b,w,f),l.call(o+"_sub",f,x,f),l.call(a,L,E),l.call(o+"_add",f,E,f),l.call(o+"_mul",y,A,h),l.call(o+"_sub",h,I,h),l.call(o+"_add",h,m,h))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_mul",c,s,f),l.call(o+"_add",f,f,h),l.call(o+"_sub",c,s,p),l.call(o+"_add",p,r,p),l.call(o+"_square",p,p),l.call(o+"_mul",s,r,m),l.call(o+"_add",m,m,L),l.call(o+"_square",r,b),l.call(a,L,d),l.call(o+"_add",g,d,d),l.call(a,b,u),l.call(o+"_add",h,u,u),l.call(o+"_add",g,b,_),l.call(o+"_sub",L,_,_),l.call(o+"_add",p,_,_),l.call(o+"_add",h,_,_))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_add",l,r,_),n.call(o+"_add",c,d,g),n.call(o+"_add",s,u,f))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_sub",l,r,_),n.call(o+"_sub",c,d,g),n.call(o+"_sub",s,u,f))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_neg",l,r),n.call(o+"_neg",c,d),n.call(o+"_neg",s,u))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.setLocal("s",n.call(o+"_sign",s)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_toMontgomery",l,r),n.call(o+"_toMontgomery",c,d),n.call(o+"_toMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_fromMontgomery",l,r),n.call(o+"_fromMontgomery",c,d),n.call(o+"_fromMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_eq",l,r),n.call(o+"_eq",c,d)),n.call(o+"_eq",s,u)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_square",s,f),l.call(o+"_square",r,h),l.call(o+"_mul",c,s,p),l.call(o+"_mul",c,r,m),l.call(o+"_mul",s,r,L),l.call(a,L,b),l.call(o+"_sub",g,b,b),l.call(a,h,w),l.call(o+"_sub",w,p,w),l.call(o+"_sub",f,m,y),l.call(o+"_mul",r,w,A),l.call(o+"_mul",s,y,C),l.call(o+"_add",A,C,A),l.call(a,A,A),l.call(o+"_mul",c,b,C),l.call(o+"_add",C,A,A),l.call(o+"_inverse",A,A),l.call(o+"_mul",A,b,d),l.call(o+"_mul",A,w,u),l.call(o+"_mul",A,y,_))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),r),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),d),n.call(o+"_timesScalar",s,n.getLocal("scalar"),n.getLocal("scalarLen"),u))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.if(n.call(o+"_isZero",s),n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l)),n.ret(n.call(o+"_isNegative",c)))),n.ret(n.call(o+"_isNegative",s)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),Ot(t,e),qt(t,e+"_exp",3*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_isNegative"),e};const zt=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("base","i32"),s.addParam("scalar","i32"),s.addParam("scalarLength","i32"),s.addParam("r","i32"),s.addLocal("old0","i32"),s.addLocal("nbits","i32"),s.addLocal("i","i32"),s.addLocal("last","i32"),s.addLocal("cur","i32"),s.addLocal("carry","i32"),s.addLocal("p","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(e));function u(t){return r.i32_and(r.i32_shr_u(r.i32_load(r.i32_add(r.getLocal("scalar"),r.i32_and(r.i32_shr_u(t,r.i32_const(3)),r.i32_const(4294967292)))),r.i32_and(t,r.i32_const(31))),r.i32_const(1))}function _(t){return[...r.i32_store8(r.getLocal("p"),r.i32_const(t)),...r.setLocal("p",r.i32_add(r.getLocal("p"),r.i32_const(1)))]}s.addCode(r.if(r.i32_eqz(r.getLocal("scalarLength")),[...r.call(c,r.getLocal("r")),...r.ret([])]),r.setLocal("nbits",r.i32_shl(r.getLocal("scalarLength"),r.i32_const(3))),r.setLocal("old0",r.i32_load(r.i32_const(0))),r.setLocal("p",r.getLocal("old0")),r.i32_store(r.i32_const(0),r.i32_and(r.i32_add(r.i32_add(r.getLocal("old0"),r.i32_const(32)),r.getLocal("nbits")),r.i32_const(4294967288))),r.setLocal("i",r.i32_const(1)),r.setLocal("last",u(r.i32_const(0))),r.setLocal("carry",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("nbits"))),r.setLocal("cur",u(r.getLocal("i"))),r.if(r.getLocal("last"),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(1)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(1)])),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(0)],[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(0)]))),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0))),r.if(r.getLocal("last"),r.if(r.getLocal("carry"),[..._(255),..._(0),..._(1)],[..._(1)]),r.if(r.getLocal("carry"),[..._(0),..._(1)])),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.call(l,r.getLocal("base"),d),r.call(c,r.getLocal("r")),r.block(r.loop(r.call(i,r.getLocal("r"),r.getLocal("r")),r.setLocal("cur",r.i32_load8_u(r.getLocal("p"))),r.if(r.getLocal("cur"),r.if(r.i32_eq(r.getLocal("cur"),r.i32_const(1)),r.call(o,r.getLocal("r"),d,r.getLocal("r")),r.call(n,r.getLocal("r"),d,r.getLocal("r")))),r.br_if(1,r.i32_eq(r.getLocal("old0"),r.getLocal("p"))),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.br(0))),r.i32_store(r.i32_const(0),r.getLocal("old0")))},Tt=W,Mt=function(t,a,e,o,i){const n=8*t.modules[a].n64;function l(){const o=t.addFunction(e);o.addParam("pBases","i32"),o.addParam("pScalars","i32"),o.addParam("scalarSize","i32"),o.addParam("n","i32"),o.addParam("pr","i32"),o.addLocal("chunkSize","i32"),o.addLocal("nChunks","i32"),o.addLocal("itScalar","i32"),o.addLocal("endScalar","i32"),o.addLocal("itBase","i32"),o.addLocal("itBit","i32"),o.addLocal("i","i32"),o.addLocal("j","i32"),o.addLocal("nTable","i32"),o.addLocal("pTable","i32"),o.addLocal("idx","i32"),o.addLocal("pIdxTable","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n)),c=t.alloc([17,17,17,17,17,17,17,17,17,17,16,16,15,14,13,13,12,11,10,9,8,7,7,6,5,4,3,2,1,1,1,1]);o.addCode(i.call(a+"_zero",i.getLocal("pr")),i.if(i.i32_eqz(i.getLocal("n")),i.ret([])),i.setLocal("chunkSize",i.i32_load8_u(i.i32_clz(i.getLocal("n")),c)),i.setLocal("nChunks",i.i32_add(i.i32_div_u(i.i32_sub(i.i32_shl(i.getLocal("scalarSize"),i.i32_const(3)),i.i32_const(1)),i.getLocal("chunkSize")),i.i32_const(1))),i.setLocal("itBit",i.i32_mul(i.i32_sub(i.getLocal("nChunks"),i.i32_const(1)),i.getLocal("chunkSize"))),i.block(i.loop(i.br_if(1,i.i32_lt_s(i.getLocal("itBit"),i.i32_const(0))),i.if(i.i32_eqz(i.call(a+"_isZero",i.getLocal("pr"))),[...i.setLocal("j",i.i32_const(0)),...i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("j"),i.getLocal("chunkSize"))),i.call(a+"_double",i.getLocal("pr"),i.getLocal("pr")),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0)))]),i.call(e+"_chunk",i.getLocal("pBases"),i.getLocal("pScalars"),i.getLocal("scalarSize"),i.getLocal("n"),i.getLocal("itBit"),i.getLocal("chunkSize"),l),i.call(a+"_add",i.getLocal("pr"),l,i.getLocal("pr")),i.setLocal("itBit",i.i32_sub(i.getLocal("itBit"),i.getLocal("chunkSize"))),i.br(0))))}!function(){const a=t.addFunction(e+"_getChunk");a.addParam("pScalar","i32"),a.addParam("scalarSize","i32"),a.addParam("startBit","i32"),a.addParam("chunkSize","i32"),a.addLocal("bitsToEnd","i32"),a.addLocal("mask","i32"),a.setReturnType("i32");const o=a.getCodeBuilder();a.addCode(o.setLocal("bitsToEnd",o.i32_sub(o.i32_mul(o.getLocal("scalarSize"),o.i32_const(8)),o.getLocal("startBit"))),o.if(o.i32_gt_s(o.getLocal("chunkSize"),o.getLocal("bitsToEnd")),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("bitsToEnd")),o.i32_const(1))),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("chunkSize")),o.i32_const(1)))),o.i32_and(o.i32_shr_u(o.i32_load(o.i32_add(o.getLocal("pScalar"),o.i32_shr_u(o.getLocal("startBit"),o.i32_const(3))),0,0),o.i32_and(o.getLocal("startBit"),o.i32_const(7))),o.getLocal("mask")))}(),function(){const o=t.addFunction(e+"_reduceTable");o.addParam("pTable","i32"),o.addParam("p","i32"),o.addLocal("half","i32"),o.addLocal("it1","i32"),o.addLocal("it2","i32"),o.addLocal("pAcc","i32");const i=o.getCodeBuilder();o.addCode(i.if(i.i32_eq(i.getLocal("p"),i.i32_const(1)),i.ret([])),i.setLocal("half",i.i32_shl(i.i32_const(1),i.i32_sub(i.getLocal("p"),i.i32_const(1)))),i.setLocal("it1",i.getLocal("pTable")),i.setLocal("it2",i.i32_add(i.getLocal("pTable"),i.i32_mul(i.getLocal("half"),i.i32_const(n)))),i.setLocal("pAcc",i.i32_sub(i.getLocal("it2"),i.i32_const(n))),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("it1"),i.getLocal("pAcc"))),i.call(a+"_add",i.getLocal("it1"),i.getLocal("it2"),i.getLocal("it1")),i.call(a+"_add",i.getLocal("pAcc"),i.getLocal("it2"),i.getLocal("pAcc")),i.setLocal("it1",i.i32_add(i.getLocal("it1"),i.i32_const(n))),i.setLocal("it2",i.i32_add(i.getLocal("it2"),i.i32_const(n))),i.br(0))),i.call(e+"_reduceTable",i.getLocal("pTable"),i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("p"))),i.call(a+"_double",i.getLocal("pAcc"),i.getLocal("pAcc")),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.br(0))),i.call(a+"_add",i.getLocal("pTable"),i.getLocal("pAcc"),i.getLocal("pTable")))}(),function(){const l=t.addFunction(e+"_chunk");l.addParam("pBases","i32"),l.addParam("pScalars","i32"),l.addParam("scalarSize","i32"),l.addParam("n","i32"),l.addParam("startBit","i32"),l.addParam("chunkSize","i32"),l.addParam("pr","i32"),l.addLocal("nChunks","i32"),l.addLocal("itScalar","i32"),l.addLocal("endScalar","i32"),l.addLocal("itBase","i32"),l.addLocal("i","i32"),l.addLocal("j","i32"),l.addLocal("nTable","i32"),l.addLocal("pTable","i32"),l.addLocal("idx","i32"),l.addLocal("pIdxTable","i32");const c=l.getCodeBuilder();l.addCode(c.if(c.i32_eqz(c.getLocal("n")),[...c.call(a+"_zero",c.getLocal("pr")),...c.ret([])]),c.setLocal("nTable",c.i32_shl(c.i32_const(1),c.getLocal("chunkSize"))),c.setLocal("pTable",c.i32_load(c.i32_const(0))),c.i32_store(c.i32_const(0),c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("nTable"),c.i32_const(n)))),c.setLocal("j",c.i32_const(0)),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("j"),c.getLocal("nTable"))),c.call(a+"_zero",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("j"),c.i32_const(n)))),c.setLocal("j",c.i32_add(c.getLocal("j"),c.i32_const(1))),c.br(0))),c.setLocal("itBase",c.getLocal("pBases")),c.setLocal("itScalar",c.getLocal("pScalars")),c.setLocal("endScalar",c.i32_add(c.getLocal("pScalars"),c.i32_mul(c.getLocal("n"),c.getLocal("scalarSize")))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("itScalar"),c.getLocal("endScalar"))),c.setLocal("idx",c.call(e+"_getChunk",c.getLocal("itScalar"),c.getLocal("scalarSize"),c.getLocal("startBit"),c.getLocal("chunkSize"))),c.if(c.getLocal("idx"),[...c.setLocal("pIdxTable",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.i32_sub(c.getLocal("idx"),c.i32_const(1)),c.i32_const(n)))),...c.call(o,c.getLocal("pIdxTable"),c.getLocal("itBase"),c.getLocal("pIdxTable"))]),c.setLocal("itScalar",c.i32_add(c.getLocal("itScalar"),c.getLocal("scalarSize"))),c.setLocal("itBase",c.i32_add(c.getLocal("itBase"),c.i32_const(i))),c.br(0))),c.call(e+"_reduceTable",c.getLocal("pTable"),c.getLocal("chunkSize")),c.call(a+"_copy",c.getLocal("pTable"),c.getLocal("pr")),c.i32_store(c.i32_const(0),c.getLocal("pTable")))}(),l(),t.exportFunction(e),t.exportFunction(e+"_chunk")};var Ut=function(t,a,e,o){const i=t.modules[e].n64,n=8*i;if(t.modules[a])return a;return t.modules[a]={n64:3*i},function(){const o=t.addFunction(a+"_isZeroAffine");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.i32_and(i.call(e+"_isZero",i.getLocal("p1")),i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(n)))))}(),function(){const o=t.addFunction(a+"_isZero");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))))}(),function(){const o=t.addFunction(a+"_zeroAffine");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(n))))}(),function(){const o=t.addFunction(a+"_zero");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(n)))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))))}(),function(){const e=t.addFunction(a+"_copyAffine");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<2*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const e=t.addFunction(a+"_copy");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<3*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const o=t.addFunction(a+"_toJacobian");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_one",d),...i.call(e+"_copy",c,r),...i.call(e+"_copy",l,s)]))}(),function(){const o=t.addFunction(a+"_eqAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder();o.addCode(i.ret(i.i32_and(i.call(e+"_eq",i.getLocal("p1"),i.getLocal("p2")),i.call(e+"_eq",i.i32_add(i.getLocal("p1"),i.i32_const(n)),i.i32_add(i.getLocal("p2"),i.i32_const(n))))))}(),function(){const o=t.addFunction(a+"_eqMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZeroAffine",i.getLocal("p2")))),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqAffine",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,u),i.call(e+"_mul",r,u,_),i.call(e+"_mul",s,u,g),i.call(e+"_mul",d,g,f),i.if(i.call(e+"_eq",l,_),i.if(i.call(e+"_eq",c,f),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_eq");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZero",i.getLocal("p2")))),i.if(i.call(a+"_isZero",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqMixed",i.getLocal("p2"),i.getLocal("p1")))),i.if(i.call(e+"_isOne",u),i.ret(i.call(a+"_eqMixed",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,_),i.call(e+"_square",u,g),i.call(e+"_mul",l,g,f),i.call(e+"_mul",r,_,h),i.call(e+"_mul",s,_,p),i.call(e+"_mul",u,g,m),i.call(e+"_mul",c,m,L),i.call(e+"_mul",d,p,b),i.if(i.call(e+"_eq",f,h),i.if(i.call(e+"_eq",L,b),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_doubleAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_toJacobian",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.call(e+"_square",l,u),i.call(e+"_square",c,_),i.call(e+"_square",_,g),i.call(e+"_add",l,_,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,u,f),i.call(e+"_sub",f,g,f),i.call(e+"_add",f,f,f),i.call(e+"_add",u,u,h),i.call(e+"_add",h,u,h),i.call(e+"_add",c,c,d),i.call(e+"_square",h,s),i.call(e+"_sub",s,f,s),i.call(e+"_sub",s,f,s),i.call(e+"_add",g,g,p),i.call(e+"_add",p,p,p),i.call(e+"_add",p,p,p),i.call(e+"_sub",f,s,r),i.call(e+"_mul",r,h,r),i.call(e+"_sub",r,p,r))}(),function(){const o=t.addFunction(a+"_double");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.ret(i.call(a+"_doubleAffine",i.getLocal("p1"),i.getLocal("pr"))),...i.ret([])]),i.call(e+"_square",l,_),i.call(e+"_square",c,g),i.call(e+"_square",g,f),i.call(e+"_add",l,g,h),i.call(e+"_square",h,h),i.call(e+"_sub",h,_,h),i.call(e+"_sub",h,f,h),i.call(e+"_add",h,h,h),i.call(e+"_add",_,_,p),i.call(e+"_add",p,_,p),i.call(e+"_square",p,m),i.call(e+"_mul",c,s,L),i.call(e+"_add",h,h,r),i.call(e+"_sub",m,r,r),i.call(e+"_add",f,f,b),i.call(e+"_add",b,b,b),i.call(e+"_add",b,b,b),i.call(e+"_sub",h,r,d),i.call(e+"_mul",d,p,d),i.call(e+"_sub",d,b,d),i.call(e+"_add",L,L,u))}(),function(){const o=t.addFunction(a+"_addAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("p2"),r=i.i32_add(i.getLocal("p2"),i.i32_const(n)),d=i.getLocal("pr"),u=i.i32_add(i.getLocal("pr"),i.i32_const(n)),_=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copyAffine",i.getLocal("p1"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(e+"_eq",l,s),i.if(i.call(e+"_eq",c,r),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",s,l,g),i.call(e+"_sub",r,c,h),i.call(e+"_square",g,f),i.call(e+"_add",f,f,p),i.call(e+"_add",p,p,p),i.call(e+"_mul",g,p,m),i.call(e+"_add",h,h,L),i.call(e+"_mul",l,p,w),i.call(e+"_square",L,b),i.call(e+"_add",w,w,y),i.call(e+"_sub",b,m,d),i.call(e+"_sub",d,y,d),i.call(e+"_mul",c,m,A),i.call(e+"_add",A,A,A),i.call(e+"_sub",w,d,u),i.call(e+"_mul",u,L,u),i.call(e+"_sub",u,A,u),i.call(e+"_add",g,g,_))}(),function(){const o=t.addFunction(a+"_addMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.getLocal("pr"),_=i.i32_add(i.getLocal("pr"),i.i32_const(n)),g=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addAffine",l,r,u),...i.ret([])]),i.call(e+"_square",s,f),i.call(e+"_mul",r,f,h),i.call(e+"_mul",s,f,p),i.call(e+"_mul",d,p,m),i.if(i.call(e+"_eq",l,h),i.if(i.call(e+"_eq",c,m),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",h,l,L),i.call(e+"_sub",m,c,w),i.call(e+"_square",L,b),i.call(e+"_add",b,b,y),i.call(e+"_add",y,y,y),i.call(e+"_mul",L,y,A),i.call(e+"_add",w,w,C),i.call(e+"_mul",l,y,x),i.call(e+"_square",C,F),i.call(e+"_add",x,x,I),i.call(e+"_sub",F,A,u),i.call(e+"_sub",u,I,u),i.call(e+"_mul",c,A,B),i.call(e+"_add",B,B,B),i.call(e+"_sub",x,u,_),i.call(e+"_mul",_,C,_),i.call(e+"_sub",_,B,_),i.call(e+"_add",s,L,g),i.call(e+"_square",g,g),i.call(e+"_sub",g,f,g),i.call(e+"_sub",g,b,g))}(),function(){const o=t.addFunction(a+"_add");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.getLocal("pr"),g=i.i32_add(i.getLocal("pr"),i.i32_const(n)),f=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n)),E=i.i32_const(t.alloc(n)),v=i.i32_const(t.alloc(n)),S=i.i32_const(t.alloc(n)),P=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(a+"_isZero",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addMixed",r,l,_),...i.ret([])]),i.if(i.call(e+"_isOne",u),[...i.call(a+"_addMixed",l,r,_),...i.ret([])]),i.call(e+"_square",s,h),i.call(e+"_square",u,p),i.call(e+"_mul",l,p,m),i.call(e+"_mul",r,h,L),i.call(e+"_mul",s,h,b),i.call(e+"_mul",u,p,w),i.call(e+"_mul",c,w,y),i.call(e+"_mul",d,b,A),i.if(i.call(e+"_eq",m,L),i.if(i.call(e+"_eq",y,A),[...i.call(a+"_double",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",L,m,C),i.call(e+"_sub",A,y,F),i.call(e+"_add",C,C,x),i.call(e+"_square",x,x),i.call(e+"_mul",C,x,I),i.call(e+"_add",F,F,B),i.call(e+"_mul",m,x,v),i.call(e+"_square",B,E),i.call(e+"_add",v,v,S),i.call(e+"_sub",E,I,_),i.call(e+"_sub",_,S,_),i.call(e+"_mul",y,I,P),i.call(e+"_add",P,P,P),i.call(e+"_sub",v,_,g),i.call(e+"_mul",g,B,g),i.call(e+"_sub",g,P,g),i.call(e+"_add",s,u,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,h,f),i.call(e+"_sub",f,p,f),i.call(e+"_mul",f,C,f))}(),function(){const o=t.addFunction(a+"_negAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n));o.addCode(i.call(e+"_copy",l,s),i.call(e+"_neg",c,r))}(),function(){const o=t.addFunction(a+"_neg");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.call(e+"_copy",l,r),i.call(e+"_neg",c,d),i.call(e+"_copy",s,u))}(),function(){const e=t.addFunction(a+"_subAffine");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addAffine",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_subMixed");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addMixed",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_sub");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_neg",o.getLocal("p2"),i),o.call(a+"_add",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const o=t.addFunction(a+"_fromMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_fromMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(e+"_zero",r),...i.call(e+"_zero",d)],[...i.call(e+"_inverse",s,u),...i.call(e+"_square",u,_),...i.call(e+"_mul",u,_,g),...i.call(e+"_mul",l,_,r),...i.call(e+"_mul",c,g,d)]))}(),function(){const i=t.addFunction(a+"_inCurveAffine");i.addParam("pIn","i32"),i.setReturnType("i32");const l=i.getCodeBuilder(),c=l.getLocal("pIn"),s=l.i32_add(l.getLocal("pIn"),l.i32_const(n)),r=l.i32_const(t.alloc(n)),d=l.i32_const(t.alloc(n));i.addCode(l.call(e+"_square",s,r),l.call(e+"_square",c,d),l.call(e+"_mul",c,d,d),l.call(e+"_add",d,l.i32_const(o),d),l.ret(l.call(e+"_eq",r,d)))}(),function(){const e=t.addFunction(a+"_inCurve");e.addParam("pIn","i32"),e.setReturnType("i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(2*n));e.addCode(o.call(a+"_toAffine",o.getLocal("pIn"),i),o.ret(o.call(a+"_inCurveAffine",i)))}(),function(){const o=t.addFunction(a+"_batchToAffine");o.addParam("pIn","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addLocal("pAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itAux","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.setLocal("pAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("pAux"),i.i32_mul(i.getLocal("n"),i.i32_const(n)))),i.call(e+"_batchInverse",i.i32_add(i.getLocal("pIn"),i.i32_const(2*n)),i.i32_const(3*n),i.getLocal("n"),i.getLocal("pAux"),i.i32_const(n)),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.getLocal("pAux")),i.setLocal("itOut",i.getLocal("pOut")),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(e+"_isZero",i.getLocal("itAux")),[...i.call(e+"_zero",i.getLocal("itOut")),...i.call(e+"_zero",i.i32_add(i.getLocal("itOut"),i.i32_const(n)))],[...i.call(e+"_mul",i.getLocal("itAux"),i.i32_add(i.getLocal("itIn"),i.i32_const(n)),l),...i.call(e+"_square",i.getLocal("itAux"),i.getLocal("itAux")),...i.call(e+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.getLocal("itOut")),...i.call(e+"_mul",i.getLocal("itAux"),l,i.i32_add(i.getLocal("itOut"),i.i32_const(n)))]),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.i32_const(3*n))),i.setLocal("itOut",i.i32_add(i.getLocal("itOut"),i.i32_const(2*n))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.i32_store(i.i32_const(0),i.getLocal("pAux")))}(),function(){const o=t.addFunction(a+"_normalize");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_inverse",s,_),...i.call(e+"_square",_,g),...i.call(e+"_mul",_,g,f),...i.call(e+"_mul",l,g,r),...i.call(e+"_mul",c,f,d),...i.call(e+"_one",u)]))}(),function(){const e=t.addFunction(a+"__reverseBytes");e.addParam("pIn","i32"),e.addParam("n","i32"),e.addParam("pOut","i32"),e.addLocal("itOut","i32"),e.addLocal("itIn","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("itOut",o.i32_sub(o.i32_add(o.getLocal("pOut"),o.getLocal("n")),o.i32_const(1))),o.setLocal("itIn",o.getLocal("pIn")),o.block(o.loop(o.br_if(1,o.i32_lt_s(o.getLocal("itOut"),o.getLocal("pOut"))),o.i32_store8(o.getLocal("itOut"),o.i32_load8_u(o.getLocal("itIn"))),o.setLocal("itOut",o.i32_sub(o.getLocal("itOut"),o.i32_const(1))),o.setLocal("itIn",o.i32_add(o.getLocal("itIn"),o.i32_const(1))),o.br(0))))}(),function(){const e=t.addFunction(a+"_LEMtoU");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.call(a+"_isZeroAffine",o.getLocal("pIn")),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.ret([])]),o.call(a+"_fromMontgomeryAffine",o.getLocal("pIn"),l),o.call(a+"__reverseBytes",c,o.i32_const(n),o.getLocal("pOut")),o.call(a+"__reverseBytes",s,o.i32_const(n),o.i32_add(o.getLocal("pOut"),o.i32_const(n))))}(),function(){const o=t.addFunction(a+"_LEMtoC");o.addParam("pIn","i32"),o.addParam("pOut","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("pIn")),[...i.call(e+"_zero",i.getLocal("pOut")),...i.i32_store8(i.getLocal("pOut"),i.i32_const(64)),...i.ret([])]),i.call(e+"_fromMontgomery",i.getLocal("pIn"),l),i.call(a+"__reverseBytes",l,i.i32_const(n),i.getLocal("pOut")),i.if(i.i32_eq(i.call(e+"_sign",i.i32_add(i.getLocal("pIn"),i.i32_const(n))),i.i32_const(-1)),i.i32_store8(i.getLocal("pOut"),i.i32_or(i.i32_load8_u(i.getLocal("pOut")),i.i32_const(128)))))}(),function(){const e=t.addFunction(a+"_UtoLEM");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.i32_and(o.i32_load8_u(o.getLocal("pIn")),o.i32_const(64)),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.ret([])]),o.call(a+"__reverseBytes",o.getLocal("pIn"),o.i32_const(n),c),o.call(a+"__reverseBytes",o.i32_add(o.getLocal("pIn"),o.i32_const(n)),o.i32_const(n),s),o.call(a+"_toMontgomeryAffine",l,o.getLocal("pOut")))}(),function(){const i=t.addFunction(a+"_CtoLEM");i.addParam("pIn","i32"),i.addParam("pOut","i32"),i.addLocal("firstByte","i32"),i.addLocal("greatest","i32");const l=i.getCodeBuilder(),c=t.alloc(2*n),s=l.i32_const(c),r=l.i32_const(c+n);i.addCode(l.setLocal("firstByte",l.i32_load8_u(l.getLocal("pIn"))),l.if(l.i32_and(l.getLocal("firstByte"),l.i32_const(64)),[...l.call(a+"_zeroAffine",l.getLocal("pOut")),...l.ret([])]),l.setLocal("greatest",l.i32_and(l.getLocal("firstByte"),l.i32_const(128))),l.call(e+"_copy",l.getLocal("pIn"),r),l.i32_store8(r,l.i32_and(l.getLocal("firstByte"),l.i32_const(63))),l.call(a+"__reverseBytes",r,l.i32_const(n),s),l.call(e+"_toMontgomery",s,l.getLocal("pOut")),l.call(e+"_square",l.getLocal("pOut"),r),l.call(e+"_mul",l.getLocal("pOut"),r,r),l.call(e+"_add",r,l.i32_const(o),r),l.call(e+"_sqrt",r,r),l.call(e+"_neg",r,s),l.if(l.i32_eq(l.call(e+"_sign",r),l.i32_const(-1)),l.if(l.getLocal("greatest"),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n)))),l.if(l.getLocal("greatest"),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))))))}(),Tt(t,a+"_batchLEMtoU",a+"_LEMtoU",2*n,2*n),Tt(t,a+"_batchLEMtoC",a+"_LEMtoC",2*n,n),Tt(t,a+"_batchUtoLEM",a+"_UtoLEM",2*n,2*n),Tt(t,a+"_batchCtoLEM",a+"_CtoLEM",n,2*n,!0),Tt(t,a+"_batchToJacobian",a+"_toJacobian",2*n,3*n,!0),Mt(t,a,a+"_multiexp",a+"_add",3*n),Mt(t,a,a+"_multiexpAffine",a+"_addMixed",2*n),zt(t,a+"_timesScalar",3*n,a+"_add",a+"_double",a+"_sub",a+"_copy",a+"_zero"),zt(t,a+"_timesScalarAffine",2*n,a+"_addMixed",a+"_double",a+"_subMixed",a+"_copyAffine",a+"_zero"),t.exportFunction(a+"_isZero"),t.exportFunction(a+"_isZeroAffine"),t.exportFunction(a+"_eq"),t.exportFunction(a+"_eqMixed"),t.exportFunction(a+"_eqAffine"),t.exportFunction(a+"_copy"),t.exportFunction(a+"_copyAffine"),t.exportFunction(a+"_zero"),t.exportFunction(a+"_zeroAffine"),t.exportFunction(a+"_double"),t.exportFunction(a+"_doubleAffine"),t.exportFunction(a+"_add"),t.exportFunction(a+"_addMixed"),t.exportFunction(a+"_addAffine"),t.exportFunction(a+"_neg"),t.exportFunction(a+"_negAffine"),t.exportFunction(a+"_sub"),t.exportFunction(a+"_subMixed"),t.exportFunction(a+"_subAffine"),t.exportFunction(a+"_fromMontgomery"),t.exportFunction(a+"_fromMontgomeryAffine"),t.exportFunction(a+"_toMontgomery"),t.exportFunction(a+"_toMontgomeryAffine"),t.exportFunction(a+"_timesScalar"),t.exportFunction(a+"_timesScalarAffine"),t.exportFunction(a+"_normalize"),t.exportFunction(a+"_LEMtoU"),t.exportFunction(a+"_LEMtoC"),t.exportFunction(a+"_UtoLEM"),t.exportFunction(a+"_CtoLEM"),t.exportFunction(a+"_batchLEMtoU"),t.exportFunction(a+"_batchLEMtoC"),t.exportFunction(a+"_batchUtoLEM"),t.exportFunction(a+"_batchCtoLEM"),t.exportFunction(a+"_toAffine"),t.exportFunction(a+"_toJacobian"),t.exportFunction(a+"_batchToAffine"),t.exportFunction(a+"_batchToJacobian"),t.exportFunction(a+"_inCurve"),t.exportFunction(a+"_inCurveAffine"),a};const{isOdd:Qt,modInv:kt,modPow:Rt}=J,Nt=K;var Dt=function(t,a,e,o,i){const n=8*t.modules[o].n64,l=8*t.modules[e].n64,c=t.modules[o].q;let s=c-1n,r=0;for(;!Qt(s);)r++,s>>=1n;let d=2n;for(;1n===Rt(d,c>>1n,c);)d+=1n;const u=new Array(r+1);u[r]=Rt(d,s,c);let _=r-1;for(;_>=0;)u[_]=Rt(u[_+1],2n,c),_--;const g=[],f=(1n<>e);return a}const x=Array(256);for(let t=0;t<256;t++)x[t]=F(t);const I=t.alloc(x);function B(){const e=t.addFunction(a+"_fft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32");const i=e.getCodeBuilder(),l=i.i32_const(t.alloc(n));e.addCode(i.setLocal("bits",i.call(a+"__log2",i.getLocal("n"))),i.call(o+"_one",l),i.call(a+"_rawfft",i.getLocal("px"),i.getLocal("bits"),i.i32_const(0),l))}!function(){const e=t.addFunction(a+"__rev");e.addParam("x","i32"),e.addParam("bits","i32"),e.setReturnType("i32");const o=e.getCodeBuilder();e.addCode(o.i32_rotl(o.i32_add(o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.getLocal("x"),o.i32_const(255)),I,0),o.i32_const(24)),o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(8)),o.i32_const(255)),I,0),o.i32_const(16))),o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(16)),o.i32_const(255)),I,0),o.i32_const(8)),o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(24)),o.i32_const(255)),I,0))),o.getLocal("bits")))}(),function(){const o=t.addFunction(a+"__reversePermutation");o.addParam("px","i32"),o.addParam("bits","i32"),o.addLocal("n","i32"),o.addLocal("i","i32"),o.addLocal("ri","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.setLocal("n",i.i32_shl(i.i32_const(1),i.getLocal("bits"))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("i"),i.i32_const(l)))),i.setLocal("ri",i.call(a+"__rev",i.getLocal("i"),i.getLocal("bits"))),i.setLocal("idx2",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("ri"),i.i32_const(l)))),i.if(i.i32_lt_u(i.getLocal("i"),i.getLocal("ri")),[...i.call(e+"_copy",i.getLocal("idx1"),n),...i.call(e+"_copy",i.getLocal("idx2"),i.getLocal("idx1")),...i.call(e+"_copy",n,i.getLocal("idx2"))]),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=t.addFunction(a+"__fftFinal");n.addParam("px","i32"),n.addParam("bits","i32"),n.addParam("reverse","i32"),n.addParam("mulFactor","i32"),n.addLocal("n","i32"),n.addLocal("ndiv2","i32"),n.addLocal("pInv2","i32"),n.addLocal("i","i32"),n.addLocal("mask","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32");const c=n.getCodeBuilder(),s=c.i32_const(t.alloc(l));n.addCode(c.if(c.i32_and(c.i32_eqz(c.getLocal("reverse")),c.call(o+"_isOne",c.getLocal("mulFactor"))),c.ret([])),c.setLocal("n",c.i32_shl(c.i32_const(1),c.getLocal("bits"))),c.setLocal("mask",c.i32_sub(c.getLocal("n"),c.i32_const(1))),c.setLocal("i",c.i32_const(1)),c.setLocal("ndiv2",c.i32_shr_u(c.getLocal("n"),c.i32_const(1))),c.block(c.loop(c.br_if(1,c.i32_ge_u(c.getLocal("i"),c.getLocal("ndiv2"))),c.setLocal("idx1",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("i"),c.i32_const(l)))),c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.i32_sub(c.getLocal("n"),c.getLocal("i")),c.i32_const(l)))),c.if(c.getLocal("reverse"),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(e+"_copy",c.getLocal("idx2"),c.getLocal("idx1")),...c.call(e+"_copy",s,c.getLocal("idx2"))],[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,s,c.getLocal("mulFactor"),c.getLocal("idx2"))]),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("idx1"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))])),c.setLocal("i",c.i32_add(c.getLocal("i"),c.i32_const(1))),c.br(0))),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("px"),c.getLocal("mulFactor"),c.getLocal("px")),...c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("ndiv2"),c.i32_const(l)))),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))]))}(),function(){const c=t.addFunction(a+"_rawfft");c.addParam("px","i32"),c.addParam("bits","i32"),c.addParam("reverse","i32"),c.addParam("mulFactor","i32"),c.addLocal("s","i32"),c.addLocal("k","i32"),c.addLocal("j","i32"),c.addLocal("m","i32"),c.addLocal("mdiv2","i32"),c.addLocal("n","i32"),c.addLocal("pwm","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(a+"__reversePermutation",s.getLocal("px"),s.getLocal("bits")),s.setLocal("n",s.i32_shl(s.i32_const(1),s.getLocal("bits"))),s.setLocal("s",s.i32_const(1)),s.block(s.loop(s.br_if(1,s.i32_gt_u(s.getLocal("s"),s.getLocal("bits"))),s.setLocal("m",s.i32_shl(s.i32_const(1),s.getLocal("s"))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("s"),s.i32_const(n)))),s.setLocal("k",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("k"),s.getLocal("n"))),s.call(o+"_one",r),s.setLocal("mdiv2",s.i32_shr_u(s.getLocal("m"),s.i32_const(1))),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("j"),s.getLocal("mdiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("px"),s.i32_mul(s.i32_add(s.getLocal("k"),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.i32_mul(s.getLocal("mdiv2"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("k",s.i32_add(s.getLocal("k"),s.getLocal("m"))),s.br(0))),s.setLocal("s",s.i32_add(s.getLocal("s"),s.i32_const(1))),s.br(0))),s.call(a+"__fftFinal",s.getLocal("px"),s.getLocal("bits"),s.getLocal("reverse"),s.getLocal("mulFactor")))}(),function(){const e=t.addFunction(a+"__log2");e.addParam("n","i32"),e.setReturnType("i32"),e.addLocal("bits","i32"),e.addLocal("aux","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("aux",o.i32_shr_u(o.getLocal("n"),o.i32_const(1)))),e.addCode(o.setLocal("bits",o.i32_const(0))),e.addCode(o.block(o.loop(o.br_if(1,o.i32_eqz(o.getLocal("aux"))),o.setLocal("aux",o.i32_shr_u(o.getLocal("aux"),o.i32_const(1))),o.setLocal("bits",o.i32_add(o.getLocal("bits"),o.i32_const(1))),o.br(0)))),e.addCode(o.if(o.i32_ne(o.getLocal("n"),o.i32_shl(o.i32_const(1),o.getLocal("bits"))),o.unreachable())),e.addCode(o.if(o.i32_gt_u(o.getLocal("bits"),o.i32_const(r)),o.unreachable())),e.addCode(o.getLocal("bits"))}(),B(),function(){const e=t.addFunction(a+"_ifft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32"),e.addLocal("pInv2","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("bits",o.call(a+"__log2",o.getLocal("n"))),o.setLocal("pInv2",o.i32_add(o.i32_const(L),o.i32_mul(o.getLocal("bits"),o.i32_const(n)))),o.call(a+"_rawfft",o.getLocal("px"),o.getLocal("bits"),o.i32_const(1),o.getLocal("pInv2")))}(),function(){const c=t.addFunction(a+"_fftJoin");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExt");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),d),s.call(i,s.getLocal("idx2"),s.getLocal("pShiftToM"),s.getLocal("idx2")),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(e+"_copy",d,s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExtInv");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_sub",s.getLocal("idx1"),d,s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),s.getLocal("pSConst"),s.getLocal("idx2")),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),s.getLocal("idx1")),s.call(e+"_sub",d,s.getLocal("idx1"),s.getLocal("idx1")),s.call(i,s.getLocal("idx1"),s.getLocal("pSConst"),s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftMix");c.addParam("pBuff","i32"),c.addParam("n","i32"),c.addParam("exp","i32"),c.addLocal("nGroups","i32"),c.addLocal("nPerGroup","i32"),c.addLocal("nPerGroupDiv2","i32"),c.addLocal("pairOffset","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("j","i32"),c.addLocal("pwm","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.setLocal("nPerGroup",s.i32_shl(s.i32_const(1),s.getLocal("exp"))),s.setLocal("nPerGroupDiv2",s.i32_shr_u(s.getLocal("nPerGroup"),s.i32_const(1))),s.setLocal("nGroups",s.i32_shr_u(s.getLocal("n"),s.getLocal("exp"))),s.setLocal("pairOffset",s.i32_mul(s.getLocal("nPerGroupDiv2"),s.i32_const(l))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("exp"),s.i32_const(n)))),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("nGroups"))),s.call(o+"_one",r),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("j"),s.getLocal("nPerGroupDiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff"),s.i32_mul(s.i32_add(s.i32_mul(s.getLocal("i"),s.getLocal("nPerGroup")),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.getLocal("pairOffset"))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const o=t.addFunction(a+"_fftFinal");o.addParam("pBuff","i32"),o.addParam("n","i32"),o.addParam("factor","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32"),o.addLocal("i","i32"),o.addLocal("ndiv2","i32");const n=o.getCodeBuilder(),c=n.i32_const(t.alloc(l));o.addCode(n.setLocal("ndiv2",n.i32_shr_u(n.getLocal("n"),n.i32_const(1))),n.if(n.i32_and(n.getLocal("n"),n.i32_const(1)),n.call(i,n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))),n.getLocal("factor"),n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))))),n.setLocal("i",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_ge_u(n.getLocal("i"),n.getLocal("ndiv2"))),n.setLocal("idx1",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("i"),n.i32_const(l)))),n.setLocal("idx2",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.i32_sub(n.i32_sub(n.getLocal("n"),n.i32_const(1)),n.getLocal("i")),n.i32_const(l)))),n.call(i,n.getLocal("idx2"),n.getLocal("factor"),c),n.call(i,n.getLocal("idx1"),n.getLocal("factor"),n.getLocal("idx2")),n.call(e+"_copy",c,n.getLocal("idx1")),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),function(){const c=t.addFunction(a+"_prepareLagrangeEvaluation");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),d),s.call(e+"_sub",s.getLocal("idx2"),d,d),s.call(e+"_sub",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,d,s.getLocal("pSConst"),s.getLocal("idx1")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),t.exportFunction(a+"_fft"),t.exportFunction(a+"_ifft"),t.exportFunction(a+"_rawfft"),t.exportFunction(a+"_fftJoin"),t.exportFunction(a+"_fftJoinExt"),t.exportFunction(a+"_fftJoinExtInv"),t.exportFunction(a+"_fftMix"),t.exportFunction(a+"_fftFinal"),t.exportFunction(a+"_prepareLagrangeEvaluation")},$t=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_zero");i.addParam("px","i32"),i.addParam("n","i32"),i.addLocal("lastp","i32"),i.addLocal("p","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("p",n.getLocal("px")),n.setLocal("lastp",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("p"),n.getLocal("lastp"))),n.call(e+"_zero",n.getLocal("p")),n.setLocal("p",n.i32_add(n.getLocal("p"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_constructLC");i.addParam("ppolynomials","i32"),i.addParam("psignals","i32"),i.addParam("nSignals","i32"),i.addParam("pres","i32"),i.addLocal("i","i32"),i.addLocal("j","i32"),i.addLocal("pp","i32"),i.addLocal("ps","i32"),i.addLocal("pd","i32"),i.addLocal("ncoefs","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("i",n.i32_const(0)),n.setLocal("pp",n.getLocal("ppolynomials")),n.setLocal("ps",n.getLocal("psignals")),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("i"),n.getLocal("nSignals"))),n.setLocal("ncoefs",n.i32_load(n.getLocal("pp"))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.setLocal("j",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("j"),n.getLocal("ncoefs"))),n.setLocal("pd",n.i32_add(n.getLocal("pres"),n.i32_mul(n.i32_load(n.getLocal("pp")),n.i32_const(o)))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.call(e+"_mul",n.getLocal("ps"),n.getLocal("pp"),l),n.call(e+"_add",l,n.getLocal("pd"),n.getLocal("pd")),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(o))),n.setLocal("j",n.i32_add(n.getLocal("j"),n.i32_const(1))),n.br(0))),n.setLocal("ps",n.i32_add(n.getLocal("ps"),n.i32_const(o))),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),t.exportFunction(a+"_zero"),t.exportFunction(a+"_constructLC"),a},jt=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_buildABC");i.addParam("pCoefs","i32"),i.addParam("nCoefs","i32"),i.addParam("pWitness","i32"),i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("offsetOut","i32"),i.addParam("nOut","i32"),i.addParam("offsetWitness","i32"),i.addParam("nWitness","i32"),i.addLocal("it","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("last","i32"),i.addLocal("m","i32"),i.addLocal("c","i32"),i.addLocal("s","i32"),i.addLocal("pOut","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_zero",n.getLocal("ita")),n.call(e+"_zero",n.getLocal("itb")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.br(0))),n.setLocal("it",n.getLocal("pCoefs")),n.setLocal("last",n.i32_add(n.getLocal("pCoefs"),n.i32_mul(n.getLocal("nCoefs"),n.i32_const(o+12)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("it"),n.getLocal("last"))),n.setLocal("s",n.i32_load(n.getLocal("it"),8)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_ge_u(n.getLocal("s"),n.i32_add(n.getLocal("offsetWitness"),n.getLocal("nWitness")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("m",n.i32_load(n.getLocal("it"))),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(0)),n.setLocal("pOut",n.getLocal("pA")),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(1)),n.setLocal("pOut",n.getLocal("pB")),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)])),n.setLocal("c",n.i32_load(n.getLocal("it"),4)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_ge_u(n.getLocal("c"),n.i32_add(n.getLocal("offsetOut"),n.getLocal("nOut")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("pOut",n.i32_add(n.getLocal("pOut"),n.i32_mul(n.i32_sub(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_const(o)))),n.call(e+"_mul",n.i32_add(n.getLocal("pWitness"),n.i32_mul(n.i32_sub(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_const(o))),n.i32_add(n.getLocal("it"),n.i32_const(12)),l),n.call(e+"_add",n.getLocal("pOut"),l,n.getLocal("pOut")),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),n.br(0))),n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("it",n.getLocal("pC")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("it")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_joinABC");i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("n","i32"),i.addParam("pP","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itc","i32"),i.addLocal("itp","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("itc",n.getLocal("pC")),n.setLocal("itp",n.getLocal("pP")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),l),n.call(e+"_sub",l,n.getLocal("itc"),n.getLocal("itp")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itc",n.i32_add(n.getLocal("itc"),n.i32_const(o))),n.setLocal("itp",n.i32_add(n.getLocal("itp"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_batchAdd");i.addParam("pa","i32"),i.addParam("pb","i32"),i.addParam("n","i32"),i.addParam("pr","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itr","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("ita",n.getLocal("pa")),n.setLocal("itb",n.getLocal("pb")),n.setLocal("itr",n.getLocal("pr")),n.setLocal("last",n.i32_add(n.getLocal("pa"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_add",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("itr")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itr",n.i32_add(n.getLocal("itr"),n.i32_const(o))),n.br(0))))}(),t.exportFunction(a+"_buildABC"),t.exportFunction(a+"_joinABC"),t.exportFunction(a+"_batchAdd"),a},Vt=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("pIn","i32"),s.addParam("n","i32"),s.addParam("pFirst","i32"),s.addParam("pInc","i32"),s.addParam("pOut","i32"),s.addLocal("pOldFree","i32"),s.addLocal("i","i32"),s.addLocal("pFrom","i32"),s.addLocal("pTo","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(l));s.addCode(r.setLocal("pFrom",r.getLocal("pIn")),r.setLocal("pTo",r.getLocal("pOut"))),s.addCode(r.call(o+"_copy",r.getLocal("pFirst"),d)),s.addCode(r.setLocal("i",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("n"))),r.call(c,r.getLocal("pFrom"),d,r.getLocal("pTo")),r.setLocal("pFrom",r.i32_add(r.getLocal("pFrom"),r.i32_const(i))),r.setLocal("pTo",r.i32_add(r.getLocal("pTo"),r.i32_const(n))),r.call(o+"_mul",d,r.getLocal("pInc"),d),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0)))),t.exportFunction(a)};const Kt=K,Ht=Ft,Zt=Bt,Wt=Pt,Yt=Gt,Jt=Ut,Xt=Dt,ta=$t,aa=jt,ea=Vt,{bitLength:oa,modInv:ia,isOdd:na,isNegative:la}=J;const ca=K,sa=Ft,ra=Bt,da=Pt,ua=Gt,_a=Ut,ga=Dt,fa=$t,ha=jt,pa=Vt,{bitLength:ma,isOdd:La,isNegative:ba}=J;var wa=function(t,a){const e=a||"bn128";if(t.modules[e])return e;const o=21888242871839275222246405745257275088696311157297823662689037894645226208583n,i=21888242871839275222246405745257275088548364400416034343698204186575808495617n,n=Math.floor((oa(o-1n)-1)/64)+1,l=8*n,c=l,s=l,r=2*s,d=12*s,u=t.alloc(Kt.bigInt2BytesLE(i,c)),_=Ht(t,o,"f1m");Zt(t,i,"fr","frm");const g=t.alloc(Kt.bigInt2BytesLE(b(3n),s)),f=Jt(t,"g1m","f1m",g);Xt(t,"frm","frm","frm","frm_mul"),ta(t,"pol","frm"),aa(t,"qap","frm");const h=Wt(t,"f1m_neg","f2m","f1m"),p=t.alloc([...Kt.bigInt2BytesLE(b(19485874751759354771024239261021720505790618469301721065564631296452457478373n),s),...Kt.bigInt2BytesLE(b(266929791119991161246907387137283842545076965332900288569378510910307636690n),s)]),m=Jt(t,"g2m","f2m",p);function L(a,e){const o=t.addFunction(a);o.addParam("pG","i32"),o.addParam("pFr","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.call("frm_fromMontgomery",i.getLocal("pFr"),n),i.call(e,i.getLocal("pG"),n,i.i32_const(l),i.getLocal("pr"))),t.exportFunction(a)}function b(t){return BigInt(t)*(1n<0n;)na(a)?e.push(1):e.push(0),a>>=1n;return e}(29793968203157093288n),T=t.alloc(z),M=3*r,U=z.length-1,Q=z.reduce(((t,a)=>t+(0!=a?1:0)),0),k=6*l,R=3*l*2+(Q+U+1)*M;t.modules[e]={n64:n,pG1gen:y,pG1zero:C,pG1b:g,pG2gen:x,pG2zero:B,pG2b:p,pq:t.modules.f1m.pq,pr:u,pOneT:E,prePSize:k,preQSize:R,r:i.toString(),q:o.toString()};const N=4965661367192848881n;function D(a){const i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[8376118865763821496583973867626364092589906065868298776909617916018768340080n,16469823323077808223889137241176536799009286646108169935659301613961712198316n],[21888242871839275220042445260109153167277707414472061641714758635765020556617n,0n],[11697423496358154304825782922584725312912383441159505038794027105778954184319n,303847389135065887422783454877609941456349188919719272345083954437860409601n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3321304630594332808241809054958361220322477375291206261884409189760185844239n,5722266937896532885780051958958348231143373700109372999374820235121374419868n],[21888242871839275222246405745257275088696311157297823662689037894645226208582n,0n],[13512124006075453725662431877630910996106405091429524885779419978626457868503n,5418419548761466998357268504080738289687024511189653727029736280683514010267n],[2203960485148121921418603742825762020974279258880205651966n,0n],[10190819375481120917420622822672549775783927716138318623895010788866272024264n,21584395482704209334823622290379665147239961968378104390343953940207365798982n],[2203960485148121921418603742825762020974279258880205651967n,0n],[18566938241244942414004596690298913868373833782006617400804628704885040364344n,16165975933942742336466353786298926857552937457188450663314217659523851788715n]]],n=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[21575463638280843010398324269430826099269044274347216827212613867836435027261n,10307601595873709700152284273816112264069230130616436755625194854815875713954n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3772000881919853776433695186713858239009073593817195771773381919316419345261n,2236595495967245188281701248203181795121068902605861227855261137820944008926n],[2203960485148121921418603742825762020974279258880205651966n,0n],[18429021223477853657660792034369865839114504446431234726392080002137598044644n,9344045779998320333812420223237981029506012124075525679208581902008406485703n]],[[1n,0n],[2581911344467009335267311115468803099551665605076196740867805258568234346338n,19937756971775647987995932169929341994314640652964949448313374472400716661030n],[2203960485148121921418603742825762020974279258880205651966n,0n],[5324479202449903542726783395506214481928257762400643279780343368557297135718n,16208900380737693084919495127334387981393726419856888799917914180988844123039n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[13981852324922362344252311234282257507216387789820983642040889267519694726527n,7629828391165209371577384193250820201684255241773809077146787135900891633097n]]],l=t.addFunction(e+"__frobeniusMap"+a);l.addParam("x","i32"),l.addParam("r","i32");const c=l.getCodeBuilder();for(let e=0;e<6;e++){const o=0==e?c.getLocal("x"):c.i32_add(c.getLocal("x"),c.i32_const(e*r)),u=o,g=c.i32_add(c.getLocal("x"),c.i32_const(e*r+s)),f=0==e?c.getLocal("r"):c.i32_add(c.getLocal("r"),c.i32_const(e*r)),p=f,m=c.i32_add(c.getLocal("r"),c.i32_const(e*r+s)),L=d(i[Math.floor(e/3)][a%12],n[e%3][a%6]),w=t.alloc([...Kt.bigInt2BytesLE(b(L[0]),32),...Kt.bigInt2BytesLE(b(L[1]),32)]);a%2==1?l.addCode(c.call(_+"_copy",u,p),c.call(_+"_neg",g,m),c.call(h+"_mul",f,c.i32_const(w),f)):l.addCode(c.call(h+"_mul",o,c.i32_const(w),f))}function d(t,a){const e=BigInt(t[0]),i=BigInt(t[1]),n=BigInt(a[0]),l=BigInt(a[1]),c=[(e*n-i*l)%o,(e*l+i*n)%o];return la(c[0])&&(c[0]=c[0]+o),c}}function $(a,o){const i=function(t){let a=t;const e=[];for(;a>0n;){if(na(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),n=t.alloc(i),l=t.addFunction(e+"__cyclotomicExp_"+o);l.addParam("x","i32"),l.addParam("r","i32"),l.addLocal("bit","i32"),l.addLocal("i","i32");const c=l.getCodeBuilder(),s=c.getLocal("x"),r=c.getLocal("r"),u=c.i32_const(t.alloc(d));l.addCode(c.call(G+"_conjugate",s,u),c.call(G+"_one",r),c.if(c.teeLocal("bit",c.i32_load8_s(c.i32_const(i.length-1),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.setLocal("i",c.i32_const(i.length-2)),c.block(c.loop(c.call(e+"__cyclotomicSquare",r,r),c.if(c.teeLocal("bit",c.i32_load8_s(c.getLocal("i"),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.br_if(1,c.i32_eqz(c.getLocal("i"))),c.setLocal("i",c.i32_sub(c.getLocal("i"),c.i32_const(1))),c.br(0))))}function j(){!function(){const a=t.addFunction(e+"__cyclotomicSquare");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.i32_add(o.getLocal("x"),o.i32_const(r)),l=o.i32_add(o.getLocal("x"),o.i32_const(2*r)),c=o.i32_add(o.getLocal("x"),o.i32_const(3*r)),s=o.i32_add(o.getLocal("x"),o.i32_const(4*r)),d=o.i32_add(o.getLocal("x"),o.i32_const(5*r)),u=o.getLocal("r"),_=o.i32_add(o.getLocal("r"),o.i32_const(r)),g=o.i32_add(o.getLocal("r"),o.i32_const(2*r)),f=o.i32_add(o.getLocal("r"),o.i32_const(3*r)),p=o.i32_add(o.getLocal("r"),o.i32_const(4*r)),m=o.i32_add(o.getLocal("r"),o.i32_const(5*r)),L=o.i32_const(t.alloc(r)),b=o.i32_const(t.alloc(r)),w=o.i32_const(t.alloc(r)),y=o.i32_const(t.alloc(r)),A=o.i32_const(t.alloc(r)),C=o.i32_const(t.alloc(r)),F=o.i32_const(t.alloc(r)),x=o.i32_const(t.alloc(r));a.addCode(o.call(h+"_mul",i,s,F),o.call(h+"_mul",s,o.i32_const(v),L),o.call(h+"_add",i,L,L),o.call(h+"_add",i,s,x),o.call(h+"_mul",x,L,L),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",L,x,L),o.call(h+"_add",F,F,b),o.call(h+"_mul",c,l,F),o.call(h+"_mul",l,o.i32_const(v),w),o.call(h+"_add",c,w,w),o.call(h+"_add",c,l,x),o.call(h+"_mul",x,w,w),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",w,x,w),o.call(h+"_add",F,F,y),o.call(h+"_mul",n,d,F),o.call(h+"_mul",d,o.i32_const(v),A),o.call(h+"_add",n,A,A),o.call(h+"_add",n,d,x),o.call(h+"_mul",x,A,A),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",A,x,A),o.call(h+"_add",F,F,C),o.call(h+"_sub",L,i,u),o.call(h+"_add",u,u,u),o.call(h+"_add",L,u,u),o.call(h+"_add",b,s,p),o.call(h+"_add",p,p,p),o.call(h+"_add",b,p,p),o.call(h+"_mul",C,o.i32_const(P),x),o.call(h+"_add",x,c,f),o.call(h+"_add",f,f,f),o.call(h+"_add",x,f,f),o.call(h+"_sub",A,l,g),o.call(h+"_add",g,g,g),o.call(h+"_add",A,g,g),o.call(h+"_sub",w,n,_),o.call(h+"_add",_,_,_),o.call(h+"_add",w,_,_),o.call(h+"_add",y,d,m),o.call(h+"_add",m,m,m),o.call(h+"_add",y,m,m))}(),$(N,"w0");const a=t.addFunction(e+"__finalExponentiationLastChunk");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.getLocal("r"),l=o.i32_const(t.alloc(d)),c=o.i32_const(t.alloc(d)),s=o.i32_const(t.alloc(d)),u=o.i32_const(t.alloc(d)),_=o.i32_const(t.alloc(d)),g=o.i32_const(t.alloc(d)),f=o.i32_const(t.alloc(d)),p=o.i32_const(t.alloc(d)),m=o.i32_const(t.alloc(d)),L=o.i32_const(t.alloc(d)),b=o.i32_const(t.alloc(d)),w=o.i32_const(t.alloc(d)),y=o.i32_const(t.alloc(d)),A=o.i32_const(t.alloc(d)),C=o.i32_const(t.alloc(d)),F=o.i32_const(t.alloc(d)),x=o.i32_const(t.alloc(d)),I=o.i32_const(t.alloc(d)),B=o.i32_const(t.alloc(d)),E=o.i32_const(t.alloc(d)),S=o.i32_const(t.alloc(d));a.addCode(o.call(e+"__cyclotomicExp_w0",i,l),o.call(G+"_conjugate",l,l),o.call(e+"__cyclotomicSquare",l,c),o.call(e+"__cyclotomicSquare",c,s),o.call(G+"_mul",s,c,u),o.call(e+"__cyclotomicExp_w0",u,_),o.call(G+"_conjugate",_,_),o.call(e+"__cyclotomicSquare",_,g),o.call(e+"__cyclotomicExp_w0",g,f),o.call(G+"_conjugate",f,f),o.call(G+"_conjugate",u,p),o.call(G+"_conjugate",f,m),o.call(G+"_mul",m,_,L),o.call(G+"_mul",L,p,b),o.call(G+"_mul",b,c,w),o.call(G+"_mul",b,_,y),o.call(G+"_mul",y,i,A),o.call(e+"__frobeniusMap1",w,C),o.call(G+"_mul",C,A,F),o.call(e+"__frobeniusMap2",b,x),o.call(G+"_mul",x,F,I),o.call(G+"_conjugate",i,B),o.call(G+"_mul",B,w,E),o.call(e+"__frobeniusMap3",E,S),o.call(G+"_mul",S,I,n))}const V=t.alloc(k),K=t.alloc(R);function H(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t0n;)La(a)?e.push(1):e.push(0),a>>=1n;return e}(0xd201000000010000n),z=t.alloc(G),T=3*s,M=G.length-1,U=G.reduce(((t,a)=>t+(0!=a?1:0)),0),Q=6*l,k=3*l*2+(U+M+1)*T,R=!0,N=15132376222941642752n;function D(a){const e=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n,151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n],[2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n,1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n,877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n,3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n,2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n,3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n]]],i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[0n,4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[0n,1n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[0n,793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n]],[[1n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n]]],n=t.addFunction(O+"_frobeniusMap"+a);n.addParam("x","i32"),n.addParam("r","i32");const r=n.getCodeBuilder();for(let o=0;o<6;o++){const u=0==o?r.getLocal("x"):r.i32_add(r.getLocal("x"),r.i32_const(o*s)),_=u,g=r.i32_add(r.getLocal("x"),r.i32_const(o*s+c)),h=0==o?r.getLocal("r"):r.i32_add(r.getLocal("r"),r.i32_const(o*s)),p=h,L=r.i32_add(r.getLocal("r"),r.i32_const(o*s+c)),b=d(e[Math.floor(o/3)][a%12],i[o%3][a%6]),w=t.alloc([...ca.bigInt2BytesLE(y(b[0]),l),...ca.bigInt2BytesLE(y(b[1]),l)]);a%2==1?n.addCode(r.call(f+"_copy",_,p),r.call(f+"_neg",g,L),r.call(m+"_mul",h,r.i32_const(w),h)):n.addCode(r.call(m+"_mul",u,r.i32_const(w),h))}function d(t,a){const e=t[0],i=t[1],n=a[0],l=a[1],c=[(e*n-i*l)%o,(e*l+i*n)%o];return ba(c[0])&&(c[0]=c[0]+o),c}}function $(a,o,i){const n=function(t){let a=t;const e=[];for(;a>0n;){if(La(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),l=t.alloc(n),c=t.addFunction(e+"__cyclotomicExp_"+i);c.addParam("x","i32"),c.addParam("r","i32"),c.addLocal("bit","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),d=s.getLocal("x"),u=s.getLocal("r"),_=s.i32_const(t.alloc(r));c.addCode(s.call(O+"_conjugate",d,_),s.call(O+"_one",u),s.if(s.teeLocal("bit",s.i32_load8_s(s.i32_const(n.length-1),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.setLocal("i",s.i32_const(n.length-2)),s.block(s.loop(s.call(e+"__cyclotomicSquare",u,u),s.if(s.teeLocal("bit",s.i32_load8_s(s.getLocal("i"),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.br(0)))),o&&c.addCode(s.call(O+"_conjugate",u,u))}t.modules[e]={n64q:n,n64r:d,n8q:l,n8r:u,pG1gen:C,pG1zero:x,pG1b:h,pG2gen:B,pG2zero:v,pG2b:L,pq:t.modules.f1m.pq,pr:g,pOneT:S,r:i,q:o,prePSize:Q,preQSize:k},function(){const a=t.addFunction(q+"_mul1");a.addParam("pA","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC1"),s=e.getLocal("pR"),r=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),d=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),u=e.i32_const(t.alloc(2*c)),_=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_add",o,i,u),e.call(m+"_add",i,n,_),e.call(m+"_mul",i,l,d),e.call(m+"_mul",_,l,s),e.call(m+"_sub",s,d,s),e.call(m+"_mulNR",s,s),e.call(m+"_mul",u,l,r),e.call(m+"_sub",r,d,r))}(),function(){const a=t.addFunction(q+"_mul01");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC0"),s=e.getLocal("pC1"),r=e.getLocal("pR"),d=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),u=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),_=e.i32_const(t.alloc(2*c)),g=e.i32_const(t.alloc(2*c)),f=e.i32_const(t.alloc(2*c)),h=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_mul",o,l,_),e.call(m+"_mul",i,s,g),e.call(m+"_add",o,i,f),e.call(m+"_add",o,n,h),e.call(m+"_add",i,n,r),e.call(m+"_mul",r,s,r),e.call(m+"_sub",r,g,r),e.call(m+"_mulNR",r,r),e.call(m+"_add",r,_,r),e.call(m+"_add",l,s,d),e.call(m+"_mul",d,f,d),e.call(m+"_sub",d,_,d),e.call(m+"_sub",d,g,d),e.call(m+"_mul",h,l,u),e.call(m+"_sub",u,_,u),e.call(m+"_add",u,g,u))}(),function(){const a=t.addFunction(O+"_mul014");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pC4","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(6*c)),n=e.getLocal("pC0"),l=e.getLocal("pC1"),s=e.getLocal("pC4"),r=e.i32_const(t.alloc(6*c)),d=e.i32_const(t.alloc(6*c)),u=e.i32_const(t.alloc(2*c)),_=e.getLocal("pR"),g=e.i32_add(e.getLocal("pR"),e.i32_const(6*c));a.addCode(e.call(q+"_mul01",o,n,l,r),e.call(q+"_mul1",i,s,d),e.call(m+"_add",l,s,u),e.call(q+"_add",i,o,g),e.call(q+"_mul01",g,n,u,g),e.call(q+"_sub",g,r,g),e.call(q+"_sub",g,d,g),e.call(q+"_copy",d,_),e.call(q+"_mulNR",_,_),e.call(q+"_add",_,r,_))}(),function(){const a=t.addFunction(e+"_ell");a.addParam("pP","i32"),a.addParam("pCoefs","i32"),a.addParam("pF","i32");const o=a.getCodeBuilder(),i=o.getLocal("pP"),n=o.i32_add(o.getLocal("pP"),o.i32_const(l)),s=o.getLocal("pF"),r=o.getLocal("pCoefs"),d=o.i32_add(o.getLocal("pCoefs"),o.i32_const(c)),u=o.i32_add(o.getLocal("pCoefs"),o.i32_const(2*c)),_=o.i32_add(o.getLocal("pCoefs"),o.i32_const(3*c)),g=o.i32_add(o.getLocal("pCoefs"),o.i32_const(4*c)),h=t.alloc(2*c),p=o.i32_const(h),m=o.i32_const(h),L=o.i32_const(h+c),b=t.alloc(2*c),w=o.i32_const(b),y=o.i32_const(b),A=o.i32_const(b+c);a.addCode(o.call(f+"_mul",r,n,m),o.call(f+"_mul",d,n,L),o.call(f+"_mul",u,i,y),o.call(f+"_mul",_,i,A),o.call(O+"_mul014",s,g,w,p,s))}();const j=t.alloc(Q),V=t.alloc(k);function K(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t>=BigInt(32)):l+2<=a?(n.setUint16(l,Number(e&BigInt(65535)),!0),l+=2,e>>=BigInt(16)):(n.setUint8(l,Number(e&BigInt(255)),!0),l+=1,e>>=BigInt(8));if(e)throw new Error("Number does not fit in this length");return o}const Ca=[];for(let t=0;t<256;t++)Ca[t]=Fa(t,8);function Fa(t,a){let e=0,o=t;for(let t=0;t>=1;return e}function xa(t,a){return(Ca[t>>>24]|Ca[t>>>16&255]<<8|Ca[t>>>8&255]<<16|Ca[255&t]<<24)>>>32-a}function Ia(t){return(0!=(4294901760&t)?(t&=4294901760,16):0)|(0!=(4278255360&t)?(t&=4278255360,8):0)|(0!=(4042322160&t)?(t&=4042322160,4):0)|(0!=(3435973836&t)?(t&=3435973836,2):0)|0!=(2863311530&t)}function Ba(t,a){const e=t.byteLength/a,o=Ia(e);if(e!=1<e){const o=t.slice(i*a,(i+1)*a);t.set(t.slice(e*a,(e+1)*a),i*a),t.set(o,e*a)}}}function Ea(t,a){const e=new Uint8Array(a*t.length);for(let o=0;o{e[o]=t(a[o])})),e}return a},unstringifyBigInts:function t(a){if("string"==typeof a&&/^[0-9]+$/.test(a))return BigInt(a);if("string"==typeof a&&/^0x[0-9a-fA-F]+$/.test(a))return BigInt(a);if(Array.isArray(a))return a.map(t);if("object"==typeof a){if(null===a)return null;const e={};return Object.keys(a).forEach((o=>{e[o]=t(a[o])})),e}return a},beBuff2int:function(t){let a=BigInt(0),e=t.length,o=0;const i=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e>0;)e>=4?(e-=4,a+=BigInt(i.getUint32(e))<=2?(e-=2,a+=BigInt(i.getUint16(e))<0;)n-4>=0?(n-=4,i.setUint32(n,Number(e&BigInt(4294967295))),e>>=BigInt(32)):n-2>=0?(n-=2,i.setUint16(n,Number(e&BigInt(65535))),e>>=BigInt(16)):(n-=1,i.setUint8(n,Number(e&BigInt(255))),e>>=BigInt(8));if(e)throw new Error("Number does not fit in this length");return o},leBuff2int:function(t){let a=BigInt(0),e=0;const o=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e{o[i]=t(a,e[i])})),o}return e},unstringifyFElements:function t(a,e){if("string"==typeof e&&/^[0-9]+$/.test(e))return a.e(e);if("string"==typeof e&&/^0x[0-9a-fA-F]+$/.test(e))return a.e(e);if(Array.isArray(e))return e.map(t.bind(this,a));if("object"==typeof e){if(null===e)return null;const o={};return Object.keys(e).forEach((i=>{o[i]=t(a,e[i])})),o}return e},bitReverse:xa,log2:Ia,buffReverseBits:Ba,array2buffer:Ea,buffer2array:va});const Pa=1<<30;class qa{constructor(t){this.buffers=[],this.byteLength=t;for(let a=0;a0;){const t=l+c>Pa?Pa-l:c,a=new Uint8Array(this.buffers[n].buffer,this.buffers[n].byteOffset+l,t);if(t==e)return a.slice();i||(i=e<=Pa?new Uint8Array(e):new qa(e)),i.set(a,e-c),c-=t,n++,l=0}return i}set(t,a){void 0===a&&(a=0);const e=t.byteLength;if(0==e)return;const o=Math.floor(a/Pa);if(o==Math.floor((a+e-1)/Pa))return t instanceof qa&&1==t.buffers.length?this.buffers[o].set(t.buffers[0],a%Pa):this.buffers[o].set(t,a%Pa);let i=o,n=a%Pa,l=e;for(;l>0;){const a=n+l>Pa?Pa-n:l,o=t.slice(e-l,e-l+a);new Uint8Array(this.buffers[i].buffer,this.buffers[i].byteOffset+n,a).set(o),l-=a,i++,n=0}}}function Oa(t,a,e,o){return async function(i){const n=Math.floor(i.byteLength/e);if(n*e!==i.byteLength)throw new Error("Invalid buffer size");const l=Math.floor(n/t.concurrency),c=[];for(let s=0;s=0;t--)this.w[t]=this.square(this.w[t+1]);if(!this.eq(this.w[0],this.one))throw new Error("Error calculating roots of unity");this.batchToMontgomery=Oa(t,a+"_batchToMontgomery",this.n8,this.n8),this.batchFromMontgomery=Oa(t,a+"_batchFromMontgomery",this.n8,this.n8)}op2(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op2Bool(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2)}op1(t,a){return this.tm.setBuff(this.pOp1,a),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op1Bool(t,a){return this.tm.setBuff(this.pOp1,a),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3)}add(t,a){return this.op2("_add",t,a)}eq(t,a){return this.op2Bool("_eq",t,a)}isZero(t){return this.op1Bool("_isZero",t)}sub(t,a){return this.op2("_sub",t,a)}neg(t){return this.op1("_neg",t)}inv(t){return this.op1("_inverse",t)}toMontgomery(t){return this.op1("_toMontgomery",t)}fromMontgomery(t){return this.op1("_fromMontgomery",t)}mul(t,a){return this.op2("_mul",t,a)}div(t,a){return this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_inverse"](this.pOp2,this.pOp2),this.tm.instance.exports[this.prefix+"_mul"](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}square(t){return this.op1("_square",t)}isSquare(t){return this.op1Bool("_isSquare",t)}sqrt(t){return this.op1("_sqrt",t)}exp(t,a){return a instanceof Uint8Array||(a=S(o(a))),this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_exp"](this.pOp1,this.pOp2,a.byteLength,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}isNegative(t){return this.op1Bool("_isNegative",t)}e(t,a){if(t instanceof Uint8Array)return t;let e=o(t,a);n(e)?(e=p(e),A(e,this.p)&&(e=w(e,this.p)),e=h(this.p,e)):A(e,this.p)&&(e=w(e,this.p));const i=Aa(e,this.n8);return this.toMontgomery(i)}toString(t,a){return v(B(this.fromMontgomery(t),0),a)}fromRng(t){let a;const e=new Uint8Array(this.n8);do{a=P;for(let e=0;eo.buffer.byteLength){const i=o.buffer.byteLength/65536;let n=Math.floor((e[0]+t)/65536)+1;n>a&&(n=a),o.grow(n-i)}return i}function l(t){const a=n(t.byteLength);return s(a,t),a}function c(t,a){const e=new Uint8Array(o.buffer);return new Uint8Array(e.buffer,e.byteOffset+t,a)}function s(t,a){new Uint8Array(o.buffer).set(new Uint8Array(a),t)}function r(t){if("INIT"==t[0].cmd)return i(t[0]);const a={vars:[],out:[]},r=new Uint32Array(o.buffer,0,1)[0];for(let o=0;o{this.reject=a,this.resolve=t}))}}var Da;const $a="data:application/javascript;base64,"+(Da="("+Ua.toString()+")(self)",globalThis.btoa(Da));class ja{constructor(){this.actionQueue=[],this.oldPFree=0}startSyncOp(){if(0!=this.oldPFree)throw new Error("Sync operation in progress");this.oldPFree=this.u32[0]}endSyncOp(){if(0==this.oldPFree)throw new Error("No sync operation in progress");this.u32[0]=this.oldPFree,this.oldPFree=0}postAction(t,a,e,o){if(this.working[t])throw new Error("Posting a job t a working worker");return this.working[t]=!0,this.pendingDeferreds[t]=o||new Na,this.workers[t].postMessage(a,e),this.pendingDeferreds[t].promise}processWorks(){for(let t=0;t0;t++)if(0==this.working[t]){const a=this.actionQueue.shift();this.postAction(t,a.data,a.transfers,a.deferred)}}queueAction(t,a){const e=new Na;if(this.singleThread){const a=this.taskManager(t);e.resolve(a)}else this.actionQueue.push({data:t,transfers:a,deferred:e}),this.processWorks();return e.promise}resetMemory(){this.u32[0]=this.initalPFree}allocBuff(t){const a=this.alloc(t.byteLength);return this.setBuff(a,t),a}getBuff(t,a){return this.u8.slice(t,t+a)}setBuff(t,a){this.u8.set(new Uint8Array(a),t)}alloc(t){for(;3&this.u32[0];)this.u32[0]++;const a=this.u32[0];return this.u32[0]+=t,a}async terminate(){for(let t=0;tsetTimeout(a,t))))}}function Va(t,a){const e=t[a],o=t.Fr,i=t.tm;t[a].batchApplyKey=async function(t,n,l,c,s){let r,d,u,_,g;if(c=c||"affine",s=s||"affine","G1"==a)"jacobian"==c?(u=3*e.F.n8,r="g1m_batchApplyKey"):(u=2*e.F.n8,r="g1m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g1m_batchToAffine",g=2*e.F.n8);else if("G2"==a)"jacobian"==c?(u=3*e.F.n8,r="g2m_batchApplyKey"):(u=2*e.F.n8,r="g2m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g2m_batchToAffine",g=2*e.F.n8);else{if("Fr"!=a)throw new Error("Invalid group: "+a);r="frm_batchApplyKey",u=e.n8,_=e.n8,g=e.n8}const f=Math.floor(t.byteLength/u),h=Math.floor(f/i.concurrency),p=[];l=o.e(l);let m=o.e(n);for(let a=0;a=0;t--){if(!e.isZero(h))for(let t=0;tr&&(h=r),h<1024&&(h=1024);const p=[];for(let a=0;a(c&&c.debug(`Multiexp end: ${s}: ${a}/${u}`),t))))}const m=await Promise.all(p);let L=e.zero;for(let t=m.length-1;t>=0;t--)L=e.add(L,m[t]);return L}e.multiExp=async function(t,a,e,o){return await n(t,a,"jacobian",e,o)},e.multiExpAffine=async function(t,a,e,o){return await n(t,a,"affine",e,o)}}function Za(t,a){const e=t[a],o=t.Fr,i=e.tm;async function n(t,c,s,r,d,u){s=s||"affine",r=r||"affine";let _,g,f,h,p,m,L,b;"G1"==a?("affine"==s?(_=2*e.F.n8,h="g1m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g1m_fftFinal"),L="g1m_fftJoin",m="g1m_fftMix","affine"==r?(f=2*e.F.n8,p="g1m_batchToAffine"):f=3*e.F.n8):"G2"==a?("affine"==s?(_=2*e.F.n8,h="g2m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g2m_fftFinal"),L="g2m_fftJoin",m="g2m_fftMix","affine"==r?(f=2*e.F.n8,p="g2m_batchToAffine"):f=3*e.F.n8):"Fr"==a&&(_=e.n8,g=e.n8,f=e.n8,c&&(b="frm_fftFinal"),m="frm_fftMix",L="frm_fftJoin");let w=!1;Array.isArray(t)?(t=Ea(t,_),w=!0):t=t.slice(0,t.byteLength);const y=t.byteLength/_,A=Ia(y);if(1<1<<28?new qa(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u):await async function(t,a,e,i,c){let s,r;s=t.slice(0,t.byteLength/2),r=t.slice(t.byteLength/2,t.byteLength);const d=[];[s,r]=await l(s,r,"fftJoinExt",o.one,o.shift,a,"jacobian",i,c),d.push(n(s,!1,"jacobian",e,i,c)),d.push(n(r,!1,"jacobian",e,i,c));const u=await Promise.all(d);let _;_=u[0].byteLength>1<<28?new qa(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u),w?va(a,f):a}let C,F,x;c&&(C=o.inv(o.e(y))),Ba(t,_);let I=Math.min(16384,y),B=y/I;for(;B=16;)B*=2,I/=2;const E=Ia(I),v=[];for(let a=0;a(d&&d.debug(`${u}: fft ${A} mix end: ${a}/${B}`),t))))}x=await Promise.all(v);for(let t=0;t(d&&d.debug(`${u}: fft ${A} join ${t}/${A} ${l+1}/${a} ${c}/${e/2}`),o))))}const l=await Promise.all(n);for(let t=0;t0;a--)F.set(x[a],t),t+=I*f,delete x[a];F.set(x[0].slice(0,(I-1)*f),t),delete x[0]}else for(let t=0;t65536&&(w=65536);const y=[];for(let a=0;a(u&&u.debug(`${_}: fftJoinExt End: ${a}/${b}`),t))))}const A=await Promise.all(y);let C,F;b*p>1<<28?(C=new qa(b*p),F=new qa(b*p)):(C=new Uint8Array(b*p),F=new Uint8Array(b*p));let x=0;for(let t=0;to.s+1)throw s&&s.error("lagrangeEvaluations input too big"),new Error("lagrangeEvaluations input too big");let g=t.slice(0,t.byteLength/2),f=t.slice(t.byteLength/2,t.byteLength);const h=o.exp(o.shift,u/2),p=o.inv(o.sub(o.one,h));[g,f]=await l(g,f,"prepareLagrangeEvaluation",p,o.shiftInv,i,"jacobian",s,r+" prep");const m=[];let L;return m.push(n(g,!0,"jacobian",c,s,r+" t0")),m.push(n(f,!0,"jacobian",c,s,r+" t1")),[g,f]=await Promise.all(m),L=g.byteLength>1<<28?new qa(2*g.byteLength):new Uint8Array(2*g.byteLength),L.set(g),L.set(f,g.byteLength),L},e.fftMix=async function(t){const n=3*e.F.n8;let l,c;if("G1"==a)l="g1m_fftMix",c="g1m_fftJoin";else if("G2"==a)l="g2m_fftMix",c="g2m_fftJoin";else{if("Fr"!=a)throw new Error("Invalid group");l="frm_fftMix",c="frm_fftJoin"}const s=Math.floor(t.byteLength/n),r=Ia(s);let d=1<=0;t--)g.set(_[t][0],f),f+=_[t][0].byteLength;return g}}async function Wa(t){const a=await async function(t,a){const e=new ja;e.memory=new WebAssembly.Memory({initial:Ra}),e.u8=new Uint8Array(e.memory.buffer),e.u32=new Uint32Array(e.memory.buffer);const o=await WebAssembly.compile(t.code);if(e.instance=await WebAssembly.instantiate(o,{env:{memory:e.memory}}),e.singleThread=a,e.initalPFree=e.u32[0],e.pq=t.pq,e.pr=t.pr,e.pG1gen=t.pG1gen,e.pG1zero=t.pG1zero,e.pG2gen=t.pG2gen,e.pG2zero=t.pG2zero,e.pOneT=t.pOneT,a)e.code=t.code,e.taskManager=Ua(),await e.taskManager([{cmd:"INIT",init:Ra,code:e.code.slice()}]),e.concurrency=1;else{let a;e.workers=[],e.pendingDeferreds=[],e.working=[],a="object"==typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:Qa.cpus().length,0==a&&(a=2),a>64&&(a=64),e.concurrency=a;for(let t=0;t>8n&0xFFn)),a.push(Number(e>>16n&0xFFn)),a.push(Number(e>>24n&0xFFn)),a}function ae(t){const a=function(t){for(var a=[],e=0;e>6,128|63&o):o<55296||o>=57344?a.push(224|o>>12,128|o>>6&63,128|63&o):(e++,o=65536+((1023&o)<<10|1023&t.charCodeAt(e)),a.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return a}(t);return[...le(a.length),...a]}function ee(t){const a=[];let e=Ya(t);if(Ja(e))throw new Error("Number cannot be negative");for(;!Xa(e);)a.push(Number(0x7Fn&e)),e>>=7n;0==a.length&&a.push(0);for(let t=0;t0xFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFn&&(a-=0x100000000n),a<-2147483648n)throw new Error("Number too small");return oe(a)}function ne(t){let a=Ya(t);if(a>0xFFFFFFFFFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFFFFFFFFFn&&(a-=0x10000000000000000n),a<-9223372036854775808n)throw new Error("Number too small");return oe(a)}function le(t){let a=Ya(t);if(a>0xFFFFFFFFn)throw new Error("Number too big");return ee(a)}function ce(t){return Array.from(t,(function(t){return("0"+(255&t).toString(16)).slice(-2)})).join("")}class se{constructor(t){this.func=t,this.functionName=t.functionName,this.module=t.module}setLocal(t,a){const e=this.func.localIdxByName[t];if(void 0===e)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${t} `);return[...a,33,...le(e)]}teeLocal(t,a){const e=this.func.localIdxByName[t];if(void 0===e)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${t} `);return[...a,34,...le(e)]}getLocal(t){const a=this.func.localIdxByName[t];if(void 0===a)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${t} `);return[32,...le(a)]}i64_load8_s(t,a,e){return[...t,48,void 0===e?0:e,...le(a||0)]}i64_load8_u(t,a,e){return[...t,49,void 0===e?0:e,...le(a||0)]}i64_load16_s(t,a,e){return[...t,50,void 0===e?1:e,...le(a||0)]}i64_load16_u(t,a,e){return[...t,51,void 0===e?1:e,...le(a||0)]}i64_load32_s(t,a,e){return[...t,52,void 0===e?2:e,...le(a||0)]}i64_load32_u(t,a,e){return[...t,53,void 0===e?2:e,...le(a||0)]}i64_load(t,a,e){return[...t,41,void 0===e?3:e,...le(a||0)]}i64_store(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=3,l=a):Array.isArray(e)?(i=a,n=3,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,55,n,...le(i)]}i64_store32(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=2,l=a):Array.isArray(e)?(i=a,n=2,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,62,n,...le(i)]}i64_store16(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=1,l=a):Array.isArray(e)?(i=a,n=1,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,61,n,...le(i)]}i64_store8(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=0,l=a):Array.isArray(e)?(i=a,n=0,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,60,n,...le(i)]}i32_load8_s(t,a,e){return[...t,44,void 0===e?0:e,...le(a||0)]}i32_load8_u(t,a,e){return[...t,45,void 0===e?0:e,...le(a||0)]}i32_load16_s(t,a,e){return[...t,46,void 0===e?1:e,...le(a||0)]}i32_load16_u(t,a,e){return[...t,47,void 0===e?1:e,...le(a||0)]}i32_load(t,a,e){return[...t,40,void 0===e?2:e,...le(a||0)]}i32_store(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=2,l=a):Array.isArray(e)?(i=a,n=2,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,54,n,...le(i)]}i32_store16(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=1,l=a):Array.isArray(e)?(i=a,n=1,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,59,n,...le(i)]}i32_store8(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=0,l=a):Array.isArray(e)?(i=a,n=0,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,58,n,...le(i)]}call(t,...a){const e=this.module.functionIdxByName[t];if(void 0===e)throw new Error(`Function not defined: Function: ${t}`);return[...[].concat(...a),16,...le(e)]}call_indirect(t,...a){return[...[].concat(...a),...t,17,0,0]}if(t,a,e){return e?[...t,4,64,...a,5,...e,11]:[...t,4,64,...a,11]}block(t){return[2,64,...t,11]}loop(...t){return[3,64,...[].concat(...t),11]}br_if(t,a){return[...a,13,...le(t)]}br(t){return[12,...le(t)]}ret(t){return[...t,15]}drop(t){return[...t,26]}i64_const(t){return[66,...ne(t)]}i32_const(t){return[65,...ie(t)]}i64_eqz(t){return[...t,80]}i64_eq(t,a){return[...t,...a,81]}i64_ne(t,a){return[...t,...a,82]}i64_lt_s(t,a){return[...t,...a,83]}i64_lt_u(t,a){return[...t,...a,84]}i64_gt_s(t,a){return[...t,...a,85]}i64_gt_u(t,a){return[...t,...a,86]}i64_le_s(t,a){return[...t,...a,87]}i64_le_u(t,a){return[...t,...a,88]}i64_ge_s(t,a){return[...t,...a,89]}i64_ge_u(t,a){return[...t,...a,90]}i64_add(t,a){return[...t,...a,124]}i64_sub(t,a){return[...t,...a,125]}i64_mul(t,a){return[...t,...a,126]}i64_div_s(t,a){return[...t,...a,127]}i64_div_u(t,a){return[...t,...a,128]}i64_rem_s(t,a){return[...t,...a,129]}i64_rem_u(t,a){return[...t,...a,130]}i64_and(t,a){return[...t,...a,131]}i64_or(t,a){return[...t,...a,132]}i64_xor(t,a){return[...t,...a,133]}i64_shl(t,a){return[...t,...a,134]}i64_shr_s(t,a){return[...t,...a,135]}i64_shr_u(t,a){return[...t,...a,136]}i64_extend_i32_s(t){return[...t,172]}i64_extend_i32_u(t){return[...t,173]}i64_clz(t){return[...t,121]}i64_ctz(t){return[...t,122]}i32_eqz(t){return[...t,69]}i32_eq(t,a){return[...t,...a,70]}i32_ne(t,a){return[...t,...a,71]}i32_lt_s(t,a){return[...t,...a,72]}i32_lt_u(t,a){return[...t,...a,73]}i32_gt_s(t,a){return[...t,...a,74]}i32_gt_u(t,a){return[...t,...a,75]}i32_le_s(t,a){return[...t,...a,76]}i32_le_u(t,a){return[...t,...a,77]}i32_ge_s(t,a){return[...t,...a,78]}i32_ge_u(t,a){return[...t,...a,79]}i32_add(t,a){return[...t,...a,106]}i32_sub(t,a){return[...t,...a,107]}i32_mul(t,a){return[...t,...a,108]}i32_div_s(t,a){return[...t,...a,109]}i32_div_u(t,a){return[...t,...a,110]}i32_rem_s(t,a){return[...t,...a,111]}i32_rem_u(t,a){return[...t,...a,112]}i32_and(t,a){return[...t,...a,113]}i32_or(t,a){return[...t,...a,114]}i32_xor(t,a){return[...t,...a,115]}i32_shl(t,a){return[...t,...a,116]}i32_shr_s(t,a){return[...t,...a,117]}i32_shr_u(t,a){return[...t,...a,118]}i32_rotl(t,a){return[...t,...a,119]}i32_rotr(t,a){return[...t,...a,120]}i32_wrap_i64(t){return[...t,167]}i32_clz(t){return[...t,103]}i32_ctz(t){return[...t,104]}unreachable(){return[0]}current_memory(){return[63,0]}comment(){return[]}}const re={i32:127,i64:126,f32:125,f64:124,anyfunc:112,func:96,emptyblock:64};class de{constructor(t,a,e,o,i){if("import"==e)this.fnType="import",this.moduleName=o,this.fieldName=i;else{if("internal"!=e)throw new Error("Invalid function fnType: "+e);this.fnType="internal"}this.module=t,this.fnName=a,this.params=[],this.locals=[],this.localIdxByName={},this.code=[],this.returnType=null,this.nextLocal=0}addParam(t,a){if(this.localIdxByName[t])throw new Error(`param already exists. Function: ${this.fnName}, Param: ${t} `);const e=this.nextLocal++;this.localIdxByName[t]=e,this.params.push({type:a})}addLocal(t,a,e){const o=e||1;if(this.localIdxByName[t])throw new Error(`local already exists. Function: ${this.fnName}, Param: ${t} `);const i=this.nextLocal++;this.localIdxByName[t]=i,this.locals.push({type:a,length:o})}setReturnType(t){if(this.returnType)throw new Error(`returnType already defined. Function: ${this.fnName}`);this.returnType=t}getSignature(){return[96,...[...le(this.params.length),...this.params.map((t=>re[t.type]))],...this.returnType?[1,re[this.returnType]]:[0]]}getBody(){const t=this.locals.map((t=>[...le(t.length),re[t.type]])),a=[...le(this.locals.length),...[].concat(...t),...this.code,11];return[...le(a.length),...a]}addCode(...t){this.code.push(...[].concat(...t))}getCodeBuilder(){return new se(this)}}class ue{constructor(){this.functions=[],this.functionIdxByName={},this.nImportFunctions=0,this.nInternalFunctions=0,this.memory={pagesSize:1,moduleName:"env",fieldName:"memory"},this.free=8,this.datas=[],this.modules={},this.exports=[],this.functionsTable=[]}build(){return this._setSignatures(),new Uint8Array([...te(1836278016),...te(1),...this._buildType(),...this._buildImport(),...this._buildFunctionDeclarations(),...this._buildFunctionsTable(),...this._buildExports(),...this._buildElements(),...this._buildCode(),...this._buildData()])}addFunction(t){if(void 0!==this.functionIdxByName[t])throw new Error(`Function already defined: ${t}`);const a=this.functions.length;return this.functionIdxByName[t]=a,this.functions.push(new de(this,t,"internal")),this.nInternalFunctions++,this.functions[a]}addIimportFunction(t,a,e){if(void 0!==this.functionIdxByName[t])throw new Error(`Function already defined: ${t}`);if(this.functions.length>0&&"internal"==this.functions[this.functions.length-1].type)throw new Error(`Import functions must be declared before internal: ${t}`);let o=e||t;const i=this.functions.length;return this.functionIdxByName[t]=i,this.functions.push(new de(this,t,"import",a,o)),this.nImportFunctions++,this.functions[i]}setMemory(t,a,e){this.memory={pagesSize:t,moduleName:a||"env",fieldName:e||"memory"}}exportFunction(t,a){const e=a||t;if(void 0===this.functionIdxByName[t])throw new Error(`Function not defined: ${t}`);const o=this.functionIdxByName[t];e!=t&&(this.functionIdxByName[e]=o),this.exports.push({exportName:e,idx:o})}addFunctionToTable(t){const a=this.functionIdxByName[t];this.functionsTable.push(a)}addData(t,a){this.datas.push({offset:t,bytes:a})}alloc(t,a){let e,o;(Array.isArray(t)||ArrayBuffer.isView(t))&&void 0===a?(e=t.length,o=t):(e=t,o=a),e=1+(e-1>>3)<<3;const i=this.free;return this.free+=e,o&&this.addData(i,o),i}allocString(t){const a=(new globalThis.TextEncoder).encode(t);return this.alloc([...a,0])}_setSignatures(){this.signatures=[];const t={};if(this.functionsTable.length>0){const a=this.functions[this.functionsTable[0]].getSignature();t["s_"+ce(a)]=0,this.signatures.push(a)}for(let a=0;a{a.pendingLoads.push({page:t,resolve:e,reject:o})}));return a.__statusPage("After Load request: ",t),e}__statusPage(t,a){const e=[],o=this;if(!o.logHistory)return;e.push("=="+t+" "+a);let i="";for(let t=0;t "+a.history[t][e][o])}_triggerLoad(){const t=this;if(t.reading)return;if(0==t.pendingLoads.length)return;const a=Object.keys(t.pages),e=[];for(let o=0;o0&&(void 0!==t.pages[t.pendingLoads[0].page]||o>0||e.length>0);){const a=t.pendingLoads.shift();if(void 0!==t.pages[a.page]){t.pages[a.page].pendingOps++;const o=e.indexOf(a.page);o>=0&&e.splice(o,1),t.pages[a.page].loading?t.pages[a.page].loading.push(a):a.resolve(),t.__statusPage("After Load (cached): ",a.page)}else{if(o)o--;else{const a=e.shift();t.__statusPage("Before Unload: ",a),t.avBuffs.unshift(t.pages[a]),delete t.pages[a],t.__statusPage("After Unload: ",a)}a.page>=t.totalPages?(t.pages[a.page]=n(),a.resolve(),t.__statusPage("After Load (new): ",a.page)):(t.reading=!0,t.pages[a.page]=n(),t.pages[a.page].loading=[a],i.push(t.fd.read(t.pages[a.page].buff,0,t.pageSize,a.page*t.pageSize).then((e=>{t.pages[a.page].size=e.bytesRead;const o=t.pages[a.page].loading;delete t.pages[a.page].loading;for(let t=0;t{a.reject(t)}))),t.__statusPage("After Load (loading): ",a.page))}}function n(){if(t.avBuffs.length>0){const a=t.avBuffs.shift();return a.dirty=!1,a.pendingOps=1,a.size=0,a}return{dirty:!1,buff:new Uint8Array(t.pageSize),pendingOps:1,size:0}}Promise.all(i).then((()=>{t.reading=!1,t.pendingLoads.length>0&&setImmediate(t._triggerLoad.bind(t)),t._tryClose()}))}_triggerWrite(){const t=this;if(t.writing)return;const a=Object.keys(t.pages),e=[];for(let o=0;o{i.writing=!1}),(a=>{console.log("ERROR Writing: "+a),t.error=a,t._tryClose()}))))}t.writing&&Promise.all(e).then((()=>{t.writing=!1,setImmediate(t._triggerWrite.bind(t)),t._tryClose(),t.pendingLoads.length>0&&setImmediate(t._triggerLoad.bind(t))}))}_getDirtyPage(){for(let t in this.pages)if(this.pages[t].dirty)return t;return-1}async write(t,a){if(0==t.byteLength)return;const e=this;if(void 0===a&&(a=e.pos),e.pos=a+t.byteLength,e.totalSize0;){await n[l-o];const a=c+s>e.pageSize?e.pageSize-c:s,i=t.slice(t.byteLength-s,t.byteLength-s+a);new Uint8Array(e.pages[l].buff.buffer,c,a).set(i),e.pages[l].dirty=!0,e.pages[l].pendingOps--,e.pages[l].size=Math.max(c+a,e.pages[l].size),l>=e.totalPages&&(e.totalPages=l+1),s-=a,l++,c=0,e.writing||setImmediate(e._triggerWrite.bind(e))}}async read(t,a){let e=new Uint8Array(t);return await this.readToBuffer(e,0,t,a),e}async readToBuffer(t,a,e,o){if(0==e)return;const i=this;if(e>i.pageSize*i.maxPagesLoaded*.8){const t=Math.floor(1.1*e);this.maxPagesLoaded=Math.floor(t/i.pageSize)+1}if(void 0===o&&(o=i.pos),i.pos=o+e,i.pendingClose)throw new Error("Reading a closing file");const n=Math.floor(o/i.pageSize),l=Math.floor((o+e-1)/i.pageSize),c=[];for(let t=n;t<=l;t++)c.push(i._loadPage(t));i._triggerLoad();let s=n,r=o%i.pageSize,d=o+e>i.totalSize?e-(o+e-i.totalSize):e;for(;d>0;){await c[s-n],i.__statusPage("After Await (read): ",s);const o=r+d>i.pageSize?i.pageSize-r:d,l=new Uint8Array(i.pages[s].buff.buffer,i.pages[s].buff.byteOffset+r,o);t.set(l,a+e-d),i.pages[s].pendingOps--,i.__statusPage("After Op done: ",s),d-=o,s++,r=0,i.pendingLoads.length>0&&setImmediate(i._triggerLoad.bind(i))}this.pos=o+e}_tryClose(){const t=this;if(!t.pendingClose)return;t.error&&t.pendingCloseReject(t.error);t._getDirtyPage()>=0||t.writing||t.reading||t.pendingLoads.length>0||t.pendingClose()}close(){const t=this;if(t.pendingClose)throw new Error("Closing the file twice");return new Promise(((a,e)=>{t.pendingClose=a,t.pendingCloseReject=e,t._tryClose()})).then((()=>{t.fd.close()}),(a=>{throw t.fd.close(),a}))}async discard(){await this.close(),await pe.promises.unlink(this.fileName)}async writeULE32(t,a){const e=new Uint8Array(4);new DataView(e.buffer).setUint32(0,t,!0),await this.write(e,a)}async writeUBE32(t,a){const e=new Uint8Array(4);new DataView(e.buffer).setUint32(0,t,!1),await this.write(e,a)}async writeULE64(t,a){const e=new Uint8Array(8),o=new DataView(e.buffer);o.setUint32(0,4294967295&t,!0),o.setUint32(4,Math.floor(t/4294967296),!0),await this.write(e,a)}async readULE32(t){const a=await this.read(4,t);return new Uint32Array(a.buffer)[0]}async readUBE32(t){const a=await this.read(4,t);return new DataView(a.buffer).getUint32(0,!1)}async readULE64(t){const a=await this.read(8,t),e=new Uint32Array(a.buffer);return 4294967296*e[1]+e[0]}async readString(t){const a=this;if(a.pendingClose)throw new Error("Reading a closing file");let e=void 0===t?a.pos:t,o=Math.floor(e/a.pageSize),i=!1,n="";for(;!i;){let t=a._loadPage(o);a._triggerLoad(),await t,a.__statusPage("After Await (read): ",o);let l=e%a.pageSize;const c=new Uint8Array(a.pages[o].buff.buffer,a.pages[o].buff.byteOffset+l,a.pageSize-l);let s=c.findIndex((t=>0===t));i=-1!==s,i?(n+=(new TextDecoder).decode(c.slice(0,s)),a.pos=o*this.pageSize+l+s+1):(n+=(new TextDecoder).decode(c),a.pos=o*this.pageSize+l+c.length),a.pages[o].pendingOps--,a.__statusPage("After Op done: ",o),e=a.pos,o++,a.pendingLoads.length>0&&setImmediate(a._triggerLoad.bind(a))}return n}}const be=new Uint8Array(4),we=new DataView(be.buffer),ye=new Uint8Array(8),Ae=new DataView(ye.buffer);class Ce{constructor(){this.pageSize=16384}_resizeIfNeeded(t){if(t>this.allocSize){const a=Math.max(this.allocSize+(1<<20),Math.floor(1.1*this.allocSize),t),e=new Uint8Array(a);e.set(this.o.data),this.o.data=e,this.allocSize=a}}async write(t,a){if(void 0===a&&(a=this.pos),this.readOnly)throw new Error("Writing a read only file");this._resizeIfNeeded(a+t.byteLength),this.o.data.set(t.slice(),a),a+t.byteLength>this.totalSize&&(this.totalSize=a+t.byteLength),this.pos=a+t.byteLength}async readToBuffer(t,a,e,o){if(void 0===o&&(o=this.pos),this.readOnly&&o+e>this.totalSize)throw new Error("Reading out of bounds");this._resizeIfNeeded(o+e);const i=new Uint8Array(this.o.data.buffer,this.o.data.byteOffset+o,e);t.set(i,a),this.pos=o+e}async read(t,a){const e=new Uint8Array(t);return await this.readToBuffer(e,0,t,a),e}close(){this.o.data.byteLength!=this.totalSize&&(this.o.data=this.o.data.slice(0,this.totalSize))}async discard(){}async writeULE32(t,a){we.setUint32(0,t,!0),await this.write(be,a)}async writeUBE32(t,a){we.setUint32(0,t,!1),await this.write(be,a)}async writeULE64(t,a){Ae.setUint32(0,4294967295&t,!0),Ae.setUint32(4,Math.floor(t/4294967296),!0),await this.write(ye,a)}async readULE32(t){const a=await this.read(4,t);return new Uint32Array(a.buffer)[0]}async readUBE32(t){const a=await this.read(4,t);return new DataView(a.buffer).getUint32(0,!1)}async readULE64(t){const a=await this.read(8,t),e=new Uint32Array(a.buffer);return 4294967296*e[1]+e[0]}async readString(t){const a=this;let e=void 0===t?a.pos:t;if(e>this.totalSize){if(this.readOnly)throw new Error("Reading out of bounds");this._resizeIfNeeded(t)}const o=new Uint8Array(a.o.data.buffer,e,this.totalSize-e);let i=o.findIndex((t=>0===t)),n="";return-1!==i?(n=(new TextDecoder).decode(o.slice(0,i)),a.pos=e+i+1):a.pos=e,n}}const Fe=1<<22;const xe=new Uint8Array(4),Ie=new DataView(xe.buffer),Be=new Uint8Array(8),Ee=new DataView(Be.buffer);class ve{constructor(){this.pageSize=16384}_resizeIfNeeded(t){if(t<=this.totalSize)return;if(this.readOnly)throw new Error("Reading out of file bounds");const a=Math.floor((t-1)/Fe)+1;for(let e=Math.max(this.o.data.length-1,0);e0;){const a=i+n>Fe?Fe-i:n,l=t.slice(t.byteLength-n,t.byteLength-n+a);new Uint8Array(e.o.data[o].buffer,i,a).set(l),n-=a,o++,i=0}this.pos=a+t.byteLength}async readToBuffer(t,a,e,o){const i=this;if(void 0===o&&(o=i.pos),this.readOnly&&o+e>this.totalSize)throw new Error("Reading out of bounds");this._resizeIfNeeded(o+e);let n=Math.floor(o/Fe),l=o%Fe,c=e;for(;c>0;){const o=l+c>Fe?Fe-l:c,s=new Uint8Array(i.o.data[n].buffer,l,o);t.set(s,a+e-c),c-=o,n++,l=0}this.pos=o+e}async read(t,a){const e=new Uint8Array(t);return await this.readToBuffer(e,0,t,a),e}close(){}async discard(){}async writeULE32(t,a){Ie.setUint32(0,t,!0),await this.write(xe,a)}async writeUBE32(t,a){Ie.setUint32(0,t,!1),await this.write(xe,a)}async writeULE64(t,a){Ee.setUint32(0,4294967295&t,!0),Ee.setUint32(4,Math.floor(t/4294967296),!0),await this.write(Be,a)}async readULE32(t){const a=await this.read(4,t);return new Uint32Array(a.buffer)[0]}async readUBE32(t){const a=await this.read(4,t);return new DataView(a.buffer).getUint32(0,!1)}async readULE64(t){const a=await this.read(8,t),e=new Uint32Array(a.buffer);return 4294967296*e[1]+e[0]}async readString(t){const a=this;let e=void 0===t?a.pos:t;if(e>this.totalSize){if(this.readOnly)throw new Error("Reading out of bounds");this._resizeIfNeeded(t)}let o=!1,i="";for(;!o;){let t=Math.floor(e/Fe),n=e%Fe;if(void 0===a.o.data[t])throw new Error("ERROR");let l=Math.min(2048,a.o.data[t].length-n);const c=new Uint8Array(a.o.data[t].buffer,n,l);let s=c.findIndex((t=>0===t));o=-1!==s,o?(i+=(new TextDecoder).decode(c.slice(0,s)),a.pos=t*Fe+n+s+1):(i+=(new TextDecoder).decode(c),a.pos=t*Fe+n+c.length),e=a.pos}return i}}const Se=1024,Pe=512,qe=2,Oe=0,Ge=65536,ze=8192;async function Te(t,a,e){if("string"==typeof t&&(t={type:"file",fileName:t,cacheSize:a||Ge,pageSize:e||ze}),"file"==t.type)return await me(t.fileName,Se|Pe|qe,t.cacheSize,t.pageSize);if("mem"==t.type)return function(t){const a=t.initialSize||1<<20,e=new Ce;return e.o=t,e.o.data=new Uint8Array(a),e.allocSize=a,e.totalSize=0,e.readOnly=!1,e.pos=0,e}(t);if("bigMem"==t.type)return function(t){const a=t.initialSize||0,e=new ve;e.o=t;const o=a?Math.floor((a-1)/Fe)+1:0;e.o.data=[];for(let t=0;te)throw new Error("Version not supported");const s=await n.readULE32();let r=[];for(let t=0;t1)throw new Error(t.fileName+": Section Duplicated "+e);t.pos=a[e][0].p,t.readingSection=a[e][0]}async function De(t,a){if(void 0===t.readingSection)throw new Error("Not reading a section");if(!a&&t.pos-t.readingSection.p!=t.readingSection.size)throw new Error("Invalid section size reading");delete t.readingSection}async function $e(t,a,e,o){const i=new Uint8Array(e);fe.toRprLE(i,0,a,e),await t.write(i,o)}async function je(t,a,e){const o=await t.read(a,e);return fe.fromRprLE(o,0,a)}async function Ve(t,a,e,o,i){void 0===i&&(i=a[o][0].size);const n=t.pageSize;await Ne(t,a,o),await ke(e,o);for(let a=0;aa[e][0].size)throw new Error("Reading out of the range of the section");let n;return n=i<1<<30?new Uint8Array(i):new qa(i),await t.readToBuffer(n,0,i,a[e][0].p+o),n}async function He(t,a,e,o,i){const n=16*t.pageSize;if(await Ne(t,a,i),await Ne(e,o,i),a[i][0].size!=o[i][0].size)return!1;const l=a[i][0].size;for(let a=0;a=0)a=await _e();else{if(!(["BLS12381"].indexOf(e)>=0))throw new Error(`Curve not supported: ${t}`);a=await ge()}return a}var ao={exports:{}},eo=function t(a,e){if(!a){var o=new oo(e);throw Error.captureStackTrace&&Error.captureStackTrace(o,t),o}};class oo extends Error{}oo.prototype.name="AssertionError";var io={exports:{}};function no(t){return t.length}var lo={byteLength:no,toString:function(t){const a=t.byteLength;let e="";for(let o=0;o1&&61===t.charCodeAt(a-1)&&a--,3*a>>>2}so[45]=62,so[95]=63;var uo={byteLength:ro,toString:function(t){const a=t.byteLength;let e="";for(let o=0;o>2]+co[(3&t[o])<<4|t[o+1]>>4]+co[(15&t[o+1])<<2|t[o+2]>>6]+co[63&t[o+2]];return a%3==2?e=e.substring(0,e.length-1)+"=":a%3==1&&(e=e.substring(0,e.length-2)+"=="),e},write:function(t,a,e=0,o=ro(a)){const i=Math.min(o,t.byteLength-e);for(let e=0,o=0;o>4,t[o++]=(15&n)<<4|l>>2,t[o++]=(3&l)<<6|63&c}return i}};function _o(t){return t.length>>>1}var go={byteLength:_o,toString:function(t){const a=t.byteLength;t=new DataView(t.buffer,t.byteOffset,a);let e="",o=0;for(let i=a-a%4;o=48&&t<=57?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:void 0}function ho(t){let a=0;for(let e=0,o=t.length;e=55296&&i<=56319&&e+1=56320&&o<=57343){a+=4,e++;continue}}a+=i<=127?1:i<=2047?2:3}return a}let po,mo;if("undefined"!=typeof TextDecoder){const t=new TextDecoder;po=function(a){return t.decode(a)}}else po=function(t){const a=t.byteLength;let e="",o=0;for(;o0){let a=0;for(;a>o,o-=6;o>=0;)t[l++]=128|e>>o&63,o-=6;n+=e>=65536?2:1}return i};var Lo={byteLength:ho,toString:po,write:mo};function bo(t){return 2*t.length}var wo,yo,Ao={byteLength:bo,toString:function(t){const a=t.byteLength;let e="";for(let o=0;o>8,l=i%256;t[e+2*o]=l,t[e+2*o+1]=n}return i}};!function(t,a){const e=lo,o=uo,i=go,n=Lo,l=Ao,c=255===new Uint8Array(Uint16Array.of(255).buffer)[0];function s(t){switch(t){case"ascii":return e;case"base64":return o;case"hex":return i;case"utf8":case"utf-8":case void 0:return n;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l;default:throw new Error(`Unknown encoding: ${t}`)}}function r(t){return t instanceof Uint8Array}function d(t,a,e){return"string"==typeof t?function(t,a){const e=s(a),o=new Uint8Array(e.byteLength(t));return e.write(o,t,0,o.byteLength),o}(t,a):Array.isArray(t)?function(t){const a=new Uint8Array(t.length);return a.set(t),a}(t):ArrayBuffer.isView(t)?function(t){const a=new Uint8Array(t.byteLength);return a.set(t),a}(t):function(t,a,e){return new Uint8Array(t,a,e)}(t,a,e)}function u(t,a,e,o,i){if(0===t.byteLength)return-1;if("string"==typeof e?(o=e,e=0):void 0===e?e=i?0:t.length-1:e<0&&(e+=t.byteLength),e>=t.byteLength){if(i)return-1;e=t.byteLength-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof a)a=d(a,o);else if("number"==typeof a)return a&=255,i?t.indexOf(a,e):t.lastIndexOf(a,e);if(0===a.byteLength)return-1;if(i){let o=-1;for(let i=e;it.byteLength&&(e=t.byteLength-a.byteLength);for(let o=e;o>=0;o--){let e=!0;for(let i=0;ii)return 1}return t.byteLength>a.byteLength?1:t.byteLengtht+a.byteLength),0));const e=new Uint8Array(a);return t.reduce(((t,a)=>(e.set(a,t),t+a.byteLength)),0),e},copy:function(t,a,e=0,o=0,i=t.byteLength){if(i>0&&i=t.byteLength)throw new RangeError("sourceStart is out of range");if(i<0)throw new RangeError("sourceEnd is out of range");e>=a.byteLength&&(e=a.byteLength),i>t.byteLength&&(i=t.byteLength),a.byteLength-e=i||o<=e?"":(e<0&&(e=0),o>i&&(o=i),(0!==e||o{for(var t=new Uint8Array(128),a=0;a<64;a++)t[a<26?a+65:a<52?a+71:a<62?a-4:4*a-205]=a;return a=>{for(var e=a.length,o=new Uint8Array(3*(e-("="==a[e-1])-("="==a[e-2]))/4|0),i=0,n=0;i>4,o[n++]=c<<4|s>>2,o[n++]=s<<6|r}return o}})(),a=((t,a)=>function(){return a||(0,t[Object.keys(t)[0]])((a={exports:{}}).exports,a),a.exports})({"wasm-binary:./blake2b.wat"(a,e){e.exports=t("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCU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ACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}}),e=a(),o=WebAssembly.compile(e);return wo=async t=>(await WebAssembly.instantiate(await o,t)).exports}()().then((t=>{xo=t})),Bo=64,Eo=[];ao.exports=zo;var vo=ao.exports.BYTES_MIN=16,So=ao.exports.BYTES_MAX=64;ao.exports.BYTES=32;var Po=ao.exports.KEYBYTES_MIN=16,qo=ao.exports.KEYBYTES_MAX=64;ao.exports.KEYBYTES=32;var Oo=ao.exports.SALTBYTES=16,Go=ao.exports.PERSONALBYTES=16;function zo(t,a,e,o,i){if(!(this instanceof zo))return new zo(t,a,e,o,i);if(!xo)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");t||(t=32),!0!==i&&(Co(t>=vo,"digestLength must be at least "+vo+", was given "+t),Co(t<=So,"digestLength must be at most "+So+", was given "+t),null!=a&&(Co(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),Co(a.length>=Po,"key must be at least "+Po+", was given "+a.length),Co(a.length<=qo,"key must be at least "+qo+", was given "+a.length)),null!=e&&(Co(e instanceof Uint8Array,"salt must be Uint8Array or Buffer"),Co(e.length===Oo,"salt must be exactly "+Oo+", was given "+e.length)),null!=o&&(Co(o instanceof Uint8Array,"personal must be Uint8Array or Buffer"),Co(o.length===Go,"personal must be exactly "+Go+", was given "+o.length))),Eo.length||(Eo.push(Bo),Bo+=216),this.digestLength=t,this.finalized=!1,this.pointer=Eo.pop(),this._memory=new Uint8Array(xo.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=a?a.length:0,this._memory[2]=1,this._memory[3]=1,e&&this._memory.set(e,32),o&&this._memory.set(o,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),xo.blake2b_init(this.pointer,this.digestLength),a&&(this.update(a),this._memory.fill(0,Bo,Bo+a.length),this._memory[this.pointer+200]=128)}function To(){}function Mo(t){return(0!=(4294901760&t)?(t&=4294901760,16):0)|(0!=(4278255360&t)?(t&=4278255360,8):0)|(0!=(4042322160&t)?(t&=4042322160,4):0)|(0!=(3435973836&t)?(t&=3435973836,2):0)|0!=(2863311530&t)}function Uo(t,a){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);let o="";for(let t=0;t<4;t++){t>0&&(o+="\n"),o+="\t\t";for(let a=0;a<4;a++)a>0&&(o+=" "),o+=e.getUint32(16*t+4*a).toString(16).padStart(8,"0")}return a&&(o=a+"\n"+o),o}function Qo(t,a){if(t.byteLength!=a.byteLength)return!1;for(var e=new Int8Array(t),o=new Int8Array(a),i=0;i!=t.byteLength;i++)if(e[i]!=o[i])return!1;return!0}function ko(t){const a=t.getPartialHash(),e=ao.exports(64);return e.setPartialHash(a),e}async function Ro(t,a,e,o,i){if(t.G1.isZero(a))return!1;if(t.G1.isZero(e))return!1;if(t.G2.isZero(o))return!1;if(t.G2.isZero(i))return!1;return await t.pairingEq(a,i,t.G1.neg(e),o)}function No(t){let a=new Uint8Array(t);return void 0!==globalThis.crypto?globalThis.crypto.getRandomValues(a):U.randomFillSync(a),a}async function Do(t){if(void 0!==globalThis.crypto&&void 0!==globalThis.crypto.subtle){const a=await globalThis.crypto.subtle.digest("SHA-256",t.buffer);return new Uint8Array(a)}return U.createHash("sha256").update(t).digest()}function $o(t,a){return new DataView(t.buffer).getUint32(a,!1)}async function jo(t){for(;!t;)t=await window.prompt("Enter a random text. (Entropy): ","");const a=ao.exports(64);a.update(No(64));const e=new TextEncoder;a.update(e.encode(t));const o=a.digest(),i=[];for(let t=0;t<8;t++)i[t]=$o(o,4*t);return new M(i)}async function Vo(t,a){let e,o;a<32?(e=1<>>0,o=1):(e=4294967296,o=1<>>0);let i=t;for(let t=0;t{e[o]=Zo(t,a[o])})),e}return"bigint"==typeof a||void 0!==a.eq?a.toString(10):a}zo.prototype._realloc=function(t){xo.memory.grow(Math.max(0,Math.ceil(Math.abs(t-this._memory.length)/65536))),this._memory=new Uint8Array(xo.memory.buffer)},zo.prototype.update=function(t){return Co(!1===this.finalized,"Hash instance finalized"),Co(t instanceof Uint8Array,"input must be Uint8Array or Buffer"),Bo+t.length>this._memory.length&&this._realloc(Bo+t.length),this._memory.set(t,Bo),xo.blake2b_update(this.pointer,Bo,Bo+t.length),this},zo.prototype.digest=function(t){if(Co(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,Eo.push(this.pointer),xo.blake2b_final(this.pointer),!t||"binary"===t)return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("string"==typeof t)return Fo.toString(this._memory,t,this.pointer+128,this.pointer+128+this.digestLength);Co(t instanceof Uint8Array&&t.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var a=0;at()),t):t(new Error("WebAssembly not supported"))},zo.prototype.ready=zo.ready,zo.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)},zo.prototype.setPartialHash=function(t){this._memory.set(t,this.pointer)};const Wo=1,Yo=1,Jo=2,Xo=10,ti=3,ai=17,ei=2,oi=3,ii=4,ni=5,li=6,ci=7,si=8,ri=9,di=10,ui=11,_i=12,gi=13,fi=14,hi=15,pi=16,mi=17;async function Li(t,a){await ke(t,1),await t.writeULE32(1),await Re(t);const e=await Xe(a.q);await ke(t,2);const o=e.q,i=8*(Math.floor((fe.bitLength(o)-1)/64)+1),n=e.r,l=8*(Math.floor((fe.bitLength(n)-1)/64)+1);await t.writeULE32(i),await $e(t,o,i),await t.writeULE32(l),await $e(t,n,l),await t.writeULE32(a.nVars),await t.writeULE32(a.nPublic),await t.writeULE32(a.domainSize),await bi(t,e,a.vk_alpha_1),await bi(t,e,a.vk_beta_1),await wi(t,e,a.vk_beta_2),await wi(t,e,a.vk_gamma_2),await bi(t,e,a.vk_delta_1),await wi(t,e,a.vk_delta_2),await Re(t)}async function bi(t,a,e){const o=new Uint8Array(2*a.G1.F.n8);a.G1.toRprLEM(o,0,e),await t.write(o)}async function wi(t,a,e){const o=new Uint8Array(2*a.G2.F.n8);a.G2.toRprLEM(o,0,e),await t.write(o)}async function yi(t,a,e){const o=await t.read(2*a.G1.F.n8),i=a.G1.fromRprLEM(o,0);return e?a.G1.toObject(i):i}async function Ai(t,a,e){const o=await t.read(2*a.G2.F.n8),i=a.G2.fromRprLEM(o,0);return e?a.G2.toObject(i):i}async function Ci(t,a,e){await Ne(t,a,1);const o=await t.readULE32();if(await De(t),o===Yo)return await async function(t,a,e){const o={protocol:"groth16"};await Ne(t,a,2);const i=await t.readULE32();o.n8q=i,o.q=await je(t,i);const n=await t.readULE32();return o.n8r=n,o.r=await je(t,n),o.curve=await Xe(o.q),o.nVars=await t.readULE32(),o.nPublic=await t.readULE32(),o.domainSize=await t.readULE32(),o.power=Mo(o.domainSize),o.vk_alpha_1=await yi(t,o.curve,e),o.vk_beta_1=await yi(t,o.curve,e),o.vk_beta_2=await Ai(t,o.curve,e),o.vk_gamma_2=await Ai(t,o.curve,e),o.vk_delta_1=await yi(t,o.curve,e),o.vk_delta_2=await Ai(t,o.curve,e),await De(t),o}(t,a,e);if(o===Jo)return await async function(t,a,e){const o={protocol:"plonk"};await Ne(t,a,2);const i=await t.readULE32();o.n8q=i,o.q=await je(t,i);const n=await t.readULE32();return o.n8r=n,o.r=await je(t,n),o.curve=await Xe(o.q),o.nVars=await t.readULE32(),o.nPublic=await t.readULE32(),o.domainSize=await t.readULE32(),o.power=Mo(o.domainSize),o.nAdditions=await t.readULE32(),o.nConstraints=await t.readULE32(),o.k1=await t.read(n),o.k2=await t.read(n),o.Qm=await yi(t,o.curve,e),o.Ql=await yi(t,o.curve,e),o.Qr=await yi(t,o.curve,e),o.Qo=await yi(t,o.curve,e),o.Qc=await yi(t,o.curve,e),o.S1=await yi(t,o.curve,e),o.S2=await yi(t,o.curve,e),o.S3=await yi(t,o.curve,e),o.X_2=await Ai(t,o.curve,e),await De(t),o}(t,a,e);if(o===Xo)return await async function(t,a,e){const o={protocol:"fflonk"};o.protocolId=Xo,await Ne(t,a,ei);const i=await t.readULE32();o.n8q=i,o.q=await je(t,i),o.curve=await Xe(o.q);const n=await t.readULE32();return o.n8r=n,o.r=await je(t,n),o.nVars=await t.readULE32(),o.nPublic=await t.readULE32(),o.domainSize=await t.readULE32(),o.power=Mo(o.domainSize),o.nAdditions=await t.readULE32(),o.nConstraints=await t.readULE32(),o.k1=await t.read(n),o.k2=await t.read(n),o.w3=await t.read(n),o.w4=await t.read(n),o.w8=await t.read(n),o.wr=await t.read(n),o.X_2=await Ai(t,o.curve,e),o.C0=await yi(t,o.curve,e),await De(t),o}(t,a,e);throw new Error("Protocol not supported: ")}async function Fi(t,a,e){const o={delta:{}};o.deltaAfter=await yi(t,a,e),o.delta.g1_s=await yi(t,a,e),o.delta.g1_sx=await yi(t,a,e),o.delta.g2_spx=await Ai(t,a,e),o.transcript=await t.read(64),o.type=await t.readULE32();const i=await t.readULE32(),n=t.pos;let l=0;for(;t.pos-n0){const a=new Uint8Array(o);await t.writeULE32(a.byteLength),await t.write(a)}else await t.writeULE32(0)}async function Bi(t,a,e){await ke(t,10),await t.write(e.csHash),await t.writeULE32(e.contributions.length);for(let o=0;o0;)e.unshift(0),n--;return e}const Ti=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function Mi(t,a){return a&&10!=a?16==a?"0x"==t.slice(0,2)?BigInt(t):BigInt("0x"+t):void 0:BigInt(t)}const Ui=Mi;function Qi(t){const a=t.toString(16);return 4*(a.length-1)+Ti[parseInt(a[0],16)]}function ki(t){return!t}function Ri(t,a){return BigInt(t)<>BigInt(a)}const Di=Ri,$i=Ni;function ji(t){return(BigInt(t)&BigInt(1))==BigInt(1)}function Vi(t){let a=BigInt(t);const e=[];for(;a;)a&BigInt(1)?e.push(1):e.push(0),a>>=BigInt(1);return e}function Ki(t){if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(t)}function Hi(t,a){return BigInt(t)-BigInt(a)}function Zi(t,a){return BigInt(t)**BigInt(a)}function Wi(t,a){return BigInt(t)/BigInt(a)}function Yi(t,a){return BigInt(t)%BigInt(a)}function Ji(t,a){return BigInt(t)==BigInt(a)}function Xi(t,a){return BigInt(t)&BigInt(a)}function tn(t,a,e,o){const i="0000000"+e.toString(16),n=new Uint32Array(t.buffer,a,o/4),l=1+(4*(i.length-7)-1>>5);for(let t=0;t>5);for(let t=0;ti[i.length-a-1]=t.toString(16).padStart(8,"0"))),Mi(i.join(""),16)}function on(t,a,e){e=e||t.byteLength,a=a||0;const o=new DataView(t.buffer,t.byteOffset+a,e),i=new Array(e/4);for(let t=0;t>=BigInt(1)}return e},bits:Vi,toNumber:Ki,toArray:function(t,a){const e=[];let o=BigInt(t);for(a=BigInt(a);o;)e.unshift(Number(o%a)),o/=a;return e},add:function(t,a){return BigInt(t)+BigInt(a)},sub:Hi,neg:function(t){return-BigInt(t)},mul:function(t,a){return BigInt(t)*BigInt(a)},square:function(t){return BigInt(t)*BigInt(t)},pow:Zi,exp:function(t,a){return BigInt(t)**BigInt(a)},abs:function(t){return BigInt(t)>=0?BigInt(t):-BigInt(t)},div:Wi,mod:Yi,eq:Ji,neq:function(t,a){return BigInt(t)!=BigInt(a)},lt:function(t,a){return BigInt(t)BigInt(a)},leq:function(t,a){return BigInt(t)<=BigInt(a)},geq:function(t,a){return BigInt(t)>=BigInt(a)},band:Xi,bor:function(t,a){return BigInt(t)|BigInt(a)},bxor:function(t,a){return BigInt(t)^BigInt(a)},land:function(t,a){return BigInt(t)&&BigInt(a)},lor:function(t,a){return BigInt(t)||BigInt(a)},lnot:function(t){return!BigInt(t)},toRprLE:tn,toRprBE:an,fromRprLE:en,fromRprBE:on,toString:function(t,a){return t.toString(a)},toLEBuff:function(t){const a=new Uint8Array(Math.floor((Qi(t)-1)/8)+1);return tn(a,0,t,a.byteLength),a},zero:nn,one:ln});function sn(t,a,e){if(ki(e))return t.one;const o=Vi(e);if(0==o.length)return t.one;let i=a;for(let e=o.length-2;e>=0;e--)i=t.square(i),o[e]&&(i=t.mul(i,a));return i}function rn(t){if(t.m%2==1)if(Ji(Yi(t.p,4),1))if(Ji(Yi(t.p,8),1))if(Ji(Yi(t.p,16),1))!function(t){t.sqrt_q=Zi(t.p,t.m),t.sqrt_s=0,t.sqrt_t=Hi(t.sqrt_q,1);for(;!ji(t.sqrt_t);)t.sqrt_s=t.sqrt_s+1,t.sqrt_t=Wi(t.sqrt_t,2);let a=t.one;for(;t.eq(a,t.one);){const e=t.random();t.sqrt_z=t.pow(e,t.sqrt_t),a=t.pow(t.sqrt_z,2**(t.sqrt_s-1))}t.sqrt_tm1d2=Wi(Hi(t.sqrt_t,1),2),t.sqrt=function(t){const a=this;if(a.isZero(t))return a.zero;let e=a.pow(t,a.sqrt_tm1d2);const o=a.pow(a.mul(a.square(e),t),2**(a.sqrt_s-1));if(a.eq(o,a.negone))return null;let i=a.sqrt_s,n=a.mul(t,e),l=a.mul(n,e),c=a.sqrt_z;for(;!a.eq(l,a.one);){let t=a.square(l),o=1;for(;!a.eq(t,a.one);)t=a.square(t),o++;e=c;for(let t=0;t>>0;return a}class un{constructor(t,a,e){this.F=a,this.G=t,this.opMulGF=e;let o=a.sqrt_t||a.t,i=a.sqrt_s||a.s,n=a.one;for(;a.eq(a.pow(n,a.half),a.one);)n=a.add(n,a.one);this.w=new Array(i+1),this.wi=new Array(i+1),this.w[i]=this.F.pow(n,o),this.wi[i]=this.F.inv(this.w[i]);let l=i-1;for(;l>=0;)this.w[l]=this.F.square(this.w[l+1]),this.wi[l]=this.F.square(this.wi[l+1]),l--;this.roots=[],this._setRoots(Math.min(i,15))}_setRoots(t){for(let a=t;a>=0&&!this.roots[a];a--){let t=this.F.one;const e=1<>1,c=gn(t,a,e-1,o,2*i),s=gn(t,a,e-1,o+i,2*i),r=new Array(n);for(let a=0;a>this.one,this.bitLength=Qi(this.p),this.mask=(this.one<>this.one;this.nqr=this.two;let e=this.pow(this.nqr,a);for(;!this.eq(e,this.negone);)this.nqr=this.nqr+this.one,e=this.pow(this.nqr,a);for(this.s=0,this.t=this.negone;(this.t&this.one)==this.zero;)this.s=this.s+1,this.t=this.t>>this.one;this.nqr_to_t=this.pow(this.nqr,this.t),rn(this),this.FFT=new un(this,this,this.mul.bind(this)),this.fft=this.FFT.fft.bind(this.FFT),this.ifft=this.FFT.ifft.bind(this.FFT),this.w=this.FFT.w,this.wi=this.FFT.wi,this.shift=this.square(this.nqr),this.k=this.exp(this.nqr,2**this.s)}e(t,a){let e;if(a?16==a&&(e=BigInt("0x"+t)):e=BigInt(t),e<0){let t=-e;return t>=this.p&&(t%=this.p),this.p-t}return e>=this.p?e%this.p:e}add(t,a){const e=t+a;return e>=this.p?e-this.p:e}sub(t,a){return t>=a?t-a:this.p-a+t}neg(t){return t?this.p-t:t}mul(t,a){return t*a%this.p}mulScalar(t,a){return t*this.e(a)%this.p}square(t){return t*t%this.p}eq(t,a){return t==a}neq(t,a){return t!=a}lt(t,a){return(t>this.half?t-this.p:t)<(a>this.half?a-this.p:a)}gt(t,a){return(t>this.half?t-this.p:t)>(a>this.half?a-this.p:a)}leq(t,a){return(t>this.half?t-this.p:t)<=(a>this.half?a-this.p:a)}geq(t,a){return(t>this.half?t-this.p:t)>=(a>this.half?a-this.p:a)}div(t,a){return this.mul(t,this.inv(a))}idiv(t,a){if(!a)throw new Error("Division by zero");return t/a}inv(t){if(!t)throw new Error("Division by zero");let a=this.zero,e=this.p,o=this.one,i=t%this.p;for(;i;){let t=e/i;[a,o]=[o,a-t*o],[e,i]=[i,e-t*i]}return a=this.p?e-this.p:e}bor(t,a){const e=(t|a)&this.mask;return e>=this.p?e-this.p:e}bxor(t,a){const e=(t^a)&this.mask;return e>=this.p?e-this.p:e}bnot(t){const a=t^this.mask;return a>=this.p?a-this.p:a}shl(t,a){if(Number(a)=this.p?e-this.p:e}{const e=this.p-a;return Number(e)>e:this.zero}}shr(t,a){if(Number(a)>a;{const e=this.p-a;if(Number(e)=this.p?a-this.p:a}return 0}}land(t,a){return t&&a?this.one:this.zero}lor(t,a){return t||a?this.one:this.zero}lnot(t){return t?this.zero:this.one}sqrt_old(t){if(t==this.zero)return this.zero;if(this.pow(t,this.negone>>this.one)!=this.one)return null;let a=this.s,e=this.nqr_to_t,o=this.pow(t,this.t),i=this.pow(t,this.add(this.t,this.one)>>this.one);for(;o!=this.one;){let t=this.square(o),n=1;for(;t!=this.one;)n++,t=this.square(t);let l=e;for(let t=0;tthis.p>>this.one&&(i=this.neg(i)),i}normalize(t,a){if((t=BigInt(t,a))<0){let a=-t;return a>=this.p&&(a%=this.p),this.p-a}return t>=this.p?t%this.p:t}random(){const t=2*this.bitLength/8;let a=this.zero;for(let e=0;ethis.half&&10==a){e="-"+(this.p-t).toString(a)}else e=t.toString(a);return e}isZero(t){return t==this.zero}fromRng(t){let a;do{a=this.zero;for(let e=0;e=this.p);return a=a*this.Ri%this.p,a}fft(t){return this.FFT.fft(t)}ifft(t){return this.FFT.ifft(t)}toRprLE(t,a,e){tn(t,a,e,8*this.n64)}toRprBE(t,a,e){an(t,a,e,8*this.n64)}toRprBEM(t,a,e){return this.toRprBE(t,a,this.mul(this.R,e))}toRprLEM(t,a,e){return this.toRprLE(t,a,this.mul(this.R,e))}fromRprLE(t,a){return en(t,a,this.n8)}fromRprBE(t,a){return on(t,a,this.n8)}fromRprLEM(t,a){return this.mul(this.fromRprLE(t,a),this.Ri)}fromRprBEM(t,a){return this.mul(this.fromRprBE(t,a),this.Ri)}toObject(t){return t}}!function(t){globalThis.btoa(t)}("("+function(t){const a=32767;let e,o;async function i(t){const i=new Uint8Array(t.code),n=await WebAssembly.compile(i);o=new WebAssembly.Memory({initial:t.init,maximum:a}),e=await WebAssembly.instantiate(n,{env:{memory:o}})}function n(t){const e=new Uint32Array(o.buffer,0,1);for(;3&e[0];)e[0]++;const i=e[0];if(e[0]+=t,e[0]+t>o.buffer.byteLength){const i=o.buffer.byteLength/65536;let n=Math.floor((e[0]+t)/65536)+1;n>a&&(n=a),o.grow(n-i)}return i}function l(t){const a=n(t.byteLength);return s(a,t),a}function c(t,a){const e=new Uint8Array(o.buffer);return new Uint8Array(e.buffer,e.byteOffset+t,a)}function s(t,a){new Uint8Array(o.buffer).set(new Uint8Array(a),t)}function r(t){if("INIT"==t[0].cmd)return i(t[0]);const a={vars:[],out:[]},r=new Uint32Array(o.buffer,0,1)[0];for(let o=0;o=2&&(d>=1||u>=7)){""!==s&&(s+=" ");const t=hn.fromArray(a,4294967296).toString();s+=t}else console.log(hn.fromArray(a,4294967296))},error:function(t,e,o,i,n,c){let s;throw s=7==t?h(e)+" "+l.getFr(i).toString()+" != "+l.getFr(n).toString()+" "+h(c):9==t?h(e)+" "+l.getFr(i).toString()+" "+h(n):5==t&&a.sym?h(e)+" "+a.sym.labelIdx2Name[n]:h(e)+" "+o+" "+i+" "+n+" "+c,console.log("ERROR: ",t,s),new Error(s)},log:function(t){console.log(l.getFr(t).toString())},logGetSignal:function(t,e){a.logGetSignal&&a.logGetSignal(t,l.getFr(e))},logSetSignal:function(t,e){a.logSetSignal&&a.logSetSignal(t,l.getFr(e))},logStartComponent:function(t){a.logStartComponent&&a.logStartComponent(t)},logFinishComponent:function(t){a.logFinishComponent&&a.logFinishComponent(t)}}});"function"==typeof _.exports.getVersion&&(r=_.exports.getVersion()),"function"==typeof _.exports.getMinorVersion&&(d=_.exports.getMinorVersion()),"function"==typeof _.exports.getPatchVersion&&(u=_.exports.getPatchVersion());const g=a&&(a.sanityCheck||a.logGetSignal||a.logSetSignal||a.logStartComponent||a.logFinishComponent);return l=2===r?new Ln(_,g):new mn(e,_,g),l;function f(){for(var t="",a=_.exports.getMessageChar();0!=a;)t+=String.fromCharCode(a),a=_.exports.getMessageChar();return t}function h(t){const a=new Uint8Array(e.buffer),o=[];for(let e=0;a[t+e]>0;e++)o.push(a[t+e]);return String.fromCharCode.apply(null,o)}}class mn{constructor(t,a,e){this.memory=t,this.i32=new Uint32Array(t.buffer),this.instance=a,this.n32=(this.instance.exports.getFrLen()>>2)-2;const o=this.instance.exports.getPRawPrime(),i=new Array(this.n32);for(let t=0;t>2)+t];this.prime=hn.fromArray(i,4294967296),this.Fr=new fn(this.prime),this.mask32=hn.fromString("FFFFFFFF",16),this.NVars=this.instance.exports.getNVars(),this.n64=Math.floor((this.Fr.bitLength-1)/64)+1,this.R=this.Fr.e(hn.shiftLeft(1,64*this.n64)),this.RInv=this.Fr.inv(this.R),this.sanityCheck=e}circom_version(){return 1}async _doCalculateWitness(t,a){this.instance.exports.init(this.sanityCheck||a?1:0);const e=this.allocInt(),o=this.allocFr();Object.keys(t).forEach((a=>{const i=Gi(a),n=parseInt(i.slice(0,8),16),l=parseInt(i.slice(8,16),16);try{this.instance.exports.getSignalOffset32(e,0,n,l)}catch(t){throw new Error(`Signal ${a} is not an input of the circuit.`)}const c=this.getInt(e),s=Oi(t[a]);for(let t=0;t>2]}setInt(t,a){this.i32[t>>2]=a}getFr(t){const a=this,e=t>>2;if(2147483648&a.i32[e+1]){const t=new Array(a.n32);for(let o=0;o>2]=i,void(e.i32[1+(t>>2)]=0)}e.i32[t>>2]=0,e.i32[1+(t>>2)]=2147483648;const n=hn.toArray(a,4294967296);for(let a=0;a>2)+a]=o>=0?n[o]:0}}}class Ln{constructor(t,a){this.instance=t,this.version=this.instance.exports.getVersion(),this.n32=this.instance.exports.getFieldNumLen32(),this.instance.exports.getRawPrime();const e=new Array(this.n32);for(let t=0;t{const e=Gi(a),i=parseInt(e.slice(0,8),16),n=parseInt(e.slice(8,16),16),l=Oi(t[a]);for(let t=0;t1)throw new Error(t.fileName+": File has more than one header");t.pos=a[1][0].p;const e=await t.readULE32(),o=await t.read(e),i=fe.fromRprLE(o),n=await Xe(i);if(8*n.F1.n64!=e)throw new Error(t.fileName+": Invalid size");const l=await t.readULE32(),c=await t.readULE32();if(t.pos-a[1][0].p!=a[1][0].size)throw new Error("Invalid PTau header size");return{curve:n,power:l,ceremonyPower:c}}function qn(t,a,e,o){const i={tau:{},alpha:{},beta:{}};return i.tau.g1_s=n(),i.tau.g1_sx=n(),i.alpha.g1_s=n(),i.alpha.g1_sx=n(),i.beta.g1_s=n(),i.beta.g1_sx=n(),i.tau.g2_spx=l(),i.alpha.g2_spx=l(),i.beta.g2_spx=l(),i;function n(){let i;return i=o?e.G1.fromRprLEM(t,a):e.G1.fromRprUncompressed(t,a),a+=2*e.G1.F.n8,i}function l(){let i;return i=o?e.G2.fromRprLEM(t,a):e.G2.fromRprUncompressed(t,a),a+=2*e.G2.F.n8,i}}function On(t,a,e,o,i){async function n(o){i?e.G1.toRprLEM(t,a,o):e.G1.toRprUncompressed(t,a,o),a+=2*e.F1.n8}async function l(o){i?e.G2.toRprLEM(t,a,o):e.G2.toRprUncompressed(t,a,o),a+=2*e.F2.n8}return n(o.tau.g1_s),n(o.tau.g1_sx),n(o.alpha.g1_s),n(o.alpha.g1_sx),n(o.beta.g1_s),n(o.beta.g1_sx),l(o.tau.g2_spx),l(o.alpha.g2_spx),l(o.beta.g2_spx),t}async function Gn(t,a){const e={};e.tauG1=await s(),e.tauG2=await r(),e.alphaG1=await s(),e.betaG1=await s(),e.betaG2=await r(),e.key=await async function(t,a,e){return qn(await t.read(2*a.F1.n8*6+2*a.F2.n8*3),0,a,e)}(t,a,!0),e.partialHash=await t.read(216),e.nextChallenge=await t.read(64),e.type=await t.readULE32();const o=new Uint8Array(2*a.G1.F.n8*6+2*a.G2.F.n8*3);On(o,0,a,e.key,!1);const i=ao.exports(64);i.setPartialHash(e.partialHash),i.update(o),e.responseHash=i.digest();const n=await t.readULE32(),l=t.pos;let c=0;for(;t.pos-l1)throw new Error(t.fileName+": File has more than one contributions section");t.pos=e[7][0].p;const o=await t.readULE32(),i=[];for(let e=0;e0){const a=new Uint8Array(n);await t.writeULE32(a.byteLength),await t.write(a)}else await t.writeULE32(0);async function l(e){a.G1.toRprLEM(o,0,e),await t.write(o)}async function c(e){a.G2.toRprLEM(i,0,e),await t.write(i)}}async function Mn(t,a,e){await t.writeULE32(7);const o=t.pos;await t.writeULE64(0),await t.writeULE32(e.length);for(let o=0;o0?u[u.length-1].nextChallenge:Un(r,d,n);const b=await Qe(e,"ptau",1,i?7:2);await Sn(b,r,d);const w=await m.read(64);if(Qo(l,L)&&(L=w,u[u.length-1].nextChallenge=L),!Qo(w,L))throw new Error("Wrong contribution. this contribution is not based on the previus hash");const y=new ao.exports(64);y.update(w);const A=[];let C;C=await I(m,b,"G1",2,2**d*2-1,[1],"tauG1"),_.tauG1=C[0],C=await I(m,b,"G2",3,2**d,[1],"tauG2"),_.tauG2=C[0],C=await I(m,b,"G1",4,2**d,[0],"alphaG1"),_.alphaG1=C[0],C=await I(m,b,"G1",5,2**d,[0],"betaG1"),_.betaG1=C[0],C=await I(m,b,"G2",6,1,[0],"betaG2"),_.betaG2=C[0],_.partialHash=y.getPartialHash();const F=await m.read(2*r.F1.n8*6+2*r.F2.n8*3);_.key=qn(F,0,r,!1),y.update(new Uint8Array(F));const x=y.digest();if(n&&n.info(Uo(x,"Contribution Response Hash imported: ")),i){const t=new ao.exports(64);t.update(x),await B(t,b,"G1",2,2**d*2-1,"tauG1",n),await B(t,b,"G2",3,2**d,"tauG2",n),await B(t,b,"G1",4,2**d,"alphaTauG1",n),await B(t,b,"G1",5,2**d,"betaTauG1",n),await B(t,b,"G2",6,1,"betaG2",n),_.nextChallenge=t.digest(),n&&n.info(Uo(_.nextChallenge,"Next Challenge Hash: "))}else _.nextChallenge=l;return u.push(_),await Mn(b,r,u),await m.close(),await b.close(),await c.close(),_.nextChallenge;async function I(t,a,e,o,l,c,s){return i?await async function(t,a,e,o,i,l,c){const s=r[e],d=s.F.n8,u=2*s.F.n8,_=[];await ke(a,o);const g=Math.floor((1<<24)/u);A[o]=a.pos;for(let e=0;e=e&&a=a&&i1?s[s.length-2]:r;const u=s[s.length-1];if(a&&a.debug("Validating contribution #"+s[s.length-1].id),!await Rn(n,u,d,a))return!1;const _=ao.exports(64);_.update(u.responseHash),a&&a.debug("Verifying powers in tau*G1 section");const g=await w(2,"G1","tauG1",2**l*2-1,[0,1],a);if(e=await kn(n,g.R1,g.R2,n.G2.g,u.tauG2),!0!==e)return a&&a.error("tauG1 section. Powers do not match"),!1;if(!n.G1.eq(n.G1.g,g.singularPoints[0]))return a&&a.error("First element of tau*G1 section must be the generator"),!1;if(!n.G1.eq(u.tauG1,g.singularPoints[1]))return a&&a.error("Second element of tau*G1 section does not match the one in the contribution section"),!1;a&&a.debug("Verifying powers in tau*G2 section");const f=await w(3,"G2","tauG2",2**l,[0,1],a);if(e=await kn(n,n.G1.g,u.tauG1,f.R1,f.R2),!0!==e)return a&&a.error("tauG2 section. Powers do not match"),!1;if(!n.G2.eq(n.G2.g,f.singularPoints[0]))return a&&a.error("First element of tau*G2 section must be the generator"),!1;if(!n.G2.eq(u.tauG2,f.singularPoints[1]))return a&&a.error("Second element of tau*G2 section does not match the one in the contribution section"),!1;a&&a.debug("Verifying powers in alpha*tau*G1 section");const h=await w(4,"G1","alphatauG1",2**l,[0],a);if(e=await kn(n,h.R1,h.R2,n.G2.g,u.tauG2),!0!==e)return a&&a.error("alphaTauG1 section. Powers do not match"),!1;if(!n.G1.eq(u.alphaG1,h.singularPoints[0]))return a&&a.error("First element of alpha*tau*G1 section (alpha*G1) does not match the one in the contribution section"),!1;a&&a.debug("Verifying powers in beta*tau*G1 section");const p=await w(5,"G1","betatauG1",2**l,[0],a);if(e=await kn(n,p.R1,p.R2,n.G2.g,u.tauG2),!0!==e)return a&&a.error("betaTauG1 section. Powers do not match"),!1;if(!n.G1.eq(u.betaG1,p.singularPoints[0]))return a&&a.error("First element of beta*tau*G1 section (beta*G1) does not match the one in the contribution section"),!1;const m=await async function(t){const a=n.G2,e=2*a.F.n8,l=new Uint8Array(e);if(!i[6])throw t.error("File has no BetaG2 section"),new Error("File has no BetaG2 section");if(i[6].length>1)throw t.error("File has no BetaG2 section"),new Error("File has more than one GetaG2 section");o.pos=i[6][0].p;const c=await o.read(e),s=a.fromRprLEM(c);return a.toRprUncompressed(l,0,s),_.update(l),s}(a);if(!n.G2.eq(u.betaG2,m))return a&&a.error("betaG2 element in betaG2 section does not match the one in the contribution section"),!1;const L=_.digest();if(l==c&&!Qo(L,u.nextChallenge))return a&&a.error("Hash of the values does not match the next challenge of the last contributor in the contributions section"),!1;a&&a.info(Uo(L,"Next challenge hash: ")),b(u,d);for(let t=s.length-2;t>=0;t--){const e=s[t],o=t>0?s[t-1]:r;if(!await Rn(n,e,o,a))return!1;b(e,o)}if(a&&a.info("-----------------------------------------------------"),i[12]&&i[13]&&i[14]&&i[15]){let t;if(t=await y("G1",2,12,"tauG1",a),!t)return!1;if(t=await y("G2",3,13,"tauG2",a),!t)return!1;if(t=await y("G1",4,14,"alphaTauG1",a),!t)return!1;if(t=await y("G1",5,15,"betaTauG1",a),!t)return!1}else a&&a.warn('this file does not contain phase2 precalculated values. Please run: \n snarkjs "powersoftau preparephase2" to prepare this file to be used in the phase2 ceremony.');return await o.close(),a&&a.info("Powers of Tau Ok!"),!0;function b(t,e){if(!a)return;a.info("-----------------------------------------------------"),a.info(`Contribution #${t.id}: ${t.name||""}`),a.info(Uo(t.nextChallenge,"Next Challenge: "));const o=new Uint8Array(2*n.G1.F.n8*6+2*n.G2.F.n8*3);On(o,0,n,t.key,!1);const i=ao.exports(64);i.setPartialHash(t.partialHash),i.update(o);const l=i.digest();a.info(Uo(l,"Response Hash:")),a.info(Uo(e.nextChallenge,"Response Hash:")),1==t.type&&(a.info(`Beacon generator: ${Ho(t.beaconHash)}`),a.info(`Beacon iterations Exp: ${t.numIterationsExp}`))}async function w(t,a,e,l,c,s){const r=n[a],d=2*r.F.n8;await Ne(o,i,t);const u=[];let g=r.zero,f=r.zero,h=r.zero;for(let t=0;t0){const t=r.fromRprLEM(i,0),a=$o(No(4),0);g=r.add(g,r.timesScalar(h,a)),f=r.add(f,r.timesScalar(t,a))}const m=await r.multiExpAffine(i.slice(0,(a-1)*d),p),L=await r.multiExpAffine(i.slice(d),p);g=r.add(g,m),f=r.add(f,L),h=r.fromRprLEM(i,(a-1)*d);for(let e=0;e=t&&o1;)r/=2,d+=1;if(2**d!=s)throw new Error("Invalid file size");i&&i.debug("Power to tau size: "+d);const u=await jo(o),_=await Te(e),g=ao.exports(64);for(let t=0;t{i.debug(a+".g1_s: "+t.G1.toString(p[a].g1_s,16)),i.debug(a+".g1_sx: "+t.G1.toString(p[a].g1_sx,16)),i.debug(a+".g2_sp: "+t.G2.toString(p[a].g2_sp,16)),i.debug(a+".g2_spx: "+t.G2.toString(p[a].g2_spx,16)),i.debug("")}));const m=ao.exports(64);await _.write(h),m.update(h),await Dn(n,_,m,t,"G1",2**d*2-1,t.Fr.one,p.tau.prvKey,"COMPRESSED","tauG1",i),await Dn(n,_,m,t,"G2",2**d,t.Fr.one,p.tau.prvKey,"COMPRESSED","tauG2",i),await Dn(n,_,m,t,"G1",2**d,p.alpha.prvKey,p.tau.prvKey,"COMPRESSED","alphaTauG1",i),await Dn(n,_,m,t,"G1",2**d,p.beta.prvKey,p.tau.prvKey,"COMPRESSED","betaTauG1",i),await Dn(n,_,m,t,"G2",1,p.beta.prvKey,p.tau.prvKey,"COMPRESSED","betaTauG2",i);const L=new Uint8Array(2*t.F1.n8*6+2*t.F2.n8*3);On(L,0,t,p,!1),await _.write(L),m.update(L);const b=m.digest();i&&i.info(Uo(b,"Contribution Response Hash: ")),await _.close(),await n.close()},beacon:async function(t,a,e,o,i,n){const l=Ko(o);if(0==l.byteLength||2*l.byteLength!=o.length)return n&&n.error("Invalid Beacon Hash. (It must be a valid hexadecimal sequence)"),!1;if(l.length>=256)return n&&n.error("Maximum lenght of beacon hash is 255 bytes"),!1;if((i=parseInt(i))<10||i>63)return n&&n.error("Invalid numIterationsExp. (Must be between 10 and 63)"),!1;await ao.exports.ready();const{fd:c,sections:s}=await Ue(t,"ptau",1),{curve:r,power:d,ceremonyPower:u}=await Pn(c,s);if(d!=u)return n&&n.error("This file has been reduced. You cannot contribute into a reduced file."),!1;s[12]&&n&&n.warn("Contributing into a file that has phase2 calculated. You will have to prepare phase2 again.");const _=await zn(c,r,s),g={name:e,type:1,numIterationsExp:i,beaconHash:l};let f;f=_.length>0?_[_.length-1].nextChallenge:Un(r,d,n),g.key=await Qn(r,f,l,i);const h=new ao.exports(64);h.update(f);const p=await Qe(a,"ptau",1,7);await Sn(p,r,d);const m=[];let L;L=await A(2,"G1",2**d*2-1,r.Fr.e(1),g.key.tau.prvKey,"tauG1",n),g.tauG1=L[1],L=await A(3,"G2",2**d,r.Fr.e(1),g.key.tau.prvKey,"tauG2",n),g.tauG2=L[1],L=await A(4,"G1",2**d,g.key.alpha.prvKey,g.key.tau.prvKey,"alphaTauG1",n),g.alphaG1=L[0],L=await A(5,"G1",2**d,g.key.beta.prvKey,g.key.tau.prvKey,"betaTauG1",n),g.betaG1=L[0],L=await A(6,"G2",1,g.key.beta.prvKey,g.key.tau.prvKey,"betaTauG2",n),g.betaG2=L[0],g.partialHash=h.getPartialHash();const b=new Uint8Array(2*r.F1.n8*6+2*r.F2.n8*3);On(b,0,r,g.key,!1),h.update(new Uint8Array(b));const w=h.digest();n&&n.info(Uo(w,"Contribution Response Hash imported: "));const y=new ao.exports(64);return y.update(w),await C(p,"G1",2,2**d*2-1,"tauG1",n),await C(p,"G2",3,2**d,"tauG2",n),await C(p,"G1",4,2**d,"alphaTauG1",n),await C(p,"G1",5,2**d,"betaTauG1",n),await C(p,"G2",6,1,"betaG2",n),g.nextChallenge=y.digest(),n&&n.info(Uo(g.nextChallenge,"Next Challenge Hash: ")),_.push(g),await Mn(p,r,_),await c.close(),await p.close(),w;async function A(t,a,e,o,i,n,l){const d=[];c.pos=s[t][0].p,await ke(p,t),m[t]=p.pos;const u=r[a],_=2*u.F.n8,g=Math.floor((1<<20)/_);let f=o;for(let t=0;t0?d[d.length-1].nextChallenge:Un(c,s,i),u.key=vn(c,_,g);const f=new ao.exports(64);f.update(_);const h=await Qe(a,"ptau",1,7);await Sn(h,c,s);const p=[];let m;m=await y(2,"G1",2**s*2-1,c.Fr.e(1),u.key.tau.prvKey,"tauG1"),u.tauG1=m[1],m=await y(3,"G2",2**s,c.Fr.e(1),u.key.tau.prvKey,"tauG2"),u.tauG2=m[1],m=await y(4,"G1",2**s,u.key.alpha.prvKey,u.key.tau.prvKey,"alphaTauG1"),u.alphaG1=m[0],m=await y(5,"G1",2**s,u.key.beta.prvKey,u.key.tau.prvKey,"betaTauG1"),u.betaG1=m[0],m=await y(6,"G2",1,u.key.beta.prvKey,u.key.tau.prvKey,"betaTauG2"),u.betaG2=m[0],u.partialHash=f.getPartialHash();const L=new Uint8Array(2*c.F1.n8*6+2*c.F2.n8*3);On(L,0,c,u.key,!1),f.update(new Uint8Array(L));const b=f.digest();i&&i.info(Uo(b,"Contribution Response Hash imported: "));const w=new ao.exports(64);return w.update(b),await A(h,"G1",2,2**s*2-1,"tauG1"),await A(h,"G2",3,2**s,"tauG2"),await A(h,"G1",4,2**s,"alphaTauG1"),await A(h,"G1",5,2**s,"betaTauG1"),await A(h,"G2",6,1,"betaG2"),u.nextChallenge=w.digest(),i&&i.info(Uo(u.nextChallenge,"Next Challenge Hash: ")),d.push(u),await Mn(h,c,d),await n.close(),await h.close(),b;async function y(t,a,e,o,s,r){const d=[];n.pos=l[t][0].p,await ke(h,t),p[t]=h.pos;const u=c[a],_=2*u.F.n8,g=Math.floor((1<<20)/_);let m=o;for(let t=0;t>BigInt(a)}function Yn(t){return(BigInt(t)&BigInt(1))==BigInt(1)}function Jn(t){if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(t)}function Xn(t,a){return BigInt(t)+BigInt(a)}function tl(t,a){return BigInt(t)-BigInt(a)}function al(t,a){return BigInt(t)**BigInt(a)}function el(t,a){return BigInt(t)/BigInt(a)}function ol(t,a){return BigInt(t)%BigInt(a)}function il(t,a){return BigInt(t)==BigInt(a)}function nl(t,a){return BigInt(t)>BigInt(a)}function ll(t,a){return BigInt(t)&BigInt(a)}function cl(t,a,e,o){const i="0000000"+e.toString(16),n=new Uint32Array(t.buffer,a,o/4),l=1+(4*(i.length-7)-1>>5);for(let t=0;ti[i.length-a-1]=t.toString(16).padStart(8,"0"))),Vn(i.join(""),16)}function rl(t,a){return t.toString(a)}function dl(t){const a=new Uint8Array(Math.floor((Hn(t)-1)/8)+1);return cl(a,0,t,a.byteLength),a}const ul=Kn(0),_l=Kn(1);function gl(t,a,e){if(!e)return t.one;const o=function(t){let a=BigInt(t);const e=[];for(;a;)a&BigInt(1)?e.push(1):e.push(0),a>>=BigInt(1);return e}(e);if(0==o.length)return t.one;let i=a;for(let e=o.length-2;e>=0;e--)i=t.square(i),o[e]&&(i=t.mul(i,a));return i}function fl(t){if(t.m%2==1)if(il(ol(t.p,4),1))if(il(ol(t.p,8),1))if(il(ol(t.p,16),1))!function(t){t.sqrt_q=al(t.p,t.m),t.sqrt_s=0,t.sqrt_t=tl(t.sqrt_q,1);for(;!Yn(t.sqrt_t);)t.sqrt_s=t.sqrt_s+1,t.sqrt_t=el(t.sqrt_t,2);let a=t.one;for(;t.eq(a,t.one);){const e=t.random();t.sqrt_z=t.pow(e,t.sqrt_t),a=t.pow(t.sqrt_z,2**(t.sqrt_s-1))}t.sqrt_tm1d2=el(tl(t.sqrt_t,1),2),t.sqrt=function(t){const a=this;if(a.isZero(t))return a.zero;let e=a.pow(t,a.sqrt_tm1d2);const o=a.pow(a.mul(a.square(e),t),2**(a.sqrt_s-1));if(a.eq(o,a.negone))return null;let i=a.sqrt_s,n=a.mul(t,e),l=a.mul(n,e),c=a.sqrt_z;for(;!a.eq(l,a.one);){let t=a.square(l),o=1;for(;!a.eq(t,a.one);)t=a.square(t),o++;e=c;for(let t=0;t>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<16|t[i]>>>16&65535)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<12|t[e]>>>20&4095)>>>0,t[a]=t[a]+t[e]>>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<8|t[i]>>>24&255)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<7|t[e]>>>25&127)>>>0}class pl{constructor(t){t=t||[0,0,0,0,0,0,0,0],this.state=[1634760805,857760878,2036477234,1797285236,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],0,0,0,0],this.idx=16,this.buff=new Array(16)}nextU32(){return 16==this.idx&&this.update(),this.buff[this.idx++]}nextU64(){return Xn((t=this.nextU32(),a=4294967296,BigInt(t)*BigInt(a)),this.nextU32());var t,a}nextBool(){return 1==(1&this.nextU32())}update(){for(let t=0;t<16;t++)this.buff[t]=this.state[t];for(let a=0;a<10;a++)hl(t=this.buff,0,4,8,12),hl(t,1,5,9,13),hl(t,2,6,10,14),hl(t,3,7,11,15),hl(t,0,5,10,15),hl(t,1,6,11,12),hl(t,2,7,8,13),hl(t,3,4,9,14);var t;for(let t=0;t<16;t++)this.buff[t]=this.buff[t]+this.state[t]>>>0;this.idx=0,this.state[12]=this.state[12]+1>>>0,0==this.state[12]&&(this.state[13]=this.state[13]+1>>>0,0==this.state[13]&&(this.state[14]=this.state[14]+1>>>0,0==this.state[14]&&(this.state[15]=this.state[15]+1>>>0)))}}function ml(t){let a=new Uint8Array(t);if(void 0!==globalThis.crypto)globalThis.crypto.getRandomValues(a);else for(let e=0;e>>0;return a}let Ll=null;function bl(){return Ll||(Ll=new pl(function(){const t=ml(32),a=new Uint32Array(t.buffer),e=[];for(let t=0;t<8;t++)e.push(a[t]);return e}()),Ll)}class wl{constructor(t,a,e){this.F=a,this.G=t,this.opMulGF=e;let o=a.sqrt_t||a.t,i=a.sqrt_s||a.s,n=a.one;for(;a.eq(a.pow(n,a.half),a.one);)n=a.add(n,a.one);this.w=new Array(i+1),this.wi=new Array(i+1),this.w[i]=this.F.pow(n,o),this.wi[i]=this.F.inv(this.w[i]);let l=i-1;for(;l>=0;)this.w[l]=this.F.square(this.w[l+1]),this.wi[l]=this.F.square(this.wi[l+1]),l--;this.roots=[],this._setRoots(Math.min(i,15))}_setRoots(t){for(let a=t;a>=0&&!this.roots[a];a--){let t=this.F.one;const e=1<>1,c=Al(t,a,e-1,o,2*i),s=Al(t,a,e-1,o+i,2*i),r=new Array(n);for(let a=0;a>this.one,this.bitLength=Hn(this.p),this.mask=(this.one<>this.one;this.nqr=this.two;let e=this.pow(this.nqr,a);for(;!this.eq(e,this.negone);)this.nqr=this.nqr+this.one,e=this.pow(this.nqr,a);for(this.s=0,this.t=this.negone;(this.t&this.one)==this.zero;)this.s=this.s+1,this.t=this.t>>this.one;this.nqr_to_t=this.pow(this.nqr,this.t),fl(this),this.FFT=new wl(this,this,this.mul.bind(this)),this.fft=this.FFT.fft.bind(this.FFT),this.ifft=this.FFT.ifft.bind(this.FFT),this.w=this.FFT.w,this.wi=this.FFT.wi,this.shift=this.square(this.nqr),this.k=this.exp(this.nqr,2**this.s)}e(t,a){let e;if(a?16==a&&(e=BigInt("0x"+t)):e=BigInt(t),e<0){let t=-e;return t>=this.p&&(t%=this.p),this.p-t}return e>=this.p?e%this.p:e}add(t,a){const e=t+a;return e>=this.p?e-this.p:e}sub(t,a){return t>=a?t-a:this.p-a+t}neg(t){return t?this.p-t:t}mul(t,a){return t*a%this.p}mulScalar(t,a){return t*this.e(a)%this.p}square(t){return t*t%this.p}eq(t,a){return t==a}neq(t,a){return t!=a}lt(t,a){return(t>this.half?t-this.p:t)<(a>this.half?a-this.p:a)}gt(t,a){return(t>this.half?t-this.p:t)>(a>this.half?a-this.p:a)}leq(t,a){return(t>this.half?t-this.p:t)<=(a>this.half?a-this.p:a)}geq(t,a){return(t>this.half?t-this.p:t)>=(a>this.half?a-this.p:a)}div(t,a){return this.mul(t,this.inv(a))}idiv(t,a){if(!a)throw new Error("Division by zero");return t/a}inv(t){if(!t)throw new Error("Division by zero");let a=this.zero,e=this.p,o=this.one,i=t%this.p;for(;i;){let t=e/i;[a,o]=[o,a-t*o],[e,i]=[i,e-t*i]}return a=this.p?e-this.p:e}bor(t,a){const e=(t|a)&this.mask;return e>=this.p?e-this.p:e}bxor(t,a){const e=(t^a)&this.mask;return e>=this.p?e-this.p:e}bnot(t){const a=t^this.mask;return a>=this.p?a-this.p:a}shl(t,a){if(Number(a)=this.p?e-this.p:e}{const e=this.p-a;return Number(e)>e:this.zero}}shr(t,a){if(Number(a)>a;{const e=this.p-a;if(Number(e)=this.p?a-this.p:a}return 0}}land(t,a){return t&&a?this.one:this.zero}lor(t,a){return t||a?this.one:this.zero}lnot(t){return t?this.zero:this.one}sqrt_old(t){if(t==this.zero)return this.zero;if(this.pow(t,this.negone>>this.one)!=this.one)return null;let a=this.s,e=this.nqr_to_t,o=this.pow(t,this.t),i=this.pow(t,this.add(this.t,this.one)>>this.one);for(;o!=this.one;){let t=this.square(o),n=1;for(;t!=this.one;)n++,t=this.square(t);let l=e;for(let t=0;tthis.p>>this.one&&(i=this.neg(i)),i}normalize(t,a){if((t=BigInt(t,a))<0){let a=-t;return a>=this.p&&(a%=this.p),this.p-a}return t>=this.p?t%this.p:t}random(){const t=2*this.bitLength/8;let a=this.zero;for(let e=0;ethis.half&&10==a){e="-"+(this.p-t).toString(a)}else e=t.toString(a);return e}isZero(t){return t==this.zero}fromRng(t){let a;do{a=this.zero;for(let e=0;e=this.p);return a=a*this.Ri%this.p,a}fft(t){return this.FFT.fft(t)}ifft(t){return this.FFT.ifft(t)}toRprLE(t,a,e){cl(t,a,e,8*this.n64)}toRprBE(t,a,e){!function(t,a,e,o){const i="0000000"+e.toString(16),n=new DataView(t.buffer,t.byteOffset+a,o),l=1+(4*(i.length-7)-1>>5);for(let t=0;t>=8n;return e},bigInt2U32LE:function(t,a){const e=Array(a);let o=BigInt(t);for(let t=0;t>=32n;return e},isOcamNum:function(t){return!!Array.isArray(t)&&(3==t.length&&("number"==typeof t[0]&&("number"==typeof t[1]&&!!Array.isArray(t[2]))))}},xl=function(t,a,e,o,i,n,l){const c=t.addFunction(a);c.addParam("base","i32"),c.addParam("scalar","i32"),c.addParam("scalarLength","i32"),c.addParam("r","i32"),c.addLocal("i","i32"),c.addLocal("b","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(e));c.addCode(s.if(s.i32_eqz(s.getLocal("scalarLength")),[...s.call(l,s.getLocal("r")),...s.ret([])])),c.addCode(s.call(n,s.getLocal("base"),r)),c.addCode(s.call(l,s.getLocal("r"))),c.addCode(s.setLocal("i",s.getLocal("scalarLength"))),c.addCode(s.block(s.loop(s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.setLocal("b",s.i32_load8_u(s.i32_add(s.getLocal("scalar"),s.getLocal("i")))),...function(){const t=[];for(let a=0;a<8;a++)t.push(...s.call(i,s.getLocal("r"),s.getLocal("r")),...s.if(s.i32_ge_u(s.getLocal("b"),s.i32_const(128>>a)),[...s.setLocal("b",s.i32_sub(s.getLocal("b"),s.i32_const(128>>a))),...s.call(o,s.getLocal("r"),r,s.getLocal("r"))]));return t}(),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.br(0))))},Il=function(t,a){const e=8*t.modules[a].n64,o=t.addFunction(a+"_batchInverse");o.addParam("pIn","i32"),o.addParam("inStep","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addParam("outStep","i32"),o.addLocal("itAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(e));o.addCode(i.setLocal("itAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("itAux"),i.i32_mul(i.i32_add(i.getLocal("n"),i.i32_const(1)),i.i32_const(e))))),o.addCode(i.call(a+"_one",i.getLocal("itAux")),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux")),i.call(a+"_mul",i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux"))),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("itOut",i.i32_add(i.getLocal("pOut"),i.i32_mul(i.i32_sub(i.getLocal("n"),i.i32_const(1)),i.getLocal("outStep")))),i.call(a+"_inverse",i.getLocal("itAux"),i.getLocal("itAux")),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),[...i.call(a+"_copy",i.getLocal("itAux"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_zero",i.getLocal("itOut"))],[...i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),n),...i.call(a+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_mul",i.getLocal("itAux"),n,i.getLocal("itOut"))]),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itOut",i.i32_sub(i.getLocal("itOut"),i.getLocal("outStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.br(0)))),o.addCode(i.i32_store(i.i32_const(0),i.getLocal("itAux")))};var Bl=function(t,a,e,o,i,n){void 0===n&&(n=oa?1:-1}function Pl(t){return t*t}function ql(t){return t%2n!==0n}function Ol(t){return t%2n===0n}function Gl(t){return t<0n}function zl(t){return t>0n}function Tl(t){return Gl(t)?t.toString(2).length-1:t.toString(2).length}function Ml(t){return t<0n?-t:t}function Ul(t){return 1n===Ml(t)}function Ql(t,a){for(var e,o,i,n=0n,l=1n,c=a,s=Ml(t);0n!==s;)e=c/s,o=n,i=c,n=l,c=s,l=o-e*l,s=i-e*s;if(!Ul(c))throw new Error(t.toString()+" and "+a.toString()+" are not co-prime");return-1===Sl(n,0n)&&(n+=a),Gl(t)?-n:n}function kl(t,a,e){if(0n===e)throw new Error("Cannot take modPow with modulus 0");var o=1n,i=t%e;for(Gl(a)&&(a*=-1n,i=Ql(i,e));zl(a);){if(0n===i)return 0n;ql(a)&&(o=o*i%e),a/=2n,i=Pl(i)%e}return o}function Rl(t,a){return 0n!==a&&(!!Ul(a)||(0===function(t,a){return(t=t>=0n?t:-t)===(a=a>=0n?a:-a)?0:t>a?1:-1}(a,2n)?Ol(t):t%a===0n))}function Nl(t,a){for(var e,o,i,n=function(t){return t-1n}(t),l=n,c=0;Ol(l);)l/=2n,c++;t:for(o=0;o>1&&o>1,t>>1)))),a.addCode(e.setLocal(s,e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(c,e.i64_add(e.i64_and(e.getLocal(c),e.i64_const(4294967295)),e.i64_and(e.getLocal(r),e.i64_const(4294967295))))),a.addCode(e.setLocal(s,e.i64_add(e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32))),e.getLocal(d))))),a.addCode(e.i64_store32(e.getLocal("r"),4*t,e.getLocal(c))),a.addCode(e.setLocal(r,e.getLocal(s)),e.setLocal(d,e.i64_shr_u(e.getLocal(r),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*i*2-4,e.getLocal(r)))}(),function(){const a=t.addFunction(o+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(o+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){!function(){const a=t.addFunction(o+"__mul1");a.addParam("px","i32"),a.addParam("y","i64"),a.addParam("pr","i32"),a.addLocal("c","i64");const e=a.getCodeBuilder();a.addCode(e.setLocal("c",e.i64_mul(e.i64_load32_u(e.getLocal("px"),0,0),e.getLocal("y")))),a.addCode(e.i64_store32(e.getLocal("pr"),0,0,e.getLocal("c")));for(let t=1;t>1n,p=t.alloc(c,$l.bigInt2BytesLE(h,c)),m=h+1n,L=t.alloc(c,$l.bigInt2BytesLE(m,c));t.modules[s]={pq:d,pR2:u,n64:n,q:i,pOne:_,pZero:g,pePlusOne:L};let b=2n;if(Jl(i))for(;Yl(b,h,i)!==f;)b+=1n;let w=0,y=f;for(;!Xl(y)&&0n!==y;)w++,y>>=1n;const A=t.alloc(c,$l.bigInt2BytesLE(y,c)),C=Yl(b,y,i),F=t.alloc($l.bigInt2BytesLE((C<>1n,I=t.alloc(c,$l.bigInt2BytesLE(x,c));return t.exportFunction(r+"_copy",s+"_copy"),t.exportFunction(r+"_zero",s+"_zero"),t.exportFunction(r+"_isZero",s+"_isZero"),t.exportFunction(r+"_eq",s+"_eq"),function(){const a=t.addFunction(s+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.ret(e.call(r+"_eq",e.getLocal("x"),e.i32_const(_))))}(),function(){const a=t.addFunction(s+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_add",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_sub",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_add",e.getLocal("r"),e.i32_const(d),e.getLocal("r")))))}(),function(){const a=t.addFunction(s+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_sub",e.i32_const(g),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.alloc(l*l*8),e=t.addFunction(s+"_mReduct");e.addParam("t","i32"),e.addParam("r","i32"),e.addLocal("np32","i64"),e.addLocal("c","i64"),e.addLocal("m","i64");const o=e.getCodeBuilder(),n=Number(0x100000000n-Wl(i,0x100000000n));e.addCode(o.setLocal("np32",o.i64_const(n)));for(let t=0;t=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(f))),[f,h]=[h,f],a.addCode(e.setLocal(h,e.i64_shr_u(e.getLocal(f),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(f))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(h)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32"),a.addLocal("c0","i64"),a.addLocal("c1","i64"),a.addLocal("c0_old","i64"),a.addLocal("c1_old","i64"),a.addLocal("np32","i64");for(let t=0;t>1&&o>1,t>>1)))),a.addCode(e.setLocal(f,e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(g,e.i64_add(e.i64_and(e.getLocal(g),e.i64_const(4294967295)),e.i64_and(e.getLocal(h),e.i64_const(4294967295))))),a.addCode(e.setLocal(f,e.i64_add(e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32))),e.getLocal(p)))));for(let o=Math.max(1,t-l+1);o<=t&&o=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(g))),a.addCode(e.setLocal(h,e.getLocal(f)),e.setLocal(p,e.i64_shr_u(e.getLocal(h),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(h))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(p)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.i32_const(u),e.getLocal("r")))}(),function(){const a=t.alloc(2*c),e=t.addFunction(s+"_fromMontgomery");e.addParam("x","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(r+"_copy",o.getLocal("x"),o.i32_const(a))),e.addCode(o.call(r+"_zero",o.i32_const(a+c))),e.addCode(o.call(s+"_mReduct",o.i32_const(a),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.call(r+"_gte",o,e.i32_const(L)))}(),function(){const a=t.addFunction(s+"_sign");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(r+"_isZero",e.getLocal("x")),e.ret(e.i32_const(0))),e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.if(e.call(r+"_gte",o,e.i32_const(L)),e.ret(e.i32_const(-1))),e.ret(e.i32_const(1)))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),e.getLocal("r"))),a.addCode(e.call(r+"_inverseMod",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),a.addCode(e.call(s+"_toMontgomery",e.getLocal("r"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_one");a.addParam("pr","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_copy",e.i32_const(_),e.getLocal("pr")))}(),function(){const a=t.addFunction(s+"_load");a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32"),a.addLocal("p","i32"),a.addLocal("l","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c)),i=t.alloc(c),n=e.i32_const(i);a.addCode(e.call(r+"_zero",e.getLocal("r")),e.setLocal("i",e.i32_const(c)),e.setLocal("p",e.getLocal("scalar")),e.block(e.loop(e.br_if(1,e.i32_gt_u(e.getLocal("i"),e.getLocal("scalarLen"))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",e.getLocal("p"),o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(c))),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(c))),e.br(0))),e.setLocal("l",e.i32_rem_u(e.getLocal("scalarLen"),e.i32_const(c))),e.if(e.i32_eqz(e.getLocal("l")),e.ret([])),e.call(r+"_zero",n),e.setLocal("j",e.i32_const(0)),e.block(e.loop(e.br_if(1,e.i32_eq(e.getLocal("j"),e.getLocal("l"))),e.i32_store8(e.getLocal("j"),i,e.i32_load8_u(e.getLocal("p"))),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(1))),e.setLocal("j",e.i32_add(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",n,o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_load",e.getLocal("scalar"),e.getLocal("scalarLen"),o),e.call(s+"_toMontgomery",o,o),e.call(s+"_mul",e.getLocal("x"),o,e.getLocal("r")))}(),Vl(t,s),Kl(t,s+"_batchToMontgomery",s+"_toMontgomery",c,c),Kl(t,s+"_batchFromMontgomery",s+"_fromMontgomery",c,c),Kl(t,s+"_batchNeg",s+"_neg",c,c),Hl(t,s+"_batchAdd",s+"_add",c,c),Hl(t,s+"_batchSub",s+"_sub",c,c),Hl(t,s+"_batchMul",s+"_mul",c,c),t.exportFunction(s+"_add"),t.exportFunction(s+"_sub"),t.exportFunction(s+"_neg"),t.exportFunction(s+"_isNegative"),t.exportFunction(s+"_isOne"),t.exportFunction(s+"_sign"),t.exportFunction(s+"_mReduct"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_squareOld"),t.exportFunction(s+"_fromMontgomery"),t.exportFunction(s+"_toMontgomery"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_one"),t.exportFunction(s+"_load"),t.exportFunction(s+"_timesScalar"),jl(t,s+"_exp",c,s+"_mul",s+"_square",r+"_copy",s+"_one"),t.exportFunction(s+"_exp"),t.exportFunction(s+"_batchInverse"),Jl(i)&&(!function(){const a=t.addFunction(s+"_sqrt");a.addParam("n","i32"),a.addParam("r","i32"),a.addLocal("m","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c)),n=e.i32_const(t.alloc(c)),l=e.i32_const(t.alloc(c)),r=e.i32_const(t.alloc(c)),d=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.call(s+"_zero",e.getLocal("r")))),e.setLocal("m",e.i32_const(w)),e.call(s+"_copy",e.i32_const(F),i),e.call(s+"_exp",e.getLocal("n"),e.i32_const(A),e.i32_const(c),n),e.call(s+"_exp",e.getLocal("n"),e.i32_const(I),e.i32_const(c),l),e.block(e.loop(e.br_if(1,e.call(s+"_eq",n,o)),e.call(s+"_square",n,r),e.setLocal("i",e.i32_const(1)),e.block(e.loop(e.br_if(1,e.call(s+"_eq",r,o)),e.call(s+"_square",r,r),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(1))),e.br(0))),e.call(s+"_copy",i,d),e.setLocal("j",e.i32_sub(e.i32_sub(e.getLocal("m"),e.getLocal("i")),e.i32_const(1))),e.block(e.loop(e.br_if(1,e.i32_eqz(e.getLocal("j"))),e.call(s+"_square",d,d),e.setLocal("j",e.i32_sub(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.setLocal("m",e.getLocal("i")),e.call(s+"_square",d,i),e.call(s+"_mul",n,i,n),e.call(s+"_mul",l,d,l),e.br(0))),e.if(e.call(s+"_isNegative",l),e.call(s+"_neg",l,e.getLocal("r")),e.call(s+"_copy",l,e.getLocal("r"))))}(),function(){const a=t.addFunction(s+"_isSquare");a.addParam("n","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.i32_const(1))),e.call(s+"_exp",e.getLocal("n"),e.i32_const(p),e.i32_const(c),i),e.call(s+"_eq",i,o))}(),t.exportFunction(s+"_sqrt"),t.exportFunction(s+"_isSquare")),t.exportFunction(s+"_batchToMontgomery"),t.exportFunction(s+"_batchFromMontgomery"),s};const ec=ac,{bitLength:oc}=vl;var ic=function(t,a,e,o,i){const n=BigInt(a),l=Math.floor((oc(n-1n)-1)/64)+1,c=8*l,s=e||"f1";if(t.modules[s])return s;t.modules[s]={n64:l};const r=i||"int",d=ec(t,n,o,r),u=t.modules[d].pR2,_=t.modules[d].pq,g=t.modules[d].pePlusOne;return function(){const a=t.alloc(c),e=t.addFunction(s+"_mul");e.addParam("x","i32"),e.addParam("y","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(d+"_mul",o.getLocal("x"),o.getLocal("y"),o.i32_const(a))),e.addCode(o.call(d+"_mul",o.i32_const(a),o.i32_const(u),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_inverseMod",e.getLocal("x"),e.i32_const(_),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_gte",e.getLocal("x"),e.i32_const(g)))}(),t.exportFunction(d+"_add",s+"_add"),t.exportFunction(d+"_sub",s+"_sub"),t.exportFunction(d+"_neg",s+"_neg"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_isNegative"),t.exportFunction(d+"_copy",s+"_copy"),t.exportFunction(d+"_zero",s+"_zero"),t.exportFunction(d+"_one",s+"_one"),t.exportFunction(d+"_isZero",s+"_isZero"),t.exportFunction(d+"_eq",s+"_eq"),s};const nc=xl,lc=Il,cc=Fl;var sc=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64,n=t.modules[o].q;return t.modules[e]={n64:2*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.ret(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_copy",c,r))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("y"),d=l.i32_add(l.getLocal("y"),l.i32_const(i)),u=l.getLocal("r"),_=l.i32_add(l.getLocal("r"),l.i32_const(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,r,g),l.call(o+"_mul",s,d,f),l.call(o+"_add",c,s,h),l.call(o+"_add",r,d,p),l.call(o+"_mul",h,p,h),l.call(a,f,u),l.call(o+"_add",g,u,u),l.call(o+"_add",g,f,_),l.call(o+"_sub",h,_,_))}(),function(){const a=t.addFunction(e+"_mul1");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_mul",l,s,r),n.call(o+"_mul",c,s,d))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,s,u),l.call(o+"_add",c,s,_),l.call(a,s,g),l.call(o+"_add",c,g,g),l.call(a,u,f),l.call(o+"_add",f,u,f),l.call(o+"_mul",_,g,r),l.call(o+"_sub",r,f,r),l.call(o+"_add",u,u,d))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_add",l,s,d),n.call(o+"_add",c,r,u))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_sub",l,s,d),n.call(o+"_sub",c,r,u))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_neg",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_conjugate");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_toMontgomery",l,s),n.call(o+"_toMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_fromMontgomery",l,s),n.call(o+"_fromMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_eq",l,s),n.call(o+"_eq",c,r)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,u),l.call(o+"_square",s,_),l.call(a,_,g),l.call(o+"_sub",u,g,g),l.call(o+"_inverse",g,f),l.call(o+"_mul",c,f,r),l.call(o+"_mul",s,f,d),l.call(o+"_neg",d,d))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),s),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),r))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l))),n.ret(n.call(o+"_isNegative",c)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_mul1"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_conjugate"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),lc(t,e),nc(t,e+"_exp",2*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),function(){const a=t.addFunction(e+"_sqrt");a.addParam("a","i32"),a.addParam("pr","i32");const l=a.getCodeBuilder(),c=l.i32_const(t.alloc(cc.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),s=l.i32_const(t.alloc(cc.bigInt2BytesLE((BigInt(n||0)-1n)/2n,i))),r=l.getLocal("a"),d=l.i32_const(t.alloc(2*i)),u=l.i32_const(t.alloc(2*i)),_=l.i32_const(t.alloc(2*i)),g=t.alloc(2*i),f=l.i32_const(g),h=l.i32_const(g),p=l.i32_const(g+i),m=l.i32_const(t.alloc(2*i)),L=l.i32_const(t.alloc(2*i));a.addCode(l.call(e+"_one",f),l.call(e+"_neg",f,f),l.call(e+"_exp",r,c,l.i32_const(i),d),l.call(e+"_square",d,u),l.call(e+"_mul",r,u,u),l.call(e+"_conjugate",u,_),l.call(e+"_mul",_,u,_),l.if(l.call(e+"_eq",_,f),l.unreachable()),l.call(e+"_mul",d,r,m),l.if(l.call(e+"_eq",u,f),[...l.call(o+"_zero",h),...l.call(o+"_one",p),...l.call(e+"_mul",f,m,l.getLocal("pr"))],[...l.call(e+"_one",L),...l.call(e+"_add",L,u,L),...l.call(e+"_exp",L,s,l.i32_const(i),L),...l.call(e+"_mul",L,m,l.getLocal("pr"))]))}(),function(){const a=t.addFunction(e+"_isSquare");a.addParam("a","i32"),a.setReturnType("i32");const o=a.getCodeBuilder(),l=o.i32_const(t.alloc(cc.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),c=o.getLocal("a"),s=o.i32_const(t.alloc(2*i)),r=o.i32_const(t.alloc(2*i)),d=o.i32_const(t.alloc(2*i)),u=t.alloc(2*i),_=o.i32_const(u);a.addCode(o.call(e+"_one",_),o.call(e+"_neg",_,_),o.call(e+"_exp",c,l,o.i32_const(i),s),o.call(e+"_square",s,r),o.call(e+"_mul",c,r,r),o.call(e+"_conjugate",r,d),o.call(e+"_mul",d,r,d),o.if(o.call(e+"_eq",d,_),o.ret(o.i32_const(0))),o.ret(o.i32_const(1)))}(),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_sqrt"),t.exportFunction(e+"_isSquare"),t.exportFunction(e+"_isNegative"),e};const rc=xl,dc=Il;var uc=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64;return t.modules[e]={n64:3*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.ret(n.i32_and(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_copy",l,r),n.call(o+"_copy",c,d),n.call(o+"_copy",s,u))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("y"),u=l.i32_add(l.getLocal("y"),l.i32_const(i)),_=l.i32_add(l.getLocal("y"),l.i32_const(2*i)),g=l.getLocal("r"),f=l.i32_add(l.getLocal("r"),l.i32_const(i)),h=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i)),F=l.i32_const(t.alloc(i)),x=l.i32_const(t.alloc(i)),I=l.i32_const(t.alloc(i)),B=l.i32_const(t.alloc(i)),E=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,d,p),l.call(o+"_mul",s,u,m),l.call(o+"_mul",r,_,L),l.call(o+"_add",c,s,b),l.call(o+"_add",d,u,w),l.call(o+"_add",c,r,y),l.call(o+"_add",d,_,A),l.call(o+"_add",s,r,C),l.call(o+"_add",u,_,F),l.call(o+"_add",p,m,x),l.call(o+"_add",p,L,I),l.call(o+"_add",m,L,B),l.call(o+"_mul",C,F,g),l.call(o+"_sub",g,B,g),l.call(a,g,g),l.call(o+"_add",p,g,g),l.call(o+"_mul",b,w,f),l.call(o+"_sub",f,x,f),l.call(a,L,E),l.call(o+"_add",f,E,f),l.call(o+"_mul",y,A,h),l.call(o+"_sub",h,I,h),l.call(o+"_add",h,m,h))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_mul",c,s,f),l.call(o+"_add",f,f,h),l.call(o+"_sub",c,s,p),l.call(o+"_add",p,r,p),l.call(o+"_square",p,p),l.call(o+"_mul",s,r,m),l.call(o+"_add",m,m,L),l.call(o+"_square",r,b),l.call(a,L,d),l.call(o+"_add",g,d,d),l.call(a,b,u),l.call(o+"_add",h,u,u),l.call(o+"_add",g,b,_),l.call(o+"_sub",L,_,_),l.call(o+"_add",p,_,_),l.call(o+"_add",h,_,_))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_add",l,r,_),n.call(o+"_add",c,d,g),n.call(o+"_add",s,u,f))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_sub",l,r,_),n.call(o+"_sub",c,d,g),n.call(o+"_sub",s,u,f))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_neg",l,r),n.call(o+"_neg",c,d),n.call(o+"_neg",s,u))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.setLocal("s",n.call(o+"_sign",s)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_toMontgomery",l,r),n.call(o+"_toMontgomery",c,d),n.call(o+"_toMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_fromMontgomery",l,r),n.call(o+"_fromMontgomery",c,d),n.call(o+"_fromMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_eq",l,r),n.call(o+"_eq",c,d)),n.call(o+"_eq",s,u)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_square",s,f),l.call(o+"_square",r,h),l.call(o+"_mul",c,s,p),l.call(o+"_mul",c,r,m),l.call(o+"_mul",s,r,L),l.call(a,L,b),l.call(o+"_sub",g,b,b),l.call(a,h,w),l.call(o+"_sub",w,p,w),l.call(o+"_sub",f,m,y),l.call(o+"_mul",r,w,A),l.call(o+"_mul",s,y,C),l.call(o+"_add",A,C,A),l.call(a,A,A),l.call(o+"_mul",c,b,C),l.call(o+"_add",C,A,A),l.call(o+"_inverse",A,A),l.call(o+"_mul",A,b,d),l.call(o+"_mul",A,w,u),l.call(o+"_mul",A,y,_))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),r),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),d),n.call(o+"_timesScalar",s,n.getLocal("scalar"),n.getLocal("scalarLen"),u))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.if(n.call(o+"_isZero",s),n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l)),n.ret(n.call(o+"_isNegative",c)))),n.ret(n.call(o+"_isNegative",s)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),dc(t,e),rc(t,e+"_exp",3*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_isNegative"),e};const _c=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("base","i32"),s.addParam("scalar","i32"),s.addParam("scalarLength","i32"),s.addParam("r","i32"),s.addLocal("old0","i32"),s.addLocal("nbits","i32"),s.addLocal("i","i32"),s.addLocal("last","i32"),s.addLocal("cur","i32"),s.addLocal("carry","i32"),s.addLocal("p","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(e));function u(t){return r.i32_and(r.i32_shr_u(r.i32_load(r.i32_add(r.getLocal("scalar"),r.i32_and(r.i32_shr_u(t,r.i32_const(3)),r.i32_const(4294967292)))),r.i32_and(t,r.i32_const(31))),r.i32_const(1))}function _(t){return[...r.i32_store8(r.getLocal("p"),r.i32_const(t)),...r.setLocal("p",r.i32_add(r.getLocal("p"),r.i32_const(1)))]}s.addCode(r.if(r.i32_eqz(r.getLocal("scalarLength")),[...r.call(c,r.getLocal("r")),...r.ret([])]),r.setLocal("nbits",r.i32_shl(r.getLocal("scalarLength"),r.i32_const(3))),r.setLocal("old0",r.i32_load(r.i32_const(0))),r.setLocal("p",r.getLocal("old0")),r.i32_store(r.i32_const(0),r.i32_and(r.i32_add(r.i32_add(r.getLocal("old0"),r.i32_const(32)),r.getLocal("nbits")),r.i32_const(4294967288))),r.setLocal("i",r.i32_const(1)),r.setLocal("last",u(r.i32_const(0))),r.setLocal("carry",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("nbits"))),r.setLocal("cur",u(r.getLocal("i"))),r.if(r.getLocal("last"),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(1)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(1)])),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(0)],[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(0)]))),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0))),r.if(r.getLocal("last"),r.if(r.getLocal("carry"),[..._(255),..._(0),..._(1)],[..._(1)]),r.if(r.getLocal("carry"),[..._(0),..._(1)])),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.call(l,r.getLocal("base"),d),r.call(c,r.getLocal("r")),r.block(r.loop(r.call(i,r.getLocal("r"),r.getLocal("r")),r.setLocal("cur",r.i32_load8_u(r.getLocal("p"))),r.if(r.getLocal("cur"),r.if(r.i32_eq(r.getLocal("cur"),r.i32_const(1)),r.call(o,r.getLocal("r"),d,r.getLocal("r")),r.call(n,r.getLocal("r"),d,r.getLocal("r")))),r.br_if(1,r.i32_eq(r.getLocal("old0"),r.getLocal("p"))),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.br(0))),r.i32_store(r.i32_const(0),r.getLocal("old0")))},gc=Bl,fc=function(t,a,e,o,i){const n=8*t.modules[a].n64;function l(){const o=t.addFunction(e);o.addParam("pBases","i32"),o.addParam("pScalars","i32"),o.addParam("scalarSize","i32"),o.addParam("n","i32"),o.addParam("pr","i32"),o.addLocal("chunkSize","i32"),o.addLocal("nChunks","i32"),o.addLocal("itScalar","i32"),o.addLocal("endScalar","i32"),o.addLocal("itBase","i32"),o.addLocal("itBit","i32"),o.addLocal("i","i32"),o.addLocal("j","i32"),o.addLocal("nTable","i32"),o.addLocal("pTable","i32"),o.addLocal("idx","i32"),o.addLocal("pIdxTable","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n)),c=t.alloc([17,17,17,17,17,17,17,17,17,17,16,16,15,14,13,13,12,11,10,9,8,7,7,6,5,4,3,2,1,1,1,1]);o.addCode(i.call(a+"_zero",i.getLocal("pr")),i.if(i.i32_eqz(i.getLocal("n")),i.ret([])),i.setLocal("chunkSize",i.i32_load8_u(i.i32_clz(i.getLocal("n")),c)),i.setLocal("nChunks",i.i32_add(i.i32_div_u(i.i32_sub(i.i32_shl(i.getLocal("scalarSize"),i.i32_const(3)),i.i32_const(1)),i.getLocal("chunkSize")),i.i32_const(1))),i.setLocal("itBit",i.i32_mul(i.i32_sub(i.getLocal("nChunks"),i.i32_const(1)),i.getLocal("chunkSize"))),i.block(i.loop(i.br_if(1,i.i32_lt_s(i.getLocal("itBit"),i.i32_const(0))),i.if(i.i32_eqz(i.call(a+"_isZero",i.getLocal("pr"))),[...i.setLocal("j",i.i32_const(0)),...i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("j"),i.getLocal("chunkSize"))),i.call(a+"_double",i.getLocal("pr"),i.getLocal("pr")),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0)))]),i.call(e+"_chunk",i.getLocal("pBases"),i.getLocal("pScalars"),i.getLocal("scalarSize"),i.getLocal("n"),i.getLocal("itBit"),i.getLocal("chunkSize"),l),i.call(a+"_add",i.getLocal("pr"),l,i.getLocal("pr")),i.setLocal("itBit",i.i32_sub(i.getLocal("itBit"),i.getLocal("chunkSize"))),i.br(0))))}!function(){const a=t.addFunction(e+"_getChunk");a.addParam("pScalar","i32"),a.addParam("scalarSize","i32"),a.addParam("startBit","i32"),a.addParam("chunkSize","i32"),a.addLocal("bitsToEnd","i32"),a.addLocal("mask","i32"),a.setReturnType("i32");const o=a.getCodeBuilder();a.addCode(o.setLocal("bitsToEnd",o.i32_sub(o.i32_mul(o.getLocal("scalarSize"),o.i32_const(8)),o.getLocal("startBit"))),o.if(o.i32_gt_s(o.getLocal("chunkSize"),o.getLocal("bitsToEnd")),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("bitsToEnd")),o.i32_const(1))),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("chunkSize")),o.i32_const(1)))),o.i32_and(o.i32_shr_u(o.i32_load(o.i32_add(o.getLocal("pScalar"),o.i32_shr_u(o.getLocal("startBit"),o.i32_const(3))),0,0),o.i32_and(o.getLocal("startBit"),o.i32_const(7))),o.getLocal("mask")))}(),function(){const o=t.addFunction(e+"_reduceTable");o.addParam("pTable","i32"),o.addParam("p","i32"),o.addLocal("half","i32"),o.addLocal("it1","i32"),o.addLocal("it2","i32"),o.addLocal("pAcc","i32");const i=o.getCodeBuilder();o.addCode(i.if(i.i32_eq(i.getLocal("p"),i.i32_const(1)),i.ret([])),i.setLocal("half",i.i32_shl(i.i32_const(1),i.i32_sub(i.getLocal("p"),i.i32_const(1)))),i.setLocal("it1",i.getLocal("pTable")),i.setLocal("it2",i.i32_add(i.getLocal("pTable"),i.i32_mul(i.getLocal("half"),i.i32_const(n)))),i.setLocal("pAcc",i.i32_sub(i.getLocal("it2"),i.i32_const(n))),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("it1"),i.getLocal("pAcc"))),i.call(a+"_add",i.getLocal("it1"),i.getLocal("it2"),i.getLocal("it1")),i.call(a+"_add",i.getLocal("pAcc"),i.getLocal("it2"),i.getLocal("pAcc")),i.setLocal("it1",i.i32_add(i.getLocal("it1"),i.i32_const(n))),i.setLocal("it2",i.i32_add(i.getLocal("it2"),i.i32_const(n))),i.br(0))),i.call(e+"_reduceTable",i.getLocal("pTable"),i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("p"))),i.call(a+"_double",i.getLocal("pAcc"),i.getLocal("pAcc")),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.br(0))),i.call(a+"_add",i.getLocal("pTable"),i.getLocal("pAcc"),i.getLocal("pTable")))}(),function(){const l=t.addFunction(e+"_chunk");l.addParam("pBases","i32"),l.addParam("pScalars","i32"),l.addParam("scalarSize","i32"),l.addParam("n","i32"),l.addParam("startBit","i32"),l.addParam("chunkSize","i32"),l.addParam("pr","i32"),l.addLocal("nChunks","i32"),l.addLocal("itScalar","i32"),l.addLocal("endScalar","i32"),l.addLocal("itBase","i32"),l.addLocal("i","i32"),l.addLocal("j","i32"),l.addLocal("nTable","i32"),l.addLocal("pTable","i32"),l.addLocal("idx","i32"),l.addLocal("pIdxTable","i32");const c=l.getCodeBuilder();l.addCode(c.if(c.i32_eqz(c.getLocal("n")),[...c.call(a+"_zero",c.getLocal("pr")),...c.ret([])]),c.setLocal("nTable",c.i32_shl(c.i32_const(1),c.getLocal("chunkSize"))),c.setLocal("pTable",c.i32_load(c.i32_const(0))),c.i32_store(c.i32_const(0),c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("nTable"),c.i32_const(n)))),c.setLocal("j",c.i32_const(0)),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("j"),c.getLocal("nTable"))),c.call(a+"_zero",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("j"),c.i32_const(n)))),c.setLocal("j",c.i32_add(c.getLocal("j"),c.i32_const(1))),c.br(0))),c.setLocal("itBase",c.getLocal("pBases")),c.setLocal("itScalar",c.getLocal("pScalars")),c.setLocal("endScalar",c.i32_add(c.getLocal("pScalars"),c.i32_mul(c.getLocal("n"),c.getLocal("scalarSize")))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("itScalar"),c.getLocal("endScalar"))),c.setLocal("idx",c.call(e+"_getChunk",c.getLocal("itScalar"),c.getLocal("scalarSize"),c.getLocal("startBit"),c.getLocal("chunkSize"))),c.if(c.getLocal("idx"),[...c.setLocal("pIdxTable",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.i32_sub(c.getLocal("idx"),c.i32_const(1)),c.i32_const(n)))),...c.call(o,c.getLocal("pIdxTable"),c.getLocal("itBase"),c.getLocal("pIdxTable"))]),c.setLocal("itScalar",c.i32_add(c.getLocal("itScalar"),c.getLocal("scalarSize"))),c.setLocal("itBase",c.i32_add(c.getLocal("itBase"),c.i32_const(i))),c.br(0))),c.call(e+"_reduceTable",c.getLocal("pTable"),c.getLocal("chunkSize")),c.call(a+"_copy",c.getLocal("pTable"),c.getLocal("pr")),c.i32_store(c.i32_const(0),c.getLocal("pTable")))}(),l(),t.exportFunction(e),t.exportFunction(e+"_chunk")};var hc=function(t,a,e,o){const i=t.modules[e].n64,n=8*i;if(t.modules[a])return a;return t.modules[a]={n64:3*i},function(){const o=t.addFunction(a+"_isZeroAffine");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.i32_and(i.call(e+"_isZero",i.getLocal("p1")),i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(n)))))}(),function(){const o=t.addFunction(a+"_isZero");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))))}(),function(){const o=t.addFunction(a+"_zeroAffine");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(n))))}(),function(){const o=t.addFunction(a+"_zero");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(n)))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))))}(),function(){const e=t.addFunction(a+"_copyAffine");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<2*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const e=t.addFunction(a+"_copy");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<3*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const o=t.addFunction(a+"_toJacobian");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_one",d),...i.call(e+"_copy",c,r),...i.call(e+"_copy",l,s)]))}(),function(){const o=t.addFunction(a+"_eqAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder();o.addCode(i.ret(i.i32_and(i.call(e+"_eq",i.getLocal("p1"),i.getLocal("p2")),i.call(e+"_eq",i.i32_add(i.getLocal("p1"),i.i32_const(n)),i.i32_add(i.getLocal("p2"),i.i32_const(n))))))}(),function(){const o=t.addFunction(a+"_eqMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZeroAffine",i.getLocal("p2")))),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqAffine",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,u),i.call(e+"_mul",r,u,_),i.call(e+"_mul",s,u,g),i.call(e+"_mul",d,g,f),i.if(i.call(e+"_eq",l,_),i.if(i.call(e+"_eq",c,f),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_eq");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZero",i.getLocal("p2")))),i.if(i.call(a+"_isZero",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqMixed",i.getLocal("p2"),i.getLocal("p1")))),i.if(i.call(e+"_isOne",u),i.ret(i.call(a+"_eqMixed",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,_),i.call(e+"_square",u,g),i.call(e+"_mul",l,g,f),i.call(e+"_mul",r,_,h),i.call(e+"_mul",s,_,p),i.call(e+"_mul",u,g,m),i.call(e+"_mul",c,m,L),i.call(e+"_mul",d,p,b),i.if(i.call(e+"_eq",f,h),i.if(i.call(e+"_eq",L,b),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_doubleAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_toJacobian",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.call(e+"_square",l,u),i.call(e+"_square",c,_),i.call(e+"_square",_,g),i.call(e+"_add",l,_,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,u,f),i.call(e+"_sub",f,g,f),i.call(e+"_add",f,f,f),i.call(e+"_add",u,u,h),i.call(e+"_add",h,u,h),i.call(e+"_add",c,c,d),i.call(e+"_square",h,s),i.call(e+"_sub",s,f,s),i.call(e+"_sub",s,f,s),i.call(e+"_add",g,g,p),i.call(e+"_add",p,p,p),i.call(e+"_add",p,p,p),i.call(e+"_sub",f,s,r),i.call(e+"_mul",r,h,r),i.call(e+"_sub",r,p,r))}(),function(){const o=t.addFunction(a+"_double");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.ret(i.call(a+"_doubleAffine",i.getLocal("p1"),i.getLocal("pr"))),...i.ret([])]),i.call(e+"_square",l,_),i.call(e+"_square",c,g),i.call(e+"_square",g,f),i.call(e+"_add",l,g,h),i.call(e+"_square",h,h),i.call(e+"_sub",h,_,h),i.call(e+"_sub",h,f,h),i.call(e+"_add",h,h,h),i.call(e+"_add",_,_,p),i.call(e+"_add",p,_,p),i.call(e+"_square",p,m),i.call(e+"_mul",c,s,L),i.call(e+"_add",h,h,r),i.call(e+"_sub",m,r,r),i.call(e+"_add",f,f,b),i.call(e+"_add",b,b,b),i.call(e+"_add",b,b,b),i.call(e+"_sub",h,r,d),i.call(e+"_mul",d,p,d),i.call(e+"_sub",d,b,d),i.call(e+"_add",L,L,u))}(),function(){const o=t.addFunction(a+"_addAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("p2"),r=i.i32_add(i.getLocal("p2"),i.i32_const(n)),d=i.getLocal("pr"),u=i.i32_add(i.getLocal("pr"),i.i32_const(n)),_=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copyAffine",i.getLocal("p1"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(e+"_eq",l,s),i.if(i.call(e+"_eq",c,r),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",s,l,g),i.call(e+"_sub",r,c,h),i.call(e+"_square",g,f),i.call(e+"_add",f,f,p),i.call(e+"_add",p,p,p),i.call(e+"_mul",g,p,m),i.call(e+"_add",h,h,L),i.call(e+"_mul",l,p,w),i.call(e+"_square",L,b),i.call(e+"_add",w,w,y),i.call(e+"_sub",b,m,d),i.call(e+"_sub",d,y,d),i.call(e+"_mul",c,m,A),i.call(e+"_add",A,A,A),i.call(e+"_sub",w,d,u),i.call(e+"_mul",u,L,u),i.call(e+"_sub",u,A,u),i.call(e+"_add",g,g,_))}(),function(){const o=t.addFunction(a+"_addMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.getLocal("pr"),_=i.i32_add(i.getLocal("pr"),i.i32_const(n)),g=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addAffine",l,r,u),...i.ret([])]),i.call(e+"_square",s,f),i.call(e+"_mul",r,f,h),i.call(e+"_mul",s,f,p),i.call(e+"_mul",d,p,m),i.if(i.call(e+"_eq",l,h),i.if(i.call(e+"_eq",c,m),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",h,l,L),i.call(e+"_sub",m,c,w),i.call(e+"_square",L,b),i.call(e+"_add",b,b,y),i.call(e+"_add",y,y,y),i.call(e+"_mul",L,y,A),i.call(e+"_add",w,w,C),i.call(e+"_mul",l,y,x),i.call(e+"_square",C,F),i.call(e+"_add",x,x,I),i.call(e+"_sub",F,A,u),i.call(e+"_sub",u,I,u),i.call(e+"_mul",c,A,B),i.call(e+"_add",B,B,B),i.call(e+"_sub",x,u,_),i.call(e+"_mul",_,C,_),i.call(e+"_sub",_,B,_),i.call(e+"_add",s,L,g),i.call(e+"_square",g,g),i.call(e+"_sub",g,f,g),i.call(e+"_sub",g,b,g))}(),function(){const o=t.addFunction(a+"_add");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.getLocal("pr"),g=i.i32_add(i.getLocal("pr"),i.i32_const(n)),f=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n)),E=i.i32_const(t.alloc(n)),v=i.i32_const(t.alloc(n)),S=i.i32_const(t.alloc(n)),P=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(a+"_isZero",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addMixed",r,l,_),...i.ret([])]),i.if(i.call(e+"_isOne",u),[...i.call(a+"_addMixed",l,r,_),...i.ret([])]),i.call(e+"_square",s,h),i.call(e+"_square",u,p),i.call(e+"_mul",l,p,m),i.call(e+"_mul",r,h,L),i.call(e+"_mul",s,h,b),i.call(e+"_mul",u,p,w),i.call(e+"_mul",c,w,y),i.call(e+"_mul",d,b,A),i.if(i.call(e+"_eq",m,L),i.if(i.call(e+"_eq",y,A),[...i.call(a+"_double",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",L,m,C),i.call(e+"_sub",A,y,F),i.call(e+"_add",C,C,x),i.call(e+"_square",x,x),i.call(e+"_mul",C,x,I),i.call(e+"_add",F,F,B),i.call(e+"_mul",m,x,v),i.call(e+"_square",B,E),i.call(e+"_add",v,v,S),i.call(e+"_sub",E,I,_),i.call(e+"_sub",_,S,_),i.call(e+"_mul",y,I,P),i.call(e+"_add",P,P,P),i.call(e+"_sub",v,_,g),i.call(e+"_mul",g,B,g),i.call(e+"_sub",g,P,g),i.call(e+"_add",s,u,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,h,f),i.call(e+"_sub",f,p,f),i.call(e+"_mul",f,C,f))}(),function(){const o=t.addFunction(a+"_negAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n));o.addCode(i.call(e+"_copy",l,s),i.call(e+"_neg",c,r))}(),function(){const o=t.addFunction(a+"_neg");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.call(e+"_copy",l,r),i.call(e+"_neg",c,d),i.call(e+"_copy",s,u))}(),function(){const e=t.addFunction(a+"_subAffine");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addAffine",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_subMixed");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addMixed",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_sub");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_neg",o.getLocal("p2"),i),o.call(a+"_add",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const o=t.addFunction(a+"_fromMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_fromMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(e+"_zero",r),...i.call(e+"_zero",d)],[...i.call(e+"_inverse",s,u),...i.call(e+"_square",u,_),...i.call(e+"_mul",u,_,g),...i.call(e+"_mul",l,_,r),...i.call(e+"_mul",c,g,d)]))}(),function(){const i=t.addFunction(a+"_inCurveAffine");i.addParam("pIn","i32"),i.setReturnType("i32");const l=i.getCodeBuilder(),c=l.getLocal("pIn"),s=l.i32_add(l.getLocal("pIn"),l.i32_const(n)),r=l.i32_const(t.alloc(n)),d=l.i32_const(t.alloc(n));i.addCode(l.call(e+"_square",s,r),l.call(e+"_square",c,d),l.call(e+"_mul",c,d,d),l.call(e+"_add",d,l.i32_const(o),d),l.ret(l.call(e+"_eq",r,d)))}(),function(){const e=t.addFunction(a+"_inCurve");e.addParam("pIn","i32"),e.setReturnType("i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(2*n));e.addCode(o.call(a+"_toAffine",o.getLocal("pIn"),i),o.ret(o.call(a+"_inCurveAffine",i)))}(),function(){const o=t.addFunction(a+"_batchToAffine");o.addParam("pIn","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addLocal("pAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itAux","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.setLocal("pAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("pAux"),i.i32_mul(i.getLocal("n"),i.i32_const(n)))),i.call(e+"_batchInverse",i.i32_add(i.getLocal("pIn"),i.i32_const(2*n)),i.i32_const(3*n),i.getLocal("n"),i.getLocal("pAux"),i.i32_const(n)),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.getLocal("pAux")),i.setLocal("itOut",i.getLocal("pOut")),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(e+"_isZero",i.getLocal("itAux")),[...i.call(e+"_zero",i.getLocal("itOut")),...i.call(e+"_zero",i.i32_add(i.getLocal("itOut"),i.i32_const(n)))],[...i.call(e+"_mul",i.getLocal("itAux"),i.i32_add(i.getLocal("itIn"),i.i32_const(n)),l),...i.call(e+"_square",i.getLocal("itAux"),i.getLocal("itAux")),...i.call(e+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.getLocal("itOut")),...i.call(e+"_mul",i.getLocal("itAux"),l,i.i32_add(i.getLocal("itOut"),i.i32_const(n)))]),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.i32_const(3*n))),i.setLocal("itOut",i.i32_add(i.getLocal("itOut"),i.i32_const(2*n))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.i32_store(i.i32_const(0),i.getLocal("pAux")))}(),function(){const o=t.addFunction(a+"_normalize");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_inverse",s,_),...i.call(e+"_square",_,g),...i.call(e+"_mul",_,g,f),...i.call(e+"_mul",l,g,r),...i.call(e+"_mul",c,f,d),...i.call(e+"_one",u)]))}(),function(){const e=t.addFunction(a+"__reverseBytes");e.addParam("pIn","i32"),e.addParam("n","i32"),e.addParam("pOut","i32"),e.addLocal("itOut","i32"),e.addLocal("itIn","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("itOut",o.i32_sub(o.i32_add(o.getLocal("pOut"),o.getLocal("n")),o.i32_const(1))),o.setLocal("itIn",o.getLocal("pIn")),o.block(o.loop(o.br_if(1,o.i32_lt_s(o.getLocal("itOut"),o.getLocal("pOut"))),o.i32_store8(o.getLocal("itOut"),o.i32_load8_u(o.getLocal("itIn"))),o.setLocal("itOut",o.i32_sub(o.getLocal("itOut"),o.i32_const(1))),o.setLocal("itIn",o.i32_add(o.getLocal("itIn"),o.i32_const(1))),o.br(0))))}(),function(){const e=t.addFunction(a+"_LEMtoU");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.call(a+"_isZeroAffine",o.getLocal("pIn")),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.i32_store8(o.getLocal("pOut"),o.i32_const(64)),...o.ret([])]),o.call(a+"_fromMontgomeryAffine",o.getLocal("pIn"),l),o.call(a+"__reverseBytes",c,o.i32_const(n),o.getLocal("pOut")),o.call(a+"__reverseBytes",s,o.i32_const(n),o.i32_add(o.getLocal("pOut"),o.i32_const(n))))}(),function(){const o=t.addFunction(a+"_LEMtoC");o.addParam("pIn","i32"),o.addParam("pOut","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("pIn")),[...i.call(e+"_zero",i.getLocal("pOut")),...i.i32_store8(i.getLocal("pOut"),i.i32_const(64)),...i.ret([])]),i.call(e+"_fromMontgomery",i.getLocal("pIn"),l),i.call(a+"__reverseBytes",l,i.i32_const(n),i.getLocal("pOut")),i.if(i.i32_eq(i.call(e+"_sign",i.i32_add(i.getLocal("pIn"),i.i32_const(n))),i.i32_const(-1)),i.i32_store8(i.getLocal("pOut"),i.i32_or(i.i32_load8_u(i.getLocal("pOut")),i.i32_const(128)))))}(),function(){const e=t.addFunction(a+"_UtoLEM");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.i32_and(o.i32_load8_u(o.getLocal("pIn")),o.i32_const(64)),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.ret([])]),o.call(a+"__reverseBytes",o.getLocal("pIn"),o.i32_const(n),c),o.call(a+"__reverseBytes",o.i32_add(o.getLocal("pIn"),o.i32_const(n)),o.i32_const(n),s),o.call(a+"_toMontgomeryAffine",l,o.getLocal("pOut")))}(),function(){const i=t.addFunction(a+"_CtoLEM");i.addParam("pIn","i32"),i.addParam("pOut","i32"),i.addLocal("firstByte","i32"),i.addLocal("greatest","i32");const l=i.getCodeBuilder(),c=t.alloc(2*n),s=l.i32_const(c),r=l.i32_const(c+n);i.addCode(l.setLocal("firstByte",l.i32_load8_u(l.getLocal("pIn"))),l.if(l.i32_and(l.getLocal("firstByte"),l.i32_const(64)),[...l.call(a+"_zeroAffine",l.getLocal("pOut")),...l.ret([])]),l.setLocal("greatest",l.i32_and(l.getLocal("firstByte"),l.i32_const(128))),l.call(e+"_copy",l.getLocal("pIn"),r),l.i32_store8(r,l.i32_and(l.getLocal("firstByte"),l.i32_const(63))),l.call(a+"__reverseBytes",r,l.i32_const(n),s),l.call(e+"_toMontgomery",s,l.getLocal("pOut")),l.call(e+"_square",l.getLocal("pOut"),r),l.call(e+"_mul",l.getLocal("pOut"),r,r),l.call(e+"_add",r,l.i32_const(o),r),l.call(e+"_sqrt",r,r),l.call(e+"_neg",r,s),l.if(l.i32_eq(l.call(e+"_sign",r),l.i32_const(-1)),l.if(l.getLocal("greatest"),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n)))),l.if(l.getLocal("greatest"),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))))))}(),gc(t,a+"_batchLEMtoU",a+"_LEMtoU",2*n,2*n),gc(t,a+"_batchLEMtoC",a+"_LEMtoC",2*n,n),gc(t,a+"_batchUtoLEM",a+"_UtoLEM",2*n,2*n),gc(t,a+"_batchCtoLEM",a+"_CtoLEM",n,2*n,!0),gc(t,a+"_batchToJacobian",a+"_toJacobian",2*n,3*n,!0),fc(t,a,a+"_multiexp",a+"_add",3*n),fc(t,a,a+"_multiexpAffine",a+"_addMixed",2*n),_c(t,a+"_timesScalar",3*n,a+"_add",a+"_double",a+"_sub",a+"_copy",a+"_zero"),_c(t,a+"_timesScalarAffine",2*n,a+"_addMixed",a+"_double",a+"_subMixed",a+"_copyAffine",a+"_zero"),t.exportFunction(a+"_isZero"),t.exportFunction(a+"_isZeroAffine"),t.exportFunction(a+"_eq"),t.exportFunction(a+"_eqMixed"),t.exportFunction(a+"_eqAffine"),t.exportFunction(a+"_copy"),t.exportFunction(a+"_copyAffine"),t.exportFunction(a+"_zero"),t.exportFunction(a+"_zeroAffine"),t.exportFunction(a+"_double"),t.exportFunction(a+"_doubleAffine"),t.exportFunction(a+"_add"),t.exportFunction(a+"_addMixed"),t.exportFunction(a+"_addAffine"),t.exportFunction(a+"_neg"),t.exportFunction(a+"_negAffine"),t.exportFunction(a+"_sub"),t.exportFunction(a+"_subMixed"),t.exportFunction(a+"_subAffine"),t.exportFunction(a+"_fromMontgomery"),t.exportFunction(a+"_fromMontgomeryAffine"),t.exportFunction(a+"_toMontgomery"),t.exportFunction(a+"_toMontgomeryAffine"),t.exportFunction(a+"_timesScalar"),t.exportFunction(a+"_timesScalarAffine"),t.exportFunction(a+"_normalize"),t.exportFunction(a+"_LEMtoU"),t.exportFunction(a+"_LEMtoC"),t.exportFunction(a+"_UtoLEM"),t.exportFunction(a+"_CtoLEM"),t.exportFunction(a+"_batchLEMtoU"),t.exportFunction(a+"_batchLEMtoC"),t.exportFunction(a+"_batchUtoLEM"),t.exportFunction(a+"_batchCtoLEM"),t.exportFunction(a+"_toAffine"),t.exportFunction(a+"_toJacobian"),t.exportFunction(a+"_batchToAffine"),t.exportFunction(a+"_batchToJacobian"),t.exportFunction(a+"_inCurve"),t.exportFunction(a+"_inCurveAffine"),a};const{isOdd:pc,modInv:mc,modPow:Lc}=vl,bc=Fl;var wc=function(t,a,e,o,i){const n=8*t.modules[o].n64,l=8*t.modules[e].n64,c=t.modules[o].q;let s=c-1n,r=0;for(;!pc(s);)r++,s>>=1n;let d=2n;for(;1n===Lc(d,c>>1n,c);)d+=1n;const u=new Array(r+1);u[r]=Lc(d,s,c);let _=r-1;for(;_>=0;)u[_]=Lc(u[_+1],2n,c),_--;const g=[],f=(1n<>e);return a}const x=Array(256);for(let t=0;t<256;t++)x[t]=F(t);const I=t.alloc(x);function B(){const e=t.addFunction(a+"_fft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32");const i=e.getCodeBuilder(),l=i.i32_const(t.alloc(n));e.addCode(i.setLocal("bits",i.call(a+"__log2",i.getLocal("n"))),i.call(o+"_one",l),i.call(a+"_rawfft",i.getLocal("px"),i.getLocal("bits"),i.i32_const(0),l))}!function(){const e=t.addFunction(a+"__rev");e.addParam("x","i32"),e.addParam("bits","i32"),e.setReturnType("i32");const o=e.getCodeBuilder();e.addCode(o.i32_rotl(o.i32_add(o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.getLocal("x"),o.i32_const(255)),I,0),o.i32_const(24)),o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(8)),o.i32_const(255)),I,0),o.i32_const(16))),o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(16)),o.i32_const(255)),I,0),o.i32_const(8)),o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(24)),o.i32_const(255)),I,0))),o.getLocal("bits")))}(),function(){const o=t.addFunction(a+"__reversePermutation");o.addParam("px","i32"),o.addParam("bits","i32"),o.addLocal("n","i32"),o.addLocal("i","i32"),o.addLocal("ri","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.setLocal("n",i.i32_shl(i.i32_const(1),i.getLocal("bits"))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("i"),i.i32_const(l)))),i.setLocal("ri",i.call(a+"__rev",i.getLocal("i"),i.getLocal("bits"))),i.setLocal("idx2",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("ri"),i.i32_const(l)))),i.if(i.i32_lt_u(i.getLocal("i"),i.getLocal("ri")),[...i.call(e+"_copy",i.getLocal("idx1"),n),...i.call(e+"_copy",i.getLocal("idx2"),i.getLocal("idx1")),...i.call(e+"_copy",n,i.getLocal("idx2"))]),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=t.addFunction(a+"__fftFinal");n.addParam("px","i32"),n.addParam("bits","i32"),n.addParam("reverse","i32"),n.addParam("mulFactor","i32"),n.addLocal("n","i32"),n.addLocal("ndiv2","i32"),n.addLocal("pInv2","i32"),n.addLocal("i","i32"),n.addLocal("mask","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32");const c=n.getCodeBuilder(),s=c.i32_const(t.alloc(l));n.addCode(c.if(c.i32_and(c.i32_eqz(c.getLocal("reverse")),c.call(o+"_isOne",c.getLocal("mulFactor"))),c.ret([])),c.setLocal("n",c.i32_shl(c.i32_const(1),c.getLocal("bits"))),c.setLocal("mask",c.i32_sub(c.getLocal("n"),c.i32_const(1))),c.setLocal("i",c.i32_const(1)),c.setLocal("ndiv2",c.i32_shr_u(c.getLocal("n"),c.i32_const(1))),c.block(c.loop(c.br_if(1,c.i32_ge_u(c.getLocal("i"),c.getLocal("ndiv2"))),c.setLocal("idx1",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("i"),c.i32_const(l)))),c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.i32_sub(c.getLocal("n"),c.getLocal("i")),c.i32_const(l)))),c.if(c.getLocal("reverse"),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(e+"_copy",c.getLocal("idx2"),c.getLocal("idx1")),...c.call(e+"_copy",s,c.getLocal("idx2"))],[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,s,c.getLocal("mulFactor"),c.getLocal("idx2"))]),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("idx1"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))])),c.setLocal("i",c.i32_add(c.getLocal("i"),c.i32_const(1))),c.br(0))),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("px"),c.getLocal("mulFactor"),c.getLocal("px")),...c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("ndiv2"),c.i32_const(l)))),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))]))}(),function(){const c=t.addFunction(a+"_rawfft");c.addParam("px","i32"),c.addParam("bits","i32"),c.addParam("reverse","i32"),c.addParam("mulFactor","i32"),c.addLocal("s","i32"),c.addLocal("k","i32"),c.addLocal("j","i32"),c.addLocal("m","i32"),c.addLocal("mdiv2","i32"),c.addLocal("n","i32"),c.addLocal("pwm","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(a+"__reversePermutation",s.getLocal("px"),s.getLocal("bits")),s.setLocal("n",s.i32_shl(s.i32_const(1),s.getLocal("bits"))),s.setLocal("s",s.i32_const(1)),s.block(s.loop(s.br_if(1,s.i32_gt_u(s.getLocal("s"),s.getLocal("bits"))),s.setLocal("m",s.i32_shl(s.i32_const(1),s.getLocal("s"))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("s"),s.i32_const(n)))),s.setLocal("k",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("k"),s.getLocal("n"))),s.call(o+"_one",r),s.setLocal("mdiv2",s.i32_shr_u(s.getLocal("m"),s.i32_const(1))),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("j"),s.getLocal("mdiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("px"),s.i32_mul(s.i32_add(s.getLocal("k"),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.i32_mul(s.getLocal("mdiv2"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("k",s.i32_add(s.getLocal("k"),s.getLocal("m"))),s.br(0))),s.setLocal("s",s.i32_add(s.getLocal("s"),s.i32_const(1))),s.br(0))),s.call(a+"__fftFinal",s.getLocal("px"),s.getLocal("bits"),s.getLocal("reverse"),s.getLocal("mulFactor")))}(),function(){const e=t.addFunction(a+"__log2");e.addParam("n","i32"),e.setReturnType("i32"),e.addLocal("bits","i32"),e.addLocal("aux","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("aux",o.i32_shr_u(o.getLocal("n"),o.i32_const(1)))),e.addCode(o.setLocal("bits",o.i32_const(0))),e.addCode(o.block(o.loop(o.br_if(1,o.i32_eqz(o.getLocal("aux"))),o.setLocal("aux",o.i32_shr_u(o.getLocal("aux"),o.i32_const(1))),o.setLocal("bits",o.i32_add(o.getLocal("bits"),o.i32_const(1))),o.br(0)))),e.addCode(o.if(o.i32_ne(o.getLocal("n"),o.i32_shl(o.i32_const(1),o.getLocal("bits"))),o.unreachable())),e.addCode(o.if(o.i32_gt_u(o.getLocal("bits"),o.i32_const(r)),o.unreachable())),e.addCode(o.getLocal("bits"))}(),B(),function(){const e=t.addFunction(a+"_ifft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32"),e.addLocal("pInv2","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("bits",o.call(a+"__log2",o.getLocal("n"))),o.setLocal("pInv2",o.i32_add(o.i32_const(L),o.i32_mul(o.getLocal("bits"),o.i32_const(n)))),o.call(a+"_rawfft",o.getLocal("px"),o.getLocal("bits"),o.i32_const(1),o.getLocal("pInv2")))}(),function(){const c=t.addFunction(a+"_fftJoin");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExt");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),d),s.call(i,s.getLocal("idx2"),s.getLocal("pShiftToM"),s.getLocal("idx2")),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(e+"_copy",d,s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExtInv");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_sub",s.getLocal("idx1"),d,s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),s.getLocal("pSConst"),s.getLocal("idx2")),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),s.getLocal("idx1")),s.call(e+"_sub",d,s.getLocal("idx1"),s.getLocal("idx1")),s.call(i,s.getLocal("idx1"),s.getLocal("pSConst"),s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftMix");c.addParam("pBuff","i32"),c.addParam("n","i32"),c.addParam("exp","i32"),c.addLocal("nGroups","i32"),c.addLocal("nPerGroup","i32"),c.addLocal("nPerGroupDiv2","i32"),c.addLocal("pairOffset","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("j","i32"),c.addLocal("pwm","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.setLocal("nPerGroup",s.i32_shl(s.i32_const(1),s.getLocal("exp"))),s.setLocal("nPerGroupDiv2",s.i32_shr_u(s.getLocal("nPerGroup"),s.i32_const(1))),s.setLocal("nGroups",s.i32_shr_u(s.getLocal("n"),s.getLocal("exp"))),s.setLocal("pairOffset",s.i32_mul(s.getLocal("nPerGroupDiv2"),s.i32_const(l))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("exp"),s.i32_const(n)))),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("nGroups"))),s.call(o+"_one",r),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("j"),s.getLocal("nPerGroupDiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff"),s.i32_mul(s.i32_add(s.i32_mul(s.getLocal("i"),s.getLocal("nPerGroup")),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.getLocal("pairOffset"))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const o=t.addFunction(a+"_fftFinal");o.addParam("pBuff","i32"),o.addParam("n","i32"),o.addParam("factor","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32"),o.addLocal("i","i32"),o.addLocal("ndiv2","i32");const n=o.getCodeBuilder(),c=n.i32_const(t.alloc(l));o.addCode(n.setLocal("ndiv2",n.i32_shr_u(n.getLocal("n"),n.i32_const(1))),n.if(n.i32_and(n.getLocal("n"),n.i32_const(1)),n.call(i,n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))),n.getLocal("factor"),n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))))),n.setLocal("i",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_ge_u(n.getLocal("i"),n.getLocal("ndiv2"))),n.setLocal("idx1",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("i"),n.i32_const(l)))),n.setLocal("idx2",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.i32_sub(n.i32_sub(n.getLocal("n"),n.i32_const(1)),n.getLocal("i")),n.i32_const(l)))),n.call(i,n.getLocal("idx2"),n.getLocal("factor"),c),n.call(i,n.getLocal("idx1"),n.getLocal("factor"),n.getLocal("idx2")),n.call(e+"_copy",c,n.getLocal("idx1")),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),function(){const c=t.addFunction(a+"_prepareLagrangeEvaluation");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),d),s.call(e+"_sub",s.getLocal("idx2"),d,d),s.call(e+"_sub",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,d,s.getLocal("pSConst"),s.getLocal("idx1")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),t.exportFunction(a+"_fft"),t.exportFunction(a+"_ifft"),t.exportFunction(a+"_rawfft"),t.exportFunction(a+"_fftJoin"),t.exportFunction(a+"_fftJoinExt"),t.exportFunction(a+"_fftJoinExtInv"),t.exportFunction(a+"_fftMix"),t.exportFunction(a+"_fftFinal"),t.exportFunction(a+"_prepareLagrangeEvaluation")},yc=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_zero");i.addParam("px","i32"),i.addParam("n","i32"),i.addLocal("lastp","i32"),i.addLocal("p","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("p",n.getLocal("px")),n.setLocal("lastp",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("p"),n.getLocal("lastp"))),n.call(e+"_zero",n.getLocal("p")),n.setLocal("p",n.i32_add(n.getLocal("p"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_constructLC");i.addParam("ppolynomials","i32"),i.addParam("psignals","i32"),i.addParam("nSignals","i32"),i.addParam("pres","i32"),i.addLocal("i","i32"),i.addLocal("j","i32"),i.addLocal("pp","i32"),i.addLocal("ps","i32"),i.addLocal("pd","i32"),i.addLocal("ncoefs","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("i",n.i32_const(0)),n.setLocal("pp",n.getLocal("ppolynomials")),n.setLocal("ps",n.getLocal("psignals")),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("i"),n.getLocal("nSignals"))),n.setLocal("ncoefs",n.i32_load(n.getLocal("pp"))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.setLocal("j",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("j"),n.getLocal("ncoefs"))),n.setLocal("pd",n.i32_add(n.getLocal("pres"),n.i32_mul(n.i32_load(n.getLocal("pp")),n.i32_const(o)))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.call(e+"_mul",n.getLocal("ps"),n.getLocal("pp"),l),n.call(e+"_add",l,n.getLocal("pd"),n.getLocal("pd")),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(o))),n.setLocal("j",n.i32_add(n.getLocal("j"),n.i32_const(1))),n.br(0))),n.setLocal("ps",n.i32_add(n.getLocal("ps"),n.i32_const(o))),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),t.exportFunction(a+"_zero"),t.exportFunction(a+"_constructLC"),a},Ac=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_buildABC");i.addParam("pCoefs","i32"),i.addParam("nCoefs","i32"),i.addParam("pWitness","i32"),i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("offsetOut","i32"),i.addParam("nOut","i32"),i.addParam("offsetWitness","i32"),i.addParam("nWitness","i32"),i.addLocal("it","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("last","i32"),i.addLocal("m","i32"),i.addLocal("c","i32"),i.addLocal("s","i32"),i.addLocal("pOut","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_zero",n.getLocal("ita")),n.call(e+"_zero",n.getLocal("itb")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.br(0))),n.setLocal("it",n.getLocal("pCoefs")),n.setLocal("last",n.i32_add(n.getLocal("pCoefs"),n.i32_mul(n.getLocal("nCoefs"),n.i32_const(o+12)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("it"),n.getLocal("last"))),n.setLocal("s",n.i32_load(n.getLocal("it"),8)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_ge_u(n.getLocal("s"),n.i32_add(n.getLocal("offsetWitness"),n.getLocal("nWitness")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("m",n.i32_load(n.getLocal("it"))),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(0)),n.setLocal("pOut",n.getLocal("pA")),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(1)),n.setLocal("pOut",n.getLocal("pB")),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)])),n.setLocal("c",n.i32_load(n.getLocal("it"),4)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_ge_u(n.getLocal("c"),n.i32_add(n.getLocal("offsetOut"),n.getLocal("nOut")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("pOut",n.i32_add(n.getLocal("pOut"),n.i32_mul(n.i32_sub(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_const(o)))),n.call(e+"_mul",n.i32_add(n.getLocal("pWitness"),n.i32_mul(n.i32_sub(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_const(o))),n.i32_add(n.getLocal("it"),n.i32_const(12)),l),n.call(e+"_add",n.getLocal("pOut"),l,n.getLocal("pOut")),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),n.br(0))),n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("it",n.getLocal("pC")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("it")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_joinABC");i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("n","i32"),i.addParam("pP","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itc","i32"),i.addLocal("itp","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("itc",n.getLocal("pC")),n.setLocal("itp",n.getLocal("pP")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),l),n.call(e+"_sub",l,n.getLocal("itc"),n.getLocal("itp")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itc",n.i32_add(n.getLocal("itc"),n.i32_const(o))),n.setLocal("itp",n.i32_add(n.getLocal("itp"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_batchAdd");i.addParam("pa","i32"),i.addParam("pb","i32"),i.addParam("n","i32"),i.addParam("pr","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itr","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("ita",n.getLocal("pa")),n.setLocal("itb",n.getLocal("pb")),n.setLocal("itr",n.getLocal("pr")),n.setLocal("last",n.i32_add(n.getLocal("pa"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_add",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("itr")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itr",n.i32_add(n.getLocal("itr"),n.i32_const(o))),n.br(0))))}(),t.exportFunction(a+"_buildABC"),t.exportFunction(a+"_joinABC"),t.exportFunction(a+"_batchAdd"),a},Cc=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("pIn","i32"),s.addParam("n","i32"),s.addParam("pFirst","i32"),s.addParam("pInc","i32"),s.addParam("pOut","i32"),s.addLocal("pOldFree","i32"),s.addLocal("i","i32"),s.addLocal("pFrom","i32"),s.addLocal("pTo","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(l));s.addCode(r.setLocal("pFrom",r.getLocal("pIn")),r.setLocal("pTo",r.getLocal("pOut"))),s.addCode(r.call(o+"_copy",r.getLocal("pFirst"),d)),s.addCode(r.setLocal("i",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("n"))),r.call(c,r.getLocal("pFrom"),d,r.getLocal("pTo")),r.setLocal("pFrom",r.i32_add(r.getLocal("pFrom"),r.i32_const(i))),r.setLocal("pTo",r.i32_add(r.getLocal("pTo"),r.i32_const(n))),r.call(o+"_mul",d,r.getLocal("pInc"),d),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0)))),t.exportFunction(a)};const Fc=Fl,xc=ac,Ic=ic,Bc=sc,Ec=uc,vc=hc,Sc=wc,Pc=yc,qc=Ac,Oc=Cc,{bitLength:Gc,modInv:zc,isOdd:Tc,isNegative:Mc}=vl;const Uc=Fl,Qc=ac,kc=ic,Rc=sc,Nc=uc,Dc=hc,$c=wc,jc=yc,Vc=Ac,Kc=Cc,{bitLength:Hc,isOdd:Zc,isNegative:Wc}=vl;var Yc=function(t,a){const e=a||"bn128";if(t.modules[e])return e;const o=21888242871839275222246405745257275088696311157297823662689037894645226208583n,i=21888242871839275222246405745257275088548364400416034343698204186575808495617n,n=Math.floor((Gc(o-1n)-1)/64)+1,l=8*n,c=l,s=l,r=2*s,d=12*s,u=t.alloc(Fc.bigInt2BytesLE(i,c)),_=xc(t,o,"f1m");Ic(t,i,"fr","frm");const g=t.alloc(Fc.bigInt2BytesLE(b(3n),s)),f=vc(t,"g1m","f1m",g);Sc(t,"frm","frm","frm","frm_mul"),Pc(t,"pol","frm"),qc(t,"qap","frm");const h=Bc(t,"f1m_neg","f2m","f1m"),p=t.alloc([...Fc.bigInt2BytesLE(b(19485874751759354771024239261021720505790618469301721065564631296452457478373n),s),...Fc.bigInt2BytesLE(b(266929791119991161246907387137283842545076965332900288569378510910307636690n),s)]),m=vc(t,"g2m","f2m",p);function L(a,e){const o=t.addFunction(a);o.addParam("pG","i32"),o.addParam("pFr","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.call("frm_fromMontgomery",i.getLocal("pFr"),n),i.call(e,i.getLocal("pG"),n,i.i32_const(l),i.getLocal("pr"))),t.exportFunction(a)}function b(t){return BigInt(t)*(1n<0n;)Tc(a)?e.push(1):e.push(0),a>>=1n;return e}(29793968203157093288n),T=t.alloc(z),M=3*r,U=z.length-1,Q=z.reduce(((t,a)=>t+(0!=a?1:0)),0),k=6*l,R=3*l*2+(Q+U+1)*M;t.modules[e]={n64:n,pG1gen:y,pG1zero:C,pG1b:g,pG2gen:x,pG2zero:B,pG2b:p,pq:t.modules.f1m.pq,pr:u,pOneT:E,prePSize:k,preQSize:R,r:i.toString(),q:o.toString()};const N=4965661367192848881n;function D(a){const i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[8376118865763821496583973867626364092589906065868298776909617916018768340080n,16469823323077808223889137241176536799009286646108169935659301613961712198316n],[21888242871839275220042445260109153167277707414472061641714758635765020556617n,0n],[11697423496358154304825782922584725312912383441159505038794027105778954184319n,303847389135065887422783454877609941456349188919719272345083954437860409601n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3321304630594332808241809054958361220322477375291206261884409189760185844239n,5722266937896532885780051958958348231143373700109372999374820235121374419868n],[21888242871839275222246405745257275088696311157297823662689037894645226208582n,0n],[13512124006075453725662431877630910996106405091429524885779419978626457868503n,5418419548761466998357268504080738289687024511189653727029736280683514010267n],[2203960485148121921418603742825762020974279258880205651966n,0n],[10190819375481120917420622822672549775783927716138318623895010788866272024264n,21584395482704209334823622290379665147239961968378104390343953940207365798982n],[2203960485148121921418603742825762020974279258880205651967n,0n],[18566938241244942414004596690298913868373833782006617400804628704885040364344n,16165975933942742336466353786298926857552937457188450663314217659523851788715n]]],n=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[21575463638280843010398324269430826099269044274347216827212613867836435027261n,10307601595873709700152284273816112264069230130616436755625194854815875713954n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3772000881919853776433695186713858239009073593817195771773381919316419345261n,2236595495967245188281701248203181795121068902605861227855261137820944008926n],[2203960485148121921418603742825762020974279258880205651966n,0n],[18429021223477853657660792034369865839114504446431234726392080002137598044644n,9344045779998320333812420223237981029506012124075525679208581902008406485703n]],[[1n,0n],[2581911344467009335267311115468803099551665605076196740867805258568234346338n,19937756971775647987995932169929341994314640652964949448313374472400716661030n],[2203960485148121921418603742825762020974279258880205651966n,0n],[5324479202449903542726783395506214481928257762400643279780343368557297135718n,16208900380737693084919495127334387981393726419856888799917914180988844123039n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[13981852324922362344252311234282257507216387789820983642040889267519694726527n,7629828391165209371577384193250820201684255241773809077146787135900891633097n]]],l=t.addFunction(e+"__frobeniusMap"+a);l.addParam("x","i32"),l.addParam("r","i32");const c=l.getCodeBuilder();for(let e=0;e<6;e++){const o=0==e?c.getLocal("x"):c.i32_add(c.getLocal("x"),c.i32_const(e*r)),u=o,g=c.i32_add(c.getLocal("x"),c.i32_const(e*r+s)),f=0==e?c.getLocal("r"):c.i32_add(c.getLocal("r"),c.i32_const(e*r)),p=f,m=c.i32_add(c.getLocal("r"),c.i32_const(e*r+s)),L=d(i[Math.floor(e/3)][a%12],n[e%3][a%6]),w=t.alloc([...Fc.bigInt2BytesLE(b(L[0]),32),...Fc.bigInt2BytesLE(b(L[1]),32)]);a%2==1?l.addCode(c.call(_+"_copy",u,p),c.call(_+"_neg",g,m),c.call(h+"_mul",f,c.i32_const(w),f)):l.addCode(c.call(h+"_mul",o,c.i32_const(w),f))}function d(t,a){const e=BigInt(t[0]),i=BigInt(t[1]),n=BigInt(a[0]),l=BigInt(a[1]),c=[(e*n-i*l)%o,(e*l+i*n)%o];return Mc(c[0])&&(c[0]=c[0]+o),c}}function $(a,o){const i=function(t){let a=t;const e=[];for(;a>0n;){if(Tc(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),n=t.alloc(i),l=t.addFunction(e+"__cyclotomicExp_"+o);l.addParam("x","i32"),l.addParam("r","i32"),l.addLocal("bit","i32"),l.addLocal("i","i32");const c=l.getCodeBuilder(),s=c.getLocal("x"),r=c.getLocal("r"),u=c.i32_const(t.alloc(d));l.addCode(c.call(G+"_conjugate",s,u),c.call(G+"_one",r),c.if(c.teeLocal("bit",c.i32_load8_s(c.i32_const(i.length-1),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.setLocal("i",c.i32_const(i.length-2)),c.block(c.loop(c.call(e+"__cyclotomicSquare",r,r),c.if(c.teeLocal("bit",c.i32_load8_s(c.getLocal("i"),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.br_if(1,c.i32_eqz(c.getLocal("i"))),c.setLocal("i",c.i32_sub(c.getLocal("i"),c.i32_const(1))),c.br(0))))}function j(){!function(){const a=t.addFunction(e+"__cyclotomicSquare");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.i32_add(o.getLocal("x"),o.i32_const(r)),l=o.i32_add(o.getLocal("x"),o.i32_const(2*r)),c=o.i32_add(o.getLocal("x"),o.i32_const(3*r)),s=o.i32_add(o.getLocal("x"),o.i32_const(4*r)),d=o.i32_add(o.getLocal("x"),o.i32_const(5*r)),u=o.getLocal("r"),_=o.i32_add(o.getLocal("r"),o.i32_const(r)),g=o.i32_add(o.getLocal("r"),o.i32_const(2*r)),f=o.i32_add(o.getLocal("r"),o.i32_const(3*r)),p=o.i32_add(o.getLocal("r"),o.i32_const(4*r)),m=o.i32_add(o.getLocal("r"),o.i32_const(5*r)),L=o.i32_const(t.alloc(r)),b=o.i32_const(t.alloc(r)),w=o.i32_const(t.alloc(r)),y=o.i32_const(t.alloc(r)),A=o.i32_const(t.alloc(r)),C=o.i32_const(t.alloc(r)),F=o.i32_const(t.alloc(r)),x=o.i32_const(t.alloc(r));a.addCode(o.call(h+"_mul",i,s,F),o.call(h+"_mul",s,o.i32_const(v),L),o.call(h+"_add",i,L,L),o.call(h+"_add",i,s,x),o.call(h+"_mul",x,L,L),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",L,x,L),o.call(h+"_add",F,F,b),o.call(h+"_mul",c,l,F),o.call(h+"_mul",l,o.i32_const(v),w),o.call(h+"_add",c,w,w),o.call(h+"_add",c,l,x),o.call(h+"_mul",x,w,w),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",w,x,w),o.call(h+"_add",F,F,y),o.call(h+"_mul",n,d,F),o.call(h+"_mul",d,o.i32_const(v),A),o.call(h+"_add",n,A,A),o.call(h+"_add",n,d,x),o.call(h+"_mul",x,A,A),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",A,x,A),o.call(h+"_add",F,F,C),o.call(h+"_sub",L,i,u),o.call(h+"_add",u,u,u),o.call(h+"_add",L,u,u),o.call(h+"_add",b,s,p),o.call(h+"_add",p,p,p),o.call(h+"_add",b,p,p),o.call(h+"_mul",C,o.i32_const(P),x),o.call(h+"_add",x,c,f),o.call(h+"_add",f,f,f),o.call(h+"_add",x,f,f),o.call(h+"_sub",A,l,g),o.call(h+"_add",g,g,g),o.call(h+"_add",A,g,g),o.call(h+"_sub",w,n,_),o.call(h+"_add",_,_,_),o.call(h+"_add",w,_,_),o.call(h+"_add",y,d,m),o.call(h+"_add",m,m,m),o.call(h+"_add",y,m,m))}(),$(N,"w0");const a=t.addFunction(e+"__finalExponentiationLastChunk");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.getLocal("r"),l=o.i32_const(t.alloc(d)),c=o.i32_const(t.alloc(d)),s=o.i32_const(t.alloc(d)),u=o.i32_const(t.alloc(d)),_=o.i32_const(t.alloc(d)),g=o.i32_const(t.alloc(d)),f=o.i32_const(t.alloc(d)),p=o.i32_const(t.alloc(d)),m=o.i32_const(t.alloc(d)),L=o.i32_const(t.alloc(d)),b=o.i32_const(t.alloc(d)),w=o.i32_const(t.alloc(d)),y=o.i32_const(t.alloc(d)),A=o.i32_const(t.alloc(d)),C=o.i32_const(t.alloc(d)),F=o.i32_const(t.alloc(d)),x=o.i32_const(t.alloc(d)),I=o.i32_const(t.alloc(d)),B=o.i32_const(t.alloc(d)),E=o.i32_const(t.alloc(d)),S=o.i32_const(t.alloc(d));a.addCode(o.call(e+"__cyclotomicExp_w0",i,l),o.call(G+"_conjugate",l,l),o.call(e+"__cyclotomicSquare",l,c),o.call(e+"__cyclotomicSquare",c,s),o.call(G+"_mul",s,c,u),o.call(e+"__cyclotomicExp_w0",u,_),o.call(G+"_conjugate",_,_),o.call(e+"__cyclotomicSquare",_,g),o.call(e+"__cyclotomicExp_w0",g,f),o.call(G+"_conjugate",f,f),o.call(G+"_conjugate",u,p),o.call(G+"_conjugate",f,m),o.call(G+"_mul",m,_,L),o.call(G+"_mul",L,p,b),o.call(G+"_mul",b,c,w),o.call(G+"_mul",b,_,y),o.call(G+"_mul",y,i,A),o.call(e+"__frobeniusMap1",w,C),o.call(G+"_mul",C,A,F),o.call(e+"__frobeniusMap2",b,x),o.call(G+"_mul",x,F,I),o.call(G+"_conjugate",i,B),o.call(G+"_mul",B,w,E),o.call(e+"__frobeniusMap3",E,S),o.call(G+"_mul",S,I,n))}const V=t.alloc(k),K=t.alloc(R);function H(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t0n;)Zc(a)?e.push(1):e.push(0),a>>=1n;return e}(0xd201000000010000n),z=t.alloc(G),T=3*s,M=G.length-1,U=G.reduce(((t,a)=>t+(0!=a?1:0)),0),Q=6*l,k=3*l*2+(U+M+1)*T,R=!0,N=15132376222941642752n;function D(a){const e=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n,151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n],[2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n,1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n,877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n,3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n,2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n,3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n]]],i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[0n,4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[0n,1n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[0n,793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n]],[[1n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n]]],n=t.addFunction(O+"_frobeniusMap"+a);n.addParam("x","i32"),n.addParam("r","i32");const r=n.getCodeBuilder();for(let o=0;o<6;o++){const u=0==o?r.getLocal("x"):r.i32_add(r.getLocal("x"),r.i32_const(o*s)),_=u,g=r.i32_add(r.getLocal("x"),r.i32_const(o*s+c)),h=0==o?r.getLocal("r"):r.i32_add(r.getLocal("r"),r.i32_const(o*s)),p=h,L=r.i32_add(r.getLocal("r"),r.i32_const(o*s+c)),b=d(e[Math.floor(o/3)][a%12],i[o%3][a%6]),w=t.alloc([...Uc.bigInt2BytesLE(y(b[0]),l),...Uc.bigInt2BytesLE(y(b[1]),l)]);a%2==1?n.addCode(r.call(f+"_copy",_,p),r.call(f+"_neg",g,L),r.call(m+"_mul",h,r.i32_const(w),h)):n.addCode(r.call(m+"_mul",u,r.i32_const(w),h))}function d(t,a){const e=t[0],i=t[1],n=a[0],l=a[1],c=[(e*n-i*l)%o,(e*l+i*n)%o];return Wc(c[0])&&(c[0]=c[0]+o),c}}function $(a,o,i){const n=function(t){let a=t;const e=[];for(;a>0n;){if(Zc(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),l=t.alloc(n),c=t.addFunction(e+"__cyclotomicExp_"+i);c.addParam("x","i32"),c.addParam("r","i32"),c.addLocal("bit","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),d=s.getLocal("x"),u=s.getLocal("r"),_=s.i32_const(t.alloc(r));c.addCode(s.call(O+"_conjugate",d,_),s.call(O+"_one",u),s.if(s.teeLocal("bit",s.i32_load8_s(s.i32_const(n.length-1),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.setLocal("i",s.i32_const(n.length-2)),s.block(s.loop(s.call(e+"__cyclotomicSquare",u,u),s.if(s.teeLocal("bit",s.i32_load8_s(s.getLocal("i"),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.br(0)))),o&&c.addCode(s.call(O+"_conjugate",u,u))}t.modules[e]={n64q:n,n64r:d,n8q:l,n8r:u,pG1gen:C,pG1zero:x,pG1b:h,pG2gen:B,pG2zero:v,pG2b:L,pq:t.modules.f1m.pq,pr:g,pOneT:S,r:i,q:o,prePSize:Q,preQSize:k},function(){const a=t.addFunction(q+"_mul1");a.addParam("pA","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC1"),s=e.getLocal("pR"),r=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),d=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),u=e.i32_const(t.alloc(2*c)),_=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_add",o,i,u),e.call(m+"_add",i,n,_),e.call(m+"_mul",i,l,d),e.call(m+"_mul",_,l,s),e.call(m+"_sub",s,d,s),e.call(m+"_mulNR",s,s),e.call(m+"_mul",u,l,r),e.call(m+"_sub",r,d,r))}(),function(){const a=t.addFunction(q+"_mul01");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC0"),s=e.getLocal("pC1"),r=e.getLocal("pR"),d=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),u=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),_=e.i32_const(t.alloc(2*c)),g=e.i32_const(t.alloc(2*c)),f=e.i32_const(t.alloc(2*c)),h=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_mul",o,l,_),e.call(m+"_mul",i,s,g),e.call(m+"_add",o,i,f),e.call(m+"_add",o,n,h),e.call(m+"_add",i,n,r),e.call(m+"_mul",r,s,r),e.call(m+"_sub",r,g,r),e.call(m+"_mulNR",r,r),e.call(m+"_add",r,_,r),e.call(m+"_add",l,s,d),e.call(m+"_mul",d,f,d),e.call(m+"_sub",d,_,d),e.call(m+"_sub",d,g,d),e.call(m+"_mul",h,l,u),e.call(m+"_sub",u,_,u),e.call(m+"_add",u,g,u))}(),function(){const a=t.addFunction(O+"_mul014");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pC4","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(6*c)),n=e.getLocal("pC0"),l=e.getLocal("pC1"),s=e.getLocal("pC4"),r=e.i32_const(t.alloc(6*c)),d=e.i32_const(t.alloc(6*c)),u=e.i32_const(t.alloc(2*c)),_=e.getLocal("pR"),g=e.i32_add(e.getLocal("pR"),e.i32_const(6*c));a.addCode(e.call(q+"_mul01",o,n,l,r),e.call(q+"_mul1",i,s,d),e.call(m+"_add",l,s,u),e.call(q+"_add",i,o,g),e.call(q+"_mul01",g,n,u,g),e.call(q+"_sub",g,r,g),e.call(q+"_sub",g,d,g),e.call(q+"_copy",d,_),e.call(q+"_mulNR",_,_),e.call(q+"_add",_,r,_))}(),function(){const a=t.addFunction(e+"_ell");a.addParam("pP","i32"),a.addParam("pCoefs","i32"),a.addParam("pF","i32");const o=a.getCodeBuilder(),i=o.getLocal("pP"),n=o.i32_add(o.getLocal("pP"),o.i32_const(l)),s=o.getLocal("pF"),r=o.getLocal("pCoefs"),d=o.i32_add(o.getLocal("pCoefs"),o.i32_const(c)),u=o.i32_add(o.getLocal("pCoefs"),o.i32_const(2*c)),_=o.i32_add(o.getLocal("pCoefs"),o.i32_const(3*c)),g=o.i32_add(o.getLocal("pCoefs"),o.i32_const(4*c)),h=t.alloc(2*c),p=o.i32_const(h),m=o.i32_const(h),L=o.i32_const(h+c),b=t.alloc(2*c),w=o.i32_const(b),y=o.i32_const(b),A=o.i32_const(b+c);a.addCode(o.call(f+"_mul",r,n,m),o.call(f+"_mul",d,n,L),o.call(f+"_mul",u,i,y),o.call(f+"_mul",_,i,A),o.call(O+"_mul014",s,g,w,p,s))}();const j=t.alloc(Q),V=t.alloc(k);function K(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t>=1;return e}function as(t,a){return(Xc[t>>>24]|Xc[t>>>16&255]<<8|Xc[t>>>8&255]<<16|Xc[255&t]<<24)>>>32-a}function es(t){return(0!=(4294901760&t)?(t&=4294901760,16):0)|(0!=(4278255360&t)?(t&=4278255360,8):0)|(0!=(4042322160&t)?(t&=4042322160,4):0)|(0!=(3435973836&t)?(t&=3435973836,2):0)|0!=(2863311530&t)}function os(t,a){const e=new Uint8Array(a*t.length);for(let o=0;o0;){const t=l+c>ns?ns-l:c,a=new Uint8Array(this.buffers[n].buffer,this.buffers[n].byteOffset+l,t);if(t==e)return a.slice();i||(i=e<=ns?new Uint8Array(e):new ls(e)),i.set(a,e-c),c-=t,n++,l=0}return i}set(t,a){void 0===a&&(a=0);const e=t.byteLength;if(0==e)return;const o=Math.floor(a/ns);if(o==Math.floor((a+e-1)/ns))return t instanceof ls&&1==t.buffers.length?this.buffers[o].set(t.buffers[0],a%ns):this.buffers[o].set(t,a%ns);let i=o,n=a%ns,l=e;for(;l>0;){const a=n+l>ns?ns-n:l,o=t.slice(e-l,e-l+a);new Uint8Array(this.buffers[i].buffer,this.buffers[i].byteOffset+n,a).set(o),l-=a,i++,n=0}}}function cs(t,a,e,o){return async function(i){const n=Math.floor(i.byteLength/e);if(n*e!==i.byteLength)throw new Error("Invalid buffer size");const l=Math.floor(n/t.concurrency),c=[];for(let s=0;s=0;t--)this.w[t]=this.square(this.w[t+1]);if(!this.eq(this.w[0],this.one))throw new Error("Error calculating roots of unity");this.batchToMontgomery=cs(t,a+"_batchToMontgomery",this.n8,this.n8),this.batchFromMontgomery=cs(t,a+"_batchFromMontgomery",this.n8,this.n8)}op2(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op2Bool(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2)}op1(t,a){return this.tm.setBuff(this.pOp1,a),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op1Bool(t,a){return this.tm.setBuff(this.pOp1,a),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3)}add(t,a){return this.op2("_add",t,a)}eq(t,a){return this.op2Bool("_eq",t,a)}isZero(t){return this.op1Bool("_isZero",t)}sub(t,a){return this.op2("_sub",t,a)}neg(t){return this.op1("_neg",t)}inv(t){return this.op1("_inverse",t)}toMontgomery(t){return this.op1("_toMontgomery",t)}fromMontgomery(t){return this.op1("_fromMontgomery",t)}mul(t,a){return this.op2("_mul",t,a)}div(t,a){return this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_inverse"](this.pOp2,this.pOp2),this.tm.instance.exports[this.prefix+"_mul"](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}square(t){return this.op1("_square",t)}isSquare(t){return this.op1Bool("_isSquare",t)}sqrt(t){return this.op1("_sqrt",t)}exp(t,a){return a instanceof Uint8Array||(a=dl(Kn(a))),this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_exp"](this.pOp1,this.pOp2,a.byteLength,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}isNegative(t){return this.op1Bool("_isNegative",t)}e(t,a){if(t instanceof Uint8Array)return t;let e=Kn(t,a);!function(t){return BigInt(t)>=BigInt(32)):n+2<=a?(i.setUint16(n,Number(e&BigInt(65535)),!0),n+=2,e>>=BigInt(16)):(i.setUint8(n,Number(e&BigInt(255)),!0),n+=1,e>>=BigInt(8));if(e)throw new Error("Number does not fit in this length");return o}(e,this.n8);return this.toMontgomery(o)}toString(t,a){return rl(sl(this.fromMontgomery(t),0),a)}fromRng(t){let a;const e=new Uint8Array(this.n8);do{a=ul;for(let e=0;e=BigInt(i));var o,i;return cl(e,0,a,this.n8),e}random(){return this.fromRng(bl())}toObject(t){return sl(this.fromMontgomery(t),0)}fromObject(t){const a=new Uint8Array(this.n8);return cl(a,0,t,this.n8),this.toMontgomery(a)}toRprLE(t,a,e){t.set(this.fromMontgomery(e),a)}toRprBE(t,a,e){const o=this.fromMontgomery(e);for(let t=0;to.buffer.byteLength){const i=o.buffer.byteLength/65536;let n=Math.floor((e[0]+t)/65536)+1;n>a&&(n=a),o.grow(n-i)}return i}function l(t){const a=n(t.byteLength);return s(a,t),a}function c(t,a){const e=new Uint8Array(o.buffer);return new Uint8Array(e.buffer,e.byteOffset+t,a)}function s(t,a){new Uint8Array(o.buffer).set(new Uint8Array(a),t)}function r(t){if("INIT"==t[0].cmd)return i(t[0]);const a={vars:[],out:[]},r=new Uint32Array(o.buffer,0,1)[0];for(let o=0;o{this.reject=a,this.resolve=t}))}}const hs=function(t){return globalThis.btoa(t)}("("+_s.toString()+")(self)"),ps="data:application/javascript;base64,"+hs;class ms{constructor(){this.actionQueue=[],this.oldPFree=0}startSyncOp(){if(0!=this.oldPFree)throw new Error("Sync operation in progress");this.oldPFree=this.u32[0]}endSyncOp(){if(0==this.oldPFree)throw new Error("No sync operation in progress");this.u32[0]=this.oldPFree,this.oldPFree=0}postAction(t,a,e,o){if(this.working[t])throw new Error("Posting a job t a working worker");return this.working[t]=!0,this.pendingDeferreds[t]=o||new fs,this.workers[t].postMessage(a,e),this.pendingDeferreds[t].promise}processWorks(){for(let t=0;t0;t++)if(0==this.working[t]){const a=this.actionQueue.shift();this.postAction(t,a.data,a.transfers,a.deferred)}}queueAction(t,a){const e=new fs;if(this.singleThread){const a=this.taskManager(t);e.resolve(a)}else this.actionQueue.push({data:t,transfers:a,deferred:e}),this.processWorks();return e.promise}resetMemory(){this.u32[0]=this.initalPFree}allocBuff(t){const a=this.alloc(t.byteLength);return this.setBuff(a,t),a}getBuff(t,a){return this.u8.slice(t,t+a)}setBuff(t,a){this.u8.set(new Uint8Array(a),t)}alloc(t){for(;3&this.u32[0];)this.u32[0]++;const a=this.u32[0];return this.u32[0]+=t,a}async terminate(){for(let t=0;tsetTimeout(a,t))))}}function Ls(t,a){const e=t[a],o=t.Fr,i=t.tm;t[a].batchApplyKey=async function(t,n,l,c,s){let r,d,u,_,g;if(c=c||"affine",s=s||"affine","G1"==a)"jacobian"==c?(u=3*e.F.n8,r="g1m_batchApplyKey"):(u=2*e.F.n8,r="g1m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g1m_batchToAffine",g=2*e.F.n8);else if("G2"==a)"jacobian"==c?(u=3*e.F.n8,r="g2m_batchApplyKey"):(u=2*e.F.n8,r="g2m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g2m_batchToAffine",g=2*e.F.n8);else{if("Fr"!=a)throw new Error("Invalid group: "+a);r="frm_batchApplyKey",u=e.n8,_=e.n8,g=e.n8}const f=Math.floor(t.byteLength/u),h=Math.floor(f/i.concurrency),p=[];l=o.e(l);let m=o.e(n);for(let a=0;a=0;t--){if(!e.isZero(h))for(let t=0;tr&&(h=r),h<1024&&(h=1024);const p=[];for(let a=0;a(c&&c.debug(`Multiexp end: ${s}: ${a}/${u}`),t))))}const m=await Promise.all(p);let L=e.zero;for(let t=m.length-1;t>=0;t--)L=e.add(L,m[t]);return L}e.multiExp=async function(t,a,e,o){return await n(t,a,"jacobian",e,o)},e.multiExpAffine=async function(t,a,e,o){return await n(t,a,"affine",e,o)}}function ys(t,a){const e=t[a],o=t.Fr,i=e.tm;async function n(t,c,s,r,d,u){s=s||"affine",r=r||"affine";let _,g,f,h,p,m,L,b;"G1"==a?("affine"==s?(_=2*e.F.n8,h="g1m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g1m_fftFinal"),L="g1m_fftJoin",m="g1m_fftMix","affine"==r?(f=2*e.F.n8,p="g1m_batchToAffine"):f=3*e.F.n8):"G2"==a?("affine"==s?(_=2*e.F.n8,h="g2m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g2m_fftFinal"),L="g2m_fftJoin",m="g2m_fftMix","affine"==r?(f=2*e.F.n8,p="g2m_batchToAffine"):f=3*e.F.n8):"Fr"==a&&(_=e.n8,g=e.n8,f=e.n8,c&&(b="frm_fftFinal"),m="frm_fftMix",L="frm_fftJoin");let w=!1;Array.isArray(t)?(t=os(t,_),w=!0):t=t.slice(0,t.byteLength);const y=t.byteLength/_,A=es(y);if(1<1<<28?new ls(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u):await async function(t,a,e,i,c){let s,r;s=t.slice(0,t.byteLength/2),r=t.slice(t.byteLength/2,t.byteLength);const d=[];[s,r]=await l(s,r,"fftJoinExt",o.one,o.shift,a,"jacobian",i,c),d.push(n(s,!1,"jacobian",e,i,c)),d.push(n(r,!1,"jacobian",e,i,c));const u=await Promise.all(d);let _;_=u[0].byteLength>1<<28?new ls(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u),w?is(a,f):a}let C,F,x;c&&(C=o.inv(o.e(y))),function(t,a){const e=t.byteLength/a,o=es(e);if(e!=1<e){const o=t.slice(i*a,(i+1)*a);t.set(t.slice(e*a,(e+1)*a),i*a),t.set(o,e*a)}}}(t,_);let I=Math.min(16384,y),B=y/I;for(;B=16;)B*=2,I/=2;const E=es(I),v=[];for(let a=0;a(d&&d.debug(`${u}: fft ${A} mix end: ${a}/${B}`),t))))}x=await Promise.all(v);for(let t=0;t(d&&d.debug(`${u}: fft ${A} join ${t}/${A} ${l+1}/${a} ${c}/${e/2}`),o))))}const l=await Promise.all(n);for(let t=0;t0;a--)F.set(x[a],t),t+=I*f,delete x[a];F.set(x[0].slice(0,(I-1)*f),t),delete x[0]}else for(let t=0;t65536&&(w=65536);const y=[];for(let a=0;a(u&&u.debug(`${_}: fftJoinExt End: ${a}/${b}`),t))))}const A=await Promise.all(y);let C,F;b*p>1<<28?(C=new ls(b*p),F=new ls(b*p)):(C=new Uint8Array(b*p),F=new Uint8Array(b*p));let x=0;for(let t=0;to.s+1)throw s&&s.error("lagrangeEvaluations input too big"),new Error("lagrangeEvaluations input too big");let g=t.slice(0,t.byteLength/2),f=t.slice(t.byteLength/2,t.byteLength);const h=o.exp(o.shift,u/2),p=o.inv(o.sub(o.one,h));[g,f]=await l(g,f,"prepareLagrangeEvaluation",p,o.shiftInv,i,"jacobian",s,r+" prep");const m=[];let L;return m.push(n(g,!0,"jacobian",c,s,r+" t0")),m.push(n(f,!0,"jacobian",c,s,r+" t1")),[g,f]=await Promise.all(m),L=g.byteLength>1<<28?new ls(2*g.byteLength):new Uint8Array(2*g.byteLength),L.set(g),L.set(f,g.byteLength),L},e.fftMix=async function(t){const n=3*e.F.n8;let l,c;if("G1"==a)l="g1m_fftMix",c="g1m_fftJoin";else if("G2"==a)l="g2m_fftMix",c="g2m_fftJoin";else{if("Fr"!=a)throw new Error("Invalid group");l="frm_fftMix",c="frm_fftJoin"}const s=Math.floor(t.byteLength/n),r=es(s);let d=1<=0;t--)g.set(_[t][0],f),f+=_[t][0].byteLength;return g}}async function As(t){const a=await async function(t,a){const e=new ms;e.memory=new WebAssembly.Memory({initial:gs}),e.u8=new Uint8Array(e.memory.buffer),e.u32=new Uint32Array(e.memory.buffer);const o=await WebAssembly.compile(t.code);if(e.instance=await WebAssembly.instantiate(o,{env:{memory:e.memory}}),e.singleThread=a,e.initalPFree=e.u32[0],e.pq=t.pq,e.pr=t.pr,e.pG1gen=t.pG1gen,e.pG1zero=t.pG1zero,e.pG2gen=t.pG2gen,e.pG2zero=t.pG2zero,e.pOneT=t.pOneT,a)e.code=t.code,e.taskManager=_s(),await e.taskManager([{cmd:"INIT",init:gs,code:e.code.slice()}]),e.concurrency=1;else{let a;e.workers=[],e.pendingDeferreds=[],e.working=[],a="object"==typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:Qa.cpus().length,0==a&&(a=2),a>64&&(a=64),e.concurrency=a;for(let t=0;t=this.length&&(this.length=t+1),!0}getKeys(){const t=new vs;for(let a=0;a1<<20?new vs:[];for(let t=0;t1<<20?new vs:[];for(let t=0;t1<<20?new vs:[];for(let t=0;t{let o="";return Object.keys(e).forEach((i=>{let n=a.varIdx2Name[i];"one"==n&&(n="1");let l=t.curve.Fr.toString(e[i]);"1"==l&&(l=""),"-1"==l&&(l="-"),""!=o&&"-"!=l[0]&&(l="+"+l),""!=o&&(l=" "+l),o=o+l+n})),o},n=`[ ${i(o[0])} ] * [ ${i(o[1])} ] - [ ${i(o[2])} ] = 0`;e&&e.info(n)}},info:async function(t,a){const e=await Gs(t);return fe.eq(e.prime,Ts)?a&&a.info("Curve: bn-128"):fe.eq(e.prime,zs)?a&&a.info("Curve: bls12-381"):a&&a.info(`Unknown Curve. Prime: ${fe.toString(e.prime)}`),a&&a.info(`# of Wires: ${e.nVars}`),a&&a.info(`# of Constraints: ${e.nConstraints}`),a&&a.info(`# of Private Inputs: ${e.nPrvInputs}`),a&&a.info(`# of Public Inputs: ${e.nPubInputs}`),a&&a.info(`# of Labels: ${e.nLabels}`),a&&a.info(`# of Outputs: ${e.nOutputs}`),e},exportJson:async function(t,a){const e=await Gs(t,!0,!0,!0,a),o=e.curve.Fr;return delete e.curve,delete e.F,Zo(o,e)}});async function Us(t){const a={labelIdx2Name:["one"],varIdx2Name:["one"],componentIdx2Name:[]},e=await Me(t),o=await e.read(e.totalSize),i=new TextDecoder("utf-8").decode(o).split("\n");for(let t=0;t Reading r1cs file");const{fd:o,sections:i}=await Ue(t,"r1cs",1),n=await Os(o,i,{loadConstraints:!1,loadCustomGates:!1});e&&e.info("> Reading witness file");const{fd:l,sections:c}=await Ue(a,"wtns",2),s=await Si(l,c);if(!fe.eq(n.prime,s.q))throw new Error("Curve of the witness does not match the curve of the proving key");const r=await Ke(l,c,2);await l.close();const d=(await async function(t){let a;if(fe.eq(t,We))a=await _e();else{if(!fe.eq(t,Ze))throw new Error(`Curve not supported: ${fe.toString(t)}`);a=await ge()}return a}(n.prime)).Fr,u=d.n8,_=await Ke(o,i,2);e&&(e.info("----------------------------"),e.info(" WITNESS CHECK"),e.info(` Curve: ${n.curve.name}`),e.info(` Vars (wires): ${n.nVars}`),e.info(` Ouputs: ${n.nOutputs}`),e.info(` Public Inputs: ${n.nPubInputs}`),e.info(` Private Inputs: ${n.nPrvInputs}`),e.info(` Labels: ${n.nLabels}`),e.info(` Constraints: ${n.nConstraints}`),e.info(` Custom Gates: ${n.useCustomGates}`),e.info("----------------------------")),e&&e.info("> Checking witness correctness");let g=0,f=!0;for(let t=0;t{const o=function(t){return d.fromRprLE(r.slice(t*u,t*u+u))}(e),i=t[e];a=d.add(a,d.mul(o,i))})),a}function p(){const t={},a=_.slice(g,g+4);g+=4;const e=new DataView(a.buffer).getUint32(0,!0),o=_.slice(g,g+(4+n.n8)*e);g+=(4+n.n8)*e;const i=new DataView(o.buffer);for(let a=0;a=this.length&&(this.length=t+1),!0}getKeys(){const t=new $s;for(let a=0;a_)return o&&o.error(`circuit too big for this power of tau ceremony. ${h.nConstraints}*2 > 2**${_}`),-1;if(!d[12])return o&&o.error("Powers of tau is not prepared."),-1;const w=h.nOutputs+h.nPubInputs,y=2**b;await ke(p,1),await p.writeULE32(1),await Re(p),await ke(p,2);const A=u.q,C=8*(Math.floor((fe.bitLength(A)-1)/64)+1),F=u.r,x=8*(Math.floor((fe.bitLength(F)-1)/64)+1),I=fe.mod(fe.shl(1,8*x),F),B=u.Fr.e(fe.mod(fe.mul(I,I),F));let E,v,S;await p.writeULE32(C),await $e(p,A,C),await p.writeULE32(x),await $e(p,F,x),await p.writeULE32(h.nVars),await p.writeULE32(w),await p.writeULE32(y),E=await r.read(m,d[4][0].p),await p.write(E),E=await u.G1.batchLEMtoU(E),s.update(E),v=await r.read(m,d[5][0].p),await p.write(v),v=await u.G1.batchLEMtoU(v),s.update(v),S=await r.read(L,d[6][0].p),await p.write(S),S=await u.G2.batchLEMtoU(S),s.update(S);const P=new Uint8Array(m);u.G1.toRprLEM(P,0,u.G1.g);const q=new Uint8Array(L);u.G2.toRprLEM(q,0,u.G2.g);const O=new Uint8Array(m);u.G1.toRprUncompressed(O,0,u.G1.g);const G=new Uint8Array(L);u.G2.toRprUncompressed(G,0,u.G2.g),await p.write(q),await p.write(P),await p.write(q),s.update(G),s.update(O),s.update(G),await Re(p),o&&o.info("Reading r1cs");let z=await Ke(g,f,2);const T=new $s(h.nVars),M=new $s(h.nVars),U=new $s(h.nVars),Q=new $s(h.nVars-w-1),k=new Array(w+1);o&&o.info("Reading tauG1");let R=await Ke(r,d,12,(y-1)*m,y*m);o&&o.info("Reading tauG2");let N=await Ke(r,d,13,(y-1)*L,y*L);o&&o.info("Reading alphatauG1");let D=await Ke(r,d,14,(y-1)*m,y*m);o&&o.info("Reading betatauG1");let $=await Ke(r,d,15,(y-1)*m,y*m);await async function(){const t=new Uint8Array(12+u.Fr.n8),a=new DataView(t.buffer),e=new Uint8Array(u.Fr.n8);u.Fr.toRprLE(e,0,u.Fr.e(1));let s=0;function r(){const t=z.slice(s,s+4);s+=4;return new DataView(t.buffer).getUint32(0,!0)}const d=new $s;for(let t=0;t=0?u.Fr.fromRprLE(z.slice(o[3],o[3]+u.Fr.n8),0):u.Fr.fromRprLE(e,0);const n=u.Fr.mul(i,B);u.Fr.toRprLE(t,12,n),_.set(t,f),f+=t.length}await p.write(_),await Re(p)}(),await V(3,"G1",k,"IC"),await async function(){await ke(p,9);const t=new qa(y*m);if(b(o&&o.debug(`Writing points end ${i}: ${d}/${e.length}`),t)))),c+=n,t++}const r=await Promise.all(l);for(let t=0;t32768?(g=new qa(h*n),f=new qa(h*u.Fr.n8)):(g=new Uint8Array(h*n),f=new Uint8Array(h*u.Fr.n8));let p=0,m=0;const L=[R,N,D,$],b=new Uint8Array(u.Fr.n8);u.Fr.toRprLE(b,0,u.Fr.e(1));let w=0;for(let t=0;t=0?f.set(z.slice(a[t][i][2],a[t][i][2]+u.Fr.n8),w*u.Fr.n8):f.set(b,w*u.Fr.n8),w++;if(a.length>1){const t=[];t.push({cmd:"ALLOCSET",var:0,buff:g}),t.push({cmd:"ALLOCSET",var:1,buff:f}),t.push({cmd:"ALLOC",var:2,len:a.length*l}),p=0,m=0;let e=0;for(let o=0;o=0;t--){const a=d.contributions[t];o&&o.info("-------------------------"),o&&o.info(Uo(a.contributionHash,`contribution #${t+1} ${a.name?a.name:""}:`)),1==a.type&&(o&&o.info(`Beacon generator: ${Ho(a.beaconHash)}`),o&&o.info(`Beacon iterations Exp: ${a.numIterationsExp}`))}return o&&o.info("-------------------------"),o&&o.info("ZKey Ok!"),!0;async function L(t,a){const e=2*s.G1.F.n8,o=t.byteLength/e,i=s.tm.concurrency,n=Math.floor(o/i),l=[];for(let e=0;e Detected protocol: "+i.protocol),"groth16"===i.protocol)n=await async function(t,a,e){const o=await Xe(t.q),i=2*o.G1.F.n8,n=await o.pairing(t.vk_alpha_1,t.vk_beta_2);let l={protocol:t.protocol,curve:o.name,nPublic:t.nPublic,vk_alpha_1:o.G1.toObject(t.vk_alpha_1),vk_beta_2:o.G2.toObject(t.vk_beta_2),vk_gamma_2:o.G2.toObject(t.vk_gamma_2),vk_delta_2:o.G2.toObject(t.vk_delta_2),vk_alphabeta_12:o.Gt.toObject(n)};await Ne(a,e,3),l.IC=[];for(let e=0;e<=t.nPublic;e++){const t=await a.read(i),e=o.G1.toObject(t);l.IC.push(e)}return await De(a),l=Hs(l),l}(i,e,o);else if("plonk"===i.protocol)n=await async function(t){const a=await Xe(t.q);let e={protocol:t.protocol,curve:a.name,nPublic:t.nPublic,power:t.power,k1:a.Fr.toObject(t.k1),k2:a.Fr.toObject(t.k2),Qm:a.G1.toObject(t.Qm),Ql:a.G1.toObject(t.Ql),Qr:a.G1.toObject(t.Qr),Qo:a.G1.toObject(t.Qo),Qc:a.G1.toObject(t.Qc),S1:a.G1.toObject(t.S1),S2:a.G1.toObject(t.S2),S3:a.G1.toObject(t.S3),X_2:a.G2.toObject(t.X_2),w:a.Fr.toObject(a.Fr.w[t.power])};return e=Hs(e),e}(i);else{if(!i.protocolId||i.protocolId!==Xo)throw new Error("zkey file protocol unrecognized");n=await async function(t,a){const e=await Xe(t.q);let o={protocol:t.protocol,curve:e.name,nPublic:t.nPublic,power:t.power,k1:e.Fr.toObject(t.k1),k2:e.Fr.toObject(t.k2),w:e.Fr.toObject(e.Fr.w[t.power]),w3:e.Fr.toObject(t.w3),w4:e.Fr.toObject(t.w4),w8:e.Fr.toObject(t.w8),wr:e.Fr.toObject(t.wr),X_2:e.G2.toObject(t.X_2),C0:e.G1.toObject(t.C0)};return Hs(o)}(i)}return await e.close(),a&&a.info("EXPORT VERIFICATION KEY FINISHED"),n}var Ws={};const{unstringifyBigInts:Ys,stringifyBigInts:Js}=he;async function Xs(t,a,e){e&&e.info("FFLONK EXPORT SOLIDITY VERIFIER STARTED");const o=await to(t.curve);let i=r(t.w3);t.w3_2=d(o.Fr.square(i));let n=r(t.w4);t.w4_2=d(o.Fr.square(n)),t.w4_3=d(o.Fr.mul(o.Fr.square(n),n));let l=r(t.w8),c=o.Fr.one;for(let a=1;a<8;a++)c=o.Fr.mul(c,l),t["w8_"+a]=d(c);let s=a[t.protocol];return e&&e.info("FFLONK EXPORT SOLIDITY VERIFIER FINISHED"),Ws.render(s,t);function r(t){const a=Ys(t);return o.Fr.fromObject(a)}function d(t){const a=o.Fr.toObject(t);return Js(a)}}var tr=Object.freeze({__proto__:null,newZKey:js,exportBellman:async function(t,a,e){const{fd:o,sections:i}=await Ue(t,"zkey",2),n=await Ci(o,i);if("groth16"!=n.protocol)throw new Error("zkey file is not groth16");const l=await Xe(n.q),c=2*l.G1.F.n8,s=2*l.G2.F.n8,r=await xi(o,l,i),d=await Te(a);let u;await L(n.vk_alpha_1),await L(n.vk_beta_1),await b(n.vk_beta_2),await b(n.vk_gamma_2),await L(n.vk_delta_1),await b(n.vk_delta_2),u=await Ke(o,i,3),u=await l.G1.batchLEMtoU(u),await w("G1",u);const _=await Ke(o,i,9);let g,f,h,p,m;g=await l.G1.fft(_,"affine","jacobian",e),g=await l.G1.batchApplyKey(g,l.Fr.neg(l.Fr.e(2)),l.Fr.w[n.power+1],"jacobian","affine",e),g=g.slice(0,g.byteLength-c),g=await l.G1.batchLEMtoU(g),await w("G1",g),f=await Ke(o,i,8),f=await l.G1.batchLEMtoU(f),await w("G1",f),h=await Ke(o,i,5),h=await l.G1.batchLEMtoU(h),await w("G1",h),p=await Ke(o,i,6),p=await l.G1.batchLEMtoU(p),await w("G1",p),m=await Ke(o,i,7),m=await l.G2.batchLEMtoU(m),await w("G2",m),await d.write(r.csHash),await async function(t){const a=new Uint8Array(4);new DataView(a.buffer,a.byteOffset,a.byteLength).setUint32(0,t,!1),await d.write(a)}(r.contributions.length);for(let t=0;t_.contributions.length)return i&&i.error("The impoerted file does not include new contributions"),!1;for(let t=0;t=256)return n&&n.error("Maximum lenght of beacon hash is 255 bytes"),!1;if((i=parseInt(i))<10||i>63)return n&&n.error("Invalid numIterationsExp. (Must be between 10 and 63)"),!1;const{fd:c,sections:s}=await Ue(t,"zkey",2),r=await Ci(c,s);if("groth16"!=r.protocol)throw new Error("zkey file is not groth16");const d=await Xe(r.q),u=await xi(c,d,s),_=await Qe(a,"zkey",1,10),g=await Vo(l,i),f=ao.exports(64);f.update(u.csHash);for(let t=0;t{const o=this.curve.G1.toObject(this.polynomials[e]);t?a.polynomials[e]=o:a[e]=o})),Object.keys(this.evaluations).forEach((e=>{const o=this.curve.Fr.toObject(this.evaluations[e]);t?a.evaluations[e]=o:a[e]=o})),a}fromObjectProof(t){this.resetProof(),Object.keys(t.polynomials).forEach((a=>{this.polynomials[a]=this.curve.G1.fromObject(t.polynomials[a])})),Object.keys(t.evaluations).forEach((a=>{this.evaluations[a]=this.curve.Fr.fromObject(t.evaluations[a])}))}}var er,or={exports:{}}; +var snarkjs=function(t){"use strict";const a=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function e(t,a){return a&&10!=a?16==a?"0x"==t.slice(0,2)?BigInt(t):BigInt("0x"+t):void 0:BigInt(t)}const o=e;function i(t){const e=t.toString(16);return 4*(e.length-1)+a[parseInt(e[0],16)]}function n(t){return BigInt(t)>BigInt(a)}const r=c,d=s;function u(t){return(BigInt(t)&BigInt(1))==BigInt(1)}function _(t){let a=BigInt(t);const e=[];for(;a;)a&BigInt(1)?e.push(1):e.push(0),a>>=BigInt(1);return e}function g(t){if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(t)}function f(t,a){return BigInt(t)+BigInt(a)}function h(t,a){return BigInt(t)-BigInt(a)}function p(t){return-BigInt(t)}function m(t,a){return BigInt(t)*BigInt(a)}function L(t,a){return BigInt(t)**BigInt(a)}function b(t,a){return BigInt(t)/BigInt(a)}function w(t,a){return BigInt(t)%BigInt(a)}function y(t,a){return BigInt(t)==BigInt(a)}function A(t,a){return BigInt(t)>BigInt(a)}function C(t,a){return BigInt(t)>=BigInt(a)}function F(t,a){return BigInt(t)&BigInt(a)}function x(t,a,e,o){const i="0000000"+e.toString(16),n=new Uint32Array(t.buffer,t.byteOffset+a,o/4),l=1+(4*(i.length-7)-1>>5);for(let t=0;t>5);for(let t=0;tn[n.length-a-1]=t.toString(16).padStart(8,"0"))),e(n.join(""),16)}function E(t,a,o){o=o||t.byteLength,a=a||0;const i=new DataView(t.buffer,t.byteOffset+a,o),n=new Array(o/4);for(let t=0;t>=BigInt(1)}return e},bits:_,toNumber:g,toArray:function(t,a){const e=[];let o=BigInt(t);for(a=BigInt(a);o;)e.unshift(Number(o%a)),o/=a;return e},add:f,sub:h,neg:p,mul:m,square:function(t){return BigInt(t)*BigInt(t)},pow:L,exp:function(t,a){return BigInt(t)**BigInt(a)},abs:function(t){return BigInt(t)>=0?BigInt(t):-BigInt(t)},div:b,mod:w,eq:y,neq:function(t,a){return BigInt(t)!=BigInt(a)},lt:function(t,a){return BigInt(t)=0;e--)i=t.square(i),o[e]&&(i=t.mul(i,a));return i}function z(t){if(t.m%2==1)if(y(w(t.p,4),1))if(y(w(t.p,8),1))if(y(w(t.p,16),1))!function(t){t.sqrt_q=L(t.p,t.m),t.sqrt_s=0,t.sqrt_t=h(t.sqrt_q,1);for(;!u(t.sqrt_t);)t.sqrt_s=t.sqrt_s+1,t.sqrt_t=b(t.sqrt_t,2);let a=t.one;for(;t.eq(a,t.one);){const e=t.random();t.sqrt_z=t.pow(e,t.sqrt_t),a=t.pow(t.sqrt_z,2**(t.sqrt_s-1))}t.sqrt_tm1d2=b(h(t.sqrt_t,1),2),t.sqrt=function(t){const a=this;if(a.isZero(t))return a.zero;let e=a.pow(t,a.sqrt_tm1d2);const o=a.pow(a.mul(a.square(e),t),2**(a.sqrt_s-1));if(a.eq(o,a.negone))return null;let i=a.sqrt_s,n=a.mul(t,e),l=a.mul(n,e),c=a.sqrt_z;for(;!a.eq(l,a.one);){let t=a.square(l),o=1;for(;!a.eq(t,a.one);)t=a.square(t),o++;e=c;for(let t=0;t>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<16|t[i]>>>16&65535)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<12|t[e]>>>20&4095)>>>0,t[a]=t[a]+t[e]>>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<8|t[i]>>>24&255)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<7|t[e]>>>25&127)>>>0}class M{constructor(t){t=t||[0,0,0,0,0,0,0,0],this.state=[1634760805,857760878,2036477234,1797285236,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],0,0,0,0],this.idx=16,this.buff=new Array(16)}nextU32(){return 16==this.idx&&this.update(),this.buff[this.idx++]}nextU64(){return f(m(this.nextU32(),4294967296),this.nextU32())}nextBool(){return 1==(1&this.nextU32())}update(){for(let t=0;t<16;t++)this.buff[t]=this.state[t];for(let a=0;a<10;a++)T(t=this.buff,0,4,8,12),T(t,1,5,9,13),T(t,2,6,10,14),T(t,3,7,11,15),T(t,0,5,10,15),T(t,1,6,11,12),T(t,2,7,8,13),T(t,3,4,9,14);var t;for(let t=0;t<16;t++)this.buff[t]=this.buff[t]+this.state[t]>>>0;this.idx=0,this.state[12]=this.state[12]+1>>>0,0==this.state[12]&&(this.state[13]=this.state[13]+1>>>0,0==this.state[13]&&(this.state[14]=this.state[14]+1>>>0,0==this.state[14]&&(this.state[15]=this.state[15]+1>>>0)))}}var U={};function Q(t){let a=new Uint8Array(t);if(void 0!==globalThis.crypto)globalThis.crypto.getRandomValues(a);else for(let e=0;e>>0;return a}let k=null;function R(){return k||(k=new M(function(){const t=Q(32),a=new Uint32Array(t.buffer),e=[];for(let t=0;t<8;t++)e.push(a[t]);return e}()),k)}class N{constructor(t,a,e){this.F=a,this.G=t,this.opMulGF=e;let o=a.sqrt_t||a.t,i=a.sqrt_s||a.s,n=a.one;for(;a.eq(a.pow(n,a.half),a.one);)n=a.add(n,a.one);this.w=new Array(i+1),this.wi=new Array(i+1),this.w[i]=this.F.pow(n,o),this.wi[i]=this.F.inv(this.w[i]);let l=i-1;for(;l>=0;)this.w[l]=this.F.square(this.w[l+1]),this.wi[l]=this.F.square(this.wi[l+1]),l--;this.roots=[],this._setRoots(Math.min(i,15))}_setRoots(t){for(let a=t;a>=0&&!this.roots[a];a--){let t=this.F.one;const e=1<>1,c=$(t,a,e-1,o,2*i),s=$(t,a,e-1,o+i,2*i),r=new Array(n);for(let a=0;a>this.one,this.bitLength=i(this.p),this.mask=(this.one<>this.one;this.nqr=this.two;let e=this.pow(this.nqr,a);for(;!this.eq(e,this.negone);)this.nqr=this.nqr+this.one,e=this.pow(this.nqr,a);for(this.s=0,this.t=this.negone;(this.t&this.one)==this.zero;)this.s=this.s+1,this.t=this.t>>this.one;this.nqr_to_t=this.pow(this.nqr,this.t),z(this),this.FFT=new N(this,this,this.mul.bind(this)),this.fft=this.FFT.fft.bind(this.FFT),this.ifft=this.FFT.ifft.bind(this.FFT),this.w=this.FFT.w,this.wi=this.FFT.wi,this.shift=this.square(this.nqr),this.k=this.exp(this.nqr,2**this.s)}e(t,a){let e;if(a?16==a&&(e=BigInt("0x"+t)):e=BigInt(t),e<0){let t=-e;return t>=this.p&&(t%=this.p),this.p-t}return e>=this.p?e%this.p:e}add(t,a){const e=t+a;return e>=this.p?e-this.p:e}sub(t,a){return t>=a?t-a:this.p-a+t}neg(t){return t?this.p-t:t}mul(t,a){return t*a%this.p}mulScalar(t,a){return t*this.e(a)%this.p}square(t){return t*t%this.p}eq(t,a){return t==a}neq(t,a){return t!=a}lt(t,a){return(t>this.half?t-this.p:t)<(a>this.half?a-this.p:a)}gt(t,a){return(t>this.half?t-this.p:t)>(a>this.half?a-this.p:a)}leq(t,a){return(t>this.half?t-this.p:t)<=(a>this.half?a-this.p:a)}geq(t,a){return(t>this.half?t-this.p:t)>=(a>this.half?a-this.p:a)}div(t,a){return this.mul(t,this.inv(a))}idiv(t,a){if(!a)throw new Error("Division by zero");return t/a}inv(t){if(!t)throw new Error("Division by zero");let a=this.zero,e=this.p,o=this.one,i=t%this.p;for(;i;){let t=e/i;[a,o]=[o,a-t*o],[e,i]=[i,e-t*i]}return a=this.p?e-this.p:e}bor(t,a){const e=(t|a)&this.mask;return e>=this.p?e-this.p:e}bxor(t,a){const e=(t^a)&this.mask;return e>=this.p?e-this.p:e}bnot(t){const a=t^this.mask;return a>=this.p?a-this.p:a}shl(t,a){if(Number(a)=this.p?e-this.p:e}{const e=this.p-a;return Number(e)>e:this.zero}}shr(t,a){if(Number(a)>a;{const e=this.p-a;if(Number(e)=this.p?a-this.p:a}return 0}}land(t,a){return t&&a?this.one:this.zero}lor(t,a){return t||a?this.one:this.zero}lnot(t){return t?this.zero:this.one}sqrt_old(t){if(t==this.zero)return this.zero;if(this.pow(t,this.negone>>this.one)!=this.one)return null;let a=this.s,e=this.nqr_to_t,o=this.pow(t,this.t),i=this.pow(t,this.add(this.t,this.one)>>this.one);for(;o!=this.one;){let t=this.square(o),n=1;for(;t!=this.one;)n++,t=this.square(t);let l=e;for(let t=0;tthis.p>>this.one&&(i=this.neg(i)),i}normalize(t,a){if((t=BigInt(t,a))<0){let a=-t;return a>=this.p&&(a%=this.p),this.p-a}return t>=this.p?t%this.p:t}random(){const t=2*this.bitLength/8;let a=this.zero;for(let e=0;ethis.half&&10==a){e="-"+(this.p-t).toString(a)}else e=t.toString(a);return e}isZero(t){return t==this.zero}fromRng(t){let a;do{a=this.zero;for(let e=0;e=this.p);return a=a*this.Ri%this.p,a}fft(t){return this.FFT.fft(t)}ifft(t){return this.FFT.ifft(t)}toRprLE(t,a,e){x(t,a,e,8*this.n64)}toRprBE(t,a,e){I(t,a,e,8*this.n64)}toRprBEM(t,a,e){return this.toRprBE(t,a,this.mul(this.R,e))}toRprLEM(t,a,e){return this.toRprLE(t,a,this.mul(this.R,e))}fromRprLE(t,a){return B(t,a,this.n8)}fromRprBE(t,a){return E(t,a,this.n8)}fromRprLEM(t,a){return this.mul(this.fromRprLE(t,a),this.Ri)}fromRprBEM(t,a){return this.mul(this.fromRprBE(t,a),this.Ri)}toObject(t){return t}}var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K={bigInt2BytesLE:function(t,a){const e=Array(a);let o=BigInt(t);for(let t=0;t>=8n;return e},bigInt2U32LE:function(t,a){const e=Array(a);let o=BigInt(t);for(let t=0;t>=32n;return e},isOcamNum:function(t){return!!Array.isArray(t)&&(3==t.length&&("number"==typeof t[0]&&("number"==typeof t[1]&&!!Array.isArray(t[2]))))}},H=function(t,a,e,o,i,n,l){const c=t.addFunction(a);c.addParam("base","i32"),c.addParam("scalar","i32"),c.addParam("scalarLength","i32"),c.addParam("r","i32"),c.addLocal("i","i32"),c.addLocal("b","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(e));c.addCode(s.if(s.i32_eqz(s.getLocal("scalarLength")),[...s.call(l,s.getLocal("r")),...s.ret([])])),c.addCode(s.call(n,s.getLocal("base"),r)),c.addCode(s.call(l,s.getLocal("r"))),c.addCode(s.setLocal("i",s.getLocal("scalarLength"))),c.addCode(s.block(s.loop(s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.setLocal("b",s.i32_load8_u(s.i32_add(s.getLocal("scalar"),s.getLocal("i")))),...function(){const t=[];for(let a=0;a<8;a++)t.push(...s.call(i,s.getLocal("r"),s.getLocal("r")),...s.if(s.i32_ge_u(s.getLocal("b"),s.i32_const(128>>a)),[...s.setLocal("b",s.i32_sub(s.getLocal("b"),s.i32_const(128>>a))),...s.call(o,s.getLocal("r"),r,s.getLocal("r"))]));return t}(),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.br(0))))},Z=function(t,a){const e=8*t.modules[a].n64,o=t.addFunction(a+"_batchInverse");o.addParam("pIn","i32"),o.addParam("inStep","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addParam("outStep","i32"),o.addLocal("itAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(e));o.addCode(i.setLocal("itAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("itAux"),i.i32_mul(i.i32_add(i.getLocal("n"),i.i32_const(1)),i.i32_const(e))))),o.addCode(i.call(a+"_one",i.getLocal("itAux")),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux")),i.call(a+"_mul",i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux"))),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("itOut",i.i32_add(i.getLocal("pOut"),i.i32_mul(i.i32_sub(i.getLocal("n"),i.i32_const(1)),i.getLocal("outStep")))),i.call(a+"_inverse",i.getLocal("itAux"),i.getLocal("itAux")),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),[...i.call(a+"_copy",i.getLocal("itAux"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_zero",i.getLocal("itOut"))],[...i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),n),...i.call(a+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_mul",i.getLocal("itAux"),n,i.getLocal("itOut"))]),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itOut",i.i32_sub(i.getLocal("itOut"),i.getLocal("outStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.br(0)))),o.addCode(i.i32_store(i.i32_const(0),i.getLocal("itAux")))};var W=function(t,a,e,o,i,n){void 0===n&&(n=oa?1:-1}function tt(t){return t*t}function at(t){return t%2n!==0n}function et(t){return t%2n===0n}function ot(t){return t<0n}function it(t){return t>0n}function nt(t){return ot(t)?t.toString(2).length-1:t.toString(2).length}function lt(t){return t<0n?-t:t}function ct(t){return 1n===lt(t)}function st(t,a){for(var e,o,i,n=0n,l=1n,c=a,s=lt(t);0n!==s;)e=c/s,o=n,i=c,n=l,c=s,l=o-e*l,s=i-e*s;if(!ct(c))throw new Error(t.toString()+" and "+a.toString()+" are not co-prime");return-1===X(n,0n)&&(n+=a),ot(t)?-n:n}function rt(t,a,e){if(0n===e)throw new Error("Cannot take modPow with modulus 0");var o=1n,i=t%e;for(ot(a)&&(a*=-1n,i=st(i,e));it(a);){if(0n===i)return 0n;at(a)&&(o=o*i%e),a/=2n,i=tt(i)%e}return o}function dt(t,a){return 0n!==a&&(!!ct(a)||(0===function(t,a){return(t=t>=0n?t:-t)===(a=a>=0n?a:-a)?0:t>a?1:-1}(a,2n)?et(t):t%a===0n))}function ut(t,a){for(var e,o,i,n=function(t){return t-1n}(t),l=n,c=0;et(l);)l/=2n,c++;t:for(o=0;o>1&&o>1,t>>1)))),a.addCode(e.setLocal(s,e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(c,e.i64_add(e.i64_and(e.getLocal(c),e.i64_const(4294967295)),e.i64_and(e.getLocal(r),e.i64_const(4294967295))))),a.addCode(e.setLocal(s,e.i64_add(e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32))),e.getLocal(d))))),a.addCode(e.i64_store32(e.getLocal("r"),4*t,e.getLocal(c))),a.addCode(e.setLocal(r,e.getLocal(s)),e.setLocal(d,e.i64_shr_u(e.getLocal(r),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*i*2-4,e.getLocal(r)))}(),function(){const a=t.addFunction(o+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(o+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){!function(){const a=t.addFunction(o+"__mul1");a.addParam("px","i32"),a.addParam("y","i64"),a.addParam("pr","i32"),a.addLocal("c","i64");const e=a.getCodeBuilder();a.addCode(e.setLocal("c",e.i64_mul(e.i64_load32_u(e.getLocal("px"),0,0),e.getLocal("y")))),a.addCode(e.i64_store32(e.getLocal("pr"),0,0,e.getLocal("c")));for(let t=1;t>1n,p=t.alloc(c,gt.bigInt2BytesLE(h,c)),m=h+1n,L=t.alloc(c,gt.bigInt2BytesLE(m,c));t.modules[s]={pq:d,pR2:u,n64:n,q:i,pOne:_,pZero:g,pePlusOne:L};let b=2n;if(yt(i))for(;wt(b,h,i)!==f;)b+=1n;let w=0,y=f;for(;!At(y)&&0n!==y;)w++,y>>=1n;const A=t.alloc(c,gt.bigInt2BytesLE(y,c)),C=wt(b,y,i),F=t.alloc(gt.bigInt2BytesLE((C<>1n,I=t.alloc(c,gt.bigInt2BytesLE(x,c));return t.exportFunction(r+"_copy",s+"_copy"),t.exportFunction(r+"_zero",s+"_zero"),t.exportFunction(r+"_isZero",s+"_isZero"),t.exportFunction(r+"_eq",s+"_eq"),function(){const a=t.addFunction(s+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.ret(e.call(r+"_eq",e.getLocal("x"),e.i32_const(_))))}(),function(){const a=t.addFunction(s+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_add",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_sub",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_add",e.getLocal("r"),e.i32_const(d),e.getLocal("r")))))}(),function(){const a=t.addFunction(s+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_sub",e.i32_const(g),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.alloc(l*l*8),e=t.addFunction(s+"_mReduct");e.addParam("t","i32"),e.addParam("r","i32"),e.addLocal("np32","i64"),e.addLocal("c","i64"),e.addLocal("m","i64");const o=e.getCodeBuilder(),n=Number(0x100000000n-bt(i,0x100000000n));e.addCode(o.setLocal("np32",o.i64_const(n)));for(let t=0;t=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(f))),[f,h]=[h,f],a.addCode(e.setLocal(h,e.i64_shr_u(e.getLocal(f),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(f))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(h)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32"),a.addLocal("c0","i64"),a.addLocal("c1","i64"),a.addLocal("c0_old","i64"),a.addLocal("c1_old","i64"),a.addLocal("np32","i64");for(let t=0;t>1&&o>1,t>>1)))),a.addCode(e.setLocal(f,e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(g,e.i64_add(e.i64_and(e.getLocal(g),e.i64_const(4294967295)),e.i64_and(e.getLocal(h),e.i64_const(4294967295))))),a.addCode(e.setLocal(f,e.i64_add(e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32))),e.getLocal(p)))));for(let o=Math.max(1,t-l+1);o<=t&&o=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(g))),a.addCode(e.setLocal(h,e.getLocal(f)),e.setLocal(p,e.i64_shr_u(e.getLocal(h),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(h))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(p)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.i32_const(u),e.getLocal("r")))}(),function(){const a=t.alloc(2*c),e=t.addFunction(s+"_fromMontgomery");e.addParam("x","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(r+"_copy",o.getLocal("x"),o.i32_const(a))),e.addCode(o.call(r+"_zero",o.i32_const(a+c))),e.addCode(o.call(s+"_mReduct",o.i32_const(a),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.call(r+"_gte",o,e.i32_const(L)))}(),function(){const a=t.addFunction(s+"_sign");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(r+"_isZero",e.getLocal("x")),e.ret(e.i32_const(0))),e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.if(e.call(r+"_gte",o,e.i32_const(L)),e.ret(e.i32_const(-1))),e.ret(e.i32_const(1)))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),e.getLocal("r"))),a.addCode(e.call(r+"_inverseMod",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),a.addCode(e.call(s+"_toMontgomery",e.getLocal("r"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_one");a.addParam("pr","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_copy",e.i32_const(_),e.getLocal("pr")))}(),function(){const a=t.addFunction(s+"_load");a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32"),a.addLocal("p","i32"),a.addLocal("l","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c)),i=t.alloc(c),n=e.i32_const(i);a.addCode(e.call(r+"_zero",e.getLocal("r")),e.setLocal("i",e.i32_const(c)),e.setLocal("p",e.getLocal("scalar")),e.block(e.loop(e.br_if(1,e.i32_gt_u(e.getLocal("i"),e.getLocal("scalarLen"))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",e.getLocal("p"),o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(c))),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(c))),e.br(0))),e.setLocal("l",e.i32_rem_u(e.getLocal("scalarLen"),e.i32_const(c))),e.if(e.i32_eqz(e.getLocal("l")),e.ret([])),e.call(r+"_zero",n),e.setLocal("j",e.i32_const(0)),e.block(e.loop(e.br_if(1,e.i32_eq(e.getLocal("j"),e.getLocal("l"))),e.i32_store8(e.getLocal("j"),i,e.i32_load8_u(e.getLocal("p"))),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(1))),e.setLocal("j",e.i32_add(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",n,o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_load",e.getLocal("scalar"),e.getLocal("scalarLen"),o),e.call(s+"_toMontgomery",o,o),e.call(s+"_mul",e.getLocal("x"),o,e.getLocal("r")))}(),ht(t,s),pt(t,s+"_batchToMontgomery",s+"_toMontgomery",c,c),pt(t,s+"_batchFromMontgomery",s+"_fromMontgomery",c,c),pt(t,s+"_batchNeg",s+"_neg",c,c),mt(t,s+"_batchAdd",s+"_add",c,c),mt(t,s+"_batchSub",s+"_sub",c,c),mt(t,s+"_batchMul",s+"_mul",c,c),t.exportFunction(s+"_add"),t.exportFunction(s+"_sub"),t.exportFunction(s+"_neg"),t.exportFunction(s+"_isNegative"),t.exportFunction(s+"_isOne"),t.exportFunction(s+"_sign"),t.exportFunction(s+"_mReduct"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_squareOld"),t.exportFunction(s+"_fromMontgomery"),t.exportFunction(s+"_toMontgomery"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_one"),t.exportFunction(s+"_load"),t.exportFunction(s+"_timesScalar"),ft(t,s+"_exp",c,s+"_mul",s+"_square",r+"_copy",s+"_one"),t.exportFunction(s+"_exp"),t.exportFunction(s+"_batchInverse"),yt(i)&&(!function(){const a=t.addFunction(s+"_sqrt");a.addParam("n","i32"),a.addParam("r","i32"),a.addLocal("m","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c)),n=e.i32_const(t.alloc(c)),l=e.i32_const(t.alloc(c)),r=e.i32_const(t.alloc(c)),d=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.call(s+"_zero",e.getLocal("r")))),e.setLocal("m",e.i32_const(w)),e.call(s+"_copy",e.i32_const(F),i),e.call(s+"_exp",e.getLocal("n"),e.i32_const(A),e.i32_const(c),n),e.call(s+"_exp",e.getLocal("n"),e.i32_const(I),e.i32_const(c),l),e.block(e.loop(e.br_if(1,e.call(s+"_eq",n,o)),e.call(s+"_square",n,r),e.setLocal("i",e.i32_const(1)),e.block(e.loop(e.br_if(1,e.call(s+"_eq",r,o)),e.call(s+"_square",r,r),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(1))),e.br(0))),e.call(s+"_copy",i,d),e.setLocal("j",e.i32_sub(e.i32_sub(e.getLocal("m"),e.getLocal("i")),e.i32_const(1))),e.block(e.loop(e.br_if(1,e.i32_eqz(e.getLocal("j"))),e.call(s+"_square",d,d),e.setLocal("j",e.i32_sub(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.setLocal("m",e.getLocal("i")),e.call(s+"_square",d,i),e.call(s+"_mul",n,i,n),e.call(s+"_mul",l,d,l),e.br(0))),e.if(e.call(s+"_isNegative",l),e.call(s+"_neg",l,e.getLocal("r")),e.call(s+"_copy",l,e.getLocal("r"))))}(),function(){const a=t.addFunction(s+"_isSquare");a.addParam("n","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.i32_const(1))),e.call(s+"_exp",e.getLocal("n"),e.i32_const(p),e.i32_const(c),i),e.call(s+"_eq",i,o))}(),t.exportFunction(s+"_sqrt"),t.exportFunction(s+"_isSquare")),t.exportFunction(s+"_batchToMontgomery"),t.exportFunction(s+"_batchFromMontgomery"),s};const xt=Ft,{bitLength:It}=J;var Bt=function(t,a,e,o,i){const n=BigInt(a),l=Math.floor((It(n-1n)-1)/64)+1,c=8*l,s=e||"f1";if(t.modules[s])return s;t.modules[s]={n64:l};const r=i||"int",d=xt(t,n,o,r),u=t.modules[d].pR2,_=t.modules[d].pq,g=t.modules[d].pePlusOne;return function(){const a=t.alloc(c),e=t.addFunction(s+"_mul");e.addParam("x","i32"),e.addParam("y","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(d+"_mul",o.getLocal("x"),o.getLocal("y"),o.i32_const(a))),e.addCode(o.call(d+"_mul",o.i32_const(a),o.i32_const(u),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_inverseMod",e.getLocal("x"),e.i32_const(_),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_gte",e.getLocal("x"),e.i32_const(g)))}(),t.exportFunction(d+"_add",s+"_add"),t.exportFunction(d+"_sub",s+"_sub"),t.exportFunction(d+"_neg",s+"_neg"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_isNegative"),t.exportFunction(d+"_copy",s+"_copy"),t.exportFunction(d+"_zero",s+"_zero"),t.exportFunction(d+"_one",s+"_one"),t.exportFunction(d+"_isZero",s+"_isZero"),t.exportFunction(d+"_eq",s+"_eq"),s};const Et=H,vt=Z,St=K;var Pt=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64,n=t.modules[o].q;return t.modules[e]={n64:2*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.ret(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_copy",c,r))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("y"),d=l.i32_add(l.getLocal("y"),l.i32_const(i)),u=l.getLocal("r"),_=l.i32_add(l.getLocal("r"),l.i32_const(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,r,g),l.call(o+"_mul",s,d,f),l.call(o+"_add",c,s,h),l.call(o+"_add",r,d,p),l.call(o+"_mul",h,p,h),l.call(a,f,u),l.call(o+"_add",g,u,u),l.call(o+"_add",g,f,_),l.call(o+"_sub",h,_,_))}(),function(){const a=t.addFunction(e+"_mul1");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_mul",l,s,r),n.call(o+"_mul",c,s,d))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,s,u),l.call(o+"_add",c,s,_),l.call(a,s,g),l.call(o+"_add",c,g,g),l.call(a,u,f),l.call(o+"_add",f,u,f),l.call(o+"_mul",_,g,r),l.call(o+"_sub",r,f,r),l.call(o+"_add",u,u,d))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_add",l,s,d),n.call(o+"_add",c,r,u))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_sub",l,s,d),n.call(o+"_sub",c,r,u))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_neg",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_conjugate");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_toMontgomery",l,s),n.call(o+"_toMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_fromMontgomery",l,s),n.call(o+"_fromMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_eq",l,s),n.call(o+"_eq",c,r)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,u),l.call(o+"_square",s,_),l.call(a,_,g),l.call(o+"_sub",u,g,g),l.call(o+"_inverse",g,f),l.call(o+"_mul",c,f,r),l.call(o+"_mul",s,f,d),l.call(o+"_neg",d,d))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),s),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),r))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l))),n.ret(n.call(o+"_isNegative",c)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_mul1"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_conjugate"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),vt(t,e),Et(t,e+"_exp",2*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),function(){const a=t.addFunction(e+"_sqrt");a.addParam("a","i32"),a.addParam("pr","i32");const l=a.getCodeBuilder(),c=l.i32_const(t.alloc(St.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),s=l.i32_const(t.alloc(St.bigInt2BytesLE((BigInt(n||0)-1n)/2n,i))),r=l.getLocal("a"),d=l.i32_const(t.alloc(2*i)),u=l.i32_const(t.alloc(2*i)),_=l.i32_const(t.alloc(2*i)),g=t.alloc(2*i),f=l.i32_const(g),h=l.i32_const(g),p=l.i32_const(g+i),m=l.i32_const(t.alloc(2*i)),L=l.i32_const(t.alloc(2*i));a.addCode(l.call(e+"_one",f),l.call(e+"_neg",f,f),l.call(e+"_exp",r,c,l.i32_const(i),d),l.call(e+"_square",d,u),l.call(e+"_mul",r,u,u),l.call(e+"_conjugate",u,_),l.call(e+"_mul",_,u,_),l.if(l.call(e+"_eq",_,f),l.unreachable()),l.call(e+"_mul",d,r,m),l.if(l.call(e+"_eq",u,f),[...l.call(o+"_zero",h),...l.call(o+"_one",p),...l.call(e+"_mul",f,m,l.getLocal("pr"))],[...l.call(e+"_one",L),...l.call(e+"_add",L,u,L),...l.call(e+"_exp",L,s,l.i32_const(i),L),...l.call(e+"_mul",L,m,l.getLocal("pr"))]))}(),function(){const a=t.addFunction(e+"_isSquare");a.addParam("a","i32"),a.setReturnType("i32");const o=a.getCodeBuilder(),l=o.i32_const(t.alloc(St.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),c=o.getLocal("a"),s=o.i32_const(t.alloc(2*i)),r=o.i32_const(t.alloc(2*i)),d=o.i32_const(t.alloc(2*i)),u=t.alloc(2*i),_=o.i32_const(u);a.addCode(o.call(e+"_one",_),o.call(e+"_neg",_,_),o.call(e+"_exp",c,l,o.i32_const(i),s),o.call(e+"_square",s,r),o.call(e+"_mul",c,r,r),o.call(e+"_conjugate",r,d),o.call(e+"_mul",d,r,d),o.if(o.call(e+"_eq",d,_),o.ret(o.i32_const(0))),o.ret(o.i32_const(1)))}(),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_sqrt"),t.exportFunction(e+"_isSquare"),t.exportFunction(e+"_isNegative"),e};const qt=H,Ot=Z;var Gt=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64;return t.modules[e]={n64:3*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.ret(n.i32_and(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_copy",l,r),n.call(o+"_copy",c,d),n.call(o+"_copy",s,u))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("y"),u=l.i32_add(l.getLocal("y"),l.i32_const(i)),_=l.i32_add(l.getLocal("y"),l.i32_const(2*i)),g=l.getLocal("r"),f=l.i32_add(l.getLocal("r"),l.i32_const(i)),h=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i)),F=l.i32_const(t.alloc(i)),x=l.i32_const(t.alloc(i)),I=l.i32_const(t.alloc(i)),B=l.i32_const(t.alloc(i)),E=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,d,p),l.call(o+"_mul",s,u,m),l.call(o+"_mul",r,_,L),l.call(o+"_add",c,s,b),l.call(o+"_add",d,u,w),l.call(o+"_add",c,r,y),l.call(o+"_add",d,_,A),l.call(o+"_add",s,r,C),l.call(o+"_add",u,_,F),l.call(o+"_add",p,m,x),l.call(o+"_add",p,L,I),l.call(o+"_add",m,L,B),l.call(o+"_mul",C,F,g),l.call(o+"_sub",g,B,g),l.call(a,g,g),l.call(o+"_add",p,g,g),l.call(o+"_mul",b,w,f),l.call(o+"_sub",f,x,f),l.call(a,L,E),l.call(o+"_add",f,E,f),l.call(o+"_mul",y,A,h),l.call(o+"_sub",h,I,h),l.call(o+"_add",h,m,h))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_mul",c,s,f),l.call(o+"_add",f,f,h),l.call(o+"_sub",c,s,p),l.call(o+"_add",p,r,p),l.call(o+"_square",p,p),l.call(o+"_mul",s,r,m),l.call(o+"_add",m,m,L),l.call(o+"_square",r,b),l.call(a,L,d),l.call(o+"_add",g,d,d),l.call(a,b,u),l.call(o+"_add",h,u,u),l.call(o+"_add",g,b,_),l.call(o+"_sub",L,_,_),l.call(o+"_add",p,_,_),l.call(o+"_add",h,_,_))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_add",l,r,_),n.call(o+"_add",c,d,g),n.call(o+"_add",s,u,f))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_sub",l,r,_),n.call(o+"_sub",c,d,g),n.call(o+"_sub",s,u,f))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_neg",l,r),n.call(o+"_neg",c,d),n.call(o+"_neg",s,u))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.setLocal("s",n.call(o+"_sign",s)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_toMontgomery",l,r),n.call(o+"_toMontgomery",c,d),n.call(o+"_toMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_fromMontgomery",l,r),n.call(o+"_fromMontgomery",c,d),n.call(o+"_fromMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_eq",l,r),n.call(o+"_eq",c,d)),n.call(o+"_eq",s,u)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_square",s,f),l.call(o+"_square",r,h),l.call(o+"_mul",c,s,p),l.call(o+"_mul",c,r,m),l.call(o+"_mul",s,r,L),l.call(a,L,b),l.call(o+"_sub",g,b,b),l.call(a,h,w),l.call(o+"_sub",w,p,w),l.call(o+"_sub",f,m,y),l.call(o+"_mul",r,w,A),l.call(o+"_mul",s,y,C),l.call(o+"_add",A,C,A),l.call(a,A,A),l.call(o+"_mul",c,b,C),l.call(o+"_add",C,A,A),l.call(o+"_inverse",A,A),l.call(o+"_mul",A,b,d),l.call(o+"_mul",A,w,u),l.call(o+"_mul",A,y,_))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),r),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),d),n.call(o+"_timesScalar",s,n.getLocal("scalar"),n.getLocal("scalarLen"),u))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.if(n.call(o+"_isZero",s),n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l)),n.ret(n.call(o+"_isNegative",c)))),n.ret(n.call(o+"_isNegative",s)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),Ot(t,e),qt(t,e+"_exp",3*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_isNegative"),e};const zt=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("base","i32"),s.addParam("scalar","i32"),s.addParam("scalarLength","i32"),s.addParam("r","i32"),s.addLocal("old0","i32"),s.addLocal("nbits","i32"),s.addLocal("i","i32"),s.addLocal("last","i32"),s.addLocal("cur","i32"),s.addLocal("carry","i32"),s.addLocal("p","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(e));function u(t){return r.i32_and(r.i32_shr_u(r.i32_load(r.i32_add(r.getLocal("scalar"),r.i32_and(r.i32_shr_u(t,r.i32_const(3)),r.i32_const(4294967292)))),r.i32_and(t,r.i32_const(31))),r.i32_const(1))}function _(t){return[...r.i32_store8(r.getLocal("p"),r.i32_const(t)),...r.setLocal("p",r.i32_add(r.getLocal("p"),r.i32_const(1)))]}s.addCode(r.if(r.i32_eqz(r.getLocal("scalarLength")),[...r.call(c,r.getLocal("r")),...r.ret([])]),r.setLocal("nbits",r.i32_shl(r.getLocal("scalarLength"),r.i32_const(3))),r.setLocal("old0",r.i32_load(r.i32_const(0))),r.setLocal("p",r.getLocal("old0")),r.i32_store(r.i32_const(0),r.i32_and(r.i32_add(r.i32_add(r.getLocal("old0"),r.i32_const(32)),r.getLocal("nbits")),r.i32_const(4294967288))),r.setLocal("i",r.i32_const(1)),r.setLocal("last",u(r.i32_const(0))),r.setLocal("carry",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("nbits"))),r.setLocal("cur",u(r.getLocal("i"))),r.if(r.getLocal("last"),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(1)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(1)])),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(0)],[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(0)]))),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0))),r.if(r.getLocal("last"),r.if(r.getLocal("carry"),[..._(255),..._(0),..._(1)],[..._(1)]),r.if(r.getLocal("carry"),[..._(0),..._(1)])),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.call(l,r.getLocal("base"),d),r.call(c,r.getLocal("r")),r.block(r.loop(r.call(i,r.getLocal("r"),r.getLocal("r")),r.setLocal("cur",r.i32_load8_u(r.getLocal("p"))),r.if(r.getLocal("cur"),r.if(r.i32_eq(r.getLocal("cur"),r.i32_const(1)),r.call(o,r.getLocal("r"),d,r.getLocal("r")),r.call(n,r.getLocal("r"),d,r.getLocal("r")))),r.br_if(1,r.i32_eq(r.getLocal("old0"),r.getLocal("p"))),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.br(0))),r.i32_store(r.i32_const(0),r.getLocal("old0")))},Tt=W,Mt=function(t,a,e,o,i){const n=8*t.modules[a].n64;function l(){const o=t.addFunction(e);o.addParam("pBases","i32"),o.addParam("pScalars","i32"),o.addParam("scalarSize","i32"),o.addParam("n","i32"),o.addParam("pr","i32"),o.addLocal("chunkSize","i32"),o.addLocal("nChunks","i32"),o.addLocal("itScalar","i32"),o.addLocal("endScalar","i32"),o.addLocal("itBase","i32"),o.addLocal("itBit","i32"),o.addLocal("i","i32"),o.addLocal("j","i32"),o.addLocal("nTable","i32"),o.addLocal("pTable","i32"),o.addLocal("idx","i32"),o.addLocal("pIdxTable","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n)),c=t.alloc([17,17,17,17,17,17,17,17,17,17,16,16,15,14,13,13,12,11,10,9,8,7,7,6,5,4,3,2,1,1,1,1]);o.addCode(i.call(a+"_zero",i.getLocal("pr")),i.if(i.i32_eqz(i.getLocal("n")),i.ret([])),i.setLocal("chunkSize",i.i32_load8_u(i.i32_clz(i.getLocal("n")),c)),i.setLocal("nChunks",i.i32_add(i.i32_div_u(i.i32_sub(i.i32_shl(i.getLocal("scalarSize"),i.i32_const(3)),i.i32_const(1)),i.getLocal("chunkSize")),i.i32_const(1))),i.setLocal("itBit",i.i32_mul(i.i32_sub(i.getLocal("nChunks"),i.i32_const(1)),i.getLocal("chunkSize"))),i.block(i.loop(i.br_if(1,i.i32_lt_s(i.getLocal("itBit"),i.i32_const(0))),i.if(i.i32_eqz(i.call(a+"_isZero",i.getLocal("pr"))),[...i.setLocal("j",i.i32_const(0)),...i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("j"),i.getLocal("chunkSize"))),i.call(a+"_double",i.getLocal("pr"),i.getLocal("pr")),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0)))]),i.call(e+"_chunk",i.getLocal("pBases"),i.getLocal("pScalars"),i.getLocal("scalarSize"),i.getLocal("n"),i.getLocal("itBit"),i.getLocal("chunkSize"),l),i.call(a+"_add",i.getLocal("pr"),l,i.getLocal("pr")),i.setLocal("itBit",i.i32_sub(i.getLocal("itBit"),i.getLocal("chunkSize"))),i.br(0))))}!function(){const a=t.addFunction(e+"_getChunk");a.addParam("pScalar","i32"),a.addParam("scalarSize","i32"),a.addParam("startBit","i32"),a.addParam("chunkSize","i32"),a.addLocal("bitsToEnd","i32"),a.addLocal("mask","i32"),a.setReturnType("i32");const o=a.getCodeBuilder();a.addCode(o.setLocal("bitsToEnd",o.i32_sub(o.i32_mul(o.getLocal("scalarSize"),o.i32_const(8)),o.getLocal("startBit"))),o.if(o.i32_gt_s(o.getLocal("chunkSize"),o.getLocal("bitsToEnd")),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("bitsToEnd")),o.i32_const(1))),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("chunkSize")),o.i32_const(1)))),o.i32_and(o.i32_shr_u(o.i32_load(o.i32_add(o.getLocal("pScalar"),o.i32_shr_u(o.getLocal("startBit"),o.i32_const(3))),0,0),o.i32_and(o.getLocal("startBit"),o.i32_const(7))),o.getLocal("mask")))}(),function(){const o=t.addFunction(e+"_reduceTable");o.addParam("pTable","i32"),o.addParam("p","i32"),o.addLocal("half","i32"),o.addLocal("it1","i32"),o.addLocal("it2","i32"),o.addLocal("pAcc","i32");const i=o.getCodeBuilder();o.addCode(i.if(i.i32_eq(i.getLocal("p"),i.i32_const(1)),i.ret([])),i.setLocal("half",i.i32_shl(i.i32_const(1),i.i32_sub(i.getLocal("p"),i.i32_const(1)))),i.setLocal("it1",i.getLocal("pTable")),i.setLocal("it2",i.i32_add(i.getLocal("pTable"),i.i32_mul(i.getLocal("half"),i.i32_const(n)))),i.setLocal("pAcc",i.i32_sub(i.getLocal("it2"),i.i32_const(n))),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("it1"),i.getLocal("pAcc"))),i.call(a+"_add",i.getLocal("it1"),i.getLocal("it2"),i.getLocal("it1")),i.call(a+"_add",i.getLocal("pAcc"),i.getLocal("it2"),i.getLocal("pAcc")),i.setLocal("it1",i.i32_add(i.getLocal("it1"),i.i32_const(n))),i.setLocal("it2",i.i32_add(i.getLocal("it2"),i.i32_const(n))),i.br(0))),i.call(e+"_reduceTable",i.getLocal("pTable"),i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("p"))),i.call(a+"_double",i.getLocal("pAcc"),i.getLocal("pAcc")),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.br(0))),i.call(a+"_add",i.getLocal("pTable"),i.getLocal("pAcc"),i.getLocal("pTable")))}(),function(){const l=t.addFunction(e+"_chunk");l.addParam("pBases","i32"),l.addParam("pScalars","i32"),l.addParam("scalarSize","i32"),l.addParam("n","i32"),l.addParam("startBit","i32"),l.addParam("chunkSize","i32"),l.addParam("pr","i32"),l.addLocal("nChunks","i32"),l.addLocal("itScalar","i32"),l.addLocal("endScalar","i32"),l.addLocal("itBase","i32"),l.addLocal("i","i32"),l.addLocal("j","i32"),l.addLocal("nTable","i32"),l.addLocal("pTable","i32"),l.addLocal("idx","i32"),l.addLocal("pIdxTable","i32");const c=l.getCodeBuilder();l.addCode(c.if(c.i32_eqz(c.getLocal("n")),[...c.call(a+"_zero",c.getLocal("pr")),...c.ret([])]),c.setLocal("nTable",c.i32_shl(c.i32_const(1),c.getLocal("chunkSize"))),c.setLocal("pTable",c.i32_load(c.i32_const(0))),c.i32_store(c.i32_const(0),c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("nTable"),c.i32_const(n)))),c.setLocal("j",c.i32_const(0)),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("j"),c.getLocal("nTable"))),c.call(a+"_zero",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("j"),c.i32_const(n)))),c.setLocal("j",c.i32_add(c.getLocal("j"),c.i32_const(1))),c.br(0))),c.setLocal("itBase",c.getLocal("pBases")),c.setLocal("itScalar",c.getLocal("pScalars")),c.setLocal("endScalar",c.i32_add(c.getLocal("pScalars"),c.i32_mul(c.getLocal("n"),c.getLocal("scalarSize")))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("itScalar"),c.getLocal("endScalar"))),c.setLocal("idx",c.call(e+"_getChunk",c.getLocal("itScalar"),c.getLocal("scalarSize"),c.getLocal("startBit"),c.getLocal("chunkSize"))),c.if(c.getLocal("idx"),[...c.setLocal("pIdxTable",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.i32_sub(c.getLocal("idx"),c.i32_const(1)),c.i32_const(n)))),...c.call(o,c.getLocal("pIdxTable"),c.getLocal("itBase"),c.getLocal("pIdxTable"))]),c.setLocal("itScalar",c.i32_add(c.getLocal("itScalar"),c.getLocal("scalarSize"))),c.setLocal("itBase",c.i32_add(c.getLocal("itBase"),c.i32_const(i))),c.br(0))),c.call(e+"_reduceTable",c.getLocal("pTable"),c.getLocal("chunkSize")),c.call(a+"_copy",c.getLocal("pTable"),c.getLocal("pr")),c.i32_store(c.i32_const(0),c.getLocal("pTable")))}(),l(),t.exportFunction(e),t.exportFunction(e+"_chunk")};var Ut=function(t,a,e,o){const i=t.modules[e].n64,n=8*i;if(t.modules[a])return a;return t.modules[a]={n64:3*i},function(){const o=t.addFunction(a+"_isZeroAffine");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.i32_and(i.call(e+"_isZero",i.getLocal("p1")),i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(n)))))}(),function(){const o=t.addFunction(a+"_isZero");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))))}(),function(){const o=t.addFunction(a+"_zeroAffine");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(n))))}(),function(){const o=t.addFunction(a+"_zero");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(n)))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))))}(),function(){const e=t.addFunction(a+"_copyAffine");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<2*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const e=t.addFunction(a+"_copy");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<3*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const o=t.addFunction(a+"_toJacobian");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_one",d),...i.call(e+"_copy",c,r),...i.call(e+"_copy",l,s)]))}(),function(){const o=t.addFunction(a+"_eqAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder();o.addCode(i.ret(i.i32_and(i.call(e+"_eq",i.getLocal("p1"),i.getLocal("p2")),i.call(e+"_eq",i.i32_add(i.getLocal("p1"),i.i32_const(n)),i.i32_add(i.getLocal("p2"),i.i32_const(n))))))}(),function(){const o=t.addFunction(a+"_eqMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZeroAffine",i.getLocal("p2")))),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqAffine",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,u),i.call(e+"_mul",r,u,_),i.call(e+"_mul",s,u,g),i.call(e+"_mul",d,g,f),i.if(i.call(e+"_eq",l,_),i.if(i.call(e+"_eq",c,f),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_eq");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZero",i.getLocal("p2")))),i.if(i.call(a+"_isZero",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqMixed",i.getLocal("p2"),i.getLocal("p1")))),i.if(i.call(e+"_isOne",u),i.ret(i.call(a+"_eqMixed",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,_),i.call(e+"_square",u,g),i.call(e+"_mul",l,g,f),i.call(e+"_mul",r,_,h),i.call(e+"_mul",s,_,p),i.call(e+"_mul",u,g,m),i.call(e+"_mul",c,m,L),i.call(e+"_mul",d,p,b),i.if(i.call(e+"_eq",f,h),i.if(i.call(e+"_eq",L,b),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_doubleAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_toJacobian",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.call(e+"_square",l,u),i.call(e+"_square",c,_),i.call(e+"_square",_,g),i.call(e+"_add",l,_,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,u,f),i.call(e+"_sub",f,g,f),i.call(e+"_add",f,f,f),i.call(e+"_add",u,u,h),i.call(e+"_add",h,u,h),i.call(e+"_add",c,c,d),i.call(e+"_square",h,s),i.call(e+"_sub",s,f,s),i.call(e+"_sub",s,f,s),i.call(e+"_add",g,g,p),i.call(e+"_add",p,p,p),i.call(e+"_add",p,p,p),i.call(e+"_sub",f,s,r),i.call(e+"_mul",r,h,r),i.call(e+"_sub",r,p,r))}(),function(){const o=t.addFunction(a+"_double");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.ret(i.call(a+"_doubleAffine",i.getLocal("p1"),i.getLocal("pr"))),...i.ret([])]),i.call(e+"_square",l,_),i.call(e+"_square",c,g),i.call(e+"_square",g,f),i.call(e+"_add",l,g,h),i.call(e+"_square",h,h),i.call(e+"_sub",h,_,h),i.call(e+"_sub",h,f,h),i.call(e+"_add",h,h,h),i.call(e+"_add",_,_,p),i.call(e+"_add",p,_,p),i.call(e+"_square",p,m),i.call(e+"_mul",c,s,L),i.call(e+"_add",h,h,r),i.call(e+"_sub",m,r,r),i.call(e+"_add",f,f,b),i.call(e+"_add",b,b,b),i.call(e+"_add",b,b,b),i.call(e+"_sub",h,r,d),i.call(e+"_mul",d,p,d),i.call(e+"_sub",d,b,d),i.call(e+"_add",L,L,u))}(),function(){const o=t.addFunction(a+"_addAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("p2"),r=i.i32_add(i.getLocal("p2"),i.i32_const(n)),d=i.getLocal("pr"),u=i.i32_add(i.getLocal("pr"),i.i32_const(n)),_=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copyAffine",i.getLocal("p1"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(e+"_eq",l,s),i.if(i.call(e+"_eq",c,r),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",s,l,g),i.call(e+"_sub",r,c,h),i.call(e+"_square",g,f),i.call(e+"_add",f,f,p),i.call(e+"_add",p,p,p),i.call(e+"_mul",g,p,m),i.call(e+"_add",h,h,L),i.call(e+"_mul",l,p,w),i.call(e+"_square",L,b),i.call(e+"_add",w,w,y),i.call(e+"_sub",b,m,d),i.call(e+"_sub",d,y,d),i.call(e+"_mul",c,m,A),i.call(e+"_add",A,A,A),i.call(e+"_sub",w,d,u),i.call(e+"_mul",u,L,u),i.call(e+"_sub",u,A,u),i.call(e+"_add",g,g,_))}(),function(){const o=t.addFunction(a+"_addMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.getLocal("pr"),_=i.i32_add(i.getLocal("pr"),i.i32_const(n)),g=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addAffine",l,r,u),...i.ret([])]),i.call(e+"_square",s,f),i.call(e+"_mul",r,f,h),i.call(e+"_mul",s,f,p),i.call(e+"_mul",d,p,m),i.if(i.call(e+"_eq",l,h),i.if(i.call(e+"_eq",c,m),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",h,l,L),i.call(e+"_sub",m,c,w),i.call(e+"_square",L,b),i.call(e+"_add",b,b,y),i.call(e+"_add",y,y,y),i.call(e+"_mul",L,y,A),i.call(e+"_add",w,w,C),i.call(e+"_mul",l,y,x),i.call(e+"_square",C,F),i.call(e+"_add",x,x,I),i.call(e+"_sub",F,A,u),i.call(e+"_sub",u,I,u),i.call(e+"_mul",c,A,B),i.call(e+"_add",B,B,B),i.call(e+"_sub",x,u,_),i.call(e+"_mul",_,C,_),i.call(e+"_sub",_,B,_),i.call(e+"_add",s,L,g),i.call(e+"_square",g,g),i.call(e+"_sub",g,f,g),i.call(e+"_sub",g,b,g))}(),function(){const o=t.addFunction(a+"_add");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.getLocal("pr"),g=i.i32_add(i.getLocal("pr"),i.i32_const(n)),f=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n)),E=i.i32_const(t.alloc(n)),v=i.i32_const(t.alloc(n)),S=i.i32_const(t.alloc(n)),P=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(a+"_isZero",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addMixed",r,l,_),...i.ret([])]),i.if(i.call(e+"_isOne",u),[...i.call(a+"_addMixed",l,r,_),...i.ret([])]),i.call(e+"_square",s,h),i.call(e+"_square",u,p),i.call(e+"_mul",l,p,m),i.call(e+"_mul",r,h,L),i.call(e+"_mul",s,h,b),i.call(e+"_mul",u,p,w),i.call(e+"_mul",c,w,y),i.call(e+"_mul",d,b,A),i.if(i.call(e+"_eq",m,L),i.if(i.call(e+"_eq",y,A),[...i.call(a+"_double",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",L,m,C),i.call(e+"_sub",A,y,F),i.call(e+"_add",C,C,x),i.call(e+"_square",x,x),i.call(e+"_mul",C,x,I),i.call(e+"_add",F,F,B),i.call(e+"_mul",m,x,v),i.call(e+"_square",B,E),i.call(e+"_add",v,v,S),i.call(e+"_sub",E,I,_),i.call(e+"_sub",_,S,_),i.call(e+"_mul",y,I,P),i.call(e+"_add",P,P,P),i.call(e+"_sub",v,_,g),i.call(e+"_mul",g,B,g),i.call(e+"_sub",g,P,g),i.call(e+"_add",s,u,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,h,f),i.call(e+"_sub",f,p,f),i.call(e+"_mul",f,C,f))}(),function(){const o=t.addFunction(a+"_negAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n));o.addCode(i.call(e+"_copy",l,s),i.call(e+"_neg",c,r))}(),function(){const o=t.addFunction(a+"_neg");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.call(e+"_copy",l,r),i.call(e+"_neg",c,d),i.call(e+"_copy",s,u))}(),function(){const e=t.addFunction(a+"_subAffine");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addAffine",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_subMixed");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addMixed",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_sub");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_neg",o.getLocal("p2"),i),o.call(a+"_add",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const o=t.addFunction(a+"_fromMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_fromMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(e+"_zero",r),...i.call(e+"_zero",d)],[...i.call(e+"_inverse",s,u),...i.call(e+"_square",u,_),...i.call(e+"_mul",u,_,g),...i.call(e+"_mul",l,_,r),...i.call(e+"_mul",c,g,d)]))}(),function(){const i=t.addFunction(a+"_inCurveAffine");i.addParam("pIn","i32"),i.setReturnType("i32");const l=i.getCodeBuilder(),c=l.getLocal("pIn"),s=l.i32_add(l.getLocal("pIn"),l.i32_const(n)),r=l.i32_const(t.alloc(n)),d=l.i32_const(t.alloc(n));i.addCode(l.call(e+"_square",s,r),l.call(e+"_square",c,d),l.call(e+"_mul",c,d,d),l.call(e+"_add",d,l.i32_const(o),d),l.ret(l.call(e+"_eq",r,d)))}(),function(){const e=t.addFunction(a+"_inCurve");e.addParam("pIn","i32"),e.setReturnType("i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(2*n));e.addCode(o.call(a+"_toAffine",o.getLocal("pIn"),i),o.ret(o.call(a+"_inCurveAffine",i)))}(),function(){const o=t.addFunction(a+"_batchToAffine");o.addParam("pIn","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addLocal("pAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itAux","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.setLocal("pAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("pAux"),i.i32_mul(i.getLocal("n"),i.i32_const(n)))),i.call(e+"_batchInverse",i.i32_add(i.getLocal("pIn"),i.i32_const(2*n)),i.i32_const(3*n),i.getLocal("n"),i.getLocal("pAux"),i.i32_const(n)),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.getLocal("pAux")),i.setLocal("itOut",i.getLocal("pOut")),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(e+"_isZero",i.getLocal("itAux")),[...i.call(e+"_zero",i.getLocal("itOut")),...i.call(e+"_zero",i.i32_add(i.getLocal("itOut"),i.i32_const(n)))],[...i.call(e+"_mul",i.getLocal("itAux"),i.i32_add(i.getLocal("itIn"),i.i32_const(n)),l),...i.call(e+"_square",i.getLocal("itAux"),i.getLocal("itAux")),...i.call(e+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.getLocal("itOut")),...i.call(e+"_mul",i.getLocal("itAux"),l,i.i32_add(i.getLocal("itOut"),i.i32_const(n)))]),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.i32_const(3*n))),i.setLocal("itOut",i.i32_add(i.getLocal("itOut"),i.i32_const(2*n))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.i32_store(i.i32_const(0),i.getLocal("pAux")))}(),function(){const o=t.addFunction(a+"_normalize");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_inverse",s,_),...i.call(e+"_square",_,g),...i.call(e+"_mul",_,g,f),...i.call(e+"_mul",l,g,r),...i.call(e+"_mul",c,f,d),...i.call(e+"_one",u)]))}(),function(){const e=t.addFunction(a+"__reverseBytes");e.addParam("pIn","i32"),e.addParam("n","i32"),e.addParam("pOut","i32"),e.addLocal("itOut","i32"),e.addLocal("itIn","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("itOut",o.i32_sub(o.i32_add(o.getLocal("pOut"),o.getLocal("n")),o.i32_const(1))),o.setLocal("itIn",o.getLocal("pIn")),o.block(o.loop(o.br_if(1,o.i32_lt_s(o.getLocal("itOut"),o.getLocal("pOut"))),o.i32_store8(o.getLocal("itOut"),o.i32_load8_u(o.getLocal("itIn"))),o.setLocal("itOut",o.i32_sub(o.getLocal("itOut"),o.i32_const(1))),o.setLocal("itIn",o.i32_add(o.getLocal("itIn"),o.i32_const(1))),o.br(0))))}(),function(){const e=t.addFunction(a+"_LEMtoU");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.call(a+"_isZeroAffine",o.getLocal("pIn")),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.ret([])]),o.call(a+"_fromMontgomeryAffine",o.getLocal("pIn"),l),o.call(a+"__reverseBytes",c,o.i32_const(n),o.getLocal("pOut")),o.call(a+"__reverseBytes",s,o.i32_const(n),o.i32_add(o.getLocal("pOut"),o.i32_const(n))))}(),function(){const o=t.addFunction(a+"_LEMtoC");o.addParam("pIn","i32"),o.addParam("pOut","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("pIn")),[...i.call(e+"_zero",i.getLocal("pOut")),...i.i32_store8(i.getLocal("pOut"),i.i32_const(64)),...i.ret([])]),i.call(e+"_fromMontgomery",i.getLocal("pIn"),l),i.call(a+"__reverseBytes",l,i.i32_const(n),i.getLocal("pOut")),i.if(i.i32_eq(i.call(e+"_sign",i.i32_add(i.getLocal("pIn"),i.i32_const(n))),i.i32_const(-1)),i.i32_store8(i.getLocal("pOut"),i.i32_or(i.i32_load8_u(i.getLocal("pOut")),i.i32_const(128)))))}(),function(){const e=t.addFunction(a+"_UtoLEM");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.i32_and(o.i32_load8_u(o.getLocal("pIn")),o.i32_const(64)),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.ret([])]),o.call(a+"__reverseBytes",o.getLocal("pIn"),o.i32_const(n),c),o.call(a+"__reverseBytes",o.i32_add(o.getLocal("pIn"),o.i32_const(n)),o.i32_const(n),s),o.call(a+"_toMontgomeryAffine",l,o.getLocal("pOut")))}(),function(){const i=t.addFunction(a+"_CtoLEM");i.addParam("pIn","i32"),i.addParam("pOut","i32"),i.addLocal("firstByte","i32"),i.addLocal("greatest","i32");const l=i.getCodeBuilder(),c=t.alloc(2*n),s=l.i32_const(c),r=l.i32_const(c+n);i.addCode(l.setLocal("firstByte",l.i32_load8_u(l.getLocal("pIn"))),l.if(l.i32_and(l.getLocal("firstByte"),l.i32_const(64)),[...l.call(a+"_zeroAffine",l.getLocal("pOut")),...l.ret([])]),l.setLocal("greatest",l.i32_and(l.getLocal("firstByte"),l.i32_const(128))),l.call(e+"_copy",l.getLocal("pIn"),r),l.i32_store8(r,l.i32_and(l.getLocal("firstByte"),l.i32_const(63))),l.call(a+"__reverseBytes",r,l.i32_const(n),s),l.call(e+"_toMontgomery",s,l.getLocal("pOut")),l.call(e+"_square",l.getLocal("pOut"),r),l.call(e+"_mul",l.getLocal("pOut"),r,r),l.call(e+"_add",r,l.i32_const(o),r),l.call(e+"_sqrt",r,r),l.call(e+"_neg",r,s),l.if(l.i32_eq(l.call(e+"_sign",r),l.i32_const(-1)),l.if(l.getLocal("greatest"),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n)))),l.if(l.getLocal("greatest"),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))))))}(),Tt(t,a+"_batchLEMtoU",a+"_LEMtoU",2*n,2*n),Tt(t,a+"_batchLEMtoC",a+"_LEMtoC",2*n,n),Tt(t,a+"_batchUtoLEM",a+"_UtoLEM",2*n,2*n),Tt(t,a+"_batchCtoLEM",a+"_CtoLEM",n,2*n,!0),Tt(t,a+"_batchToJacobian",a+"_toJacobian",2*n,3*n,!0),Mt(t,a,a+"_multiexp",a+"_add",3*n),Mt(t,a,a+"_multiexpAffine",a+"_addMixed",2*n),zt(t,a+"_timesScalar",3*n,a+"_add",a+"_double",a+"_sub",a+"_copy",a+"_zero"),zt(t,a+"_timesScalarAffine",2*n,a+"_addMixed",a+"_double",a+"_subMixed",a+"_copyAffine",a+"_zero"),t.exportFunction(a+"_isZero"),t.exportFunction(a+"_isZeroAffine"),t.exportFunction(a+"_eq"),t.exportFunction(a+"_eqMixed"),t.exportFunction(a+"_eqAffine"),t.exportFunction(a+"_copy"),t.exportFunction(a+"_copyAffine"),t.exportFunction(a+"_zero"),t.exportFunction(a+"_zeroAffine"),t.exportFunction(a+"_double"),t.exportFunction(a+"_doubleAffine"),t.exportFunction(a+"_add"),t.exportFunction(a+"_addMixed"),t.exportFunction(a+"_addAffine"),t.exportFunction(a+"_neg"),t.exportFunction(a+"_negAffine"),t.exportFunction(a+"_sub"),t.exportFunction(a+"_subMixed"),t.exportFunction(a+"_subAffine"),t.exportFunction(a+"_fromMontgomery"),t.exportFunction(a+"_fromMontgomeryAffine"),t.exportFunction(a+"_toMontgomery"),t.exportFunction(a+"_toMontgomeryAffine"),t.exportFunction(a+"_timesScalar"),t.exportFunction(a+"_timesScalarAffine"),t.exportFunction(a+"_normalize"),t.exportFunction(a+"_LEMtoU"),t.exportFunction(a+"_LEMtoC"),t.exportFunction(a+"_UtoLEM"),t.exportFunction(a+"_CtoLEM"),t.exportFunction(a+"_batchLEMtoU"),t.exportFunction(a+"_batchLEMtoC"),t.exportFunction(a+"_batchUtoLEM"),t.exportFunction(a+"_batchCtoLEM"),t.exportFunction(a+"_toAffine"),t.exportFunction(a+"_toJacobian"),t.exportFunction(a+"_batchToAffine"),t.exportFunction(a+"_batchToJacobian"),t.exportFunction(a+"_inCurve"),t.exportFunction(a+"_inCurveAffine"),a};const{isOdd:Qt,modInv:kt,modPow:Rt}=J,Nt=K;var Dt=function(t,a,e,o,i){const n=8*t.modules[o].n64,l=8*t.modules[e].n64,c=t.modules[o].q;let s=c-1n,r=0;for(;!Qt(s);)r++,s>>=1n;let d=2n;for(;1n===Rt(d,c>>1n,c);)d+=1n;const u=new Array(r+1);u[r]=Rt(d,s,c);let _=r-1;for(;_>=0;)u[_]=Rt(u[_+1],2n,c),_--;const g=[],f=(1n<>e);return a}const x=Array(256);for(let t=0;t<256;t++)x[t]=F(t);const I=t.alloc(x);function B(){const e=t.addFunction(a+"_fft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32");const i=e.getCodeBuilder(),l=i.i32_const(t.alloc(n));e.addCode(i.setLocal("bits",i.call(a+"__log2",i.getLocal("n"))),i.call(o+"_one",l),i.call(a+"_rawfft",i.getLocal("px"),i.getLocal("bits"),i.i32_const(0),l))}!function(){const e=t.addFunction(a+"__rev");e.addParam("x","i32"),e.addParam("bits","i32"),e.setReturnType("i32");const o=e.getCodeBuilder();e.addCode(o.i32_rotl(o.i32_add(o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.getLocal("x"),o.i32_const(255)),I,0),o.i32_const(24)),o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(8)),o.i32_const(255)),I,0),o.i32_const(16))),o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(16)),o.i32_const(255)),I,0),o.i32_const(8)),o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(24)),o.i32_const(255)),I,0))),o.getLocal("bits")))}(),function(){const o=t.addFunction(a+"__reversePermutation");o.addParam("px","i32"),o.addParam("bits","i32"),o.addLocal("n","i32"),o.addLocal("i","i32"),o.addLocal("ri","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.setLocal("n",i.i32_shl(i.i32_const(1),i.getLocal("bits"))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("i"),i.i32_const(l)))),i.setLocal("ri",i.call(a+"__rev",i.getLocal("i"),i.getLocal("bits"))),i.setLocal("idx2",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("ri"),i.i32_const(l)))),i.if(i.i32_lt_u(i.getLocal("i"),i.getLocal("ri")),[...i.call(e+"_copy",i.getLocal("idx1"),n),...i.call(e+"_copy",i.getLocal("idx2"),i.getLocal("idx1")),...i.call(e+"_copy",n,i.getLocal("idx2"))]),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=t.addFunction(a+"__fftFinal");n.addParam("px","i32"),n.addParam("bits","i32"),n.addParam("reverse","i32"),n.addParam("mulFactor","i32"),n.addLocal("n","i32"),n.addLocal("ndiv2","i32"),n.addLocal("pInv2","i32"),n.addLocal("i","i32"),n.addLocal("mask","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32");const c=n.getCodeBuilder(),s=c.i32_const(t.alloc(l));n.addCode(c.if(c.i32_and(c.i32_eqz(c.getLocal("reverse")),c.call(o+"_isOne",c.getLocal("mulFactor"))),c.ret([])),c.setLocal("n",c.i32_shl(c.i32_const(1),c.getLocal("bits"))),c.setLocal("mask",c.i32_sub(c.getLocal("n"),c.i32_const(1))),c.setLocal("i",c.i32_const(1)),c.setLocal("ndiv2",c.i32_shr_u(c.getLocal("n"),c.i32_const(1))),c.block(c.loop(c.br_if(1,c.i32_ge_u(c.getLocal("i"),c.getLocal("ndiv2"))),c.setLocal("idx1",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("i"),c.i32_const(l)))),c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.i32_sub(c.getLocal("n"),c.getLocal("i")),c.i32_const(l)))),c.if(c.getLocal("reverse"),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(e+"_copy",c.getLocal("idx2"),c.getLocal("idx1")),...c.call(e+"_copy",s,c.getLocal("idx2"))],[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,s,c.getLocal("mulFactor"),c.getLocal("idx2"))]),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("idx1"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))])),c.setLocal("i",c.i32_add(c.getLocal("i"),c.i32_const(1))),c.br(0))),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("px"),c.getLocal("mulFactor"),c.getLocal("px")),...c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("ndiv2"),c.i32_const(l)))),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))]))}(),function(){const c=t.addFunction(a+"_rawfft");c.addParam("px","i32"),c.addParam("bits","i32"),c.addParam("reverse","i32"),c.addParam("mulFactor","i32"),c.addLocal("s","i32"),c.addLocal("k","i32"),c.addLocal("j","i32"),c.addLocal("m","i32"),c.addLocal("mdiv2","i32"),c.addLocal("n","i32"),c.addLocal("pwm","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(a+"__reversePermutation",s.getLocal("px"),s.getLocal("bits")),s.setLocal("n",s.i32_shl(s.i32_const(1),s.getLocal("bits"))),s.setLocal("s",s.i32_const(1)),s.block(s.loop(s.br_if(1,s.i32_gt_u(s.getLocal("s"),s.getLocal("bits"))),s.setLocal("m",s.i32_shl(s.i32_const(1),s.getLocal("s"))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("s"),s.i32_const(n)))),s.setLocal("k",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("k"),s.getLocal("n"))),s.call(o+"_one",r),s.setLocal("mdiv2",s.i32_shr_u(s.getLocal("m"),s.i32_const(1))),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("j"),s.getLocal("mdiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("px"),s.i32_mul(s.i32_add(s.getLocal("k"),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.i32_mul(s.getLocal("mdiv2"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("k",s.i32_add(s.getLocal("k"),s.getLocal("m"))),s.br(0))),s.setLocal("s",s.i32_add(s.getLocal("s"),s.i32_const(1))),s.br(0))),s.call(a+"__fftFinal",s.getLocal("px"),s.getLocal("bits"),s.getLocal("reverse"),s.getLocal("mulFactor")))}(),function(){const e=t.addFunction(a+"__log2");e.addParam("n","i32"),e.setReturnType("i32"),e.addLocal("bits","i32"),e.addLocal("aux","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("aux",o.i32_shr_u(o.getLocal("n"),o.i32_const(1)))),e.addCode(o.setLocal("bits",o.i32_const(0))),e.addCode(o.block(o.loop(o.br_if(1,o.i32_eqz(o.getLocal("aux"))),o.setLocal("aux",o.i32_shr_u(o.getLocal("aux"),o.i32_const(1))),o.setLocal("bits",o.i32_add(o.getLocal("bits"),o.i32_const(1))),o.br(0)))),e.addCode(o.if(o.i32_ne(o.getLocal("n"),o.i32_shl(o.i32_const(1),o.getLocal("bits"))),o.unreachable())),e.addCode(o.if(o.i32_gt_u(o.getLocal("bits"),o.i32_const(r)),o.unreachable())),e.addCode(o.getLocal("bits"))}(),B(),function(){const e=t.addFunction(a+"_ifft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32"),e.addLocal("pInv2","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("bits",o.call(a+"__log2",o.getLocal("n"))),o.setLocal("pInv2",o.i32_add(o.i32_const(L),o.i32_mul(o.getLocal("bits"),o.i32_const(n)))),o.call(a+"_rawfft",o.getLocal("px"),o.getLocal("bits"),o.i32_const(1),o.getLocal("pInv2")))}(),function(){const c=t.addFunction(a+"_fftJoin");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExt");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),d),s.call(i,s.getLocal("idx2"),s.getLocal("pShiftToM"),s.getLocal("idx2")),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(e+"_copy",d,s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExtInv");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_sub",s.getLocal("idx1"),d,s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),s.getLocal("pSConst"),s.getLocal("idx2")),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),s.getLocal("idx1")),s.call(e+"_sub",d,s.getLocal("idx1"),s.getLocal("idx1")),s.call(i,s.getLocal("idx1"),s.getLocal("pSConst"),s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftMix");c.addParam("pBuff","i32"),c.addParam("n","i32"),c.addParam("exp","i32"),c.addLocal("nGroups","i32"),c.addLocal("nPerGroup","i32"),c.addLocal("nPerGroupDiv2","i32"),c.addLocal("pairOffset","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("j","i32"),c.addLocal("pwm","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.setLocal("nPerGroup",s.i32_shl(s.i32_const(1),s.getLocal("exp"))),s.setLocal("nPerGroupDiv2",s.i32_shr_u(s.getLocal("nPerGroup"),s.i32_const(1))),s.setLocal("nGroups",s.i32_shr_u(s.getLocal("n"),s.getLocal("exp"))),s.setLocal("pairOffset",s.i32_mul(s.getLocal("nPerGroupDiv2"),s.i32_const(l))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("exp"),s.i32_const(n)))),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("nGroups"))),s.call(o+"_one",r),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("j"),s.getLocal("nPerGroupDiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff"),s.i32_mul(s.i32_add(s.i32_mul(s.getLocal("i"),s.getLocal("nPerGroup")),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.getLocal("pairOffset"))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const o=t.addFunction(a+"_fftFinal");o.addParam("pBuff","i32"),o.addParam("n","i32"),o.addParam("factor","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32"),o.addLocal("i","i32"),o.addLocal("ndiv2","i32");const n=o.getCodeBuilder(),c=n.i32_const(t.alloc(l));o.addCode(n.setLocal("ndiv2",n.i32_shr_u(n.getLocal("n"),n.i32_const(1))),n.if(n.i32_and(n.getLocal("n"),n.i32_const(1)),n.call(i,n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))),n.getLocal("factor"),n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))))),n.setLocal("i",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_ge_u(n.getLocal("i"),n.getLocal("ndiv2"))),n.setLocal("idx1",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("i"),n.i32_const(l)))),n.setLocal("idx2",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.i32_sub(n.i32_sub(n.getLocal("n"),n.i32_const(1)),n.getLocal("i")),n.i32_const(l)))),n.call(i,n.getLocal("idx2"),n.getLocal("factor"),c),n.call(i,n.getLocal("idx1"),n.getLocal("factor"),n.getLocal("idx2")),n.call(e+"_copy",c,n.getLocal("idx1")),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),function(){const c=t.addFunction(a+"_prepareLagrangeEvaluation");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),d),s.call(e+"_sub",s.getLocal("idx2"),d,d),s.call(e+"_sub",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,d,s.getLocal("pSConst"),s.getLocal("idx1")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),t.exportFunction(a+"_fft"),t.exportFunction(a+"_ifft"),t.exportFunction(a+"_rawfft"),t.exportFunction(a+"_fftJoin"),t.exportFunction(a+"_fftJoinExt"),t.exportFunction(a+"_fftJoinExtInv"),t.exportFunction(a+"_fftMix"),t.exportFunction(a+"_fftFinal"),t.exportFunction(a+"_prepareLagrangeEvaluation")},$t=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_zero");i.addParam("px","i32"),i.addParam("n","i32"),i.addLocal("lastp","i32"),i.addLocal("p","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("p",n.getLocal("px")),n.setLocal("lastp",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("p"),n.getLocal("lastp"))),n.call(e+"_zero",n.getLocal("p")),n.setLocal("p",n.i32_add(n.getLocal("p"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_constructLC");i.addParam("ppolynomials","i32"),i.addParam("psignals","i32"),i.addParam("nSignals","i32"),i.addParam("pres","i32"),i.addLocal("i","i32"),i.addLocal("j","i32"),i.addLocal("pp","i32"),i.addLocal("ps","i32"),i.addLocal("pd","i32"),i.addLocal("ncoefs","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("i",n.i32_const(0)),n.setLocal("pp",n.getLocal("ppolynomials")),n.setLocal("ps",n.getLocal("psignals")),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("i"),n.getLocal("nSignals"))),n.setLocal("ncoefs",n.i32_load(n.getLocal("pp"))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.setLocal("j",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("j"),n.getLocal("ncoefs"))),n.setLocal("pd",n.i32_add(n.getLocal("pres"),n.i32_mul(n.i32_load(n.getLocal("pp")),n.i32_const(o)))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.call(e+"_mul",n.getLocal("ps"),n.getLocal("pp"),l),n.call(e+"_add",l,n.getLocal("pd"),n.getLocal("pd")),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(o))),n.setLocal("j",n.i32_add(n.getLocal("j"),n.i32_const(1))),n.br(0))),n.setLocal("ps",n.i32_add(n.getLocal("ps"),n.i32_const(o))),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),t.exportFunction(a+"_zero"),t.exportFunction(a+"_constructLC"),a},jt=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_buildABC");i.addParam("pCoefs","i32"),i.addParam("nCoefs","i32"),i.addParam("pWitness","i32"),i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("offsetOut","i32"),i.addParam("nOut","i32"),i.addParam("offsetWitness","i32"),i.addParam("nWitness","i32"),i.addLocal("it","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("last","i32"),i.addLocal("m","i32"),i.addLocal("c","i32"),i.addLocal("s","i32"),i.addLocal("pOut","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_zero",n.getLocal("ita")),n.call(e+"_zero",n.getLocal("itb")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.br(0))),n.setLocal("it",n.getLocal("pCoefs")),n.setLocal("last",n.i32_add(n.getLocal("pCoefs"),n.i32_mul(n.getLocal("nCoefs"),n.i32_const(o+12)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("it"),n.getLocal("last"))),n.setLocal("s",n.i32_load(n.getLocal("it"),8)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_ge_u(n.getLocal("s"),n.i32_add(n.getLocal("offsetWitness"),n.getLocal("nWitness")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("m",n.i32_load(n.getLocal("it"))),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(0)),n.setLocal("pOut",n.getLocal("pA")),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(1)),n.setLocal("pOut",n.getLocal("pB")),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)])),n.setLocal("c",n.i32_load(n.getLocal("it"),4)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_ge_u(n.getLocal("c"),n.i32_add(n.getLocal("offsetOut"),n.getLocal("nOut")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("pOut",n.i32_add(n.getLocal("pOut"),n.i32_mul(n.i32_sub(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_const(o)))),n.call(e+"_mul",n.i32_add(n.getLocal("pWitness"),n.i32_mul(n.i32_sub(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_const(o))),n.i32_add(n.getLocal("it"),n.i32_const(12)),l),n.call(e+"_add",n.getLocal("pOut"),l,n.getLocal("pOut")),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),n.br(0))),n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("it",n.getLocal("pC")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("it")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_joinABC");i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("n","i32"),i.addParam("pP","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itc","i32"),i.addLocal("itp","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("itc",n.getLocal("pC")),n.setLocal("itp",n.getLocal("pP")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),l),n.call(e+"_sub",l,n.getLocal("itc"),n.getLocal("itp")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itc",n.i32_add(n.getLocal("itc"),n.i32_const(o))),n.setLocal("itp",n.i32_add(n.getLocal("itp"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_batchAdd");i.addParam("pa","i32"),i.addParam("pb","i32"),i.addParam("n","i32"),i.addParam("pr","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itr","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("ita",n.getLocal("pa")),n.setLocal("itb",n.getLocal("pb")),n.setLocal("itr",n.getLocal("pr")),n.setLocal("last",n.i32_add(n.getLocal("pa"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_add",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("itr")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itr",n.i32_add(n.getLocal("itr"),n.i32_const(o))),n.br(0))))}(),t.exportFunction(a+"_buildABC"),t.exportFunction(a+"_joinABC"),t.exportFunction(a+"_batchAdd"),a},Vt=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("pIn","i32"),s.addParam("n","i32"),s.addParam("pFirst","i32"),s.addParam("pInc","i32"),s.addParam("pOut","i32"),s.addLocal("pOldFree","i32"),s.addLocal("i","i32"),s.addLocal("pFrom","i32"),s.addLocal("pTo","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(l));s.addCode(r.setLocal("pFrom",r.getLocal("pIn")),r.setLocal("pTo",r.getLocal("pOut"))),s.addCode(r.call(o+"_copy",r.getLocal("pFirst"),d)),s.addCode(r.setLocal("i",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("n"))),r.call(c,r.getLocal("pFrom"),d,r.getLocal("pTo")),r.setLocal("pFrom",r.i32_add(r.getLocal("pFrom"),r.i32_const(i))),r.setLocal("pTo",r.i32_add(r.getLocal("pTo"),r.i32_const(n))),r.call(o+"_mul",d,r.getLocal("pInc"),d),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0)))),t.exportFunction(a)};const Kt=K,Ht=Ft,Zt=Bt,Wt=Pt,Yt=Gt,Jt=Ut,Xt=Dt,ta=$t,aa=jt,ea=Vt,{bitLength:oa,modInv:ia,isOdd:na,isNegative:la}=J;const ca=K,sa=Ft,ra=Bt,da=Pt,ua=Gt,_a=Ut,ga=Dt,fa=$t,ha=jt,pa=Vt,{bitLength:ma,isOdd:La,isNegative:ba}=J;var wa=function(t,a){const e=a||"bn128";if(t.modules[e])return e;const o=21888242871839275222246405745257275088696311157297823662689037894645226208583n,i=21888242871839275222246405745257275088548364400416034343698204186575808495617n,n=Math.floor((oa(o-1n)-1)/64)+1,l=8*n,c=l,s=l,r=2*s,d=12*s,u=t.alloc(Kt.bigInt2BytesLE(i,c)),_=Ht(t,o,"f1m");Zt(t,i,"fr","frm");const g=t.alloc(Kt.bigInt2BytesLE(b(3n),s)),f=Jt(t,"g1m","f1m",g);Xt(t,"frm","frm","frm","frm_mul"),ta(t,"pol","frm"),aa(t,"qap","frm");const h=Wt(t,"f1m_neg","f2m","f1m"),p=t.alloc([...Kt.bigInt2BytesLE(b(19485874751759354771024239261021720505790618469301721065564631296452457478373n),s),...Kt.bigInt2BytesLE(b(266929791119991161246907387137283842545076965332900288569378510910307636690n),s)]),m=Jt(t,"g2m","f2m",p);function L(a,e){const o=t.addFunction(a);o.addParam("pG","i32"),o.addParam("pFr","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.call("frm_fromMontgomery",i.getLocal("pFr"),n),i.call(e,i.getLocal("pG"),n,i.i32_const(l),i.getLocal("pr"))),t.exportFunction(a)}function b(t){return BigInt(t)*(1n<0n;)na(a)?e.push(1):e.push(0),a>>=1n;return e}(29793968203157093288n),T=t.alloc(z),M=3*r,U=z.length-1,Q=z.reduce(((t,a)=>t+(0!=a?1:0)),0),k=6*l,R=3*l*2+(Q+U+1)*M;t.modules[e]={n64:n,pG1gen:y,pG1zero:C,pG1b:g,pG2gen:x,pG2zero:B,pG2b:p,pq:t.modules.f1m.pq,pr:u,pOneT:E,prePSize:k,preQSize:R,r:i.toString(),q:o.toString()};const N=4965661367192848881n;function D(a){const i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[8376118865763821496583973867626364092589906065868298776909617916018768340080n,16469823323077808223889137241176536799009286646108169935659301613961712198316n],[21888242871839275220042445260109153167277707414472061641714758635765020556617n,0n],[11697423496358154304825782922584725312912383441159505038794027105778954184319n,303847389135065887422783454877609941456349188919719272345083954437860409601n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3321304630594332808241809054958361220322477375291206261884409189760185844239n,5722266937896532885780051958958348231143373700109372999374820235121374419868n],[21888242871839275222246405745257275088696311157297823662689037894645226208582n,0n],[13512124006075453725662431877630910996106405091429524885779419978626457868503n,5418419548761466998357268504080738289687024511189653727029736280683514010267n],[2203960485148121921418603742825762020974279258880205651966n,0n],[10190819375481120917420622822672549775783927716138318623895010788866272024264n,21584395482704209334823622290379665147239961968378104390343953940207365798982n],[2203960485148121921418603742825762020974279258880205651967n,0n],[18566938241244942414004596690298913868373833782006617400804628704885040364344n,16165975933942742336466353786298926857552937457188450663314217659523851788715n]]],n=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[21575463638280843010398324269430826099269044274347216827212613867836435027261n,10307601595873709700152284273816112264069230130616436755625194854815875713954n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3772000881919853776433695186713858239009073593817195771773381919316419345261n,2236595495967245188281701248203181795121068902605861227855261137820944008926n],[2203960485148121921418603742825762020974279258880205651966n,0n],[18429021223477853657660792034369865839114504446431234726392080002137598044644n,9344045779998320333812420223237981029506012124075525679208581902008406485703n]],[[1n,0n],[2581911344467009335267311115468803099551665605076196740867805258568234346338n,19937756971775647987995932169929341994314640652964949448313374472400716661030n],[2203960485148121921418603742825762020974279258880205651966n,0n],[5324479202449903542726783395506214481928257762400643279780343368557297135718n,16208900380737693084919495127334387981393726419856888799917914180988844123039n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[13981852324922362344252311234282257507216387789820983642040889267519694726527n,7629828391165209371577384193250820201684255241773809077146787135900891633097n]]],l=t.addFunction(e+"__frobeniusMap"+a);l.addParam("x","i32"),l.addParam("r","i32");const c=l.getCodeBuilder();for(let e=0;e<6;e++){const o=0==e?c.getLocal("x"):c.i32_add(c.getLocal("x"),c.i32_const(e*r)),u=o,g=c.i32_add(c.getLocal("x"),c.i32_const(e*r+s)),f=0==e?c.getLocal("r"):c.i32_add(c.getLocal("r"),c.i32_const(e*r)),p=f,m=c.i32_add(c.getLocal("r"),c.i32_const(e*r+s)),L=d(i[Math.floor(e/3)][a%12],n[e%3][a%6]),w=t.alloc([...Kt.bigInt2BytesLE(b(L[0]),32),...Kt.bigInt2BytesLE(b(L[1]),32)]);a%2==1?l.addCode(c.call(_+"_copy",u,p),c.call(_+"_neg",g,m),c.call(h+"_mul",f,c.i32_const(w),f)):l.addCode(c.call(h+"_mul",o,c.i32_const(w),f))}function d(t,a){const e=BigInt(t[0]),i=BigInt(t[1]),n=BigInt(a[0]),l=BigInt(a[1]),c=[(e*n-i*l)%o,(e*l+i*n)%o];return la(c[0])&&(c[0]=c[0]+o),c}}function $(a,o){const i=function(t){let a=t;const e=[];for(;a>0n;){if(na(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),n=t.alloc(i),l=t.addFunction(e+"__cyclotomicExp_"+o);l.addParam("x","i32"),l.addParam("r","i32"),l.addLocal("bit","i32"),l.addLocal("i","i32");const c=l.getCodeBuilder(),s=c.getLocal("x"),r=c.getLocal("r"),u=c.i32_const(t.alloc(d));l.addCode(c.call(G+"_conjugate",s,u),c.call(G+"_one",r),c.if(c.teeLocal("bit",c.i32_load8_s(c.i32_const(i.length-1),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.setLocal("i",c.i32_const(i.length-2)),c.block(c.loop(c.call(e+"__cyclotomicSquare",r,r),c.if(c.teeLocal("bit",c.i32_load8_s(c.getLocal("i"),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.br_if(1,c.i32_eqz(c.getLocal("i"))),c.setLocal("i",c.i32_sub(c.getLocal("i"),c.i32_const(1))),c.br(0))))}function j(){!function(){const a=t.addFunction(e+"__cyclotomicSquare");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.i32_add(o.getLocal("x"),o.i32_const(r)),l=o.i32_add(o.getLocal("x"),o.i32_const(2*r)),c=o.i32_add(o.getLocal("x"),o.i32_const(3*r)),s=o.i32_add(o.getLocal("x"),o.i32_const(4*r)),d=o.i32_add(o.getLocal("x"),o.i32_const(5*r)),u=o.getLocal("r"),_=o.i32_add(o.getLocal("r"),o.i32_const(r)),g=o.i32_add(o.getLocal("r"),o.i32_const(2*r)),f=o.i32_add(o.getLocal("r"),o.i32_const(3*r)),p=o.i32_add(o.getLocal("r"),o.i32_const(4*r)),m=o.i32_add(o.getLocal("r"),o.i32_const(5*r)),L=o.i32_const(t.alloc(r)),b=o.i32_const(t.alloc(r)),w=o.i32_const(t.alloc(r)),y=o.i32_const(t.alloc(r)),A=o.i32_const(t.alloc(r)),C=o.i32_const(t.alloc(r)),F=o.i32_const(t.alloc(r)),x=o.i32_const(t.alloc(r));a.addCode(o.call(h+"_mul",i,s,F),o.call(h+"_mul",s,o.i32_const(v),L),o.call(h+"_add",i,L,L),o.call(h+"_add",i,s,x),o.call(h+"_mul",x,L,L),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",L,x,L),o.call(h+"_add",F,F,b),o.call(h+"_mul",c,l,F),o.call(h+"_mul",l,o.i32_const(v),w),o.call(h+"_add",c,w,w),o.call(h+"_add",c,l,x),o.call(h+"_mul",x,w,w),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",w,x,w),o.call(h+"_add",F,F,y),o.call(h+"_mul",n,d,F),o.call(h+"_mul",d,o.i32_const(v),A),o.call(h+"_add",n,A,A),o.call(h+"_add",n,d,x),o.call(h+"_mul",x,A,A),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",A,x,A),o.call(h+"_add",F,F,C),o.call(h+"_sub",L,i,u),o.call(h+"_add",u,u,u),o.call(h+"_add",L,u,u),o.call(h+"_add",b,s,p),o.call(h+"_add",p,p,p),o.call(h+"_add",b,p,p),o.call(h+"_mul",C,o.i32_const(P),x),o.call(h+"_add",x,c,f),o.call(h+"_add",f,f,f),o.call(h+"_add",x,f,f),o.call(h+"_sub",A,l,g),o.call(h+"_add",g,g,g),o.call(h+"_add",A,g,g),o.call(h+"_sub",w,n,_),o.call(h+"_add",_,_,_),o.call(h+"_add",w,_,_),o.call(h+"_add",y,d,m),o.call(h+"_add",m,m,m),o.call(h+"_add",y,m,m))}(),$(N,"w0");const a=t.addFunction(e+"__finalExponentiationLastChunk");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.getLocal("r"),l=o.i32_const(t.alloc(d)),c=o.i32_const(t.alloc(d)),s=o.i32_const(t.alloc(d)),u=o.i32_const(t.alloc(d)),_=o.i32_const(t.alloc(d)),g=o.i32_const(t.alloc(d)),f=o.i32_const(t.alloc(d)),p=o.i32_const(t.alloc(d)),m=o.i32_const(t.alloc(d)),L=o.i32_const(t.alloc(d)),b=o.i32_const(t.alloc(d)),w=o.i32_const(t.alloc(d)),y=o.i32_const(t.alloc(d)),A=o.i32_const(t.alloc(d)),C=o.i32_const(t.alloc(d)),F=o.i32_const(t.alloc(d)),x=o.i32_const(t.alloc(d)),I=o.i32_const(t.alloc(d)),B=o.i32_const(t.alloc(d)),E=o.i32_const(t.alloc(d)),S=o.i32_const(t.alloc(d));a.addCode(o.call(e+"__cyclotomicExp_w0",i,l),o.call(G+"_conjugate",l,l),o.call(e+"__cyclotomicSquare",l,c),o.call(e+"__cyclotomicSquare",c,s),o.call(G+"_mul",s,c,u),o.call(e+"__cyclotomicExp_w0",u,_),o.call(G+"_conjugate",_,_),o.call(e+"__cyclotomicSquare",_,g),o.call(e+"__cyclotomicExp_w0",g,f),o.call(G+"_conjugate",f,f),o.call(G+"_conjugate",u,p),o.call(G+"_conjugate",f,m),o.call(G+"_mul",m,_,L),o.call(G+"_mul",L,p,b),o.call(G+"_mul",b,c,w),o.call(G+"_mul",b,_,y),o.call(G+"_mul",y,i,A),o.call(e+"__frobeniusMap1",w,C),o.call(G+"_mul",C,A,F),o.call(e+"__frobeniusMap2",b,x),o.call(G+"_mul",x,F,I),o.call(G+"_conjugate",i,B),o.call(G+"_mul",B,w,E),o.call(e+"__frobeniusMap3",E,S),o.call(G+"_mul",S,I,n))}const V=t.alloc(k),K=t.alloc(R);function H(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t0n;)La(a)?e.push(1):e.push(0),a>>=1n;return e}(0xd201000000010000n),z=t.alloc(G),T=3*s,M=G.length-1,U=G.reduce(((t,a)=>t+(0!=a?1:0)),0),Q=6*l,k=3*l*2+(U+M+1)*T,R=!0,N=15132376222941642752n;function D(a){const e=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n,151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n],[2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n,1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n,877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n,3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n,2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n,3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n]]],i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[0n,4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[0n,1n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[0n,793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n]],[[1n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n]]],n=t.addFunction(O+"_frobeniusMap"+a);n.addParam("x","i32"),n.addParam("r","i32");const r=n.getCodeBuilder();for(let o=0;o<6;o++){const u=0==o?r.getLocal("x"):r.i32_add(r.getLocal("x"),r.i32_const(o*s)),_=u,g=r.i32_add(r.getLocal("x"),r.i32_const(o*s+c)),h=0==o?r.getLocal("r"):r.i32_add(r.getLocal("r"),r.i32_const(o*s)),p=h,L=r.i32_add(r.getLocal("r"),r.i32_const(o*s+c)),b=d(e[Math.floor(o/3)][a%12],i[o%3][a%6]),w=t.alloc([...ca.bigInt2BytesLE(y(b[0]),l),...ca.bigInt2BytesLE(y(b[1]),l)]);a%2==1?n.addCode(r.call(f+"_copy",_,p),r.call(f+"_neg",g,L),r.call(m+"_mul",h,r.i32_const(w),h)):n.addCode(r.call(m+"_mul",u,r.i32_const(w),h))}function d(t,a){const e=t[0],i=t[1],n=a[0],l=a[1],c=[(e*n-i*l)%o,(e*l+i*n)%o];return ba(c[0])&&(c[0]=c[0]+o),c}}function $(a,o,i){const n=function(t){let a=t;const e=[];for(;a>0n;){if(La(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),l=t.alloc(n),c=t.addFunction(e+"__cyclotomicExp_"+i);c.addParam("x","i32"),c.addParam("r","i32"),c.addLocal("bit","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),d=s.getLocal("x"),u=s.getLocal("r"),_=s.i32_const(t.alloc(r));c.addCode(s.call(O+"_conjugate",d,_),s.call(O+"_one",u),s.if(s.teeLocal("bit",s.i32_load8_s(s.i32_const(n.length-1),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.setLocal("i",s.i32_const(n.length-2)),s.block(s.loop(s.call(e+"__cyclotomicSquare",u,u),s.if(s.teeLocal("bit",s.i32_load8_s(s.getLocal("i"),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.br(0)))),o&&c.addCode(s.call(O+"_conjugate",u,u))}t.modules[e]={n64q:n,n64r:d,n8q:l,n8r:u,pG1gen:C,pG1zero:x,pG1b:h,pG2gen:B,pG2zero:v,pG2b:L,pq:t.modules.f1m.pq,pr:g,pOneT:S,r:i,q:o,prePSize:Q,preQSize:k},function(){const a=t.addFunction(q+"_mul1");a.addParam("pA","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC1"),s=e.getLocal("pR"),r=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),d=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),u=e.i32_const(t.alloc(2*c)),_=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_add",o,i,u),e.call(m+"_add",i,n,_),e.call(m+"_mul",i,l,d),e.call(m+"_mul",_,l,s),e.call(m+"_sub",s,d,s),e.call(m+"_mulNR",s,s),e.call(m+"_mul",u,l,r),e.call(m+"_sub",r,d,r))}(),function(){const a=t.addFunction(q+"_mul01");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC0"),s=e.getLocal("pC1"),r=e.getLocal("pR"),d=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),u=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),_=e.i32_const(t.alloc(2*c)),g=e.i32_const(t.alloc(2*c)),f=e.i32_const(t.alloc(2*c)),h=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_mul",o,l,_),e.call(m+"_mul",i,s,g),e.call(m+"_add",o,i,f),e.call(m+"_add",o,n,h),e.call(m+"_add",i,n,r),e.call(m+"_mul",r,s,r),e.call(m+"_sub",r,g,r),e.call(m+"_mulNR",r,r),e.call(m+"_add",r,_,r),e.call(m+"_add",l,s,d),e.call(m+"_mul",d,f,d),e.call(m+"_sub",d,_,d),e.call(m+"_sub",d,g,d),e.call(m+"_mul",h,l,u),e.call(m+"_sub",u,_,u),e.call(m+"_add",u,g,u))}(),function(){const a=t.addFunction(O+"_mul014");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pC4","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(6*c)),n=e.getLocal("pC0"),l=e.getLocal("pC1"),s=e.getLocal("pC4"),r=e.i32_const(t.alloc(6*c)),d=e.i32_const(t.alloc(6*c)),u=e.i32_const(t.alloc(2*c)),_=e.getLocal("pR"),g=e.i32_add(e.getLocal("pR"),e.i32_const(6*c));a.addCode(e.call(q+"_mul01",o,n,l,r),e.call(q+"_mul1",i,s,d),e.call(m+"_add",l,s,u),e.call(q+"_add",i,o,g),e.call(q+"_mul01",g,n,u,g),e.call(q+"_sub",g,r,g),e.call(q+"_sub",g,d,g),e.call(q+"_copy",d,_),e.call(q+"_mulNR",_,_),e.call(q+"_add",_,r,_))}(),function(){const a=t.addFunction(e+"_ell");a.addParam("pP","i32"),a.addParam("pCoefs","i32"),a.addParam("pF","i32");const o=a.getCodeBuilder(),i=o.getLocal("pP"),n=o.i32_add(o.getLocal("pP"),o.i32_const(l)),s=o.getLocal("pF"),r=o.getLocal("pCoefs"),d=o.i32_add(o.getLocal("pCoefs"),o.i32_const(c)),u=o.i32_add(o.getLocal("pCoefs"),o.i32_const(2*c)),_=o.i32_add(o.getLocal("pCoefs"),o.i32_const(3*c)),g=o.i32_add(o.getLocal("pCoefs"),o.i32_const(4*c)),h=t.alloc(2*c),p=o.i32_const(h),m=o.i32_const(h),L=o.i32_const(h+c),b=t.alloc(2*c),w=o.i32_const(b),y=o.i32_const(b),A=o.i32_const(b+c);a.addCode(o.call(f+"_mul",r,n,m),o.call(f+"_mul",d,n,L),o.call(f+"_mul",u,i,y),o.call(f+"_mul",_,i,A),o.call(O+"_mul014",s,g,w,p,s))}();const j=t.alloc(Q),V=t.alloc(k);function K(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t>=BigInt(32)):l+2<=a?(n.setUint16(l,Number(e&BigInt(65535)),!0),l+=2,e>>=BigInt(16)):(n.setUint8(l,Number(e&BigInt(255)),!0),l+=1,e>>=BigInt(8));if(e)throw new Error("Number does not fit in this length");return o}const Ca=[];for(let t=0;t<256;t++)Ca[t]=Fa(t,8);function Fa(t,a){let e=0,o=t;for(let t=0;t>=1;return e}function xa(t,a){return(Ca[t>>>24]|Ca[t>>>16&255]<<8|Ca[t>>>8&255]<<16|Ca[255&t]<<24)>>>32-a}function Ia(t){return(0!=(4294901760&t)?(t&=4294901760,16):0)|(0!=(4278255360&t)?(t&=4278255360,8):0)|(0!=(4042322160&t)?(t&=4042322160,4):0)|(0!=(3435973836&t)?(t&=3435973836,2):0)|0!=(2863311530&t)}function Ba(t,a){const e=t.byteLength/a,o=Ia(e);if(e!=1<e){const o=t.slice(i*a,(i+1)*a);t.set(t.slice(e*a,(e+1)*a),i*a),t.set(o,e*a)}}}function Ea(t,a){const e=new Uint8Array(a*t.length);for(let o=0;o{e[o]=t(a[o])})),e}return a},unstringifyBigInts:function t(a){if("string"==typeof a&&/^[0-9]+$/.test(a))return BigInt(a);if("string"==typeof a&&/^0x[0-9a-fA-F]+$/.test(a))return BigInt(a);if(Array.isArray(a))return a.map(t);if("object"==typeof a){if(null===a)return null;const e={};return Object.keys(a).forEach((o=>{e[o]=t(a[o])})),e}return a},beBuff2int:function(t){let a=BigInt(0),e=t.length,o=0;const i=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e>0;)e>=4?(e-=4,a+=BigInt(i.getUint32(e))<=2?(e-=2,a+=BigInt(i.getUint16(e))<0;)n-4>=0?(n-=4,i.setUint32(n,Number(e&BigInt(4294967295))),e>>=BigInt(32)):n-2>=0?(n-=2,i.setUint16(n,Number(e&BigInt(65535))),e>>=BigInt(16)):(n-=1,i.setUint8(n,Number(e&BigInt(255))),e>>=BigInt(8));if(e)throw new Error("Number does not fit in this length");return o},leBuff2int:function(t){let a=BigInt(0),e=0;const o=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e{o[i]=t(a,e[i])})),o}return e},unstringifyFElements:function t(a,e){if("string"==typeof e&&/^[0-9]+$/.test(e))return a.e(e);if("string"==typeof e&&/^0x[0-9a-fA-F]+$/.test(e))return a.e(e);if(Array.isArray(e))return e.map(t.bind(this,a));if("object"==typeof e){if(null===e)return null;const o={};return Object.keys(e).forEach((i=>{o[i]=t(a,e[i])})),o}return e},bitReverse:xa,log2:Ia,buffReverseBits:Ba,array2buffer:Ea,buffer2array:va});const Pa=1<<30;class qa{constructor(t){this.buffers=[],this.byteLength=t;for(let a=0;a0;){const t=l+c>Pa?Pa-l:c,a=new Uint8Array(this.buffers[n].buffer,this.buffers[n].byteOffset+l,t);if(t==e)return a.slice();i||(i=e<=Pa?new Uint8Array(e):new qa(e)),i.set(a,e-c),c-=t,n++,l=0}return i}set(t,a){void 0===a&&(a=0);const e=t.byteLength;if(0==e)return;const o=Math.floor(a/Pa);if(o==Math.floor((a+e-1)/Pa))return t instanceof qa&&1==t.buffers.length?this.buffers[o].set(t.buffers[0],a%Pa):this.buffers[o].set(t,a%Pa);let i=o,n=a%Pa,l=e;for(;l>0;){const a=n+l>Pa?Pa-n:l,o=t.slice(e-l,e-l+a);new Uint8Array(this.buffers[i].buffer,this.buffers[i].byteOffset+n,a).set(o),l-=a,i++,n=0}}}function Oa(t,a,e,o){return async function(i){const n=Math.floor(i.byteLength/e);if(n*e!==i.byteLength)throw new Error("Invalid buffer size");const l=Math.floor(n/t.concurrency),c=[];for(let s=0;s=0;t--)this.w[t]=this.square(this.w[t+1]);if(!this.eq(this.w[0],this.one))throw new Error("Error calculating roots of unity");this.batchToMontgomery=Oa(t,a+"_batchToMontgomery",this.n8,this.n8),this.batchFromMontgomery=Oa(t,a+"_batchFromMontgomery",this.n8,this.n8)}op2(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op2Bool(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2)}op1(t,a){return this.tm.setBuff(this.pOp1,a),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op1Bool(t,a){return this.tm.setBuff(this.pOp1,a),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3)}add(t,a){return this.op2("_add",t,a)}eq(t,a){return this.op2Bool("_eq",t,a)}isZero(t){return this.op1Bool("_isZero",t)}sub(t,a){return this.op2("_sub",t,a)}neg(t){return this.op1("_neg",t)}inv(t){return this.op1("_inverse",t)}toMontgomery(t){return this.op1("_toMontgomery",t)}fromMontgomery(t){return this.op1("_fromMontgomery",t)}mul(t,a){return this.op2("_mul",t,a)}div(t,a){return this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_inverse"](this.pOp2,this.pOp2),this.tm.instance.exports[this.prefix+"_mul"](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}square(t){return this.op1("_square",t)}isSquare(t){return this.op1Bool("_isSquare",t)}sqrt(t){return this.op1("_sqrt",t)}exp(t,a){return a instanceof Uint8Array||(a=S(o(a))),this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_exp"](this.pOp1,this.pOp2,a.byteLength,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}isNegative(t){return this.op1Bool("_isNegative",t)}e(t,a){if(t instanceof Uint8Array)return t;let e=o(t,a);n(e)?(e=p(e),A(e,this.p)&&(e=w(e,this.p)),e=h(this.p,e)):A(e,this.p)&&(e=w(e,this.p));const i=Aa(e,this.n8);return this.toMontgomery(i)}toString(t,a){return v(B(this.fromMontgomery(t),0),a)}fromRng(t){let a;const e=new Uint8Array(this.n8);do{a=P;for(let e=0;eo.buffer.byteLength){const i=o.buffer.byteLength/65536;let n=Math.floor((e[0]+t)/65536)+1;n>a&&(n=a),o.grow(n-i)}return i}function l(t){const a=n(t.byteLength);return s(a,t),a}function c(t,a){const e=new Uint8Array(o.buffer);return new Uint8Array(e.buffer,e.byteOffset+t,a)}function s(t,a){new Uint8Array(o.buffer).set(new Uint8Array(a),t)}function r(t){if("INIT"==t[0].cmd)return i(t[0]);const a={vars:[],out:[]},r=new Uint32Array(o.buffer,0,1)[0];for(let o=0;o{this.reject=a,this.resolve=t}))}}var Da;const $a="data:application/javascript;base64,"+(Da="("+Ua.toString()+")(self)",globalThis.btoa(Da));class ja{constructor(){this.actionQueue=[],this.oldPFree=0}startSyncOp(){if(0!=this.oldPFree)throw new Error("Sync operation in progress");this.oldPFree=this.u32[0]}endSyncOp(){if(0==this.oldPFree)throw new Error("No sync operation in progress");this.u32[0]=this.oldPFree,this.oldPFree=0}postAction(t,a,e,o){if(this.working[t])throw new Error("Posting a job t a working worker");return this.working[t]=!0,this.pendingDeferreds[t]=o||new Na,this.workers[t].postMessage(a,e),this.pendingDeferreds[t].promise}processWorks(){for(let t=0;t0;t++)if(0==this.working[t]){const a=this.actionQueue.shift();this.postAction(t,a.data,a.transfers,a.deferred)}}queueAction(t,a){const e=new Na;if(this.singleThread){const a=this.taskManager(t);e.resolve(a)}else this.actionQueue.push({data:t,transfers:a,deferred:e}),this.processWorks();return e.promise}resetMemory(){this.u32[0]=this.initalPFree}allocBuff(t){const a=this.alloc(t.byteLength);return this.setBuff(a,t),a}getBuff(t,a){return this.u8.slice(t,t+a)}setBuff(t,a){this.u8.set(new Uint8Array(a),t)}alloc(t){for(;3&this.u32[0];)this.u32[0]++;const a=this.u32[0];return this.u32[0]+=t,a}async terminate(){for(let t=0;tsetTimeout(a,t))))}}function Va(t,a){const e=t[a],o=t.Fr,i=t.tm;t[a].batchApplyKey=async function(t,n,l,c,s){let r,d,u,_,g;if(c=c||"affine",s=s||"affine","G1"==a)"jacobian"==c?(u=3*e.F.n8,r="g1m_batchApplyKey"):(u=2*e.F.n8,r="g1m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g1m_batchToAffine",g=2*e.F.n8);else if("G2"==a)"jacobian"==c?(u=3*e.F.n8,r="g2m_batchApplyKey"):(u=2*e.F.n8,r="g2m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g2m_batchToAffine",g=2*e.F.n8);else{if("Fr"!=a)throw new Error("Invalid group: "+a);r="frm_batchApplyKey",u=e.n8,_=e.n8,g=e.n8}const f=Math.floor(t.byteLength/u),h=Math.floor(f/i.concurrency),p=[];l=o.e(l);let m=o.e(n);for(let a=0;a=0;t--){if(!e.isZero(h))for(let t=0;tr&&(h=r),h<1024&&(h=1024);const p=[];for(let a=0;a(c&&c.debug(`Multiexp end: ${s}: ${a}/${u}`),t))))}const m=await Promise.all(p);let L=e.zero;for(let t=m.length-1;t>=0;t--)L=e.add(L,m[t]);return L}e.multiExp=async function(t,a,e,o){return await n(t,a,"jacobian",e,o)},e.multiExpAffine=async function(t,a,e,o){return await n(t,a,"affine",e,o)}}function Za(t,a){const e=t[a],o=t.Fr,i=e.tm;async function n(t,c,s,r,d,u){s=s||"affine",r=r||"affine";let _,g,f,h,p,m,L,b;"G1"==a?("affine"==s?(_=2*e.F.n8,h="g1m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g1m_fftFinal"),L="g1m_fftJoin",m="g1m_fftMix","affine"==r?(f=2*e.F.n8,p="g1m_batchToAffine"):f=3*e.F.n8):"G2"==a?("affine"==s?(_=2*e.F.n8,h="g2m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g2m_fftFinal"),L="g2m_fftJoin",m="g2m_fftMix","affine"==r?(f=2*e.F.n8,p="g2m_batchToAffine"):f=3*e.F.n8):"Fr"==a&&(_=e.n8,g=e.n8,f=e.n8,c&&(b="frm_fftFinal"),m="frm_fftMix",L="frm_fftJoin");let w=!1;Array.isArray(t)?(t=Ea(t,_),w=!0):t=t.slice(0,t.byteLength);const y=t.byteLength/_,A=Ia(y);if(1<1<<28?new qa(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u):await async function(t,a,e,i,c){let s,r;s=t.slice(0,t.byteLength/2),r=t.slice(t.byteLength/2,t.byteLength);const d=[];[s,r]=await l(s,r,"fftJoinExt",o.one,o.shift,a,"jacobian",i,c),d.push(n(s,!1,"jacobian",e,i,c)),d.push(n(r,!1,"jacobian",e,i,c));const u=await Promise.all(d);let _;_=u[0].byteLength>1<<28?new qa(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u),w?va(a,f):a}let C,F,x;c&&(C=o.inv(o.e(y))),Ba(t,_);let I=Math.min(16384,y),B=y/I;for(;B=16;)B*=2,I/=2;const E=Ia(I),v=[];for(let a=0;a(d&&d.debug(`${u}: fft ${A} mix end: ${a}/${B}`),t))))}x=await Promise.all(v);for(let t=0;t(d&&d.debug(`${u}: fft ${A} join ${t}/${A} ${l+1}/${a} ${c}/${e/2}`),o))))}const l=await Promise.all(n);for(let t=0;t0;a--)F.set(x[a],t),t+=I*f,delete x[a];F.set(x[0].slice(0,(I-1)*f),t),delete x[0]}else for(let t=0;t65536&&(w=65536);const y=[];for(let a=0;a(u&&u.debug(`${_}: fftJoinExt End: ${a}/${b}`),t))))}const A=await Promise.all(y);let C,F;b*p>1<<28?(C=new qa(b*p),F=new qa(b*p)):(C=new Uint8Array(b*p),F=new Uint8Array(b*p));let x=0;for(let t=0;to.s+1)throw s&&s.error("lagrangeEvaluations input too big"),new Error("lagrangeEvaluations input too big");let g=t.slice(0,t.byteLength/2),f=t.slice(t.byteLength/2,t.byteLength);const h=o.exp(o.shift,u/2),p=o.inv(o.sub(o.one,h));[g,f]=await l(g,f,"prepareLagrangeEvaluation",p,o.shiftInv,i,"jacobian",s,r+" prep");const m=[];let L;return m.push(n(g,!0,"jacobian",c,s,r+" t0")),m.push(n(f,!0,"jacobian",c,s,r+" t1")),[g,f]=await Promise.all(m),L=g.byteLength>1<<28?new qa(2*g.byteLength):new Uint8Array(2*g.byteLength),L.set(g),L.set(f,g.byteLength),L},e.fftMix=async function(t){const n=3*e.F.n8;let l,c;if("G1"==a)l="g1m_fftMix",c="g1m_fftJoin";else if("G2"==a)l="g2m_fftMix",c="g2m_fftJoin";else{if("Fr"!=a)throw new Error("Invalid group");l="frm_fftMix",c="frm_fftJoin"}const s=Math.floor(t.byteLength/n),r=Ia(s);let d=1<=0;t--)g.set(_[t][0],f),f+=_[t][0].byteLength;return g}}async function Wa(t){const a=await async function(t,a){const e=new ja;e.memory=new WebAssembly.Memory({initial:Ra}),e.u8=new Uint8Array(e.memory.buffer),e.u32=new Uint32Array(e.memory.buffer);const o=await WebAssembly.compile(t.code);if(e.instance=await WebAssembly.instantiate(o,{env:{memory:e.memory}}),e.singleThread=a,e.initalPFree=e.u32[0],e.pq=t.pq,e.pr=t.pr,e.pG1gen=t.pG1gen,e.pG1zero=t.pG1zero,e.pG2gen=t.pG2gen,e.pG2zero=t.pG2zero,e.pOneT=t.pOneT,a)e.code=t.code,e.taskManager=Ua(),await e.taskManager([{cmd:"INIT",init:Ra,code:e.code.slice()}]),e.concurrency=1;else{let a;e.workers=[],e.pendingDeferreds=[],e.working=[],a="object"==typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:Qa.cpus().length,0==a&&(a=2),a>64&&(a=64),e.concurrency=a;for(let t=0;t>8n&0xFFn)),a.push(Number(e>>16n&0xFFn)),a.push(Number(e>>24n&0xFFn)),a}function ae(t){const a=function(t){for(var a=[],e=0;e>6,128|63&o):o<55296||o>=57344?a.push(224|o>>12,128|o>>6&63,128|63&o):(e++,o=65536+((1023&o)<<10|1023&t.charCodeAt(e)),a.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return a}(t);return[...le(a.length),...a]}function ee(t){const a=[];let e=Ya(t);if(Ja(e))throw new Error("Number cannot be negative");for(;!Xa(e);)a.push(Number(0x7Fn&e)),e>>=7n;0==a.length&&a.push(0);for(let t=0;t0xFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFn&&(a-=0x100000000n),a<-2147483648n)throw new Error("Number too small");return oe(a)}function ne(t){let a=Ya(t);if(a>0xFFFFFFFFFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFFFFFFFFFn&&(a-=0x10000000000000000n),a<-9223372036854775808n)throw new Error("Number too small");return oe(a)}function le(t){let a=Ya(t);if(a>0xFFFFFFFFn)throw new Error("Number too big");return ee(a)}function ce(t){return Array.from(t,(function(t){return("0"+(255&t).toString(16)).slice(-2)})).join("")}class se{constructor(t){this.func=t,this.functionName=t.functionName,this.module=t.module}setLocal(t,a){const e=this.func.localIdxByName[t];if(void 0===e)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${t} `);return[...a,33,...le(e)]}teeLocal(t,a){const e=this.func.localIdxByName[t];if(void 0===e)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${t} `);return[...a,34,...le(e)]}getLocal(t){const a=this.func.localIdxByName[t];if(void 0===a)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${t} `);return[32,...le(a)]}i64_load8_s(t,a,e){return[...t,48,void 0===e?0:e,...le(a||0)]}i64_load8_u(t,a,e){return[...t,49,void 0===e?0:e,...le(a||0)]}i64_load16_s(t,a,e){return[...t,50,void 0===e?1:e,...le(a||0)]}i64_load16_u(t,a,e){return[...t,51,void 0===e?1:e,...le(a||0)]}i64_load32_s(t,a,e){return[...t,52,void 0===e?2:e,...le(a||0)]}i64_load32_u(t,a,e){return[...t,53,void 0===e?2:e,...le(a||0)]}i64_load(t,a,e){return[...t,41,void 0===e?3:e,...le(a||0)]}i64_store(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=3,l=a):Array.isArray(e)?(i=a,n=3,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,55,n,...le(i)]}i64_store32(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=2,l=a):Array.isArray(e)?(i=a,n=2,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,62,n,...le(i)]}i64_store16(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=1,l=a):Array.isArray(e)?(i=a,n=1,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,61,n,...le(i)]}i64_store8(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=0,l=a):Array.isArray(e)?(i=a,n=0,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,60,n,...le(i)]}i32_load8_s(t,a,e){return[...t,44,void 0===e?0:e,...le(a||0)]}i32_load8_u(t,a,e){return[...t,45,void 0===e?0:e,...le(a||0)]}i32_load16_s(t,a,e){return[...t,46,void 0===e?1:e,...le(a||0)]}i32_load16_u(t,a,e){return[...t,47,void 0===e?1:e,...le(a||0)]}i32_load(t,a,e){return[...t,40,void 0===e?2:e,...le(a||0)]}i32_store(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=2,l=a):Array.isArray(e)?(i=a,n=2,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,54,n,...le(i)]}i32_store16(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=1,l=a):Array.isArray(e)?(i=a,n=1,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,59,n,...le(i)]}i32_store8(t,a,e,o){let i,n,l;return Array.isArray(a)?(i=0,n=0,l=a):Array.isArray(e)?(i=a,n=0,l=e):Array.isArray(o)&&(i=a,n=e,l=o),[...t,...l,58,n,...le(i)]}call(t,...a){const e=this.module.functionIdxByName[t];if(void 0===e)throw new Error(`Function not defined: Function: ${t}`);return[...[].concat(...a),16,...le(e)]}call_indirect(t,...a){return[...[].concat(...a),...t,17,0,0]}if(t,a,e){return e?[...t,4,64,...a,5,...e,11]:[...t,4,64,...a,11]}block(t){return[2,64,...t,11]}loop(...t){return[3,64,...[].concat(...t),11]}br_if(t,a){return[...a,13,...le(t)]}br(t){return[12,...le(t)]}ret(t){return[...t,15]}drop(t){return[...t,26]}i64_const(t){return[66,...ne(t)]}i32_const(t){return[65,...ie(t)]}i64_eqz(t){return[...t,80]}i64_eq(t,a){return[...t,...a,81]}i64_ne(t,a){return[...t,...a,82]}i64_lt_s(t,a){return[...t,...a,83]}i64_lt_u(t,a){return[...t,...a,84]}i64_gt_s(t,a){return[...t,...a,85]}i64_gt_u(t,a){return[...t,...a,86]}i64_le_s(t,a){return[...t,...a,87]}i64_le_u(t,a){return[...t,...a,88]}i64_ge_s(t,a){return[...t,...a,89]}i64_ge_u(t,a){return[...t,...a,90]}i64_add(t,a){return[...t,...a,124]}i64_sub(t,a){return[...t,...a,125]}i64_mul(t,a){return[...t,...a,126]}i64_div_s(t,a){return[...t,...a,127]}i64_div_u(t,a){return[...t,...a,128]}i64_rem_s(t,a){return[...t,...a,129]}i64_rem_u(t,a){return[...t,...a,130]}i64_and(t,a){return[...t,...a,131]}i64_or(t,a){return[...t,...a,132]}i64_xor(t,a){return[...t,...a,133]}i64_shl(t,a){return[...t,...a,134]}i64_shr_s(t,a){return[...t,...a,135]}i64_shr_u(t,a){return[...t,...a,136]}i64_extend_i32_s(t){return[...t,172]}i64_extend_i32_u(t){return[...t,173]}i64_clz(t){return[...t,121]}i64_ctz(t){return[...t,122]}i32_eqz(t){return[...t,69]}i32_eq(t,a){return[...t,...a,70]}i32_ne(t,a){return[...t,...a,71]}i32_lt_s(t,a){return[...t,...a,72]}i32_lt_u(t,a){return[...t,...a,73]}i32_gt_s(t,a){return[...t,...a,74]}i32_gt_u(t,a){return[...t,...a,75]}i32_le_s(t,a){return[...t,...a,76]}i32_le_u(t,a){return[...t,...a,77]}i32_ge_s(t,a){return[...t,...a,78]}i32_ge_u(t,a){return[...t,...a,79]}i32_add(t,a){return[...t,...a,106]}i32_sub(t,a){return[...t,...a,107]}i32_mul(t,a){return[...t,...a,108]}i32_div_s(t,a){return[...t,...a,109]}i32_div_u(t,a){return[...t,...a,110]}i32_rem_s(t,a){return[...t,...a,111]}i32_rem_u(t,a){return[...t,...a,112]}i32_and(t,a){return[...t,...a,113]}i32_or(t,a){return[...t,...a,114]}i32_xor(t,a){return[...t,...a,115]}i32_shl(t,a){return[...t,...a,116]}i32_shr_s(t,a){return[...t,...a,117]}i32_shr_u(t,a){return[...t,...a,118]}i32_rotl(t,a){return[...t,...a,119]}i32_rotr(t,a){return[...t,...a,120]}i32_wrap_i64(t){return[...t,167]}i32_clz(t){return[...t,103]}i32_ctz(t){return[...t,104]}unreachable(){return[0]}current_memory(){return[63,0]}comment(){return[]}}const re={i32:127,i64:126,f32:125,f64:124,anyfunc:112,func:96,emptyblock:64};class de{constructor(t,a,e,o,i){if("import"==e)this.fnType="import",this.moduleName=o,this.fieldName=i;else{if("internal"!=e)throw new Error("Invalid function fnType: "+e);this.fnType="internal"}this.module=t,this.fnName=a,this.params=[],this.locals=[],this.localIdxByName={},this.code=[],this.returnType=null,this.nextLocal=0}addParam(t,a){if(this.localIdxByName[t])throw new Error(`param already exists. Function: ${this.fnName}, Param: ${t} `);const e=this.nextLocal++;this.localIdxByName[t]=e,this.params.push({type:a})}addLocal(t,a,e){const o=e||1;if(this.localIdxByName[t])throw new Error(`local already exists. Function: ${this.fnName}, Param: ${t} `);const i=this.nextLocal++;this.localIdxByName[t]=i,this.locals.push({type:a,length:o})}setReturnType(t){if(this.returnType)throw new Error(`returnType already defined. Function: ${this.fnName}`);this.returnType=t}getSignature(){return[96,...[...le(this.params.length),...this.params.map((t=>re[t.type]))],...this.returnType?[1,re[this.returnType]]:[0]]}getBody(){const t=this.locals.map((t=>[...le(t.length),re[t.type]])),a=[...le(this.locals.length),...[].concat(...t),...this.code,11];return[...le(a.length),...a]}addCode(...t){this.code.push(...[].concat(...t))}getCodeBuilder(){return new se(this)}}class ue{constructor(){this.functions=[],this.functionIdxByName={},this.nImportFunctions=0,this.nInternalFunctions=0,this.memory={pagesSize:1,moduleName:"env",fieldName:"memory"},this.free=8,this.datas=[],this.modules={},this.exports=[],this.functionsTable=[]}build(){return this._setSignatures(),new Uint8Array([...te(1836278016),...te(1),...this._buildType(),...this._buildImport(),...this._buildFunctionDeclarations(),...this._buildFunctionsTable(),...this._buildExports(),...this._buildElements(),...this._buildCode(),...this._buildData()])}addFunction(t){if(void 0!==this.functionIdxByName[t])throw new Error(`Function already defined: ${t}`);const a=this.functions.length;return this.functionIdxByName[t]=a,this.functions.push(new de(this,t,"internal")),this.nInternalFunctions++,this.functions[a]}addIimportFunction(t,a,e){if(void 0!==this.functionIdxByName[t])throw new Error(`Function already defined: ${t}`);if(this.functions.length>0&&"internal"==this.functions[this.functions.length-1].type)throw new Error(`Import functions must be declared before internal: ${t}`);let o=e||t;const i=this.functions.length;return this.functionIdxByName[t]=i,this.functions.push(new de(this,t,"import",a,o)),this.nImportFunctions++,this.functions[i]}setMemory(t,a,e){this.memory={pagesSize:t,moduleName:a||"env",fieldName:e||"memory"}}exportFunction(t,a){const e=a||t;if(void 0===this.functionIdxByName[t])throw new Error(`Function not defined: ${t}`);const o=this.functionIdxByName[t];e!=t&&(this.functionIdxByName[e]=o),this.exports.push({exportName:e,idx:o})}addFunctionToTable(t){const a=this.functionIdxByName[t];this.functionsTable.push(a)}addData(t,a){this.datas.push({offset:t,bytes:a})}alloc(t,a){let e,o;(Array.isArray(t)||ArrayBuffer.isView(t))&&void 0===a?(e=t.length,o=t):(e=t,o=a),e=1+(e-1>>3)<<3;const i=this.free;return this.free+=e,o&&this.addData(i,o),i}allocString(t){const a=(new globalThis.TextEncoder).encode(t);return this.alloc([...a,0])}_setSignatures(){this.signatures=[];const t={};if(this.functionsTable.length>0){const a=this.functions[this.functionsTable[0]].getSignature();t["s_"+ce(a)]=0,this.signatures.push(a)}for(let a=0;a{a.pendingLoads.push({page:t,resolve:e,reject:o})}));return a.__statusPage("After Load request: ",t),e}__statusPage(t,a){const e=[],o=this;if(!o.logHistory)return;e.push("=="+t+" "+a);let i="";for(let t=0;t "+a.history[t][e][o])}_triggerLoad(){const t=this;if(t.reading)return;if(0==t.pendingLoads.length)return;const a=Object.keys(t.pages),e=[];for(let o=0;o0&&(void 0!==t.pages[t.pendingLoads[0].page]||o>0||e.length>0);){const a=t.pendingLoads.shift();if(void 0!==t.pages[a.page]){t.pages[a.page].pendingOps++;const o=e.indexOf(a.page);o>=0&&e.splice(o,1),t.pages[a.page].loading?t.pages[a.page].loading.push(a):a.resolve(),t.__statusPage("After Load (cached): ",a.page)}else{if(o)o--;else{const a=e.shift();t.__statusPage("Before Unload: ",a),t.avBuffs.unshift(t.pages[a]),delete t.pages[a],t.__statusPage("After Unload: ",a)}a.page>=t.totalPages?(t.pages[a.page]=n(),a.resolve(),t.__statusPage("After Load (new): ",a.page)):(t.reading=!0,t.pages[a.page]=n(),t.pages[a.page].loading=[a],i.push(t.fd.read(t.pages[a.page].buff,0,t.pageSize,a.page*t.pageSize).then((e=>{t.pages[a.page].size=e.bytesRead;const o=t.pages[a.page].loading;delete t.pages[a.page].loading;for(let t=0;t{a.reject(t)}))),t.__statusPage("After Load (loading): ",a.page))}}function n(){if(t.avBuffs.length>0){const a=t.avBuffs.shift();return a.dirty=!1,a.pendingOps=1,a.size=0,a}return{dirty:!1,buff:new Uint8Array(t.pageSize),pendingOps:1,size:0}}Promise.all(i).then((()=>{t.reading=!1,t.pendingLoads.length>0&&setImmediate(t._triggerLoad.bind(t)),t._tryClose()}))}_triggerWrite(){const t=this;if(t.writing)return;const a=Object.keys(t.pages),e=[];for(let o=0;o{i.writing=!1}),(a=>{console.log("ERROR Writing: "+a),t.error=a,t._tryClose()}))))}t.writing&&Promise.all(e).then((()=>{t.writing=!1,setImmediate(t._triggerWrite.bind(t)),t._tryClose(),t.pendingLoads.length>0&&setImmediate(t._triggerLoad.bind(t))}))}_getDirtyPage(){for(let t in this.pages)if(this.pages[t].dirty)return t;return-1}async write(t,a){if(0==t.byteLength)return;const e=this;if(void 0===a&&(a=e.pos),e.pos=a+t.byteLength,e.totalSize0;){await n[l-o];const a=c+s>e.pageSize?e.pageSize-c:s,i=t.slice(t.byteLength-s,t.byteLength-s+a);new Uint8Array(e.pages[l].buff.buffer,c,a).set(i),e.pages[l].dirty=!0,e.pages[l].pendingOps--,e.pages[l].size=Math.max(c+a,e.pages[l].size),l>=e.totalPages&&(e.totalPages=l+1),s-=a,l++,c=0,e.writing||setImmediate(e._triggerWrite.bind(e))}}async read(t,a){let e=new Uint8Array(t);return await this.readToBuffer(e,0,t,a),e}async readToBuffer(t,a,e,o){if(0==e)return;const i=this;if(e>i.pageSize*i.maxPagesLoaded*.8){const t=Math.floor(1.1*e);this.maxPagesLoaded=Math.floor(t/i.pageSize)+1}if(void 0===o&&(o=i.pos),i.pos=o+e,i.pendingClose)throw new Error("Reading a closing file");const n=Math.floor(o/i.pageSize),l=Math.floor((o+e-1)/i.pageSize),c=[];for(let t=n;t<=l;t++)c.push(i._loadPage(t));i._triggerLoad();let s=n,r=o%i.pageSize,d=o+e>i.totalSize?e-(o+e-i.totalSize):e;for(;d>0;){await c[s-n],i.__statusPage("After Await (read): ",s);const o=r+d>i.pageSize?i.pageSize-r:d,l=new Uint8Array(i.pages[s].buff.buffer,i.pages[s].buff.byteOffset+r,o);t.set(l,a+e-d),i.pages[s].pendingOps--,i.__statusPage("After Op done: ",s),d-=o,s++,r=0,i.pendingLoads.length>0&&setImmediate(i._triggerLoad.bind(i))}this.pos=o+e}_tryClose(){const t=this;if(!t.pendingClose)return;t.error&&t.pendingCloseReject(t.error);t._getDirtyPage()>=0||t.writing||t.reading||t.pendingLoads.length>0||t.pendingClose()}close(){const t=this;if(t.pendingClose)throw new Error("Closing the file twice");return new Promise(((a,e)=>{t.pendingClose=a,t.pendingCloseReject=e,t._tryClose()})).then((()=>{t.fd.close()}),(a=>{throw t.fd.close(),a}))}async discard(){await this.close(),await pe.promises.unlink(this.fileName)}async writeULE32(t,a){const e=new Uint8Array(4);new DataView(e.buffer).setUint32(0,t,!0),await this.write(e,a)}async writeUBE32(t,a){const e=new Uint8Array(4);new DataView(e.buffer).setUint32(0,t,!1),await this.write(e,a)}async writeULE64(t,a){const e=new Uint8Array(8),o=new DataView(e.buffer);o.setUint32(0,4294967295&t,!0),o.setUint32(4,Math.floor(t/4294967296),!0),await this.write(e,a)}async readULE32(t){const a=await this.read(4,t);return new Uint32Array(a.buffer)[0]}async readUBE32(t){const a=await this.read(4,t);return new DataView(a.buffer).getUint32(0,!1)}async readULE64(t){const a=await this.read(8,t),e=new Uint32Array(a.buffer);return 4294967296*e[1]+e[0]}async readString(t){const a=this;if(a.pendingClose)throw new Error("Reading a closing file");let e=void 0===t?a.pos:t,o=Math.floor(e/a.pageSize),i=!1,n="";for(;!i;){let t=a._loadPage(o);a._triggerLoad(),await t,a.__statusPage("After Await (read): ",o);let l=e%a.pageSize;const c=new Uint8Array(a.pages[o].buff.buffer,a.pages[o].buff.byteOffset+l,a.pageSize-l);let s=c.findIndex((t=>0===t));i=-1!==s,i?(n+=(new TextDecoder).decode(c.slice(0,s)),a.pos=o*this.pageSize+l+s+1):(n+=(new TextDecoder).decode(c),a.pos=o*this.pageSize+l+c.length),a.pages[o].pendingOps--,a.__statusPage("After Op done: ",o),e=a.pos,o++,a.pendingLoads.length>0&&setImmediate(a._triggerLoad.bind(a))}return n}}const be=new Uint8Array(4),we=new DataView(be.buffer),ye=new Uint8Array(8),Ae=new DataView(ye.buffer);class Ce{constructor(){this.pageSize=16384}_resizeIfNeeded(t){if(t>this.allocSize){const a=Math.max(this.allocSize+(1<<20),Math.floor(1.1*this.allocSize),t),e=new Uint8Array(a);e.set(this.o.data),this.o.data=e,this.allocSize=a}}async write(t,a){if(void 0===a&&(a=this.pos),this.readOnly)throw new Error("Writing a read only file");this._resizeIfNeeded(a+t.byteLength),this.o.data.set(t.slice(),a),a+t.byteLength>this.totalSize&&(this.totalSize=a+t.byteLength),this.pos=a+t.byteLength}async readToBuffer(t,a,e,o){if(void 0===o&&(o=this.pos),this.readOnly&&o+e>this.totalSize)throw new Error("Reading out of bounds");this._resizeIfNeeded(o+e);const i=new Uint8Array(this.o.data.buffer,this.o.data.byteOffset+o,e);t.set(i,a),this.pos=o+e}async read(t,a){const e=new Uint8Array(t);return await this.readToBuffer(e,0,t,a),e}close(){this.o.data.byteLength!=this.totalSize&&(this.o.data=this.o.data.slice(0,this.totalSize))}async discard(){}async writeULE32(t,a){we.setUint32(0,t,!0),await this.write(be,a)}async writeUBE32(t,a){we.setUint32(0,t,!1),await this.write(be,a)}async writeULE64(t,a){Ae.setUint32(0,4294967295&t,!0),Ae.setUint32(4,Math.floor(t/4294967296),!0),await this.write(ye,a)}async readULE32(t){const a=await this.read(4,t);return new Uint32Array(a.buffer)[0]}async readUBE32(t){const a=await this.read(4,t);return new DataView(a.buffer).getUint32(0,!1)}async readULE64(t){const a=await this.read(8,t),e=new Uint32Array(a.buffer);return 4294967296*e[1]+e[0]}async readString(t){const a=this;let e=void 0===t?a.pos:t;if(e>this.totalSize){if(this.readOnly)throw new Error("Reading out of bounds");this._resizeIfNeeded(t)}const o=new Uint8Array(a.o.data.buffer,e,this.totalSize-e);let i=o.findIndex((t=>0===t)),n="";return-1!==i?(n=(new TextDecoder).decode(o.slice(0,i)),a.pos=e+i+1):a.pos=e,n}}const Fe=1<<22;const xe=new Uint8Array(4),Ie=new DataView(xe.buffer),Be=new Uint8Array(8),Ee=new DataView(Be.buffer);class ve{constructor(){this.pageSize=16384}_resizeIfNeeded(t){if(t<=this.totalSize)return;if(this.readOnly)throw new Error("Reading out of file bounds");const a=Math.floor((t-1)/Fe)+1;for(let e=Math.max(this.o.data.length-1,0);e0;){const a=i+n>Fe?Fe-i:n,l=t.slice(t.byteLength-n,t.byteLength-n+a);new Uint8Array(e.o.data[o].buffer,i,a).set(l),n-=a,o++,i=0}this.pos=a+t.byteLength}async readToBuffer(t,a,e,o){const i=this;if(void 0===o&&(o=i.pos),this.readOnly&&o+e>this.totalSize)throw new Error("Reading out of bounds");this._resizeIfNeeded(o+e);let n=Math.floor(o/Fe),l=o%Fe,c=e;for(;c>0;){const o=l+c>Fe?Fe-l:c,s=new Uint8Array(i.o.data[n].buffer,l,o);t.set(s,a+e-c),c-=o,n++,l=0}this.pos=o+e}async read(t,a){const e=new Uint8Array(t);return await this.readToBuffer(e,0,t,a),e}close(){}async discard(){}async writeULE32(t,a){Ie.setUint32(0,t,!0),await this.write(xe,a)}async writeUBE32(t,a){Ie.setUint32(0,t,!1),await this.write(xe,a)}async writeULE64(t,a){Ee.setUint32(0,4294967295&t,!0),Ee.setUint32(4,Math.floor(t/4294967296),!0),await this.write(Be,a)}async readULE32(t){const a=await this.read(4,t);return new Uint32Array(a.buffer)[0]}async readUBE32(t){const a=await this.read(4,t);return new DataView(a.buffer).getUint32(0,!1)}async readULE64(t){const a=await this.read(8,t),e=new Uint32Array(a.buffer);return 4294967296*e[1]+e[0]}async readString(t){const a=this;let e=void 0===t?a.pos:t;if(e>this.totalSize){if(this.readOnly)throw new Error("Reading out of bounds");this._resizeIfNeeded(t)}let o=!1,i="";for(;!o;){let t=Math.floor(e/Fe),n=e%Fe;if(void 0===a.o.data[t])throw new Error("ERROR");let l=Math.min(2048,a.o.data[t].length-n);const c=new Uint8Array(a.o.data[t].buffer,n,l);let s=c.findIndex((t=>0===t));o=-1!==s,o?(i+=(new TextDecoder).decode(c.slice(0,s)),a.pos=t*Fe+n+s+1):(i+=(new TextDecoder).decode(c),a.pos=t*Fe+n+c.length),e=a.pos}return i}}const Se=1024,Pe=512,qe=2,Oe=0,Ge=65536,ze=8192;async function Te(t,a,e){if("string"==typeof t&&(t={type:"file",fileName:t,cacheSize:a||Ge,pageSize:e||ze}),"file"==t.type)return await me(t.fileName,Se|Pe|qe,t.cacheSize,t.pageSize);if("mem"==t.type)return function(t){const a=t.initialSize||1<<20,e=new Ce;return e.o=t,e.o.data=new Uint8Array(a),e.allocSize=a,e.totalSize=0,e.readOnly=!1,e.pos=0,e}(t);if("bigMem"==t.type)return function(t){const a=t.initialSize||0,e=new ve;e.o=t;const o=a?Math.floor((a-1)/Fe)+1:0;e.o.data=[];for(let t=0;te)throw new Error("Version not supported");const s=await n.readULE32();let r=[];for(let t=0;t1)throw new Error(t.fileName+": Section Duplicated "+e);t.pos=a[e][0].p,t.readingSection=a[e][0]}async function De(t,a){if(void 0===t.readingSection)throw new Error("Not reading a section");if(!a&&t.pos-t.readingSection.p!=t.readingSection.size)throw new Error("Invalid section size reading");delete t.readingSection}async function $e(t,a,e,o){const i=new Uint8Array(e);fe.toRprLE(i,0,a,e),await t.write(i,o)}async function je(t,a,e){const o=await t.read(a,e);return fe.fromRprLE(o,0,a)}async function Ve(t,a,e,o,i){void 0===i&&(i=a[o][0].size);const n=t.pageSize;await Ne(t,a,o),await ke(e,o);for(let a=0;aa[e][0].size)throw new Error("Reading out of the range of the section");let n;return n=i<1<<30?new Uint8Array(i):new qa(i),await t.readToBuffer(n,0,i,a[e][0].p+o),n}async function He(t,a,e,o,i){const n=16*t.pageSize;if(await Ne(t,a,i),await Ne(e,o,i),a[i][0].size!=o[i][0].size)return!1;const l=a[i][0].size;for(let a=0;a=0)a=await _e();else{if(!(["BLS12381"].indexOf(e)>=0))throw new Error(`Curve not supported: ${t}`);a=await ge()}return a}var ao={exports:{}},eo=function t(a,e){if(!a){var o=new oo(e);throw Error.captureStackTrace&&Error.captureStackTrace(o,t),o}};class oo extends Error{}oo.prototype.name="AssertionError";var io={exports:{}};function no(t){return t.length}var lo={byteLength:no,toString:function(t){const a=t.byteLength;let e="";for(let o=0;o1&&61===t.charCodeAt(a-1)&&a--,3*a>>>2}so[45]=62,so[95]=63;var uo={byteLength:ro,toString:function(t){const a=t.byteLength;let e="";for(let o=0;o>2]+co[(3&t[o])<<4|t[o+1]>>4]+co[(15&t[o+1])<<2|t[o+2]>>6]+co[63&t[o+2]];return a%3==2?e=e.substring(0,e.length-1)+"=":a%3==1&&(e=e.substring(0,e.length-2)+"=="),e},write:function(t,a,e=0,o=ro(a)){const i=Math.min(o,t.byteLength-e);for(let e=0,o=0;o>4,t[o++]=(15&n)<<4|l>>2,t[o++]=(3&l)<<6|63&c}return i}};function _o(t){return t.length>>>1}var go={byteLength:_o,toString:function(t){const a=t.byteLength;t=new DataView(t.buffer,t.byteOffset,a);let e="",o=0;for(let i=a-a%4;o=48&&t<=57?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:void 0}function ho(t){let a=0;for(let e=0,o=t.length;e=55296&&i<=56319&&e+1=56320&&o<=57343){a+=4,e++;continue}}a+=i<=127?1:i<=2047?2:3}return a}let po,mo;if("undefined"!=typeof TextDecoder){const t=new TextDecoder;po=function(a){return t.decode(a)}}else po=function(t){const a=t.byteLength;let e="",o=0;for(;o0){let a=0;for(;a>o,o-=6;o>=0;)t[l++]=128|e>>o&63,o-=6;n+=e>=65536?2:1}return i};var Lo={byteLength:ho,toString:po,write:mo};function bo(t){return 2*t.length}var wo,yo,Ao={byteLength:bo,toString:function(t){const a=t.byteLength;let e="";for(let o=0;o>8,l=i%256;t[e+2*o]=l,t[e+2*o+1]=n}return i}};!function(t,a){const e=lo,o=uo,i=go,n=Lo,l=Ao,c=255===new Uint8Array(Uint16Array.of(255).buffer)[0];function s(t){switch(t){case"ascii":return e;case"base64":return o;case"hex":return i;case"utf8":case"utf-8":case void 0:return n;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l;default:throw new Error(`Unknown encoding: ${t}`)}}function r(t){return t instanceof Uint8Array}function d(t,a,e){return"string"==typeof t?function(t,a){const e=s(a),o=new Uint8Array(e.byteLength(t));return e.write(o,t,0,o.byteLength),o}(t,a):Array.isArray(t)?function(t){const a=new Uint8Array(t.length);return a.set(t),a}(t):ArrayBuffer.isView(t)?function(t){const a=new Uint8Array(t.byteLength);return a.set(t),a}(t):function(t,a,e){return new Uint8Array(t,a,e)}(t,a,e)}function u(t,a,e,o,i){if(0===t.byteLength)return-1;if("string"==typeof e?(o=e,e=0):void 0===e?e=i?0:t.length-1:e<0&&(e+=t.byteLength),e>=t.byteLength){if(i)return-1;e=t.byteLength-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof a)a=d(a,o);else if("number"==typeof a)return a&=255,i?t.indexOf(a,e):t.lastIndexOf(a,e);if(0===a.byteLength)return-1;if(i){let o=-1;for(let i=e;it.byteLength&&(e=t.byteLength-a.byteLength);for(let o=e;o>=0;o--){let e=!0;for(let i=0;ii)return 1}return t.byteLength>a.byteLength?1:t.byteLengtht+a.byteLength),0));const e=new Uint8Array(a);return t.reduce(((t,a)=>(e.set(a,t),t+a.byteLength)),0),e},copy:function(t,a,e=0,o=0,i=t.byteLength){if(i>0&&i=t.byteLength)throw new RangeError("sourceStart is out of range");if(i<0)throw new RangeError("sourceEnd is out of range");e>=a.byteLength&&(e=a.byteLength),i>t.byteLength&&(i=t.byteLength),a.byteLength-e=i||o<=e?"":(e<0&&(e=0),o>i&&(o=i),(0!==e||o{for(var t=new Uint8Array(128),a=0;a<64;a++)t[a<26?a+65:a<52?a+71:a<62?a-4:4*a-205]=a;return a=>{for(var e=a.length,o=new Uint8Array(3*(e-("="==a[e-1])-("="==a[e-2]))/4|0),i=0,n=0;i>4,o[n++]=c<<4|s>>2,o[n++]=s<<6|r}return o}})(),a=((t,a)=>function(){return a||(0,t[Object.keys(t)[0]])((a={exports:{}}).exports,a),a.exports})({"wasm-binary:./blake2b.wat"(a,e){e.exports=t("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK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ACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}}),e=a(),o=WebAssembly.compile(e);return wo=async t=>(await WebAssembly.instantiate(await o,t)).exports}()().then((t=>{xo=t})),Bo=64,Eo=[];ao.exports=zo;var vo=ao.exports.BYTES_MIN=16,So=ao.exports.BYTES_MAX=64;ao.exports.BYTES=32;var Po=ao.exports.KEYBYTES_MIN=16,qo=ao.exports.KEYBYTES_MAX=64;ao.exports.KEYBYTES=32;var Oo=ao.exports.SALTBYTES=16,Go=ao.exports.PERSONALBYTES=16;function zo(t,a,e,o,i){if(!(this instanceof zo))return new zo(t,a,e,o,i);if(!xo)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");t||(t=32),!0!==i&&(Co(t>=vo,"digestLength must be at least "+vo+", was given "+t),Co(t<=So,"digestLength must be at most "+So+", was given "+t),null!=a&&(Co(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),Co(a.length>=Po,"key must be at least "+Po+", was given "+a.length),Co(a.length<=qo,"key must be at least "+qo+", was given "+a.length)),null!=e&&(Co(e instanceof Uint8Array,"salt must be Uint8Array or Buffer"),Co(e.length===Oo,"salt must be exactly "+Oo+", was given "+e.length)),null!=o&&(Co(o instanceof Uint8Array,"personal must be Uint8Array or Buffer"),Co(o.length===Go,"personal must be exactly "+Go+", was given "+o.length))),Eo.length||(Eo.push(Bo),Bo+=216),this.digestLength=t,this.finalized=!1,this.pointer=Eo.pop(),this._memory=new Uint8Array(xo.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=a?a.length:0,this._memory[2]=1,this._memory[3]=1,e&&this._memory.set(e,32),o&&this._memory.set(o,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),xo.blake2b_init(this.pointer,this.digestLength),a&&(this.update(a),this._memory.fill(0,Bo,Bo+a.length),this._memory[this.pointer+200]=128)}function To(){}function Mo(t){return(0!=(4294901760&t)?(t&=4294901760,16):0)|(0!=(4278255360&t)?(t&=4278255360,8):0)|(0!=(4042322160&t)?(t&=4042322160,4):0)|(0!=(3435973836&t)?(t&=3435973836,2):0)|0!=(2863311530&t)}function Uo(t,a){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);let o="";for(let t=0;t<4;t++){t>0&&(o+="\n"),o+="\t\t";for(let a=0;a<4;a++)a>0&&(o+=" "),o+=e.getUint32(16*t+4*a).toString(16).padStart(8,"0")}return a&&(o=a+"\n"+o),o}function Qo(t,a){if(t.byteLength!=a.byteLength)return!1;for(var e=new Int8Array(t),o=new Int8Array(a),i=0;i!=t.byteLength;i++)if(e[i]!=o[i])return!1;return!0}function ko(t){const a=t.getPartialHash(),e=ao.exports(64);return e.setPartialHash(a),e}async function Ro(t,a,e,o,i){if(t.G1.isZero(a))return!1;if(t.G1.isZero(e))return!1;if(t.G2.isZero(o))return!1;if(t.G2.isZero(i))return!1;return await t.pairingEq(a,i,t.G1.neg(e),o)}function No(t){let a=new Uint8Array(t);return void 0!==globalThis.crypto?globalThis.crypto.getRandomValues(a):U.randomFillSync(a),a}async function Do(t){if(void 0!==globalThis.crypto&&void 0!==globalThis.crypto.subtle){const a=await globalThis.crypto.subtle.digest("SHA-256",t.buffer);return new Uint8Array(a)}return U.createHash("sha256").update(t).digest()}function $o(t,a){return new DataView(t.buffer).getUint32(a,!1)}async function jo(t){for(;!t;)t=await window.prompt("Enter a random text. (Entropy): ","");const a=ao.exports(64);a.update(No(64));const e=new TextEncoder;a.update(e.encode(t));const o=a.digest(),i=[];for(let t=0;t<8;t++)i[t]=$o(o,4*t);return new M(i)}async function Vo(t,a){let e,o;a<32?(e=1<>>0,o=1):(e=4294967296,o=1<>>0);let i=t;for(let t=0;t{e[o]=Zo(t,a[o])})),e}return"bigint"==typeof a||void 0!==a.eq?a.toString(10):a}zo.prototype._realloc=function(t){xo.memory.grow(Math.max(0,Math.ceil(Math.abs(t-this._memory.length)/65536))),this._memory=new Uint8Array(xo.memory.buffer)},zo.prototype.update=function(t){return Co(!1===this.finalized,"Hash instance finalized"),Co(t instanceof Uint8Array,"input must be Uint8Array or Buffer"),Bo+t.length>this._memory.length&&this._realloc(Bo+t.length),this._memory.set(t,Bo),xo.blake2b_update(this.pointer,Bo,Bo+t.length),this},zo.prototype.digest=function(t){if(Co(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,Eo.push(this.pointer),xo.blake2b_final(this.pointer),!t||"binary"===t)return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("string"==typeof t)return Fo.toString(this._memory,t,this.pointer+128,this.pointer+128+this.digestLength);Co(t instanceof Uint8Array&&t.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var a=0;at()),t):t(new Error("WebAssembly not supported"))},zo.prototype.ready=zo.ready,zo.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)},zo.prototype.setPartialHash=function(t){this._memory.set(t,this.pointer)};const Wo=1,Yo=1,Jo=2,Xo=10,ti=3,ai=17,ei=2,oi=3,ii=4,ni=5,li=6,ci=7,si=8,ri=9,di=10,ui=11,_i=12,gi=13,fi=14,hi=15,pi=16,mi=17;async function Li(t,a){await ke(t,1),await t.writeULE32(1),await Re(t);const e=await Xe(a.q);await ke(t,2);const o=e.q,i=8*(Math.floor((fe.bitLength(o)-1)/64)+1),n=e.r,l=8*(Math.floor((fe.bitLength(n)-1)/64)+1);await t.writeULE32(i),await $e(t,o,i),await t.writeULE32(l),await $e(t,n,l),await t.writeULE32(a.nVars),await t.writeULE32(a.nPublic),await t.writeULE32(a.domainSize),await bi(t,e,a.vk_alpha_1),await bi(t,e,a.vk_beta_1),await wi(t,e,a.vk_beta_2),await wi(t,e,a.vk_gamma_2),await bi(t,e,a.vk_delta_1),await wi(t,e,a.vk_delta_2),await Re(t)}async function bi(t,a,e){const o=new Uint8Array(2*a.G1.F.n8);a.G1.toRprLEM(o,0,e),await t.write(o)}async function wi(t,a,e){const o=new Uint8Array(2*a.G2.F.n8);a.G2.toRprLEM(o,0,e),await t.write(o)}async function yi(t,a,e){const o=await t.read(2*a.G1.F.n8),i=a.G1.fromRprLEM(o,0);return e?a.G1.toObject(i):i}async function Ai(t,a,e){const o=await t.read(2*a.G2.F.n8),i=a.G2.fromRprLEM(o,0);return e?a.G2.toObject(i):i}async function Ci(t,a,e){await Ne(t,a,1);const o=await t.readULE32();if(await De(t),o===Yo)return await async function(t,a,e){const o={protocol:"groth16"};await Ne(t,a,2);const i=await t.readULE32();o.n8q=i,o.q=await je(t,i);const n=await t.readULE32();return o.n8r=n,o.r=await je(t,n),o.curve=await Xe(o.q),o.nVars=await t.readULE32(),o.nPublic=await t.readULE32(),o.domainSize=await t.readULE32(),o.power=Mo(o.domainSize),o.vk_alpha_1=await yi(t,o.curve,e),o.vk_beta_1=await yi(t,o.curve,e),o.vk_beta_2=await Ai(t,o.curve,e),o.vk_gamma_2=await Ai(t,o.curve,e),o.vk_delta_1=await yi(t,o.curve,e),o.vk_delta_2=await Ai(t,o.curve,e),await De(t),o}(t,a,e);if(o===Jo)return await async function(t,a,e){const o={protocol:"plonk"};await Ne(t,a,2);const i=await t.readULE32();o.n8q=i,o.q=await je(t,i);const n=await t.readULE32();return o.n8r=n,o.r=await je(t,n),o.curve=await Xe(o.q),o.nVars=await t.readULE32(),o.nPublic=await t.readULE32(),o.domainSize=await t.readULE32(),o.power=Mo(o.domainSize),o.nAdditions=await t.readULE32(),o.nConstraints=await t.readULE32(),o.k1=await t.read(n),o.k2=await t.read(n),o.Qm=await yi(t,o.curve,e),o.Ql=await yi(t,o.curve,e),o.Qr=await yi(t,o.curve,e),o.Qo=await yi(t,o.curve,e),o.Qc=await yi(t,o.curve,e),o.S1=await yi(t,o.curve,e),o.S2=await yi(t,o.curve,e),o.S3=await yi(t,o.curve,e),o.X_2=await Ai(t,o.curve,e),await De(t),o}(t,a,e);if(o===Xo)return await async function(t,a,e){const o={protocol:"fflonk"};o.protocolId=Xo,await Ne(t,a,ei);const i=await t.readULE32();o.n8q=i,o.q=await je(t,i),o.curve=await Xe(o.q);const n=await t.readULE32();return o.n8r=n,o.r=await je(t,n),o.nVars=await t.readULE32(),o.nPublic=await t.readULE32(),o.domainSize=await t.readULE32(),o.power=Mo(o.domainSize),o.nAdditions=await t.readULE32(),o.nConstraints=await t.readULE32(),o.k1=await t.read(n),o.k2=await t.read(n),o.w3=await t.read(n),o.w4=await t.read(n),o.w8=await t.read(n),o.wr=await t.read(n),o.X_2=await Ai(t,o.curve,e),o.C0=await yi(t,o.curve,e),await De(t),o}(t,a,e);throw new Error("Protocol not supported: ")}async function Fi(t,a,e){const o={delta:{}};o.deltaAfter=await yi(t,a,e),o.delta.g1_s=await yi(t,a,e),o.delta.g1_sx=await yi(t,a,e),o.delta.g2_spx=await Ai(t,a,e),o.transcript=await t.read(64),o.type=await t.readULE32();const i=await t.readULE32(),n=t.pos;let l=0;for(;t.pos-n0){const a=new Uint8Array(o);await t.writeULE32(a.byteLength),await t.write(a)}else await t.writeULE32(0)}async function Bi(t,a,e){await ke(t,10),await t.write(e.csHash),await t.writeULE32(e.contributions.length);for(let o=0;o0;)e.unshift(0),n--;return e}const Ti=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function Mi(t,a){return a&&10!=a?16==a?"0x"==t.slice(0,2)?BigInt(t):BigInt("0x"+t):void 0:BigInt(t)}const Ui=Mi;function Qi(t){const a=t.toString(16);return 4*(a.length-1)+Ti[parseInt(a[0],16)]}function ki(t){return!t}function Ri(t,a){return BigInt(t)<>BigInt(a)}const Di=Ri,$i=Ni;function ji(t){return(BigInt(t)&BigInt(1))==BigInt(1)}function Vi(t){let a=BigInt(t);const e=[];for(;a;)a&BigInt(1)?e.push(1):e.push(0),a>>=BigInt(1);return e}function Ki(t){if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(t)}function Hi(t,a){return BigInt(t)-BigInt(a)}function Zi(t,a){return BigInt(t)**BigInt(a)}function Wi(t,a){return BigInt(t)/BigInt(a)}function Yi(t,a){return BigInt(t)%BigInt(a)}function Ji(t,a){return BigInt(t)==BigInt(a)}function Xi(t,a){return BigInt(t)&BigInt(a)}function tn(t,a,e,o){const i="0000000"+e.toString(16),n=new Uint32Array(t.buffer,a,o/4),l=1+(4*(i.length-7)-1>>5);for(let t=0;t>5);for(let t=0;ti[i.length-a-1]=t.toString(16).padStart(8,"0"))),Mi(i.join(""),16)}function on(t,a,e){e=e||t.byteLength,a=a||0;const o=new DataView(t.buffer,t.byteOffset+a,e),i=new Array(e/4);for(let t=0;t>=BigInt(1)}return e},bits:Vi,toNumber:Ki,toArray:function(t,a){const e=[];let o=BigInt(t);for(a=BigInt(a);o;)e.unshift(Number(o%a)),o/=a;return e},add:function(t,a){return BigInt(t)+BigInt(a)},sub:Hi,neg:function(t){return-BigInt(t)},mul:function(t,a){return BigInt(t)*BigInt(a)},square:function(t){return BigInt(t)*BigInt(t)},pow:Zi,exp:function(t,a){return BigInt(t)**BigInt(a)},abs:function(t){return BigInt(t)>=0?BigInt(t):-BigInt(t)},div:Wi,mod:Yi,eq:Ji,neq:function(t,a){return BigInt(t)!=BigInt(a)},lt:function(t,a){return BigInt(t)BigInt(a)},leq:function(t,a){return BigInt(t)<=BigInt(a)},geq:function(t,a){return BigInt(t)>=BigInt(a)},band:Xi,bor:function(t,a){return BigInt(t)|BigInt(a)},bxor:function(t,a){return BigInt(t)^BigInt(a)},land:function(t,a){return BigInt(t)&&BigInt(a)},lor:function(t,a){return BigInt(t)||BigInt(a)},lnot:function(t){return!BigInt(t)},toRprLE:tn,toRprBE:an,fromRprLE:en,fromRprBE:on,toString:function(t,a){return t.toString(a)},toLEBuff:function(t){const a=new Uint8Array(Math.floor((Qi(t)-1)/8)+1);return tn(a,0,t,a.byteLength),a},zero:nn,one:ln});function sn(t,a,e){if(ki(e))return t.one;const o=Vi(e);if(0==o.length)return t.one;let i=a;for(let e=o.length-2;e>=0;e--)i=t.square(i),o[e]&&(i=t.mul(i,a));return i}function rn(t){if(t.m%2==1)if(Ji(Yi(t.p,4),1))if(Ji(Yi(t.p,8),1))if(Ji(Yi(t.p,16),1))!function(t){t.sqrt_q=Zi(t.p,t.m),t.sqrt_s=0,t.sqrt_t=Hi(t.sqrt_q,1);for(;!ji(t.sqrt_t);)t.sqrt_s=t.sqrt_s+1,t.sqrt_t=Wi(t.sqrt_t,2);let a=t.one;for(;t.eq(a,t.one);){const e=t.random();t.sqrt_z=t.pow(e,t.sqrt_t),a=t.pow(t.sqrt_z,2**(t.sqrt_s-1))}t.sqrt_tm1d2=Wi(Hi(t.sqrt_t,1),2),t.sqrt=function(t){const a=this;if(a.isZero(t))return a.zero;let e=a.pow(t,a.sqrt_tm1d2);const o=a.pow(a.mul(a.square(e),t),2**(a.sqrt_s-1));if(a.eq(o,a.negone))return null;let i=a.sqrt_s,n=a.mul(t,e),l=a.mul(n,e),c=a.sqrt_z;for(;!a.eq(l,a.one);){let t=a.square(l),o=1;for(;!a.eq(t,a.one);)t=a.square(t),o++;e=c;for(let t=0;t>>0;return a}class un{constructor(t,a,e){this.F=a,this.G=t,this.opMulGF=e;let o=a.sqrt_t||a.t,i=a.sqrt_s||a.s,n=a.one;for(;a.eq(a.pow(n,a.half),a.one);)n=a.add(n,a.one);this.w=new Array(i+1),this.wi=new Array(i+1),this.w[i]=this.F.pow(n,o),this.wi[i]=this.F.inv(this.w[i]);let l=i-1;for(;l>=0;)this.w[l]=this.F.square(this.w[l+1]),this.wi[l]=this.F.square(this.wi[l+1]),l--;this.roots=[],this._setRoots(Math.min(i,15))}_setRoots(t){for(let a=t;a>=0&&!this.roots[a];a--){let t=this.F.one;const e=1<>1,c=gn(t,a,e-1,o,2*i),s=gn(t,a,e-1,o+i,2*i),r=new Array(n);for(let a=0;a>this.one,this.bitLength=Qi(this.p),this.mask=(this.one<>this.one;this.nqr=this.two;let e=this.pow(this.nqr,a);for(;!this.eq(e,this.negone);)this.nqr=this.nqr+this.one,e=this.pow(this.nqr,a);for(this.s=0,this.t=this.negone;(this.t&this.one)==this.zero;)this.s=this.s+1,this.t=this.t>>this.one;this.nqr_to_t=this.pow(this.nqr,this.t),rn(this),this.FFT=new un(this,this,this.mul.bind(this)),this.fft=this.FFT.fft.bind(this.FFT),this.ifft=this.FFT.ifft.bind(this.FFT),this.w=this.FFT.w,this.wi=this.FFT.wi,this.shift=this.square(this.nqr),this.k=this.exp(this.nqr,2**this.s)}e(t,a){let e;if(a?16==a&&(e=BigInt("0x"+t)):e=BigInt(t),e<0){let t=-e;return t>=this.p&&(t%=this.p),this.p-t}return e>=this.p?e%this.p:e}add(t,a){const e=t+a;return e>=this.p?e-this.p:e}sub(t,a){return t>=a?t-a:this.p-a+t}neg(t){return t?this.p-t:t}mul(t,a){return t*a%this.p}mulScalar(t,a){return t*this.e(a)%this.p}square(t){return t*t%this.p}eq(t,a){return t==a}neq(t,a){return t!=a}lt(t,a){return(t>this.half?t-this.p:t)<(a>this.half?a-this.p:a)}gt(t,a){return(t>this.half?t-this.p:t)>(a>this.half?a-this.p:a)}leq(t,a){return(t>this.half?t-this.p:t)<=(a>this.half?a-this.p:a)}geq(t,a){return(t>this.half?t-this.p:t)>=(a>this.half?a-this.p:a)}div(t,a){return this.mul(t,this.inv(a))}idiv(t,a){if(!a)throw new Error("Division by zero");return t/a}inv(t){if(!t)throw new Error("Division by zero");let a=this.zero,e=this.p,o=this.one,i=t%this.p;for(;i;){let t=e/i;[a,o]=[o,a-t*o],[e,i]=[i,e-t*i]}return a=this.p?e-this.p:e}bor(t,a){const e=(t|a)&this.mask;return e>=this.p?e-this.p:e}bxor(t,a){const e=(t^a)&this.mask;return e>=this.p?e-this.p:e}bnot(t){const a=t^this.mask;return a>=this.p?a-this.p:a}shl(t,a){if(Number(a)=this.p?e-this.p:e}{const e=this.p-a;return Number(e)>e:this.zero}}shr(t,a){if(Number(a)>a;{const e=this.p-a;if(Number(e)=this.p?a-this.p:a}return 0}}land(t,a){return t&&a?this.one:this.zero}lor(t,a){return t||a?this.one:this.zero}lnot(t){return t?this.zero:this.one}sqrt_old(t){if(t==this.zero)return this.zero;if(this.pow(t,this.negone>>this.one)!=this.one)return null;let a=this.s,e=this.nqr_to_t,o=this.pow(t,this.t),i=this.pow(t,this.add(this.t,this.one)>>this.one);for(;o!=this.one;){let t=this.square(o),n=1;for(;t!=this.one;)n++,t=this.square(t);let l=e;for(let t=0;tthis.p>>this.one&&(i=this.neg(i)),i}normalize(t,a){if((t=BigInt(t,a))<0){let a=-t;return a>=this.p&&(a%=this.p),this.p-a}return t>=this.p?t%this.p:t}random(){const t=2*this.bitLength/8;let a=this.zero;for(let e=0;ethis.half&&10==a){e="-"+(this.p-t).toString(a)}else e=t.toString(a);return e}isZero(t){return t==this.zero}fromRng(t){let a;do{a=this.zero;for(let e=0;e=this.p);return a=a*this.Ri%this.p,a}fft(t){return this.FFT.fft(t)}ifft(t){return this.FFT.ifft(t)}toRprLE(t,a,e){tn(t,a,e,8*this.n64)}toRprBE(t,a,e){an(t,a,e,8*this.n64)}toRprBEM(t,a,e){return this.toRprBE(t,a,this.mul(this.R,e))}toRprLEM(t,a,e){return this.toRprLE(t,a,this.mul(this.R,e))}fromRprLE(t,a){return en(t,a,this.n8)}fromRprBE(t,a){return on(t,a,this.n8)}fromRprLEM(t,a){return this.mul(this.fromRprLE(t,a),this.Ri)}fromRprBEM(t,a){return this.mul(this.fromRprBE(t,a),this.Ri)}toObject(t){return t}}!function(t){globalThis.btoa(t)}("("+function(t){const a=32767;let e,o;async function i(t){const i=new Uint8Array(t.code),n=await WebAssembly.compile(i);o=new WebAssembly.Memory({initial:t.init,maximum:a}),e=await WebAssembly.instantiate(n,{env:{memory:o}})}function n(t){const e=new Uint32Array(o.buffer,0,1);for(;3&e[0];)e[0]++;const i=e[0];if(e[0]+=t,e[0]+t>o.buffer.byteLength){const i=o.buffer.byteLength/65536;let n=Math.floor((e[0]+t)/65536)+1;n>a&&(n=a),o.grow(n-i)}return i}function l(t){const a=n(t.byteLength);return s(a,t),a}function c(t,a){const e=new Uint8Array(o.buffer);return new Uint8Array(e.buffer,e.byteOffset+t,a)}function s(t,a){new Uint8Array(o.buffer).set(new Uint8Array(a),t)}function r(t){if("INIT"==t[0].cmd)return i(t[0]);const a={vars:[],out:[]},r=new Uint32Array(o.buffer,0,1)[0];for(let o=0;o=2&&(d>=1||u>=7)){""!==s&&(s+=" ");const t=hn.fromArray(a,4294967296).toString();s+=t}else console.log(hn.fromArray(a,4294967296))},error:function(t,e,o,i,n,c){let s;throw s=7==t?h(e)+" "+l.getFr(i).toString()+" != "+l.getFr(n).toString()+" "+h(c):9==t?h(e)+" "+l.getFr(i).toString()+" "+h(n):5==t&&a.sym?h(e)+" "+a.sym.labelIdx2Name[n]:h(e)+" "+o+" "+i+" "+n+" "+c,console.log("ERROR: ",t,s),new Error(s)},log:function(t){console.log(l.getFr(t).toString())},logGetSignal:function(t,e){a.logGetSignal&&a.logGetSignal(t,l.getFr(e))},logSetSignal:function(t,e){a.logSetSignal&&a.logSetSignal(t,l.getFr(e))},logStartComponent:function(t){a.logStartComponent&&a.logStartComponent(t)},logFinishComponent:function(t){a.logFinishComponent&&a.logFinishComponent(t)}}});"function"==typeof _.exports.getVersion&&(r=_.exports.getVersion()),"function"==typeof _.exports.getMinorVersion&&(d=_.exports.getMinorVersion()),"function"==typeof _.exports.getPatchVersion&&(u=_.exports.getPatchVersion());const g=a&&(a.sanityCheck||a.logGetSignal||a.logSetSignal||a.logStartComponent||a.logFinishComponent);return l=2===r?new Ln(_,g):new mn(e,_,g),l;function f(){for(var t="",a=_.exports.getMessageChar();0!=a;)t+=String.fromCharCode(a),a=_.exports.getMessageChar();return t}function h(t){const a=new Uint8Array(e.buffer),o=[];for(let e=0;a[t+e]>0;e++)o.push(a[t+e]);return String.fromCharCode.apply(null,o)}}class mn{constructor(t,a,e){this.memory=t,this.i32=new Uint32Array(t.buffer),this.instance=a,this.n32=(this.instance.exports.getFrLen()>>2)-2;const o=this.instance.exports.getPRawPrime(),i=new Array(this.n32);for(let t=0;t>2)+t];this.prime=hn.fromArray(i,4294967296),this.Fr=new fn(this.prime),this.mask32=hn.fromString("FFFFFFFF",16),this.NVars=this.instance.exports.getNVars(),this.n64=Math.floor((this.Fr.bitLength-1)/64)+1,this.R=this.Fr.e(hn.shiftLeft(1,64*this.n64)),this.RInv=this.Fr.inv(this.R),this.sanityCheck=e}circom_version(){return 1}async _doCalculateWitness(t,a){this.instance.exports.init(this.sanityCheck||a?1:0);const e=this.allocInt(),o=this.allocFr();Object.keys(t).forEach((a=>{const i=Gi(a),n=parseInt(i.slice(0,8),16),l=parseInt(i.slice(8,16),16);try{this.instance.exports.getSignalOffset32(e,0,n,l)}catch(t){throw new Error(`Signal ${a} is not an input of the circuit.`)}const c=this.getInt(e),s=Oi(t[a]);for(let t=0;t>2]}setInt(t,a){this.i32[t>>2]=a}getFr(t){const a=this,e=t>>2;if(2147483648&a.i32[e+1]){const t=new Array(a.n32);for(let o=0;o>2]=i,void(e.i32[1+(t>>2)]=0)}e.i32[t>>2]=0,e.i32[1+(t>>2)]=2147483648;const n=hn.toArray(a,4294967296);for(let a=0;a>2)+a]=o>=0?n[o]:0}}}class Ln{constructor(t,a){this.instance=t,this.version=this.instance.exports.getVersion(),this.n32=this.instance.exports.getFieldNumLen32(),this.instance.exports.getRawPrime();const e=new Array(this.n32);for(let t=0;t{const e=Gi(a),i=parseInt(e.slice(0,8),16),n=parseInt(e.slice(8,16),16),l=Oi(t[a]);for(let t=0;t1)throw new Error(t.fileName+": File has more than one header");t.pos=a[1][0].p;const e=await t.readULE32(),o=await t.read(e),i=fe.fromRprLE(o),n=await Xe(i);if(8*n.F1.n64!=e)throw new Error(t.fileName+": Invalid size");const l=await t.readULE32(),c=await t.readULE32();if(t.pos-a[1][0].p!=a[1][0].size)throw new Error("Invalid PTau header size");return{curve:n,power:l,ceremonyPower:c}}function qn(t,a,e,o){const i={tau:{},alpha:{},beta:{}};return i.tau.g1_s=n(),i.tau.g1_sx=n(),i.alpha.g1_s=n(),i.alpha.g1_sx=n(),i.beta.g1_s=n(),i.beta.g1_sx=n(),i.tau.g2_spx=l(),i.alpha.g2_spx=l(),i.beta.g2_spx=l(),i;function n(){let i;return i=o?e.G1.fromRprLEM(t,a):e.G1.fromRprUncompressed(t,a),a+=2*e.G1.F.n8,i}function l(){let i;return i=o?e.G2.fromRprLEM(t,a):e.G2.fromRprUncompressed(t,a),a+=2*e.G2.F.n8,i}}function On(t,a,e,o,i){async function n(o){i?e.G1.toRprLEM(t,a,o):e.G1.toRprUncompressed(t,a,o),a+=2*e.F1.n8}async function l(o){i?e.G2.toRprLEM(t,a,o):e.G2.toRprUncompressed(t,a,o),a+=2*e.F2.n8}return n(o.tau.g1_s),n(o.tau.g1_sx),n(o.alpha.g1_s),n(o.alpha.g1_sx),n(o.beta.g1_s),n(o.beta.g1_sx),l(o.tau.g2_spx),l(o.alpha.g2_spx),l(o.beta.g2_spx),t}async function Gn(t,a){const e={};e.tauG1=await s(),e.tauG2=await r(),e.alphaG1=await s(),e.betaG1=await s(),e.betaG2=await r(),e.key=await async function(t,a,e){return qn(await t.read(2*a.F1.n8*6+2*a.F2.n8*3),0,a,e)}(t,a,!0),e.partialHash=await t.read(216),e.nextChallenge=await t.read(64),e.type=await t.readULE32();const o=new Uint8Array(2*a.G1.F.n8*6+2*a.G2.F.n8*3);On(o,0,a,e.key,!1);const i=ao.exports(64);i.setPartialHash(e.partialHash),i.update(o),e.responseHash=i.digest();const n=await t.readULE32(),l=t.pos;let c=0;for(;t.pos-l1)throw new Error(t.fileName+": File has more than one contributions section");t.pos=e[7][0].p;const o=await t.readULE32(),i=[];for(let e=0;e0){const a=new Uint8Array(n);await t.writeULE32(a.byteLength),await t.write(a)}else await t.writeULE32(0);async function l(e){a.G1.toRprLEM(o,0,e),await t.write(o)}async function c(e){a.G2.toRprLEM(i,0,e),await t.write(i)}}async function Mn(t,a,e){await t.writeULE32(7);const o=t.pos;await t.writeULE64(0),await t.writeULE32(e.length);for(let o=0;o0?u[u.length-1].nextChallenge:Un(r,d,n);const b=await Qe(e,"ptau",1,i?7:2);await Sn(b,r,d);const w=await m.read(64);if(Qo(l,L)&&(L=w,u[u.length-1].nextChallenge=L),!Qo(w,L))throw new Error("Wrong contribution. this contribution is not based on the previous hash");const y=new ao.exports(64);y.update(w);const A=[];let C;C=await I(m,b,"G1",2,2**d*2-1,[1],"tauG1"),_.tauG1=C[0],C=await I(m,b,"G2",3,2**d,[1],"tauG2"),_.tauG2=C[0],C=await I(m,b,"G1",4,2**d,[0],"alphaG1"),_.alphaG1=C[0],C=await I(m,b,"G1",5,2**d,[0],"betaG1"),_.betaG1=C[0],C=await I(m,b,"G2",6,1,[0],"betaG2"),_.betaG2=C[0],_.partialHash=y.getPartialHash();const F=await m.read(2*r.F1.n8*6+2*r.F2.n8*3);_.key=qn(F,0,r,!1),y.update(new Uint8Array(F));const x=y.digest();if(n&&n.info(Uo(x,"Contribution Response Hash imported: ")),i){const t=new ao.exports(64);t.update(x),await B(t,b,"G1",2,2**d*2-1,"tauG1",n),await B(t,b,"G2",3,2**d,"tauG2",n),await B(t,b,"G1",4,2**d,"alphaTauG1",n),await B(t,b,"G1",5,2**d,"betaTauG1",n),await B(t,b,"G2",6,1,"betaG2",n),_.nextChallenge=t.digest(),n&&n.info(Uo(_.nextChallenge,"Next Challenge Hash: "))}else _.nextChallenge=l;return u.push(_),await Mn(b,r,u),await m.close(),await b.close(),await c.close(),_.nextChallenge;async function I(t,a,e,o,l,c,s){return i?await async function(t,a,e,o,i,l,c){const s=r[e],d=s.F.n8,u=2*s.F.n8,_=[];await ke(a,o);const g=Math.floor((1<<24)/u);A[o]=a.pos;for(let e=0;e=e&&a=a&&i1?s[s.length-2]:r;const u=s[s.length-1];if(a&&a.debug("Validating contribution #"+s[s.length-1].id),!await Rn(n,u,d,a))return!1;const _=ao.exports(64);_.update(u.responseHash),a&&a.debug("Verifying powers in tau*G1 section");const g=await w(2,"G1","tauG1",2**l*2-1,[0,1],a);if(e=await kn(n,g.R1,g.R2,n.G2.g,u.tauG2),!0!==e)return a&&a.error("tauG1 section. Powers do not match"),!1;if(!n.G1.eq(n.G1.g,g.singularPoints[0]))return a&&a.error("First element of tau*G1 section must be the generator"),!1;if(!n.G1.eq(u.tauG1,g.singularPoints[1]))return a&&a.error("Second element of tau*G1 section does not match the one in the contribution section"),!1;a&&a.debug("Verifying powers in tau*G2 section");const f=await w(3,"G2","tauG2",2**l,[0,1],a);if(e=await kn(n,n.G1.g,u.tauG1,f.R1,f.R2),!0!==e)return a&&a.error("tauG2 section. Powers do not match"),!1;if(!n.G2.eq(n.G2.g,f.singularPoints[0]))return a&&a.error("First element of tau*G2 section must be the generator"),!1;if(!n.G2.eq(u.tauG2,f.singularPoints[1]))return a&&a.error("Second element of tau*G2 section does not match the one in the contribution section"),!1;a&&a.debug("Verifying powers in alpha*tau*G1 section");const h=await w(4,"G1","alphatauG1",2**l,[0],a);if(e=await kn(n,h.R1,h.R2,n.G2.g,u.tauG2),!0!==e)return a&&a.error("alphaTauG1 section. Powers do not match"),!1;if(!n.G1.eq(u.alphaG1,h.singularPoints[0]))return a&&a.error("First element of alpha*tau*G1 section (alpha*G1) does not match the one in the contribution section"),!1;a&&a.debug("Verifying powers in beta*tau*G1 section");const p=await w(5,"G1","betatauG1",2**l,[0],a);if(e=await kn(n,p.R1,p.R2,n.G2.g,u.tauG2),!0!==e)return a&&a.error("betaTauG1 section. Powers do not match"),!1;if(!n.G1.eq(u.betaG1,p.singularPoints[0]))return a&&a.error("First element of beta*tau*G1 section (beta*G1) does not match the one in the contribution section"),!1;const m=await async function(t){const a=n.G2,e=2*a.F.n8,l=new Uint8Array(e);if(!i[6])throw t.error("File has no BetaG2 section"),new Error("File has no BetaG2 section");if(i[6].length>1)throw t.error("File has no BetaG2 section"),new Error("File has more than one GetaG2 section");o.pos=i[6][0].p;const c=await o.read(e),s=a.fromRprLEM(c);return a.toRprUncompressed(l,0,s),_.update(l),s}(a);if(!n.G2.eq(u.betaG2,m))return a&&a.error("betaG2 element in betaG2 section does not match the one in the contribution section"),!1;const L=_.digest();if(l==c&&!Qo(L,u.nextChallenge))return a&&a.error("Hash of the values does not match the next challenge of the last contributor in the contributions section"),!1;a&&a.info(Uo(L,"Next challenge hash: ")),b(u,d);for(let t=s.length-2;t>=0;t--){const e=s[t],o=t>0?s[t-1]:r;if(!await Rn(n,e,o,a))return!1;b(e,o)}if(a&&a.info("-----------------------------------------------------"),i[12]&&i[13]&&i[14]&&i[15]){let t;if(t=await y("G1",2,12,"tauG1",a),!t)return!1;if(t=await y("G2",3,13,"tauG2",a),!t)return!1;if(t=await y("G1",4,14,"alphaTauG1",a),!t)return!1;if(t=await y("G1",5,15,"betaTauG1",a),!t)return!1}else a&&a.warn('this file does not contain phase2 precalculated values. Please run: \n snarkjs "powersoftau preparephase2" to prepare this file to be used in the phase2 ceremony.');return await o.close(),a&&a.info("Powers of Tau Ok!"),!0;function b(t,e){if(!a)return;a.info("-----------------------------------------------------"),a.info(`Contribution #${t.id}: ${t.name||""}`),a.info(Uo(t.nextChallenge,"Next Challenge: "));const o=new Uint8Array(2*n.G1.F.n8*6+2*n.G2.F.n8*3);On(o,0,n,t.key,!1);const i=ao.exports(64);i.setPartialHash(t.partialHash),i.update(o);const l=i.digest();a.info(Uo(l,"Response Hash:")),a.info(Uo(e.nextChallenge,"Response Hash:")),1==t.type&&(a.info(`Beacon generator: ${Ho(t.beaconHash)}`),a.info(`Beacon iterations Exp: ${t.numIterationsExp}`))}async function w(t,a,e,l,c,s){const r=n[a],d=2*r.F.n8;await Ne(o,i,t);const u=[];let g=r.zero,f=r.zero,h=r.zero;for(let t=0;t0){const t=r.fromRprLEM(i,0),a=$o(No(4),0);g=r.add(g,r.timesScalar(h,a)),f=r.add(f,r.timesScalar(t,a))}const m=await r.multiExpAffine(i.slice(0,(a-1)*d),p),L=await r.multiExpAffine(i.slice(d),p);g=r.add(g,m),f=r.add(f,L),h=r.fromRprLEM(i,(a-1)*d);for(let e=0;e=t&&o1;)r/=2,d+=1;if(2**d!=s)throw new Error("Invalid file size");i&&i.debug("Power to tau size: "+d);const u=await jo(o),_=await Te(e),g=ao.exports(64);for(let t=0;t{i.debug(a+".g1_s: "+t.G1.toString(p[a].g1_s,16)),i.debug(a+".g1_sx: "+t.G1.toString(p[a].g1_sx,16)),i.debug(a+".g2_sp: "+t.G2.toString(p[a].g2_sp,16)),i.debug(a+".g2_spx: "+t.G2.toString(p[a].g2_spx,16)),i.debug("")}));const m=ao.exports(64);await _.write(h),m.update(h),await Dn(n,_,m,t,"G1",2**d*2-1,t.Fr.one,p.tau.prvKey,"COMPRESSED","tauG1",i),await Dn(n,_,m,t,"G2",2**d,t.Fr.one,p.tau.prvKey,"COMPRESSED","tauG2",i),await Dn(n,_,m,t,"G1",2**d,p.alpha.prvKey,p.tau.prvKey,"COMPRESSED","alphaTauG1",i),await Dn(n,_,m,t,"G1",2**d,p.beta.prvKey,p.tau.prvKey,"COMPRESSED","betaTauG1",i),await Dn(n,_,m,t,"G2",1,p.beta.prvKey,p.tau.prvKey,"COMPRESSED","betaTauG2",i);const L=new Uint8Array(2*t.F1.n8*6+2*t.F2.n8*3);On(L,0,t,p,!1),await _.write(L),m.update(L);const b=m.digest();i&&i.info(Uo(b,"Contribution Response Hash: ")),await _.close(),await n.close()},beacon:async function(t,a,e,o,i,n){const l=Ko(o);if(0==l.byteLength||2*l.byteLength!=o.length)return n&&n.error("Invalid Beacon Hash. (It must be a valid hexadecimal sequence)"),!1;if(l.length>=256)return n&&n.error("Maximum length of beacon hash is 255 bytes"),!1;if((i=parseInt(i))<10||i>63)return n&&n.error("Invalid numIterationsExp. (Must be between 10 and 63)"),!1;await ao.exports.ready();const{fd:c,sections:s}=await Ue(t,"ptau",1),{curve:r,power:d,ceremonyPower:u}=await Pn(c,s);if(d!=u)return n&&n.error("This file has been reduced. You cannot contribute into a reduced file."),!1;s[12]&&n&&n.warn("Contributing into a file that has phase2 calculated. You will have to prepare phase2 again.");const _=await zn(c,r,s),g={name:e,type:1,numIterationsExp:i,beaconHash:l};let f;f=_.length>0?_[_.length-1].nextChallenge:Un(r,d,n),g.key=await Qn(r,f,l,i);const h=new ao.exports(64);h.update(f);const p=await Qe(a,"ptau",1,7);await Sn(p,r,d);const m=[];let L;L=await A(2,"G1",2**d*2-1,r.Fr.e(1),g.key.tau.prvKey,"tauG1",n),g.tauG1=L[1],L=await A(3,"G2",2**d,r.Fr.e(1),g.key.tau.prvKey,"tauG2",n),g.tauG2=L[1],L=await A(4,"G1",2**d,g.key.alpha.prvKey,g.key.tau.prvKey,"alphaTauG1",n),g.alphaG1=L[0],L=await A(5,"G1",2**d,g.key.beta.prvKey,g.key.tau.prvKey,"betaTauG1",n),g.betaG1=L[0],L=await A(6,"G2",1,g.key.beta.prvKey,g.key.tau.prvKey,"betaTauG2",n),g.betaG2=L[0],g.partialHash=h.getPartialHash();const b=new Uint8Array(2*r.F1.n8*6+2*r.F2.n8*3);On(b,0,r,g.key,!1),h.update(new Uint8Array(b));const w=h.digest();n&&n.info(Uo(w,"Contribution Response Hash imported: "));const y=new ao.exports(64);return y.update(w),await C(p,"G1",2,2**d*2-1,"tauG1",n),await C(p,"G2",3,2**d,"tauG2",n),await C(p,"G1",4,2**d,"alphaTauG1",n),await C(p,"G1",5,2**d,"betaTauG1",n),await C(p,"G2",6,1,"betaG2",n),g.nextChallenge=y.digest(),n&&n.info(Uo(g.nextChallenge,"Next Challenge Hash: ")),_.push(g),await Mn(p,r,_),await c.close(),await p.close(),w;async function A(t,a,e,o,i,n,l){const d=[];c.pos=s[t][0].p,await ke(p,t),m[t]=p.pos;const u=r[a],_=2*u.F.n8,g=Math.floor((1<<20)/_);let f=o;for(let t=0;t0?d[d.length-1].nextChallenge:Un(c,s,i),u.key=vn(c,_,g);const f=new ao.exports(64);f.update(_);const h=await Qe(a,"ptau",1,7);await Sn(h,c,s);const p=[];let m;m=await y(2,"G1",2**s*2-1,c.Fr.e(1),u.key.tau.prvKey,"tauG1"),u.tauG1=m[1],m=await y(3,"G2",2**s,c.Fr.e(1),u.key.tau.prvKey,"tauG2"),u.tauG2=m[1],m=await y(4,"G1",2**s,u.key.alpha.prvKey,u.key.tau.prvKey,"alphaTauG1"),u.alphaG1=m[0],m=await y(5,"G1",2**s,u.key.beta.prvKey,u.key.tau.prvKey,"betaTauG1"),u.betaG1=m[0],m=await y(6,"G2",1,u.key.beta.prvKey,u.key.tau.prvKey,"betaTauG2"),u.betaG2=m[0],u.partialHash=f.getPartialHash();const L=new Uint8Array(2*c.F1.n8*6+2*c.F2.n8*3);On(L,0,c,u.key,!1),f.update(new Uint8Array(L));const b=f.digest();i&&i.info(Uo(b,"Contribution Response Hash imported: "));const w=new ao.exports(64);return w.update(b),await A(h,"G1",2,2**s*2-1,"tauG1"),await A(h,"G2",3,2**s,"tauG2"),await A(h,"G1",4,2**s,"alphaTauG1"),await A(h,"G1",5,2**s,"betaTauG1"),await A(h,"G2",6,1,"betaG2"),u.nextChallenge=w.digest(),i&&i.info(Uo(u.nextChallenge,"Next Challenge Hash: ")),d.push(u),await Mn(h,c,d),await n.close(),await h.close(),b;async function y(t,a,e,o,s,r){const d=[];n.pos=l[t][0].p,await ke(h,t),p[t]=h.pos;const u=c[a],_=2*u.F.n8,g=Math.floor((1<<20)/_);let m=o;for(let t=0;t>BigInt(a)}function Yn(t){return(BigInt(t)&BigInt(1))==BigInt(1)}function Jn(t){if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(t)}function Xn(t,a){return BigInt(t)+BigInt(a)}function tl(t,a){return BigInt(t)-BigInt(a)}function al(t,a){return BigInt(t)**BigInt(a)}function el(t,a){return BigInt(t)/BigInt(a)}function ol(t,a){return BigInt(t)%BigInt(a)}function il(t,a){return BigInt(t)==BigInt(a)}function nl(t,a){return BigInt(t)>BigInt(a)}function ll(t,a){return BigInt(t)&BigInt(a)}function cl(t,a,e,o){const i="0000000"+e.toString(16),n=new Uint32Array(t.buffer,a,o/4),l=1+(4*(i.length-7)-1>>5);for(let t=0;ti[i.length-a-1]=t.toString(16).padStart(8,"0"))),Vn(i.join(""),16)}function rl(t,a){return t.toString(a)}function dl(t){const a=new Uint8Array(Math.floor((Hn(t)-1)/8)+1);return cl(a,0,t,a.byteLength),a}const ul=Kn(0),_l=Kn(1);function gl(t,a,e){if(!e)return t.one;const o=function(t){let a=BigInt(t);const e=[];for(;a;)a&BigInt(1)?e.push(1):e.push(0),a>>=BigInt(1);return e}(e);if(0==o.length)return t.one;let i=a;for(let e=o.length-2;e>=0;e--)i=t.square(i),o[e]&&(i=t.mul(i,a));return i}function fl(t){if(t.m%2==1)if(il(ol(t.p,4),1))if(il(ol(t.p,8),1))if(il(ol(t.p,16),1))!function(t){t.sqrt_q=al(t.p,t.m),t.sqrt_s=0,t.sqrt_t=tl(t.sqrt_q,1);for(;!Yn(t.sqrt_t);)t.sqrt_s=t.sqrt_s+1,t.sqrt_t=el(t.sqrt_t,2);let a=t.one;for(;t.eq(a,t.one);){const e=t.random();t.sqrt_z=t.pow(e,t.sqrt_t),a=t.pow(t.sqrt_z,2**(t.sqrt_s-1))}t.sqrt_tm1d2=el(tl(t.sqrt_t,1),2),t.sqrt=function(t){const a=this;if(a.isZero(t))return a.zero;let e=a.pow(t,a.sqrt_tm1d2);const o=a.pow(a.mul(a.square(e),t),2**(a.sqrt_s-1));if(a.eq(o,a.negone))return null;let i=a.sqrt_s,n=a.mul(t,e),l=a.mul(n,e),c=a.sqrt_z;for(;!a.eq(l,a.one);){let t=a.square(l),o=1;for(;!a.eq(t,a.one);)t=a.square(t),o++;e=c;for(let t=0;t>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<16|t[i]>>>16&65535)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<12|t[e]>>>20&4095)>>>0,t[a]=t[a]+t[e]>>>0,t[i]=(t[i]^t[a])>>>0,t[i]=(t[i]<<8|t[i]>>>24&255)>>>0,t[o]=t[o]+t[i]>>>0,t[e]=(t[e]^t[o])>>>0,t[e]=(t[e]<<7|t[e]>>>25&127)>>>0}class pl{constructor(t){t=t||[0,0,0,0,0,0,0,0],this.state=[1634760805,857760878,2036477234,1797285236,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],0,0,0,0],this.idx=16,this.buff=new Array(16)}nextU32(){return 16==this.idx&&this.update(),this.buff[this.idx++]}nextU64(){return Xn((t=this.nextU32(),a=4294967296,BigInt(t)*BigInt(a)),this.nextU32());var t,a}nextBool(){return 1==(1&this.nextU32())}update(){for(let t=0;t<16;t++)this.buff[t]=this.state[t];for(let a=0;a<10;a++)hl(t=this.buff,0,4,8,12),hl(t,1,5,9,13),hl(t,2,6,10,14),hl(t,3,7,11,15),hl(t,0,5,10,15),hl(t,1,6,11,12),hl(t,2,7,8,13),hl(t,3,4,9,14);var t;for(let t=0;t<16;t++)this.buff[t]=this.buff[t]+this.state[t]>>>0;this.idx=0,this.state[12]=this.state[12]+1>>>0,0==this.state[12]&&(this.state[13]=this.state[13]+1>>>0,0==this.state[13]&&(this.state[14]=this.state[14]+1>>>0,0==this.state[14]&&(this.state[15]=this.state[15]+1>>>0)))}}function ml(t){let a=new Uint8Array(t);if(void 0!==globalThis.crypto)globalThis.crypto.getRandomValues(a);else for(let e=0;e>>0;return a}let Ll=null;function bl(){return Ll||(Ll=new pl(function(){const t=ml(32),a=new Uint32Array(t.buffer),e=[];for(let t=0;t<8;t++)e.push(a[t]);return e}()),Ll)}class wl{constructor(t,a,e){this.F=a,this.G=t,this.opMulGF=e;let o=a.sqrt_t||a.t,i=a.sqrt_s||a.s,n=a.one;for(;a.eq(a.pow(n,a.half),a.one);)n=a.add(n,a.one);this.w=new Array(i+1),this.wi=new Array(i+1),this.w[i]=this.F.pow(n,o),this.wi[i]=this.F.inv(this.w[i]);let l=i-1;for(;l>=0;)this.w[l]=this.F.square(this.w[l+1]),this.wi[l]=this.F.square(this.wi[l+1]),l--;this.roots=[],this._setRoots(Math.min(i,15))}_setRoots(t){for(let a=t;a>=0&&!this.roots[a];a--){let t=this.F.one;const e=1<>1,c=Al(t,a,e-1,o,2*i),s=Al(t,a,e-1,o+i,2*i),r=new Array(n);for(let a=0;a>this.one,this.bitLength=Hn(this.p),this.mask=(this.one<>this.one;this.nqr=this.two;let e=this.pow(this.nqr,a);for(;!this.eq(e,this.negone);)this.nqr=this.nqr+this.one,e=this.pow(this.nqr,a);for(this.s=0,this.t=this.negone;(this.t&this.one)==this.zero;)this.s=this.s+1,this.t=this.t>>this.one;this.nqr_to_t=this.pow(this.nqr,this.t),fl(this),this.FFT=new wl(this,this,this.mul.bind(this)),this.fft=this.FFT.fft.bind(this.FFT),this.ifft=this.FFT.ifft.bind(this.FFT),this.w=this.FFT.w,this.wi=this.FFT.wi,this.shift=this.square(this.nqr),this.k=this.exp(this.nqr,2**this.s)}e(t,a){let e;if(a?16==a&&(e=BigInt("0x"+t)):e=BigInt(t),e<0){let t=-e;return t>=this.p&&(t%=this.p),this.p-t}return e>=this.p?e%this.p:e}add(t,a){const e=t+a;return e>=this.p?e-this.p:e}sub(t,a){return t>=a?t-a:this.p-a+t}neg(t){return t?this.p-t:t}mul(t,a){return t*a%this.p}mulScalar(t,a){return t*this.e(a)%this.p}square(t){return t*t%this.p}eq(t,a){return t==a}neq(t,a){return t!=a}lt(t,a){return(t>this.half?t-this.p:t)<(a>this.half?a-this.p:a)}gt(t,a){return(t>this.half?t-this.p:t)>(a>this.half?a-this.p:a)}leq(t,a){return(t>this.half?t-this.p:t)<=(a>this.half?a-this.p:a)}geq(t,a){return(t>this.half?t-this.p:t)>=(a>this.half?a-this.p:a)}div(t,a){return this.mul(t,this.inv(a))}idiv(t,a){if(!a)throw new Error("Division by zero");return t/a}inv(t){if(!t)throw new Error("Division by zero");let a=this.zero,e=this.p,o=this.one,i=t%this.p;for(;i;){let t=e/i;[a,o]=[o,a-t*o],[e,i]=[i,e-t*i]}return a=this.p?e-this.p:e}bor(t,a){const e=(t|a)&this.mask;return e>=this.p?e-this.p:e}bxor(t,a){const e=(t^a)&this.mask;return e>=this.p?e-this.p:e}bnot(t){const a=t^this.mask;return a>=this.p?a-this.p:a}shl(t,a){if(Number(a)=this.p?e-this.p:e}{const e=this.p-a;return Number(e)>e:this.zero}}shr(t,a){if(Number(a)>a;{const e=this.p-a;if(Number(e)=this.p?a-this.p:a}return 0}}land(t,a){return t&&a?this.one:this.zero}lor(t,a){return t||a?this.one:this.zero}lnot(t){return t?this.zero:this.one}sqrt_old(t){if(t==this.zero)return this.zero;if(this.pow(t,this.negone>>this.one)!=this.one)return null;let a=this.s,e=this.nqr_to_t,o=this.pow(t,this.t),i=this.pow(t,this.add(this.t,this.one)>>this.one);for(;o!=this.one;){let t=this.square(o),n=1;for(;t!=this.one;)n++,t=this.square(t);let l=e;for(let t=0;tthis.p>>this.one&&(i=this.neg(i)),i}normalize(t,a){if((t=BigInt(t,a))<0){let a=-t;return a>=this.p&&(a%=this.p),this.p-a}return t>=this.p?t%this.p:t}random(){const t=2*this.bitLength/8;let a=this.zero;for(let e=0;ethis.half&&10==a){e="-"+(this.p-t).toString(a)}else e=t.toString(a);return e}isZero(t){return t==this.zero}fromRng(t){let a;do{a=this.zero;for(let e=0;e=this.p);return a=a*this.Ri%this.p,a}fft(t){return this.FFT.fft(t)}ifft(t){return this.FFT.ifft(t)}toRprLE(t,a,e){cl(t,a,e,8*this.n64)}toRprBE(t,a,e){!function(t,a,e,o){const i="0000000"+e.toString(16),n=new DataView(t.buffer,t.byteOffset+a,o),l=1+(4*(i.length-7)-1>>5);for(let t=0;t>=8n;return e},bigInt2U32LE:function(t,a){const e=Array(a);let o=BigInt(t);for(let t=0;t>=32n;return e},isOcamNum:function(t){return!!Array.isArray(t)&&(3==t.length&&("number"==typeof t[0]&&("number"==typeof t[1]&&!!Array.isArray(t[2]))))}},xl=function(t,a,e,o,i,n,l){const c=t.addFunction(a);c.addParam("base","i32"),c.addParam("scalar","i32"),c.addParam("scalarLength","i32"),c.addParam("r","i32"),c.addLocal("i","i32"),c.addLocal("b","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(e));c.addCode(s.if(s.i32_eqz(s.getLocal("scalarLength")),[...s.call(l,s.getLocal("r")),...s.ret([])])),c.addCode(s.call(n,s.getLocal("base"),r)),c.addCode(s.call(l,s.getLocal("r"))),c.addCode(s.setLocal("i",s.getLocal("scalarLength"))),c.addCode(s.block(s.loop(s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.setLocal("b",s.i32_load8_u(s.i32_add(s.getLocal("scalar"),s.getLocal("i")))),...function(){const t=[];for(let a=0;a<8;a++)t.push(...s.call(i,s.getLocal("r"),s.getLocal("r")),...s.if(s.i32_ge_u(s.getLocal("b"),s.i32_const(128>>a)),[...s.setLocal("b",s.i32_sub(s.getLocal("b"),s.i32_const(128>>a))),...s.call(o,s.getLocal("r"),r,s.getLocal("r"))]));return t}(),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.br(0))))},Il=function(t,a){const e=8*t.modules[a].n64,o=t.addFunction(a+"_batchInverse");o.addParam("pIn","i32"),o.addParam("inStep","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addParam("outStep","i32"),o.addLocal("itAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(e));o.addCode(i.setLocal("itAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("itAux"),i.i32_mul(i.i32_add(i.getLocal("n"),i.i32_const(1)),i.i32_const(e))))),o.addCode(i.call(a+"_one",i.getLocal("itAux")),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux")),i.call(a+"_mul",i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),i.getLocal("itAux"))),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("itOut",i.i32_add(i.getLocal("pOut"),i.i32_mul(i.i32_sub(i.getLocal("n"),i.i32_const(1)),i.getLocal("outStep")))),i.call(a+"_inverse",i.getLocal("itAux"),i.getLocal("itAux")),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.if(i.call(a+"_isZero",i.getLocal("itIn")),[...i.call(a+"_copy",i.getLocal("itAux"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_zero",i.getLocal("itOut"))],[...i.call(a+"_copy",i.i32_sub(i.getLocal("itAux"),i.i32_const(e)),n),...i.call(a+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),...i.call(a+"_mul",i.getLocal("itAux"),n,i.getLocal("itOut"))]),i.setLocal("itIn",i.i32_sub(i.getLocal("itIn"),i.getLocal("inStep"))),i.setLocal("itOut",i.i32_sub(i.getLocal("itOut"),i.getLocal("outStep"))),i.setLocal("itAux",i.i32_sub(i.getLocal("itAux"),i.i32_const(e))),i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.br(0)))),o.addCode(i.i32_store(i.i32_const(0),i.getLocal("itAux")))};var Bl=function(t,a,e,o,i,n){void 0===n&&(n=oa?1:-1}function Pl(t){return t*t}function ql(t){return t%2n!==0n}function Ol(t){return t%2n===0n}function Gl(t){return t<0n}function zl(t){return t>0n}function Tl(t){return Gl(t)?t.toString(2).length-1:t.toString(2).length}function Ml(t){return t<0n?-t:t}function Ul(t){return 1n===Ml(t)}function Ql(t,a){for(var e,o,i,n=0n,l=1n,c=a,s=Ml(t);0n!==s;)e=c/s,o=n,i=c,n=l,c=s,l=o-e*l,s=i-e*s;if(!Ul(c))throw new Error(t.toString()+" and "+a.toString()+" are not co-prime");return-1===Sl(n,0n)&&(n+=a),Gl(t)?-n:n}function kl(t,a,e){if(0n===e)throw new Error("Cannot take modPow with modulus 0");var o=1n,i=t%e;for(Gl(a)&&(a*=-1n,i=Ql(i,e));zl(a);){if(0n===i)return 0n;ql(a)&&(o=o*i%e),a/=2n,i=Pl(i)%e}return o}function Rl(t,a){return 0n!==a&&(!!Ul(a)||(0===function(t,a){return(t=t>=0n?t:-t)===(a=a>=0n?a:-a)?0:t>a?1:-1}(a,2n)?Ol(t):t%a===0n))}function Nl(t,a){for(var e,o,i,n=function(t){return t-1n}(t),l=n,c=0;Ol(l);)l/=2n,c++;t:for(o=0;o>1&&o>1,t>>1)))),a.addCode(e.setLocal(s,e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(c,e.i64_add(e.i64_and(e.getLocal(c),e.i64_const(4294967295)),e.i64_and(e.getLocal(r),e.i64_const(4294967295))))),a.addCode(e.setLocal(s,e.i64_add(e.i64_add(e.getLocal(s),e.i64_shr_u(e.getLocal(c),e.i64_const(32))),e.getLocal(d))))),a.addCode(e.i64_store32(e.getLocal("r"),4*t,e.getLocal(c))),a.addCode(e.setLocal(r,e.getLocal(s)),e.setLocal(d,e.i64_shr_u(e.getLocal(r),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*i*2-4,e.getLocal(r)))}(),function(){const a=t.addFunction(o+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(o+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){!function(){const a=t.addFunction(o+"__mul1");a.addParam("px","i32"),a.addParam("y","i64"),a.addParam("pr","i32"),a.addLocal("c","i64");const e=a.getCodeBuilder();a.addCode(e.setLocal("c",e.i64_mul(e.i64_load32_u(e.getLocal("px"),0,0),e.getLocal("y")))),a.addCode(e.i64_store32(e.getLocal("pr"),0,0,e.getLocal("c")));for(let t=1;t>1n,p=t.alloc(c,$l.bigInt2BytesLE(h,c)),m=h+1n,L=t.alloc(c,$l.bigInt2BytesLE(m,c));t.modules[s]={pq:d,pR2:u,n64:n,q:i,pOne:_,pZero:g,pePlusOne:L};let b=2n;if(Jl(i))for(;Yl(b,h,i)!==f;)b+=1n;let w=0,y=f;for(;!Xl(y)&&0n!==y;)w++,y>>=1n;const A=t.alloc(c,$l.bigInt2BytesLE(y,c)),C=Yl(b,y,i),F=t.alloc($l.bigInt2BytesLE((C<>1n,I=t.alloc(c,$l.bigInt2BytesLE(x,c));return t.exportFunction(r+"_copy",s+"_copy"),t.exportFunction(r+"_zero",s+"_zero"),t.exportFunction(r+"_isZero",s+"_isZero"),t.exportFunction(r+"_eq",s+"_eq"),function(){const a=t.addFunction(s+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.ret(e.call(r+"_eq",e.getLocal("x"),e.i32_const(_))))}(),function(){const a=t.addFunction(s+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_add",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.if(e.call(r+"_sub",e.getLocal("x"),e.getLocal("y"),e.getLocal("r")),e.drop(e.call(r+"_add",e.getLocal("r"),e.i32_const(d),e.getLocal("r")))))}(),function(){const a=t.addFunction(s+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_sub",e.i32_const(g),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.alloc(l*l*8),e=t.addFunction(s+"_mReduct");e.addParam("t","i32"),e.addParam("r","i32"),e.addLocal("np32","i64"),e.addLocal("c","i64"),e.addLocal("m","i64");const o=e.getCodeBuilder(),n=Number(0x100000000n-Wl(i,0x100000000n));e.addCode(o.setLocal("np32",o.i64_const(n)));for(let t=0;t=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(f))),[f,h]=[h,f],a.addCode(e.setLocal(h,e.i64_shr_u(e.getLocal(f),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(f))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(h)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32"),a.addLocal("c0","i64"),a.addLocal("c1","i64"),a.addLocal("c0_old","i64"),a.addLocal("c1_old","i64"),a.addLocal("np32","i64");for(let t=0;t>1&&o>1,t>>1)))),a.addCode(e.setLocal(f,e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32)))))),t>0&&(a.addCode(e.setLocal(g,e.i64_add(e.i64_and(e.getLocal(g),e.i64_const(4294967295)),e.i64_and(e.getLocal(h),e.i64_const(4294967295))))),a.addCode(e.setLocal(f,e.i64_add(e.i64_add(e.getLocal(f),e.i64_shr_u(e.getLocal(g),e.i64_const(32))),e.getLocal(p)))));for(let o=Math.max(1,t-l+1);o<=t&&o=l&&a.addCode(e.i64_store32(e.getLocal("r"),4*(t-l),e.getLocal(g))),a.addCode(e.setLocal(h,e.getLocal(f)),e.setLocal(p,e.i64_shr_u(e.getLocal(h),e.i64_const(32))))}a.addCode(e.i64_store32(e.getLocal("r"),4*l-4,e.getLocal(h))),a.addCode(e.if(e.i32_wrap_i64(e.getLocal(p)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),e.if(e.call(r+"_gte",e.getLocal("r"),e.i32_const(d)),e.drop(e.call(r+"_sub",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))))))}(),function(){const a=t.addFunction(s+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.i32_const(u),e.getLocal("r")))}(),function(){const a=t.alloc(2*c),e=t.addFunction(s+"_fromMontgomery");e.addParam("x","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(r+"_copy",o.getLocal("x"),o.i32_const(a))),e.addCode(o.call(r+"_zero",o.i32_const(a+c))),e.addCode(o.call(s+"_mReduct",o.i32_const(a),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.call(r+"_gte",o,e.i32_const(L)))}(),function(){const a=t.addFunction(s+"_sign");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(r+"_isZero",e.getLocal("x")),e.ret(e.i32_const(0))),e.call(s+"_fromMontgomery",e.getLocal("x"),o),e.if(e.call(r+"_gte",o,e.i32_const(L)),e.ret(e.i32_const(-1))),e.ret(e.i32_const(1)))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_fromMontgomery",e.getLocal("x"),e.getLocal("r"))),a.addCode(e.call(r+"_inverseMod",e.getLocal("r"),e.i32_const(d),e.getLocal("r"))),a.addCode(e.call(s+"_toMontgomery",e.getLocal("r"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_one");a.addParam("pr","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_copy",e.i32_const(_),e.getLocal("pr")))}(),function(){const a=t.addFunction(s+"_load");a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32"),a.addLocal("p","i32"),a.addLocal("l","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c)),i=t.alloc(c),n=e.i32_const(i);a.addCode(e.call(r+"_zero",e.getLocal("r")),e.setLocal("i",e.i32_const(c)),e.setLocal("p",e.getLocal("scalar")),e.block(e.loop(e.br_if(1,e.i32_gt_u(e.getLocal("i"),e.getLocal("scalarLen"))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",e.getLocal("p"),o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(c))),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(c))),e.br(0))),e.setLocal("l",e.i32_rem_u(e.getLocal("scalarLen"),e.i32_const(c))),e.if(e.i32_eqz(e.getLocal("l")),e.ret([])),e.call(r+"_zero",n),e.setLocal("j",e.i32_const(0)),e.block(e.loop(e.br_if(1,e.i32_eq(e.getLocal("j"),e.getLocal("l"))),e.i32_store8(e.getLocal("j"),i,e.i32_load8_u(e.getLocal("p"))),e.setLocal("p",e.i32_add(e.getLocal("p"),e.i32_const(1))),e.setLocal("j",e.i32_add(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.if(e.i32_eq(e.getLocal("i"),e.i32_const(c)),e.call(s+"_one",o),e.call(s+"_mul",o,e.i32_const(u),o)),e.call(s+"_mul",n,o,n),e.call(s+"_add",e.getLocal("r"),n,e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const e=a.getCodeBuilder(),o=e.i32_const(t.alloc(c));a.addCode(e.call(s+"_load",e.getLocal("scalar"),e.getLocal("scalarLen"),o),e.call(s+"_toMontgomery",o,o),e.call(s+"_mul",e.getLocal("x"),o,e.getLocal("r")))}(),Vl(t,s),Kl(t,s+"_batchToMontgomery",s+"_toMontgomery",c,c),Kl(t,s+"_batchFromMontgomery",s+"_fromMontgomery",c,c),Kl(t,s+"_batchNeg",s+"_neg",c,c),Hl(t,s+"_batchAdd",s+"_add",c,c),Hl(t,s+"_batchSub",s+"_sub",c,c),Hl(t,s+"_batchMul",s+"_mul",c,c),t.exportFunction(s+"_add"),t.exportFunction(s+"_sub"),t.exportFunction(s+"_neg"),t.exportFunction(s+"_isNegative"),t.exportFunction(s+"_isOne"),t.exportFunction(s+"_sign"),t.exportFunction(s+"_mReduct"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_squareOld"),t.exportFunction(s+"_fromMontgomery"),t.exportFunction(s+"_toMontgomery"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_one"),t.exportFunction(s+"_load"),t.exportFunction(s+"_timesScalar"),jl(t,s+"_exp",c,s+"_mul",s+"_square",r+"_copy",s+"_one"),t.exportFunction(s+"_exp"),t.exportFunction(s+"_batchInverse"),Jl(i)&&(!function(){const a=t.addFunction(s+"_sqrt");a.addParam("n","i32"),a.addParam("r","i32"),a.addLocal("m","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c)),n=e.i32_const(t.alloc(c)),l=e.i32_const(t.alloc(c)),r=e.i32_const(t.alloc(c)),d=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.call(s+"_zero",e.getLocal("r")))),e.setLocal("m",e.i32_const(w)),e.call(s+"_copy",e.i32_const(F),i),e.call(s+"_exp",e.getLocal("n"),e.i32_const(A),e.i32_const(c),n),e.call(s+"_exp",e.getLocal("n"),e.i32_const(I),e.i32_const(c),l),e.block(e.loop(e.br_if(1,e.call(s+"_eq",n,o)),e.call(s+"_square",n,r),e.setLocal("i",e.i32_const(1)),e.block(e.loop(e.br_if(1,e.call(s+"_eq",r,o)),e.call(s+"_square",r,r),e.setLocal("i",e.i32_add(e.getLocal("i"),e.i32_const(1))),e.br(0))),e.call(s+"_copy",i,d),e.setLocal("j",e.i32_sub(e.i32_sub(e.getLocal("m"),e.getLocal("i")),e.i32_const(1))),e.block(e.loop(e.br_if(1,e.i32_eqz(e.getLocal("j"))),e.call(s+"_square",d,d),e.setLocal("j",e.i32_sub(e.getLocal("j"),e.i32_const(1))),e.br(0))),e.setLocal("m",e.getLocal("i")),e.call(s+"_square",d,i),e.call(s+"_mul",n,i,n),e.call(s+"_mul",l,d,l),e.br(0))),e.if(e.call(s+"_isNegative",l),e.call(s+"_neg",l,e.getLocal("r")),e.call(s+"_copy",l,e.getLocal("r"))))}(),function(){const a=t.addFunction(s+"_isSquare");a.addParam("n","i32"),a.setReturnType("i32");const e=a.getCodeBuilder(),o=e.i32_const(_),i=e.i32_const(t.alloc(c));a.addCode(e.if(e.call(s+"_isZero",e.getLocal("n")),e.ret(e.i32_const(1))),e.call(s+"_exp",e.getLocal("n"),e.i32_const(p),e.i32_const(c),i),e.call(s+"_eq",i,o))}(),t.exportFunction(s+"_sqrt"),t.exportFunction(s+"_isSquare")),t.exportFunction(s+"_batchToMontgomery"),t.exportFunction(s+"_batchFromMontgomery"),s};const ec=ac,{bitLength:oc}=vl;var ic=function(t,a,e,o,i){const n=BigInt(a),l=Math.floor((oc(n-1n)-1)/64)+1,c=8*l,s=e||"f1";if(t.modules[s])return s;t.modules[s]={n64:l};const r=i||"int",d=ec(t,n,o,r),u=t.modules[d].pR2,_=t.modules[d].pq,g=t.modules[d].pePlusOne;return function(){const a=t.alloc(c),e=t.addFunction(s+"_mul");e.addParam("x","i32"),e.addParam("y","i32"),e.addParam("r","i32");const o=e.getCodeBuilder();e.addCode(o.call(d+"_mul",o.getLocal("x"),o.getLocal("y"),o.i32_const(a))),e.addCode(o.call(d+"_mul",o.i32_const(a),o.i32_const(u),o.getLocal("r")))}(),function(){const a=t.addFunction(s+"_square");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(s+"_mul",e.getLocal("x"),e.getLocal("x"),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_inverseMod",e.getLocal("x"),e.i32_const(_),e.getLocal("r")))}(),function(){const a=t.addFunction(s+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const e=a.getCodeBuilder();a.addCode(e.call(r+"_gte",e.getLocal("x"),e.i32_const(g)))}(),t.exportFunction(d+"_add",s+"_add"),t.exportFunction(d+"_sub",s+"_sub"),t.exportFunction(d+"_neg",s+"_neg"),t.exportFunction(s+"_mul"),t.exportFunction(s+"_square"),t.exportFunction(s+"_inverse"),t.exportFunction(s+"_isNegative"),t.exportFunction(d+"_copy",s+"_copy"),t.exportFunction(d+"_zero",s+"_zero"),t.exportFunction(d+"_one",s+"_one"),t.exportFunction(d+"_isZero",s+"_isZero"),t.exportFunction(d+"_eq",s+"_eq"),s};const nc=xl,lc=Il,cc=Fl;var sc=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64,n=t.modules[o].q;return t.modules[e]={n64:2*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.ret(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_copy",c,r))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("y"),d=l.i32_add(l.getLocal("y"),l.i32_const(i)),u=l.getLocal("r"),_=l.i32_add(l.getLocal("r"),l.i32_const(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,r,g),l.call(o+"_mul",s,d,f),l.call(o+"_add",c,s,h),l.call(o+"_add",r,d,p),l.call(o+"_mul",h,p,h),l.call(a,f,u),l.call(o+"_add",g,u,u),l.call(o+"_add",g,f,_),l.call(o+"_sub",h,_,_))}(),function(){const a=t.addFunction(e+"_mul1");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_mul",l,s,r),n.call(o+"_mul",c,s,d))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,s,u),l.call(o+"_add",c,s,_),l.call(a,s,g),l.call(o+"_add",c,g,g),l.call(a,u,f),l.call(o+"_add",f,u,f),l.call(o+"_mul",_,g,r),l.call(o+"_sub",r,f,r),l.call(o+"_add",u,u,d))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_add",l,s,d),n.call(o+"_add",c,r,u))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i)),d=n.getLocal("r"),u=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_sub",l,s,d),n.call(o+"_sub",c,r,u))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_neg",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_conjugate");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_copy",l,s),n.call(o+"_neg",c,r))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_toMontgomery",l,s),n.call(o+"_toMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_fromMontgomery",l,s),n.call(o+"_fromMontgomery",c,r))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("y"),r=n.i32_add(n.getLocal("y"),n.i32_const(i));a.addCode(n.i32_and(n.call(o+"_eq",l,s),n.call(o+"_eq",c,r)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.getLocal("r"),d=l.i32_add(l.getLocal("r"),l.i32_const(i)),u=l.i32_const(t.alloc(i)),_=l.i32_const(t.alloc(i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,u),l.call(o+"_square",s,_),l.call(a,_,g),l.call(o+"_sub",u,g,g),l.call(o+"_inverse",g,f),l.call(o+"_mul",c,f,r),l.call(o+"_mul",s,f,d),l.call(o+"_neg",d,d))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.getLocal("r"),r=n.i32_add(n.getLocal("r"),n.i32_const(i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),s),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),r))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i));a.addCode(n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l))),n.ret(n.call(o+"_isNegative",c)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_mul1"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_conjugate"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),lc(t,e),nc(t,e+"_exp",2*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),function(){const a=t.addFunction(e+"_sqrt");a.addParam("a","i32"),a.addParam("pr","i32");const l=a.getCodeBuilder(),c=l.i32_const(t.alloc(cc.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),s=l.i32_const(t.alloc(cc.bigInt2BytesLE((BigInt(n||0)-1n)/2n,i))),r=l.getLocal("a"),d=l.i32_const(t.alloc(2*i)),u=l.i32_const(t.alloc(2*i)),_=l.i32_const(t.alloc(2*i)),g=t.alloc(2*i),f=l.i32_const(g),h=l.i32_const(g),p=l.i32_const(g+i),m=l.i32_const(t.alloc(2*i)),L=l.i32_const(t.alloc(2*i));a.addCode(l.call(e+"_one",f),l.call(e+"_neg",f,f),l.call(e+"_exp",r,c,l.i32_const(i),d),l.call(e+"_square",d,u),l.call(e+"_mul",r,u,u),l.call(e+"_conjugate",u,_),l.call(e+"_mul",_,u,_),l.if(l.call(e+"_eq",_,f),l.unreachable()),l.call(e+"_mul",d,r,m),l.if(l.call(e+"_eq",u,f),[...l.call(o+"_zero",h),...l.call(o+"_one",p),...l.call(e+"_mul",f,m,l.getLocal("pr"))],[...l.call(e+"_one",L),...l.call(e+"_add",L,u,L),...l.call(e+"_exp",L,s,l.i32_const(i),L),...l.call(e+"_mul",L,m,l.getLocal("pr"))]))}(),function(){const a=t.addFunction(e+"_isSquare");a.addParam("a","i32"),a.setReturnType("i32");const o=a.getCodeBuilder(),l=o.i32_const(t.alloc(cc.bigInt2BytesLE((BigInt(n||0)-3n)/4n,i))),c=o.getLocal("a"),s=o.i32_const(t.alloc(2*i)),r=o.i32_const(t.alloc(2*i)),d=o.i32_const(t.alloc(2*i)),u=t.alloc(2*i),_=o.i32_const(u);a.addCode(o.call(e+"_one",_),o.call(e+"_neg",_,_),o.call(e+"_exp",c,l,o.i32_const(i),s),o.call(e+"_square",s,r),o.call(e+"_mul",c,r,r),o.call(e+"_conjugate",r,d),o.call(e+"_mul",d,r,d),o.if(o.call(e+"_eq",d,_),o.ret(o.i32_const(0))),o.ret(o.i32_const(1)))}(),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_sqrt"),t.exportFunction(e+"_isSquare"),t.exportFunction(e+"_isNegative"),e};const rc=xl,dc=Il;var uc=function(t,a,e,o){if(t.modules[e])return e;const i=8*t.modules[o].n64;return t.modules[e]={n64:3*t.modules[o].n64},function(){const a=t.addFunction(e+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_isZero",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s)))}(),function(){const a=t.addFunction(e+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.ret(n.i32_and(n.i32_and(n.call(o+"_isOne",l),n.call(o+"_isZero",c)),n.call(o+"_isZero",s))))}(),function(){const a=t.addFunction(e+"_zero");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_zero",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_one");a.addParam("x","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.call(o+"_one",l),n.call(o+"_zero",c),n.call(o+"_zero",s))}(),function(){const a=t.addFunction(e+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_copy",l,r),n.call(o+"_copy",c,d),n.call(o+"_copy",s,u))}(),function(){const n=t.addFunction(e+"_mul");n.addParam("x","i32"),n.addParam("y","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("y"),u=l.i32_add(l.getLocal("y"),l.i32_const(i)),_=l.i32_add(l.getLocal("y"),l.i32_const(2*i)),g=l.getLocal("r"),f=l.i32_add(l.getLocal("r"),l.i32_const(i)),h=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i)),F=l.i32_const(t.alloc(i)),x=l.i32_const(t.alloc(i)),I=l.i32_const(t.alloc(i)),B=l.i32_const(t.alloc(i)),E=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_mul",c,d,p),l.call(o+"_mul",s,u,m),l.call(o+"_mul",r,_,L),l.call(o+"_add",c,s,b),l.call(o+"_add",d,u,w),l.call(o+"_add",c,r,y),l.call(o+"_add",d,_,A),l.call(o+"_add",s,r,C),l.call(o+"_add",u,_,F),l.call(o+"_add",p,m,x),l.call(o+"_add",p,L,I),l.call(o+"_add",m,L,B),l.call(o+"_mul",C,F,g),l.call(o+"_sub",g,B,g),l.call(a,g,g),l.call(o+"_add",p,g,g),l.call(o+"_mul",b,w,f),l.call(o+"_sub",f,x,f),l.call(a,L,E),l.call(o+"_add",f,E,f),l.call(o+"_mul",y,A,h),l.call(o+"_sub",h,I,h),l.call(o+"_add",h,m,h))}(),function(){const n=t.addFunction(e+"_square");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_mul",c,s,f),l.call(o+"_add",f,f,h),l.call(o+"_sub",c,s,p),l.call(o+"_add",p,r,p),l.call(o+"_square",p,p),l.call(o+"_mul",s,r,m),l.call(o+"_add",m,m,L),l.call(o+"_square",r,b),l.call(a,L,d),l.call(o+"_add",g,d,d),l.call(a,b,u),l.call(o+"_add",h,u,u),l.call(o+"_add",g,b,_),l.call(o+"_sub",L,_,_),l.call(o+"_add",p,_,_),l.call(o+"_add",h,_,_))}(),function(){const a=t.addFunction(e+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_add",l,r,_),n.call(o+"_add",c,d,g),n.call(o+"_add",s,u,f))}(),function(){const a=t.addFunction(e+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i)),_=n.getLocal("r"),g=n.i32_add(n.getLocal("r"),n.i32_const(i)),f=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_sub",l,r,_),n.call(o+"_sub",c,d,g),n.call(o+"_sub",s,u,f))}(),function(){const a=t.addFunction(e+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_neg",l,r),n.call(o+"_neg",c,d),n.call(o+"_neg",s,u))}(),function(){const a=t.addFunction(e+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.setLocal("s",n.call(o+"_sign",s)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.setLocal("s",n.call(o+"_sign",c)),n.if(n.getLocal("s"),n.ret(n.getLocal("s"))),n.ret(n.call(o+"_sign",l)))}(),function(){const a=t.addFunction(e+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_toMontgomery",l,r),n.call(o+"_toMontgomery",c,d),n.call(o+"_toMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_fromMontgomery",l,r),n.call(o+"_fromMontgomery",c,d),n.call(o+"_fromMontgomery",s,u))}(),function(){const a=t.addFunction(e+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("y"),d=n.i32_add(n.getLocal("y"),n.i32_const(i)),u=n.i32_add(n.getLocal("y"),n.i32_const(2*i));a.addCode(n.i32_and(n.i32_and(n.call(o+"_eq",l,r),n.call(o+"_eq",c,d)),n.call(o+"_eq",s,u)))}(),function(){const n=t.addFunction(e+"_inverse");n.addParam("x","i32"),n.addParam("r","i32");const l=n.getCodeBuilder(),c=l.getLocal("x"),s=l.i32_add(l.getLocal("x"),l.i32_const(i)),r=l.i32_add(l.getLocal("x"),l.i32_const(2*i)),d=l.getLocal("r"),u=l.i32_add(l.getLocal("r"),l.i32_const(i)),_=l.i32_add(l.getLocal("r"),l.i32_const(2*i)),g=l.i32_const(t.alloc(i)),f=l.i32_const(t.alloc(i)),h=l.i32_const(t.alloc(i)),p=l.i32_const(t.alloc(i)),m=l.i32_const(t.alloc(i)),L=l.i32_const(t.alloc(i)),b=l.i32_const(t.alloc(i)),w=l.i32_const(t.alloc(i)),y=l.i32_const(t.alloc(i)),A=l.i32_const(t.alloc(i)),C=l.i32_const(t.alloc(i));n.addCode(l.call(o+"_square",c,g),l.call(o+"_square",s,f),l.call(o+"_square",r,h),l.call(o+"_mul",c,s,p),l.call(o+"_mul",c,r,m),l.call(o+"_mul",s,r,L),l.call(a,L,b),l.call(o+"_sub",g,b,b),l.call(a,h,w),l.call(o+"_sub",w,p,w),l.call(o+"_sub",f,m,y),l.call(o+"_mul",r,w,A),l.call(o+"_mul",s,y,C),l.call(o+"_add",A,C,A),l.call(a,A,A),l.call(o+"_mul",c,b,C),l.call(o+"_add",C,A,A),l.call(o+"_inverse",A,A),l.call(o+"_mul",A,b,d),l.call(o+"_mul",A,w,u),l.call(o+"_mul",A,y,_))}(),function(){const a=t.addFunction(e+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i)),r=n.getLocal("r"),d=n.i32_add(n.getLocal("r"),n.i32_const(i)),u=n.i32_add(n.getLocal("r"),n.i32_const(2*i));a.addCode(n.call(o+"_timesScalar",l,n.getLocal("scalar"),n.getLocal("scalarLen"),r),n.call(o+"_timesScalar",c,n.getLocal("scalar"),n.getLocal("scalarLen"),d),n.call(o+"_timesScalar",s,n.getLocal("scalar"),n.getLocal("scalarLen"),u))}(),function(){const a=t.addFunction(e+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const n=a.getCodeBuilder(),l=n.getLocal("x"),c=n.i32_add(n.getLocal("x"),n.i32_const(i)),s=n.i32_add(n.getLocal("x"),n.i32_const(2*i));a.addCode(n.if(n.call(o+"_isZero",s),n.if(n.call(o+"_isZero",c),n.ret(n.call(o+"_isNegative",l)),n.ret(n.call(o+"_isNegative",c)))),n.ret(n.call(o+"_isNegative",s)))}(),t.exportFunction(e+"_isZero"),t.exportFunction(e+"_isOne"),t.exportFunction(e+"_zero"),t.exportFunction(e+"_one"),t.exportFunction(e+"_copy"),t.exportFunction(e+"_mul"),t.exportFunction(e+"_square"),t.exportFunction(e+"_add"),t.exportFunction(e+"_sub"),t.exportFunction(e+"_neg"),t.exportFunction(e+"_sign"),t.exportFunction(e+"_fromMontgomery"),t.exportFunction(e+"_toMontgomery"),t.exportFunction(e+"_eq"),t.exportFunction(e+"_inverse"),dc(t,e),rc(t,e+"_exp",3*i,e+"_mul",e+"_square",e+"_copy",e+"_one"),t.exportFunction(e+"_exp"),t.exportFunction(e+"_timesScalar"),t.exportFunction(e+"_batchInverse"),t.exportFunction(e+"_isNegative"),e};const _c=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("base","i32"),s.addParam("scalar","i32"),s.addParam("scalarLength","i32"),s.addParam("r","i32"),s.addLocal("old0","i32"),s.addLocal("nbits","i32"),s.addLocal("i","i32"),s.addLocal("last","i32"),s.addLocal("cur","i32"),s.addLocal("carry","i32"),s.addLocal("p","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(e));function u(t){return r.i32_and(r.i32_shr_u(r.i32_load(r.i32_add(r.getLocal("scalar"),r.i32_and(r.i32_shr_u(t,r.i32_const(3)),r.i32_const(4294967292)))),r.i32_and(t,r.i32_const(31))),r.i32_const(1))}function _(t){return[...r.i32_store8(r.getLocal("p"),r.i32_const(t)),...r.setLocal("p",r.i32_add(r.getLocal("p"),r.i32_const(1)))]}s.addCode(r.if(r.i32_eqz(r.getLocal("scalarLength")),[...r.call(c,r.getLocal("r")),...r.ret([])]),r.setLocal("nbits",r.i32_shl(r.getLocal("scalarLength"),r.i32_const(3))),r.setLocal("old0",r.i32_load(r.i32_const(0))),r.setLocal("p",r.getLocal("old0")),r.i32_store(r.i32_const(0),r.i32_and(r.i32_add(r.i32_add(r.getLocal("old0"),r.i32_const(32)),r.getLocal("nbits")),r.i32_const(4294967288))),r.setLocal("i",r.i32_const(1)),r.setLocal("last",u(r.i32_const(0))),r.setLocal("carry",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("nbits"))),r.setLocal("cur",u(r.getLocal("i"))),r.if(r.getLocal("last"),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(1)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(255)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(1)])),r.if(r.getLocal("cur"),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(1)),..._(0)],[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)]),r.if(r.getLocal("carry"),[...r.setLocal("last",r.i32_const(1)),...r.setLocal("carry",r.i32_const(0)),..._(0)],[...r.setLocal("last",r.i32_const(0)),...r.setLocal("carry",r.i32_const(0)),..._(0)]))),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0))),r.if(r.getLocal("last"),r.if(r.getLocal("carry"),[..._(255),..._(0),..._(1)],[..._(1)]),r.if(r.getLocal("carry"),[..._(0),..._(1)])),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.call(l,r.getLocal("base"),d),r.call(c,r.getLocal("r")),r.block(r.loop(r.call(i,r.getLocal("r"),r.getLocal("r")),r.setLocal("cur",r.i32_load8_u(r.getLocal("p"))),r.if(r.getLocal("cur"),r.if(r.i32_eq(r.getLocal("cur"),r.i32_const(1)),r.call(o,r.getLocal("r"),d,r.getLocal("r")),r.call(n,r.getLocal("r"),d,r.getLocal("r")))),r.br_if(1,r.i32_eq(r.getLocal("old0"),r.getLocal("p"))),r.setLocal("p",r.i32_sub(r.getLocal("p"),r.i32_const(1))),r.br(0))),r.i32_store(r.i32_const(0),r.getLocal("old0")))},gc=Bl,fc=function(t,a,e,o,i){const n=8*t.modules[a].n64;function l(){const o=t.addFunction(e);o.addParam("pBases","i32"),o.addParam("pScalars","i32"),o.addParam("scalarSize","i32"),o.addParam("n","i32"),o.addParam("pr","i32"),o.addLocal("chunkSize","i32"),o.addLocal("nChunks","i32"),o.addLocal("itScalar","i32"),o.addLocal("endScalar","i32"),o.addLocal("itBase","i32"),o.addLocal("itBit","i32"),o.addLocal("i","i32"),o.addLocal("j","i32"),o.addLocal("nTable","i32"),o.addLocal("pTable","i32"),o.addLocal("idx","i32"),o.addLocal("pIdxTable","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n)),c=t.alloc([17,17,17,17,17,17,17,17,17,17,16,16,15,14,13,13,12,11,10,9,8,7,7,6,5,4,3,2,1,1,1,1]);o.addCode(i.call(a+"_zero",i.getLocal("pr")),i.if(i.i32_eqz(i.getLocal("n")),i.ret([])),i.setLocal("chunkSize",i.i32_load8_u(i.i32_clz(i.getLocal("n")),c)),i.setLocal("nChunks",i.i32_add(i.i32_div_u(i.i32_sub(i.i32_shl(i.getLocal("scalarSize"),i.i32_const(3)),i.i32_const(1)),i.getLocal("chunkSize")),i.i32_const(1))),i.setLocal("itBit",i.i32_mul(i.i32_sub(i.getLocal("nChunks"),i.i32_const(1)),i.getLocal("chunkSize"))),i.block(i.loop(i.br_if(1,i.i32_lt_s(i.getLocal("itBit"),i.i32_const(0))),i.if(i.i32_eqz(i.call(a+"_isZero",i.getLocal("pr"))),[...i.setLocal("j",i.i32_const(0)),...i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("j"),i.getLocal("chunkSize"))),i.call(a+"_double",i.getLocal("pr"),i.getLocal("pr")),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0)))]),i.call(e+"_chunk",i.getLocal("pBases"),i.getLocal("pScalars"),i.getLocal("scalarSize"),i.getLocal("n"),i.getLocal("itBit"),i.getLocal("chunkSize"),l),i.call(a+"_add",i.getLocal("pr"),l,i.getLocal("pr")),i.setLocal("itBit",i.i32_sub(i.getLocal("itBit"),i.getLocal("chunkSize"))),i.br(0))))}!function(){const a=t.addFunction(e+"_getChunk");a.addParam("pScalar","i32"),a.addParam("scalarSize","i32"),a.addParam("startBit","i32"),a.addParam("chunkSize","i32"),a.addLocal("bitsToEnd","i32"),a.addLocal("mask","i32"),a.setReturnType("i32");const o=a.getCodeBuilder();a.addCode(o.setLocal("bitsToEnd",o.i32_sub(o.i32_mul(o.getLocal("scalarSize"),o.i32_const(8)),o.getLocal("startBit"))),o.if(o.i32_gt_s(o.getLocal("chunkSize"),o.getLocal("bitsToEnd")),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("bitsToEnd")),o.i32_const(1))),o.setLocal("mask",o.i32_sub(o.i32_shl(o.i32_const(1),o.getLocal("chunkSize")),o.i32_const(1)))),o.i32_and(o.i32_shr_u(o.i32_load(o.i32_add(o.getLocal("pScalar"),o.i32_shr_u(o.getLocal("startBit"),o.i32_const(3))),0,0),o.i32_and(o.getLocal("startBit"),o.i32_const(7))),o.getLocal("mask")))}(),function(){const o=t.addFunction(e+"_reduceTable");o.addParam("pTable","i32"),o.addParam("p","i32"),o.addLocal("half","i32"),o.addLocal("it1","i32"),o.addLocal("it2","i32"),o.addLocal("pAcc","i32");const i=o.getCodeBuilder();o.addCode(i.if(i.i32_eq(i.getLocal("p"),i.i32_const(1)),i.ret([])),i.setLocal("half",i.i32_shl(i.i32_const(1),i.i32_sub(i.getLocal("p"),i.i32_const(1)))),i.setLocal("it1",i.getLocal("pTable")),i.setLocal("it2",i.i32_add(i.getLocal("pTable"),i.i32_mul(i.getLocal("half"),i.i32_const(n)))),i.setLocal("pAcc",i.i32_sub(i.getLocal("it2"),i.i32_const(n))),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("it1"),i.getLocal("pAcc"))),i.call(a+"_add",i.getLocal("it1"),i.getLocal("it2"),i.getLocal("it1")),i.call(a+"_add",i.getLocal("pAcc"),i.getLocal("it2"),i.getLocal("pAcc")),i.setLocal("it1",i.i32_add(i.getLocal("it1"),i.i32_const(n))),i.setLocal("it2",i.i32_add(i.getLocal("it2"),i.i32_const(n))),i.br(0))),i.call(e+"_reduceTable",i.getLocal("pTable"),i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.block(i.loop(i.br_if(1,i.i32_eqz(i.getLocal("p"))),i.call(a+"_double",i.getLocal("pAcc"),i.getLocal("pAcc")),i.setLocal("p",i.i32_sub(i.getLocal("p"),i.i32_const(1))),i.br(0))),i.call(a+"_add",i.getLocal("pTable"),i.getLocal("pAcc"),i.getLocal("pTable")))}(),function(){const l=t.addFunction(e+"_chunk");l.addParam("pBases","i32"),l.addParam("pScalars","i32"),l.addParam("scalarSize","i32"),l.addParam("n","i32"),l.addParam("startBit","i32"),l.addParam("chunkSize","i32"),l.addParam("pr","i32"),l.addLocal("nChunks","i32"),l.addLocal("itScalar","i32"),l.addLocal("endScalar","i32"),l.addLocal("itBase","i32"),l.addLocal("i","i32"),l.addLocal("j","i32"),l.addLocal("nTable","i32"),l.addLocal("pTable","i32"),l.addLocal("idx","i32"),l.addLocal("pIdxTable","i32");const c=l.getCodeBuilder();l.addCode(c.if(c.i32_eqz(c.getLocal("n")),[...c.call(a+"_zero",c.getLocal("pr")),...c.ret([])]),c.setLocal("nTable",c.i32_shl(c.i32_const(1),c.getLocal("chunkSize"))),c.setLocal("pTable",c.i32_load(c.i32_const(0))),c.i32_store(c.i32_const(0),c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("nTable"),c.i32_const(n)))),c.setLocal("j",c.i32_const(0)),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("j"),c.getLocal("nTable"))),c.call(a+"_zero",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.getLocal("j"),c.i32_const(n)))),c.setLocal("j",c.i32_add(c.getLocal("j"),c.i32_const(1))),c.br(0))),c.setLocal("itBase",c.getLocal("pBases")),c.setLocal("itScalar",c.getLocal("pScalars")),c.setLocal("endScalar",c.i32_add(c.getLocal("pScalars"),c.i32_mul(c.getLocal("n"),c.getLocal("scalarSize")))),c.block(c.loop(c.br_if(1,c.i32_eq(c.getLocal("itScalar"),c.getLocal("endScalar"))),c.setLocal("idx",c.call(e+"_getChunk",c.getLocal("itScalar"),c.getLocal("scalarSize"),c.getLocal("startBit"),c.getLocal("chunkSize"))),c.if(c.getLocal("idx"),[...c.setLocal("pIdxTable",c.i32_add(c.getLocal("pTable"),c.i32_mul(c.i32_sub(c.getLocal("idx"),c.i32_const(1)),c.i32_const(n)))),...c.call(o,c.getLocal("pIdxTable"),c.getLocal("itBase"),c.getLocal("pIdxTable"))]),c.setLocal("itScalar",c.i32_add(c.getLocal("itScalar"),c.getLocal("scalarSize"))),c.setLocal("itBase",c.i32_add(c.getLocal("itBase"),c.i32_const(i))),c.br(0))),c.call(e+"_reduceTable",c.getLocal("pTable"),c.getLocal("chunkSize")),c.call(a+"_copy",c.getLocal("pTable"),c.getLocal("pr")),c.i32_store(c.i32_const(0),c.getLocal("pTable")))}(),l(),t.exportFunction(e),t.exportFunction(e+"_chunk")};var hc=function(t,a,e,o){const i=t.modules[e].n64,n=8*i;if(t.modules[a])return a;return t.modules[a]={n64:3*i},function(){const o=t.addFunction(a+"_isZeroAffine");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.i32_and(i.call(e+"_isZero",i.getLocal("p1")),i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(n)))))}(),function(){const o=t.addFunction(a+"_isZero");o.addParam("p1","i32"),o.setReturnType("i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_isZero",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))))}(),function(){const o=t.addFunction(a+"_zeroAffine");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(n))))}(),function(){const o=t.addFunction(a+"_zero");o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_zero",i.getLocal("pr"))),o.addCode(i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(n)))),o.addCode(i.call(e+"_zero",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))))}(),function(){const e=t.addFunction(a+"_copyAffine");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<2*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const e=t.addFunction(a+"_copy");e.addParam("ps","i32"),e.addParam("pd","i32");const o=e.getCodeBuilder();for(let t=0;t<3*i;t++)e.addCode(o.i64_store(o.getLocal("pd"),8*t,o.i64_load(o.getLocal("ps"),8*t)))}(),function(){const o=t.addFunction(a+"_toJacobian");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_one",d),...i.call(e+"_copy",c,r),...i.call(e+"_copy",l,s)]))}(),function(){const o=t.addFunction(a+"_eqAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder();o.addCode(i.ret(i.i32_and(i.call(e+"_eq",i.getLocal("p1"),i.getLocal("p2")),i.call(e+"_eq",i.i32_add(i.getLocal("p1"),i.i32_const(n)),i.i32_add(i.getLocal("p2"),i.i32_const(n))))))}(),function(){const o=t.addFunction(a+"_eqMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZeroAffine",i.getLocal("p2")))),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqAffine",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,u),i.call(e+"_mul",r,u,_),i.call(e+"_mul",s,u,g),i.call(e+"_mul",d,g,f),i.if(i.call(e+"_eq",l,_),i.if(i.call(e+"_eq",c,f),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_eq");o.addParam("p1","i32"),o.addParam("p2","i32"),o.setReturnType("i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.ret(i.call(a+"_isZero",i.getLocal("p2")))),i.if(i.call(a+"_isZero",i.getLocal("p2")),i.ret(i.i32_const(0))),i.if(i.call(e+"_isOne",s),i.ret(i.call(a+"_eqMixed",i.getLocal("p2"),i.getLocal("p1")))),i.if(i.call(e+"_isOne",u),i.ret(i.call(a+"_eqMixed",i.getLocal("p1"),i.getLocal("p2")))),i.call(e+"_square",s,_),i.call(e+"_square",u,g),i.call(e+"_mul",l,g,f),i.call(e+"_mul",r,_,h),i.call(e+"_mul",s,_,p),i.call(e+"_mul",u,g,m),i.call(e+"_mul",c,m,L),i.call(e+"_mul",d,p,b),i.if(i.call(e+"_eq",f,h),i.if(i.call(e+"_eq",L,b),i.ret(i.i32_const(1)))),i.ret(i.i32_const(0)))}(),function(){const o=t.addFunction(a+"_doubleAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n)),d=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_toJacobian",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.call(e+"_square",l,u),i.call(e+"_square",c,_),i.call(e+"_square",_,g),i.call(e+"_add",l,_,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,u,f),i.call(e+"_sub",f,g,f),i.call(e+"_add",f,f,f),i.call(e+"_add",u,u,h),i.call(e+"_add",h,u,h),i.call(e+"_add",c,c,d),i.call(e+"_square",h,s),i.call(e+"_sub",s,f,s),i.call(e+"_sub",s,f,s),i.call(e+"_add",g,g,p),i.call(e+"_add",p,p,p),i.call(e+"_add",p,p,p),i.call(e+"_sub",f,s,r),i.call(e+"_mul",r,h,r),i.call(e+"_sub",r,p,r))}(),function(){const o=t.addFunction(a+"_double");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.ret(i.call(a+"_doubleAffine",i.getLocal("p1"),i.getLocal("pr"))),...i.ret([])]),i.call(e+"_square",l,_),i.call(e+"_square",c,g),i.call(e+"_square",g,f),i.call(e+"_add",l,g,h),i.call(e+"_square",h,h),i.call(e+"_sub",h,_,h),i.call(e+"_sub",h,f,h),i.call(e+"_add",h,h,h),i.call(e+"_add",_,_,p),i.call(e+"_add",p,_,p),i.call(e+"_square",p,m),i.call(e+"_mul",c,s,L),i.call(e+"_add",h,h,r),i.call(e+"_sub",m,r,r),i.call(e+"_add",f,f,b),i.call(e+"_add",b,b,b),i.call(e+"_add",b,b,b),i.call(e+"_sub",h,r,d),i.call(e+"_mul",d,p,d),i.call(e+"_sub",d,b,d),i.call(e+"_add",L,L,u))}(),function(){const o=t.addFunction(a+"_addAffine");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("p2"),r=i.i32_add(i.getLocal("p2"),i.i32_const(n)),d=i.getLocal("pr"),u=i.i32_add(i.getLocal("pr"),i.i32_const(n)),_=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZeroAffine",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copyAffine",i.getLocal("p1"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(e+"_eq",l,s),i.if(i.call(e+"_eq",c,r),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",s,l,g),i.call(e+"_sub",r,c,h),i.call(e+"_square",g,f),i.call(e+"_add",f,f,p),i.call(e+"_add",p,p,p),i.call(e+"_mul",g,p,m),i.call(e+"_add",h,h,L),i.call(e+"_mul",l,p,w),i.call(e+"_square",L,b),i.call(e+"_add",w,w,y),i.call(e+"_sub",b,m,d),i.call(e+"_sub",d,y,d),i.call(e+"_mul",c,m,A),i.call(e+"_add",A,A,A),i.call(e+"_sub",w,d,u),i.call(e+"_mul",u,L,u),i.call(e+"_sub",u,A,u),i.call(e+"_add",g,g,_))}(),function(){const o=t.addFunction(a+"_addMixed");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n)),u=i.getLocal("pr"),_=i.i32_add(i.getLocal("pr"),i.i32_const(n)),g=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),f=i.i32_const(t.alloc(n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copyAffine",i.getLocal("p2"),i.getLocal("pr")),...i.call(e+"_one",i.i32_add(i.getLocal("pr"),i.i32_const(2*n))),...i.ret([])]),i.if(i.call(a+"_isZeroAffine",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addAffine",l,r,u),...i.ret([])]),i.call(e+"_square",s,f),i.call(e+"_mul",r,f,h),i.call(e+"_mul",s,f,p),i.call(e+"_mul",d,p,m),i.if(i.call(e+"_eq",l,h),i.if(i.call(e+"_eq",c,m),[...i.call(a+"_doubleAffine",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",h,l,L),i.call(e+"_sub",m,c,w),i.call(e+"_square",L,b),i.call(e+"_add",b,b,y),i.call(e+"_add",y,y,y),i.call(e+"_mul",L,y,A),i.call(e+"_add",w,w,C),i.call(e+"_mul",l,y,x),i.call(e+"_square",C,F),i.call(e+"_add",x,x,I),i.call(e+"_sub",F,A,u),i.call(e+"_sub",u,I,u),i.call(e+"_mul",c,A,B),i.call(e+"_add",B,B,B),i.call(e+"_sub",x,u,_),i.call(e+"_mul",_,C,_),i.call(e+"_sub",_,B,_),i.call(e+"_add",s,L,g),i.call(e+"_square",g,g),i.call(e+"_sub",g,f,g),i.call(e+"_sub",g,b,g))}(),function(){const o=t.addFunction(a+"_add");o.addParam("p1","i32"),o.addParam("p2","i32"),o.addParam("pr","i32"),o.addLocal("z1","i32"),o.addLocal("z2","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n));o.addCode(i.setLocal("z1",i.i32_add(i.getLocal("p1"),i.i32_const(2*n))));const s=i.getLocal("z1"),r=i.getLocal("p2"),d=i.i32_add(i.getLocal("p2"),i.i32_const(n));o.addCode(i.setLocal("z2",i.i32_add(i.getLocal("p2"),i.i32_const(2*n))));const u=i.getLocal("z2"),_=i.getLocal("pr"),g=i.i32_add(i.getLocal("pr"),i.i32_const(n)),f=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),h=i.i32_const(t.alloc(n)),p=i.i32_const(t.alloc(n)),m=i.i32_const(t.alloc(n)),L=i.i32_const(t.alloc(n)),b=i.i32_const(t.alloc(n)),w=i.i32_const(t.alloc(n)),y=i.i32_const(t.alloc(n)),A=i.i32_const(t.alloc(n)),C=i.i32_const(t.alloc(n)),F=i.i32_const(t.alloc(n)),x=i.i32_const(t.alloc(n)),I=i.i32_const(t.alloc(n)),B=i.i32_const(t.alloc(n)),E=i.i32_const(t.alloc(n)),v=i.i32_const(t.alloc(n)),S=i.i32_const(t.alloc(n)),P=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(a+"_copy",i.getLocal("p2"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(a+"_isZero",i.getLocal("p2")),[...i.call(a+"_copy",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])]),i.if(i.call(e+"_isOne",s),[...i.call(a+"_addMixed",r,l,_),...i.ret([])]),i.if(i.call(e+"_isOne",u),[...i.call(a+"_addMixed",l,r,_),...i.ret([])]),i.call(e+"_square",s,h),i.call(e+"_square",u,p),i.call(e+"_mul",l,p,m),i.call(e+"_mul",r,h,L),i.call(e+"_mul",s,h,b),i.call(e+"_mul",u,p,w),i.call(e+"_mul",c,w,y),i.call(e+"_mul",d,b,A),i.if(i.call(e+"_eq",m,L),i.if(i.call(e+"_eq",y,A),[...i.call(a+"_double",i.getLocal("p1"),i.getLocal("pr")),...i.ret([])])),i.call(e+"_sub",L,m,C),i.call(e+"_sub",A,y,F),i.call(e+"_add",C,C,x),i.call(e+"_square",x,x),i.call(e+"_mul",C,x,I),i.call(e+"_add",F,F,B),i.call(e+"_mul",m,x,v),i.call(e+"_square",B,E),i.call(e+"_add",v,v,S),i.call(e+"_sub",E,I,_),i.call(e+"_sub",_,S,_),i.call(e+"_mul",y,I,P),i.call(e+"_add",P,P,P),i.call(e+"_sub",v,_,g),i.call(e+"_mul",g,B,g),i.call(e+"_sub",g,P,g),i.call(e+"_add",s,u,f),i.call(e+"_square",f,f),i.call(e+"_sub",f,h,f),i.call(e+"_sub",f,p,f),i.call(e+"_mul",f,C,f))}(),function(){const o=t.addFunction(a+"_negAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.getLocal("pr"),r=i.i32_add(i.getLocal("pr"),i.i32_const(n));o.addCode(i.call(e+"_copy",l,s),i.call(e+"_neg",c,r))}(),function(){const o=t.addFunction(a+"_neg");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n));o.addCode(i.call(e+"_copy",l,r),i.call(e+"_neg",c,d),i.call(e+"_copy",s,u))}(),function(){const e=t.addFunction(a+"_subAffine");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addAffine",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_subMixed");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_negAffine",o.getLocal("p2"),i),o.call(a+"_addMixed",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const e=t.addFunction(a+"_sub");e.addParam("p1","i32"),e.addParam("p2","i32"),e.addParam("pr","i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(3*n));e.addCode(o.call(a+"_neg",o.getLocal("p2"),i),o.call(a+"_add",o.getLocal("p1"),i,o.getLocal("pr")))}(),function(){const o=t.addFunction(a+"_fromMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_fromMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_fromMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_fromMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomeryAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<2;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toMontgomery");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder();o.addCode(i.call(e+"_toMontgomery",i.getLocal("p1"),i.getLocal("pr")));for(let t=1;t<3;t++)o.addCode(i.call(e+"_toMontgomery",i.i32_add(i.getLocal("p1"),i.i32_const(t*n)),i.i32_add(i.getLocal("pr"),i.i32_const(t*n))))}(),function(){const o=t.addFunction(a+"_toAffine");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_const(t.alloc(n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),[...i.call(e+"_zero",r),...i.call(e+"_zero",d)],[...i.call(e+"_inverse",s,u),...i.call(e+"_square",u,_),...i.call(e+"_mul",u,_,g),...i.call(e+"_mul",l,_,r),...i.call(e+"_mul",c,g,d)]))}(),function(){const i=t.addFunction(a+"_inCurveAffine");i.addParam("pIn","i32"),i.setReturnType("i32");const l=i.getCodeBuilder(),c=l.getLocal("pIn"),s=l.i32_add(l.getLocal("pIn"),l.i32_const(n)),r=l.i32_const(t.alloc(n)),d=l.i32_const(t.alloc(n));i.addCode(l.call(e+"_square",s,r),l.call(e+"_square",c,d),l.call(e+"_mul",c,d,d),l.call(e+"_add",d,l.i32_const(o),d),l.ret(l.call(e+"_eq",r,d)))}(),function(){const e=t.addFunction(a+"_inCurve");e.addParam("pIn","i32"),e.setReturnType("i32");const o=e.getCodeBuilder(),i=o.i32_const(t.alloc(2*n));e.addCode(o.call(a+"_toAffine",o.getLocal("pIn"),i),o.ret(o.call(a+"_inCurveAffine",i)))}(),function(){const o=t.addFunction(a+"_batchToAffine");o.addParam("pIn","i32"),o.addParam("n","i32"),o.addParam("pOut","i32"),o.addLocal("pAux","i32"),o.addLocal("itIn","i32"),o.addLocal("itAux","i32"),o.addLocal("itOut","i32"),o.addLocal("i","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.setLocal("pAux",i.i32_load(i.i32_const(0))),i.i32_store(i.i32_const(0),i.i32_add(i.getLocal("pAux"),i.i32_mul(i.getLocal("n"),i.i32_const(n)))),i.call(e+"_batchInverse",i.i32_add(i.getLocal("pIn"),i.i32_const(2*n)),i.i32_const(3*n),i.getLocal("n"),i.getLocal("pAux"),i.i32_const(n)),i.setLocal("itIn",i.getLocal("pIn")),i.setLocal("itAux",i.getLocal("pAux")),i.setLocal("itOut",i.getLocal("pOut")),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.if(i.call(e+"_isZero",i.getLocal("itAux")),[...i.call(e+"_zero",i.getLocal("itOut")),...i.call(e+"_zero",i.i32_add(i.getLocal("itOut"),i.i32_const(n)))],[...i.call(e+"_mul",i.getLocal("itAux"),i.i32_add(i.getLocal("itIn"),i.i32_const(n)),l),...i.call(e+"_square",i.getLocal("itAux"),i.getLocal("itAux")),...i.call(e+"_mul",i.getLocal("itAux"),i.getLocal("itIn"),i.getLocal("itOut")),...i.call(e+"_mul",i.getLocal("itAux"),l,i.i32_add(i.getLocal("itOut"),i.i32_const(n)))]),i.setLocal("itIn",i.i32_add(i.getLocal("itIn"),i.i32_const(3*n))),i.setLocal("itOut",i.i32_add(i.getLocal("itOut"),i.i32_const(2*n))),i.setLocal("itAux",i.i32_add(i.getLocal("itAux"),i.i32_const(n))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))),i.i32_store(i.i32_const(0),i.getLocal("pAux")))}(),function(){const o=t.addFunction(a+"_normalize");o.addParam("p1","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),l=i.getLocal("p1"),c=i.i32_add(i.getLocal("p1"),i.i32_const(n)),s=i.i32_add(i.getLocal("p1"),i.i32_const(2*n)),r=i.getLocal("pr"),d=i.i32_add(i.getLocal("pr"),i.i32_const(n)),u=i.i32_add(i.getLocal("pr"),i.i32_const(2*n)),_=i.i32_const(t.alloc(n)),g=i.i32_const(t.alloc(n)),f=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("p1")),i.call(a+"_zero",i.getLocal("pr")),[...i.call(e+"_inverse",s,_),...i.call(e+"_square",_,g),...i.call(e+"_mul",_,g,f),...i.call(e+"_mul",l,g,r),...i.call(e+"_mul",c,f,d),...i.call(e+"_one",u)]))}(),function(){const e=t.addFunction(a+"__reverseBytes");e.addParam("pIn","i32"),e.addParam("n","i32"),e.addParam("pOut","i32"),e.addLocal("itOut","i32"),e.addLocal("itIn","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("itOut",o.i32_sub(o.i32_add(o.getLocal("pOut"),o.getLocal("n")),o.i32_const(1))),o.setLocal("itIn",o.getLocal("pIn")),o.block(o.loop(o.br_if(1,o.i32_lt_s(o.getLocal("itOut"),o.getLocal("pOut"))),o.i32_store8(o.getLocal("itOut"),o.i32_load8_u(o.getLocal("itIn"))),o.setLocal("itOut",o.i32_sub(o.getLocal("itOut"),o.i32_const(1))),o.setLocal("itIn",o.i32_add(o.getLocal("itIn"),o.i32_const(1))),o.br(0))))}(),function(){const e=t.addFunction(a+"_LEMtoU");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.call(a+"_isZeroAffine",o.getLocal("pIn")),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.i32_store8(o.getLocal("pOut"),o.i32_const(64)),...o.ret([])]),o.call(a+"_fromMontgomeryAffine",o.getLocal("pIn"),l),o.call(a+"__reverseBytes",c,o.i32_const(n),o.getLocal("pOut")),o.call(a+"__reverseBytes",s,o.i32_const(n),o.i32_add(o.getLocal("pOut"),o.i32_const(n))))}(),function(){const o=t.addFunction(a+"_LEMtoC");o.addParam("pIn","i32"),o.addParam("pOut","i32");const i=o.getCodeBuilder(),l=i.i32_const(t.alloc(n));o.addCode(i.if(i.call(a+"_isZero",i.getLocal("pIn")),[...i.call(e+"_zero",i.getLocal("pOut")),...i.i32_store8(i.getLocal("pOut"),i.i32_const(64)),...i.ret([])]),i.call(e+"_fromMontgomery",i.getLocal("pIn"),l),i.call(a+"__reverseBytes",l,i.i32_const(n),i.getLocal("pOut")),i.if(i.i32_eq(i.call(e+"_sign",i.i32_add(i.getLocal("pIn"),i.i32_const(n))),i.i32_const(-1)),i.i32_store8(i.getLocal("pOut"),i.i32_or(i.i32_load8_u(i.getLocal("pOut")),i.i32_const(128)))))}(),function(){const e=t.addFunction(a+"_UtoLEM");e.addParam("pIn","i32"),e.addParam("pOut","i32");const o=e.getCodeBuilder(),i=t.alloc(2*n),l=o.i32_const(i),c=o.i32_const(i),s=o.i32_const(i+n);e.addCode(o.if(o.i32_and(o.i32_load8_u(o.getLocal("pIn")),o.i32_const(64)),[...o.call(a+"_zeroAffine",o.getLocal("pOut")),...o.ret([])]),o.call(a+"__reverseBytes",o.getLocal("pIn"),o.i32_const(n),c),o.call(a+"__reverseBytes",o.i32_add(o.getLocal("pIn"),o.i32_const(n)),o.i32_const(n),s),o.call(a+"_toMontgomeryAffine",l,o.getLocal("pOut")))}(),function(){const i=t.addFunction(a+"_CtoLEM");i.addParam("pIn","i32"),i.addParam("pOut","i32"),i.addLocal("firstByte","i32"),i.addLocal("greatest","i32");const l=i.getCodeBuilder(),c=t.alloc(2*n),s=l.i32_const(c),r=l.i32_const(c+n);i.addCode(l.setLocal("firstByte",l.i32_load8_u(l.getLocal("pIn"))),l.if(l.i32_and(l.getLocal("firstByte"),l.i32_const(64)),[...l.call(a+"_zeroAffine",l.getLocal("pOut")),...l.ret([])]),l.setLocal("greatest",l.i32_and(l.getLocal("firstByte"),l.i32_const(128))),l.call(e+"_copy",l.getLocal("pIn"),r),l.i32_store8(r,l.i32_and(l.getLocal("firstByte"),l.i32_const(63))),l.call(a+"__reverseBytes",r,l.i32_const(n),s),l.call(e+"_toMontgomery",s,l.getLocal("pOut")),l.call(e+"_square",l.getLocal("pOut"),r),l.call(e+"_mul",l.getLocal("pOut"),r,r),l.call(e+"_add",r,l.i32_const(o),r),l.call(e+"_sqrt",r,r),l.call(e+"_neg",r,s),l.if(l.i32_eq(l.call(e+"_sign",r),l.i32_const(-1)),l.if(l.getLocal("greatest"),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n)))),l.if(l.getLocal("greatest"),l.call(e+"_neg",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))),l.call(e+"_copy",r,l.i32_add(l.getLocal("pOut"),l.i32_const(n))))))}(),gc(t,a+"_batchLEMtoU",a+"_LEMtoU",2*n,2*n),gc(t,a+"_batchLEMtoC",a+"_LEMtoC",2*n,n),gc(t,a+"_batchUtoLEM",a+"_UtoLEM",2*n,2*n),gc(t,a+"_batchCtoLEM",a+"_CtoLEM",n,2*n,!0),gc(t,a+"_batchToJacobian",a+"_toJacobian",2*n,3*n,!0),fc(t,a,a+"_multiexp",a+"_add",3*n),fc(t,a,a+"_multiexpAffine",a+"_addMixed",2*n),_c(t,a+"_timesScalar",3*n,a+"_add",a+"_double",a+"_sub",a+"_copy",a+"_zero"),_c(t,a+"_timesScalarAffine",2*n,a+"_addMixed",a+"_double",a+"_subMixed",a+"_copyAffine",a+"_zero"),t.exportFunction(a+"_isZero"),t.exportFunction(a+"_isZeroAffine"),t.exportFunction(a+"_eq"),t.exportFunction(a+"_eqMixed"),t.exportFunction(a+"_eqAffine"),t.exportFunction(a+"_copy"),t.exportFunction(a+"_copyAffine"),t.exportFunction(a+"_zero"),t.exportFunction(a+"_zeroAffine"),t.exportFunction(a+"_double"),t.exportFunction(a+"_doubleAffine"),t.exportFunction(a+"_add"),t.exportFunction(a+"_addMixed"),t.exportFunction(a+"_addAffine"),t.exportFunction(a+"_neg"),t.exportFunction(a+"_negAffine"),t.exportFunction(a+"_sub"),t.exportFunction(a+"_subMixed"),t.exportFunction(a+"_subAffine"),t.exportFunction(a+"_fromMontgomery"),t.exportFunction(a+"_fromMontgomeryAffine"),t.exportFunction(a+"_toMontgomery"),t.exportFunction(a+"_toMontgomeryAffine"),t.exportFunction(a+"_timesScalar"),t.exportFunction(a+"_timesScalarAffine"),t.exportFunction(a+"_normalize"),t.exportFunction(a+"_LEMtoU"),t.exportFunction(a+"_LEMtoC"),t.exportFunction(a+"_UtoLEM"),t.exportFunction(a+"_CtoLEM"),t.exportFunction(a+"_batchLEMtoU"),t.exportFunction(a+"_batchLEMtoC"),t.exportFunction(a+"_batchUtoLEM"),t.exportFunction(a+"_batchCtoLEM"),t.exportFunction(a+"_toAffine"),t.exportFunction(a+"_toJacobian"),t.exportFunction(a+"_batchToAffine"),t.exportFunction(a+"_batchToJacobian"),t.exportFunction(a+"_inCurve"),t.exportFunction(a+"_inCurveAffine"),a};const{isOdd:pc,modInv:mc,modPow:Lc}=vl,bc=Fl;var wc=function(t,a,e,o,i){const n=8*t.modules[o].n64,l=8*t.modules[e].n64,c=t.modules[o].q;let s=c-1n,r=0;for(;!pc(s);)r++,s>>=1n;let d=2n;for(;1n===Lc(d,c>>1n,c);)d+=1n;const u=new Array(r+1);u[r]=Lc(d,s,c);let _=r-1;for(;_>=0;)u[_]=Lc(u[_+1],2n,c),_--;const g=[],f=(1n<>e);return a}const x=Array(256);for(let t=0;t<256;t++)x[t]=F(t);const I=t.alloc(x);function B(){const e=t.addFunction(a+"_fft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32");const i=e.getCodeBuilder(),l=i.i32_const(t.alloc(n));e.addCode(i.setLocal("bits",i.call(a+"__log2",i.getLocal("n"))),i.call(o+"_one",l),i.call(a+"_rawfft",i.getLocal("px"),i.getLocal("bits"),i.i32_const(0),l))}!function(){const e=t.addFunction(a+"__rev");e.addParam("x","i32"),e.addParam("bits","i32"),e.setReturnType("i32");const o=e.getCodeBuilder();e.addCode(o.i32_rotl(o.i32_add(o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.getLocal("x"),o.i32_const(255)),I,0),o.i32_const(24)),o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(8)),o.i32_const(255)),I,0),o.i32_const(16))),o.i32_add(o.i32_shl(o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(16)),o.i32_const(255)),I,0),o.i32_const(8)),o.i32_load8_u(o.i32_and(o.i32_shr_u(o.getLocal("x"),o.i32_const(24)),o.i32_const(255)),I,0))),o.getLocal("bits")))}(),function(){const o=t.addFunction(a+"__reversePermutation");o.addParam("px","i32"),o.addParam("bits","i32"),o.addLocal("n","i32"),o.addLocal("i","i32"),o.addLocal("ri","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.setLocal("n",i.i32_shl(i.i32_const(1),i.getLocal("bits"))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("i"),i.i32_const(l)))),i.setLocal("ri",i.call(a+"__rev",i.getLocal("i"),i.getLocal("bits"))),i.setLocal("idx2",i.i32_add(i.getLocal("px"),i.i32_mul(i.getLocal("ri"),i.i32_const(l)))),i.if(i.i32_lt_u(i.getLocal("i"),i.getLocal("ri")),[...i.call(e+"_copy",i.getLocal("idx1"),n),...i.call(e+"_copy",i.getLocal("idx2"),i.getLocal("idx1")),...i.call(e+"_copy",n,i.getLocal("idx2"))]),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=t.addFunction(a+"__fftFinal");n.addParam("px","i32"),n.addParam("bits","i32"),n.addParam("reverse","i32"),n.addParam("mulFactor","i32"),n.addLocal("n","i32"),n.addLocal("ndiv2","i32"),n.addLocal("pInv2","i32"),n.addLocal("i","i32"),n.addLocal("mask","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32");const c=n.getCodeBuilder(),s=c.i32_const(t.alloc(l));n.addCode(c.if(c.i32_and(c.i32_eqz(c.getLocal("reverse")),c.call(o+"_isOne",c.getLocal("mulFactor"))),c.ret([])),c.setLocal("n",c.i32_shl(c.i32_const(1),c.getLocal("bits"))),c.setLocal("mask",c.i32_sub(c.getLocal("n"),c.i32_const(1))),c.setLocal("i",c.i32_const(1)),c.setLocal("ndiv2",c.i32_shr_u(c.getLocal("n"),c.i32_const(1))),c.block(c.loop(c.br_if(1,c.i32_ge_u(c.getLocal("i"),c.getLocal("ndiv2"))),c.setLocal("idx1",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("i"),c.i32_const(l)))),c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.i32_sub(c.getLocal("n"),c.getLocal("i")),c.i32_const(l)))),c.if(c.getLocal("reverse"),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(e+"_copy",c.getLocal("idx2"),c.getLocal("idx1")),...c.call(e+"_copy",s,c.getLocal("idx2"))],[...c.call(e+"_copy",c.getLocal("idx1"),s),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,s,c.getLocal("mulFactor"),c.getLocal("idx2"))]),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("idx1"),c.getLocal("mulFactor"),c.getLocal("idx1")),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))])),c.setLocal("i",c.i32_add(c.getLocal("i"),c.i32_const(1))),c.br(0))),c.if(c.call(o+"_isOne",c.getLocal("mulFactor")),[],[...c.call(i,c.getLocal("px"),c.getLocal("mulFactor"),c.getLocal("px")),...c.setLocal("idx2",c.i32_add(c.getLocal("px"),c.i32_mul(c.getLocal("ndiv2"),c.i32_const(l)))),...c.call(i,c.getLocal("idx2"),c.getLocal("mulFactor"),c.getLocal("idx2"))]))}(),function(){const c=t.addFunction(a+"_rawfft");c.addParam("px","i32"),c.addParam("bits","i32"),c.addParam("reverse","i32"),c.addParam("mulFactor","i32"),c.addLocal("s","i32"),c.addLocal("k","i32"),c.addLocal("j","i32"),c.addLocal("m","i32"),c.addLocal("mdiv2","i32"),c.addLocal("n","i32"),c.addLocal("pwm","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(a+"__reversePermutation",s.getLocal("px"),s.getLocal("bits")),s.setLocal("n",s.i32_shl(s.i32_const(1),s.getLocal("bits"))),s.setLocal("s",s.i32_const(1)),s.block(s.loop(s.br_if(1,s.i32_gt_u(s.getLocal("s"),s.getLocal("bits"))),s.setLocal("m",s.i32_shl(s.i32_const(1),s.getLocal("s"))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("s"),s.i32_const(n)))),s.setLocal("k",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("k"),s.getLocal("n"))),s.call(o+"_one",r),s.setLocal("mdiv2",s.i32_shr_u(s.getLocal("m"),s.i32_const(1))),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_ge_u(s.getLocal("j"),s.getLocal("mdiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("px"),s.i32_mul(s.i32_add(s.getLocal("k"),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.i32_mul(s.getLocal("mdiv2"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("k",s.i32_add(s.getLocal("k"),s.getLocal("m"))),s.br(0))),s.setLocal("s",s.i32_add(s.getLocal("s"),s.i32_const(1))),s.br(0))),s.call(a+"__fftFinal",s.getLocal("px"),s.getLocal("bits"),s.getLocal("reverse"),s.getLocal("mulFactor")))}(),function(){const e=t.addFunction(a+"__log2");e.addParam("n","i32"),e.setReturnType("i32"),e.addLocal("bits","i32"),e.addLocal("aux","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("aux",o.i32_shr_u(o.getLocal("n"),o.i32_const(1)))),e.addCode(o.setLocal("bits",o.i32_const(0))),e.addCode(o.block(o.loop(o.br_if(1,o.i32_eqz(o.getLocal("aux"))),o.setLocal("aux",o.i32_shr_u(o.getLocal("aux"),o.i32_const(1))),o.setLocal("bits",o.i32_add(o.getLocal("bits"),o.i32_const(1))),o.br(0)))),e.addCode(o.if(o.i32_ne(o.getLocal("n"),o.i32_shl(o.i32_const(1),o.getLocal("bits"))),o.unreachable())),e.addCode(o.if(o.i32_gt_u(o.getLocal("bits"),o.i32_const(r)),o.unreachable())),e.addCode(o.getLocal("bits"))}(),B(),function(){const e=t.addFunction(a+"_ifft");e.addParam("px","i32"),e.addParam("n","i32"),e.addLocal("bits","i32"),e.addLocal("pInv2","i32");const o=e.getCodeBuilder();e.addCode(o.setLocal("bits",o.call(a+"__log2",o.getLocal("n"))),o.setLocal("pInv2",o.i32_add(o.i32_const(L),o.i32_mul(o.getLocal("bits"),o.i32_const(n)))),o.call(a+"_rawfft",o.getLocal("px"),o.getLocal("bits"),o.i32_const(1),o.getLocal("pInv2")))}(),function(){const c=t.addFunction(a+"_fftJoin");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExt");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),d),s.call(i,s.getLocal("idx2"),s.getLocal("pShiftToM"),s.getLocal("idx2")),s.call(e+"_add",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(e+"_copy",d,s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftJoinExtInv");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_sub",s.getLocal("idx1"),d,s.getLocal("idx2")),s.call(i,s.getLocal("idx2"),s.getLocal("pSConst"),s.getLocal("idx2")),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),s.getLocal("idx1")),s.call(e+"_sub",d,s.getLocal("idx1"),s.getLocal("idx1")),s.call(i,s.getLocal("idx1"),s.getLocal("pSConst"),s.getLocal("idx1")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const c=t.addFunction(a+"_fftMix");c.addParam("pBuff","i32"),c.addParam("n","i32"),c.addParam("exp","i32"),c.addLocal("nGroups","i32"),c.addLocal("nPerGroup","i32"),c.addLocal("nPerGroupDiv2","i32"),c.addLocal("pairOffset","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("j","i32"),c.addLocal("pwm","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l)),u=s.i32_const(t.alloc(l));c.addCode(s.setLocal("nPerGroup",s.i32_shl(s.i32_const(1),s.getLocal("exp"))),s.setLocal("nPerGroupDiv2",s.i32_shr_u(s.getLocal("nPerGroup"),s.i32_const(1))),s.setLocal("nGroups",s.i32_shr_u(s.getLocal("n"),s.getLocal("exp"))),s.setLocal("pairOffset",s.i32_mul(s.getLocal("nPerGroupDiv2"),s.i32_const(l))),s.setLocal("pwm",s.i32_add(s.i32_const(h),s.i32_mul(s.getLocal("exp"),s.i32_const(n)))),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("nGroups"))),s.call(o+"_one",r),s.setLocal("j",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("j"),s.getLocal("nPerGroupDiv2"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff"),s.i32_mul(s.i32_add(s.i32_mul(s.getLocal("i"),s.getLocal("nPerGroup")),s.getLocal("j")),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("idx1"),s.getLocal("pairOffset"))),s.call(i,s.getLocal("idx2"),r,d),s.call(e+"_copy",s.getLocal("idx1"),u),s.call(e+"_add",u,d,s.getLocal("idx1")),s.call(e+"_sub",u,d,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("pwm"),r),s.setLocal("j",s.i32_add(s.getLocal("j"),s.i32_const(1))),s.br(0))),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),function(){const o=t.addFunction(a+"_fftFinal");o.addParam("pBuff","i32"),o.addParam("n","i32"),o.addParam("factor","i32"),o.addLocal("idx1","i32"),o.addLocal("idx2","i32"),o.addLocal("i","i32"),o.addLocal("ndiv2","i32");const n=o.getCodeBuilder(),c=n.i32_const(t.alloc(l));o.addCode(n.setLocal("ndiv2",n.i32_shr_u(n.getLocal("n"),n.i32_const(1))),n.if(n.i32_and(n.getLocal("n"),n.i32_const(1)),n.call(i,n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))),n.getLocal("factor"),n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(l))))),n.setLocal("i",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_ge_u(n.getLocal("i"),n.getLocal("ndiv2"))),n.setLocal("idx1",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.getLocal("i"),n.i32_const(l)))),n.setLocal("idx2",n.i32_add(n.getLocal("pBuff"),n.i32_mul(n.i32_sub(n.i32_sub(n.getLocal("n"),n.i32_const(1)),n.getLocal("i")),n.i32_const(l)))),n.call(i,n.getLocal("idx2"),n.getLocal("factor"),c),n.call(i,n.getLocal("idx1"),n.getLocal("factor"),n.getLocal("idx2")),n.call(e+"_copy",c,n.getLocal("idx1")),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),function(){const c=t.addFunction(a+"_prepareLagrangeEvaluation");c.addParam("pBuff1","i32"),c.addParam("pBuff2","i32"),c.addParam("n","i32"),c.addParam("first","i32"),c.addParam("inc","i32"),c.addParam("totalBits","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("pShiftToM","i32"),c.addLocal("pSConst","i32");const s=c.getCodeBuilder(),r=s.i32_const(t.alloc(n)),d=s.i32_const(t.alloc(l));c.addCode(s.setLocal("pShiftToM",s.i32_add(s.i32_const(A),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.setLocal("pSConst",s.i32_add(s.i32_const(C),s.i32_mul(s.getLocal("totalBits"),s.i32_const(n)))),s.call(o+"_copy",s.getLocal("first"),r),s.setLocal("i",s.i32_const(0)),s.block(s.loop(s.br_if(1,s.i32_eq(s.getLocal("i"),s.getLocal("n"))),s.setLocal("idx1",s.i32_add(s.getLocal("pBuff1"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.setLocal("idx2",s.i32_add(s.getLocal("pBuff2"),s.i32_mul(s.getLocal("i"),s.i32_const(l)))),s.call(i,s.getLocal("idx1"),s.getLocal("pShiftToM"),d),s.call(e+"_sub",s.getLocal("idx2"),d,d),s.call(e+"_sub",s.getLocal("idx1"),s.getLocal("idx2"),s.getLocal("idx2")),s.call(i,d,s.getLocal("pSConst"),s.getLocal("idx1")),s.call(i,s.getLocal("idx2"),r,s.getLocal("idx2")),s.call(o+"_mul",r,s.getLocal("inc"),r),s.setLocal("i",s.i32_add(s.getLocal("i"),s.i32_const(1))),s.br(0))))}(),t.exportFunction(a+"_fft"),t.exportFunction(a+"_ifft"),t.exportFunction(a+"_rawfft"),t.exportFunction(a+"_fftJoin"),t.exportFunction(a+"_fftJoinExt"),t.exportFunction(a+"_fftJoinExtInv"),t.exportFunction(a+"_fftMix"),t.exportFunction(a+"_fftFinal"),t.exportFunction(a+"_prepareLagrangeEvaluation")},yc=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_zero");i.addParam("px","i32"),i.addParam("n","i32"),i.addLocal("lastp","i32"),i.addLocal("p","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("p",n.getLocal("px")),n.setLocal("lastp",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("p"),n.getLocal("lastp"))),n.call(e+"_zero",n.getLocal("p")),n.setLocal("p",n.i32_add(n.getLocal("p"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_constructLC");i.addParam("ppolynomials","i32"),i.addParam("psignals","i32"),i.addParam("nSignals","i32"),i.addParam("pres","i32"),i.addLocal("i","i32"),i.addLocal("j","i32"),i.addLocal("pp","i32"),i.addLocal("ps","i32"),i.addLocal("pd","i32"),i.addLocal("ncoefs","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("i",n.i32_const(0)),n.setLocal("pp",n.getLocal("ppolynomials")),n.setLocal("ps",n.getLocal("psignals")),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("i"),n.getLocal("nSignals"))),n.setLocal("ncoefs",n.i32_load(n.getLocal("pp"))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.setLocal("j",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("j"),n.getLocal("ncoefs"))),n.setLocal("pd",n.i32_add(n.getLocal("pres"),n.i32_mul(n.i32_load(n.getLocal("pp")),n.i32_const(o)))),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(4))),n.call(e+"_mul",n.getLocal("ps"),n.getLocal("pp"),l),n.call(e+"_add",l,n.getLocal("pd"),n.getLocal("pd")),n.setLocal("pp",n.i32_add(n.getLocal("pp"),n.i32_const(o))),n.setLocal("j",n.i32_add(n.getLocal("j"),n.i32_const(1))),n.br(0))),n.setLocal("ps",n.i32_add(n.getLocal("ps"),n.i32_const(o))),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(),t.exportFunction(a+"_zero"),t.exportFunction(a+"_constructLC"),a},Ac=function(t,a,e){const o=8*t.modules[e].n64;return function(){const i=t.addFunction(a+"_buildABC");i.addParam("pCoefs","i32"),i.addParam("nCoefs","i32"),i.addParam("pWitness","i32"),i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("offsetOut","i32"),i.addParam("nOut","i32"),i.addParam("offsetWitness","i32"),i.addParam("nWitness","i32"),i.addLocal("it","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("last","i32"),i.addLocal("m","i32"),i.addLocal("c","i32"),i.addLocal("s","i32"),i.addLocal("pOut","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_zero",n.getLocal("ita")),n.call(e+"_zero",n.getLocal("itb")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.br(0))),n.setLocal("it",n.getLocal("pCoefs")),n.setLocal("last",n.i32_add(n.getLocal("pCoefs"),n.i32_mul(n.getLocal("nCoefs"),n.i32_const(o+12)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("it"),n.getLocal("last"))),n.setLocal("s",n.i32_load(n.getLocal("it"),8)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_ge_u(n.getLocal("s"),n.i32_add(n.getLocal("offsetWitness"),n.getLocal("nWitness")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("m",n.i32_load(n.getLocal("it"))),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(0)),n.setLocal("pOut",n.getLocal("pA")),n.if(n.i32_eq(n.getLocal("m"),n.i32_const(1)),n.setLocal("pOut",n.getLocal("pB")),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)])),n.setLocal("c",n.i32_load(n.getLocal("it"),4)),n.if(n.i32_or(n.i32_lt_u(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_ge_u(n.getLocal("c"),n.i32_add(n.getLocal("offsetOut"),n.getLocal("nOut")))),[...n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),...n.br(1)]),n.setLocal("pOut",n.i32_add(n.getLocal("pOut"),n.i32_mul(n.i32_sub(n.getLocal("c"),n.getLocal("offsetOut")),n.i32_const(o)))),n.call(e+"_mul",n.i32_add(n.getLocal("pWitness"),n.i32_mul(n.i32_sub(n.getLocal("s"),n.getLocal("offsetWitness")),n.i32_const(o))),n.i32_add(n.getLocal("it"),n.i32_const(12)),l),n.call(e+"_add",n.getLocal("pOut"),l,n.getLocal("pOut")),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o+12))),n.br(0))),n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("it",n.getLocal("pC")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("nOut"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("it")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("it",n.i32_add(n.getLocal("it"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_joinABC");i.addParam("pA","i32"),i.addParam("pB","i32"),i.addParam("pC","i32"),i.addParam("n","i32"),i.addParam("pP","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itc","i32"),i.addLocal("itp","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder(),l=n.i32_const(t.alloc(o));i.addCode(n.setLocal("ita",n.getLocal("pA")),n.setLocal("itb",n.getLocal("pB")),n.setLocal("itc",n.getLocal("pC")),n.setLocal("itp",n.getLocal("pP")),n.setLocal("last",n.i32_add(n.getLocal("pA"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_mul",n.getLocal("ita"),n.getLocal("itb"),l),n.call(e+"_sub",l,n.getLocal("itc"),n.getLocal("itp")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itc",n.i32_add(n.getLocal("itc"),n.i32_const(o))),n.setLocal("itp",n.i32_add(n.getLocal("itp"),n.i32_const(o))),n.br(0))))}(),function(){const i=t.addFunction(a+"_batchAdd");i.addParam("pa","i32"),i.addParam("pb","i32"),i.addParam("n","i32"),i.addParam("pr","i32"),i.addLocal("ita","i32"),i.addLocal("itb","i32"),i.addLocal("itr","i32"),i.addLocal("last","i32");const n=i.getCodeBuilder();i.addCode(n.setLocal("ita",n.getLocal("pa")),n.setLocal("itb",n.getLocal("pb")),n.setLocal("itr",n.getLocal("pr")),n.setLocal("last",n.i32_add(n.getLocal("pa"),n.i32_mul(n.getLocal("n"),n.i32_const(o)))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("ita"),n.getLocal("last"))),n.call(e+"_add",n.getLocal("ita"),n.getLocal("itb"),n.getLocal("itr")),n.setLocal("ita",n.i32_add(n.getLocal("ita"),n.i32_const(o))),n.setLocal("itb",n.i32_add(n.getLocal("itb"),n.i32_const(o))),n.setLocal("itr",n.i32_add(n.getLocal("itr"),n.i32_const(o))),n.br(0))))}(),t.exportFunction(a+"_buildABC"),t.exportFunction(a+"_joinABC"),t.exportFunction(a+"_batchAdd"),a},Cc=function(t,a,e,o,i,n,l,c){const s=t.addFunction(a);s.addParam("pIn","i32"),s.addParam("n","i32"),s.addParam("pFirst","i32"),s.addParam("pInc","i32"),s.addParam("pOut","i32"),s.addLocal("pOldFree","i32"),s.addLocal("i","i32"),s.addLocal("pFrom","i32"),s.addLocal("pTo","i32");const r=s.getCodeBuilder(),d=r.i32_const(t.alloc(l));s.addCode(r.setLocal("pFrom",r.getLocal("pIn")),r.setLocal("pTo",r.getLocal("pOut"))),s.addCode(r.call(o+"_copy",r.getLocal("pFirst"),d)),s.addCode(r.setLocal("i",r.i32_const(0)),r.block(r.loop(r.br_if(1,r.i32_eq(r.getLocal("i"),r.getLocal("n"))),r.call(c,r.getLocal("pFrom"),d,r.getLocal("pTo")),r.setLocal("pFrom",r.i32_add(r.getLocal("pFrom"),r.i32_const(i))),r.setLocal("pTo",r.i32_add(r.getLocal("pTo"),r.i32_const(n))),r.call(o+"_mul",d,r.getLocal("pInc"),d),r.setLocal("i",r.i32_add(r.getLocal("i"),r.i32_const(1))),r.br(0)))),t.exportFunction(a)};const Fc=Fl,xc=ac,Ic=ic,Bc=sc,Ec=uc,vc=hc,Sc=wc,Pc=yc,qc=Ac,Oc=Cc,{bitLength:Gc,modInv:zc,isOdd:Tc,isNegative:Mc}=vl;const Uc=Fl,Qc=ac,kc=ic,Rc=sc,Nc=uc,Dc=hc,$c=wc,jc=yc,Vc=Ac,Kc=Cc,{bitLength:Hc,isOdd:Zc,isNegative:Wc}=vl;var Yc=function(t,a){const e=a||"bn128";if(t.modules[e])return e;const o=21888242871839275222246405745257275088696311157297823662689037894645226208583n,i=21888242871839275222246405745257275088548364400416034343698204186575808495617n,n=Math.floor((Gc(o-1n)-1)/64)+1,l=8*n,c=l,s=l,r=2*s,d=12*s,u=t.alloc(Fc.bigInt2BytesLE(i,c)),_=xc(t,o,"f1m");Ic(t,i,"fr","frm");const g=t.alloc(Fc.bigInt2BytesLE(b(3n),s)),f=vc(t,"g1m","f1m",g);Sc(t,"frm","frm","frm","frm_mul"),Pc(t,"pol","frm"),qc(t,"qap","frm");const h=Bc(t,"f1m_neg","f2m","f1m"),p=t.alloc([...Fc.bigInt2BytesLE(b(19485874751759354771024239261021720505790618469301721065564631296452457478373n),s),...Fc.bigInt2BytesLE(b(266929791119991161246907387137283842545076965332900288569378510910307636690n),s)]),m=vc(t,"g2m","f2m",p);function L(a,e){const o=t.addFunction(a);o.addParam("pG","i32"),o.addParam("pFr","i32"),o.addParam("pr","i32");const i=o.getCodeBuilder(),n=i.i32_const(t.alloc(l));o.addCode(i.call("frm_fromMontgomery",i.getLocal("pFr"),n),i.call(e,i.getLocal("pG"),n,i.i32_const(l),i.getLocal("pr"))),t.exportFunction(a)}function b(t){return BigInt(t)*(1n<0n;)Tc(a)?e.push(1):e.push(0),a>>=1n;return e}(29793968203157093288n),T=t.alloc(z),M=3*r,U=z.length-1,Q=z.reduce(((t,a)=>t+(0!=a?1:0)),0),k=6*l,R=3*l*2+(Q+U+1)*M;t.modules[e]={n64:n,pG1gen:y,pG1zero:C,pG1b:g,pG2gen:x,pG2zero:B,pG2b:p,pq:t.modules.f1m.pq,pr:u,pOneT:E,prePSize:k,preQSize:R,r:i.toString(),q:o.toString()};const N=4965661367192848881n;function D(a){const i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[8376118865763821496583973867626364092589906065868298776909617916018768340080n,16469823323077808223889137241176536799009286646108169935659301613961712198316n],[21888242871839275220042445260109153167277707414472061641714758635765020556617n,0n],[11697423496358154304825782922584725312912383441159505038794027105778954184319n,303847389135065887422783454877609941456349188919719272345083954437860409601n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3321304630594332808241809054958361220322477375291206261884409189760185844239n,5722266937896532885780051958958348231143373700109372999374820235121374419868n],[21888242871839275222246405745257275088696311157297823662689037894645226208582n,0n],[13512124006075453725662431877630910996106405091429524885779419978626457868503n,5418419548761466998357268504080738289687024511189653727029736280683514010267n],[2203960485148121921418603742825762020974279258880205651966n,0n],[10190819375481120917420622822672549775783927716138318623895010788866272024264n,21584395482704209334823622290379665147239961968378104390343953940207365798982n],[2203960485148121921418603742825762020974279258880205651967n,0n],[18566938241244942414004596690298913868373833782006617400804628704885040364344n,16165975933942742336466353786298926857552937457188450663314217659523851788715n]]],n=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[21575463638280843010398324269430826099269044274347216827212613867836435027261n,10307601595873709700152284273816112264069230130616436755625194854815875713954n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3772000881919853776433695186713858239009073593817195771773381919316419345261n,2236595495967245188281701248203181795121068902605861227855261137820944008926n],[2203960485148121921418603742825762020974279258880205651966n,0n],[18429021223477853657660792034369865839114504446431234726392080002137598044644n,9344045779998320333812420223237981029506012124075525679208581902008406485703n]],[[1n,0n],[2581911344467009335267311115468803099551665605076196740867805258568234346338n,19937756971775647987995932169929341994314640652964949448313374472400716661030n],[2203960485148121921418603742825762020974279258880205651966n,0n],[5324479202449903542726783395506214481928257762400643279780343368557297135718n,16208900380737693084919495127334387981393726419856888799917914180988844123039n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[13981852324922362344252311234282257507216387789820983642040889267519694726527n,7629828391165209371577384193250820201684255241773809077146787135900891633097n]]],l=t.addFunction(e+"__frobeniusMap"+a);l.addParam("x","i32"),l.addParam("r","i32");const c=l.getCodeBuilder();for(let e=0;e<6;e++){const o=0==e?c.getLocal("x"):c.i32_add(c.getLocal("x"),c.i32_const(e*r)),u=o,g=c.i32_add(c.getLocal("x"),c.i32_const(e*r+s)),f=0==e?c.getLocal("r"):c.i32_add(c.getLocal("r"),c.i32_const(e*r)),p=f,m=c.i32_add(c.getLocal("r"),c.i32_const(e*r+s)),L=d(i[Math.floor(e/3)][a%12],n[e%3][a%6]),w=t.alloc([...Fc.bigInt2BytesLE(b(L[0]),32),...Fc.bigInt2BytesLE(b(L[1]),32)]);a%2==1?l.addCode(c.call(_+"_copy",u,p),c.call(_+"_neg",g,m),c.call(h+"_mul",f,c.i32_const(w),f)):l.addCode(c.call(h+"_mul",o,c.i32_const(w),f))}function d(t,a){const e=BigInt(t[0]),i=BigInt(t[1]),n=BigInt(a[0]),l=BigInt(a[1]),c=[(e*n-i*l)%o,(e*l+i*n)%o];return Mc(c[0])&&(c[0]=c[0]+o),c}}function $(a,o){const i=function(t){let a=t;const e=[];for(;a>0n;){if(Tc(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),n=t.alloc(i),l=t.addFunction(e+"__cyclotomicExp_"+o);l.addParam("x","i32"),l.addParam("r","i32"),l.addLocal("bit","i32"),l.addLocal("i","i32");const c=l.getCodeBuilder(),s=c.getLocal("x"),r=c.getLocal("r"),u=c.i32_const(t.alloc(d));l.addCode(c.call(G+"_conjugate",s,u),c.call(G+"_one",r),c.if(c.teeLocal("bit",c.i32_load8_s(c.i32_const(i.length-1),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.setLocal("i",c.i32_const(i.length-2)),c.block(c.loop(c.call(e+"__cyclotomicSquare",r,r),c.if(c.teeLocal("bit",c.i32_load8_s(c.getLocal("i"),n)),c.if(c.i32_eq(c.getLocal("bit"),c.i32_const(1)),c.call(G+"_mul",r,s,r),c.call(G+"_mul",r,u,r))),c.br_if(1,c.i32_eqz(c.getLocal("i"))),c.setLocal("i",c.i32_sub(c.getLocal("i"),c.i32_const(1))),c.br(0))))}function j(){!function(){const a=t.addFunction(e+"__cyclotomicSquare");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.i32_add(o.getLocal("x"),o.i32_const(r)),l=o.i32_add(o.getLocal("x"),o.i32_const(2*r)),c=o.i32_add(o.getLocal("x"),o.i32_const(3*r)),s=o.i32_add(o.getLocal("x"),o.i32_const(4*r)),d=o.i32_add(o.getLocal("x"),o.i32_const(5*r)),u=o.getLocal("r"),_=o.i32_add(o.getLocal("r"),o.i32_const(r)),g=o.i32_add(o.getLocal("r"),o.i32_const(2*r)),f=o.i32_add(o.getLocal("r"),o.i32_const(3*r)),p=o.i32_add(o.getLocal("r"),o.i32_const(4*r)),m=o.i32_add(o.getLocal("r"),o.i32_const(5*r)),L=o.i32_const(t.alloc(r)),b=o.i32_const(t.alloc(r)),w=o.i32_const(t.alloc(r)),y=o.i32_const(t.alloc(r)),A=o.i32_const(t.alloc(r)),C=o.i32_const(t.alloc(r)),F=o.i32_const(t.alloc(r)),x=o.i32_const(t.alloc(r));a.addCode(o.call(h+"_mul",i,s,F),o.call(h+"_mul",s,o.i32_const(v),L),o.call(h+"_add",i,L,L),o.call(h+"_add",i,s,x),o.call(h+"_mul",x,L,L),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",L,x,L),o.call(h+"_add",F,F,b),o.call(h+"_mul",c,l,F),o.call(h+"_mul",l,o.i32_const(v),w),o.call(h+"_add",c,w,w),o.call(h+"_add",c,l,x),o.call(h+"_mul",x,w,w),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",w,x,w),o.call(h+"_add",F,F,y),o.call(h+"_mul",n,d,F),o.call(h+"_mul",d,o.i32_const(v),A),o.call(h+"_add",n,A,A),o.call(h+"_add",n,d,x),o.call(h+"_mul",x,A,A),o.call(h+"_mul",o.i32_const(v),F,x),o.call(h+"_add",F,x,x),o.call(h+"_sub",A,x,A),o.call(h+"_add",F,F,C),o.call(h+"_sub",L,i,u),o.call(h+"_add",u,u,u),o.call(h+"_add",L,u,u),o.call(h+"_add",b,s,p),o.call(h+"_add",p,p,p),o.call(h+"_add",b,p,p),o.call(h+"_mul",C,o.i32_const(P),x),o.call(h+"_add",x,c,f),o.call(h+"_add",f,f,f),o.call(h+"_add",x,f,f),o.call(h+"_sub",A,l,g),o.call(h+"_add",g,g,g),o.call(h+"_add",A,g,g),o.call(h+"_sub",w,n,_),o.call(h+"_add",_,_,_),o.call(h+"_add",w,_,_),o.call(h+"_add",y,d,m),o.call(h+"_add",m,m,m),o.call(h+"_add",y,m,m))}(),$(N,"w0");const a=t.addFunction(e+"__finalExponentiationLastChunk");a.addParam("x","i32"),a.addParam("r","i32");const o=a.getCodeBuilder(),i=o.getLocal("x"),n=o.getLocal("r"),l=o.i32_const(t.alloc(d)),c=o.i32_const(t.alloc(d)),s=o.i32_const(t.alloc(d)),u=o.i32_const(t.alloc(d)),_=o.i32_const(t.alloc(d)),g=o.i32_const(t.alloc(d)),f=o.i32_const(t.alloc(d)),p=o.i32_const(t.alloc(d)),m=o.i32_const(t.alloc(d)),L=o.i32_const(t.alloc(d)),b=o.i32_const(t.alloc(d)),w=o.i32_const(t.alloc(d)),y=o.i32_const(t.alloc(d)),A=o.i32_const(t.alloc(d)),C=o.i32_const(t.alloc(d)),F=o.i32_const(t.alloc(d)),x=o.i32_const(t.alloc(d)),I=o.i32_const(t.alloc(d)),B=o.i32_const(t.alloc(d)),E=o.i32_const(t.alloc(d)),S=o.i32_const(t.alloc(d));a.addCode(o.call(e+"__cyclotomicExp_w0",i,l),o.call(G+"_conjugate",l,l),o.call(e+"__cyclotomicSquare",l,c),o.call(e+"__cyclotomicSquare",c,s),o.call(G+"_mul",s,c,u),o.call(e+"__cyclotomicExp_w0",u,_),o.call(G+"_conjugate",_,_),o.call(e+"__cyclotomicSquare",_,g),o.call(e+"__cyclotomicExp_w0",g,f),o.call(G+"_conjugate",f,f),o.call(G+"_conjugate",u,p),o.call(G+"_conjugate",f,m),o.call(G+"_mul",m,_,L),o.call(G+"_mul",L,p,b),o.call(G+"_mul",b,c,w),o.call(G+"_mul",b,_,y),o.call(G+"_mul",y,i,A),o.call(e+"__frobeniusMap1",w,C),o.call(G+"_mul",C,A,F),o.call(e+"__frobeniusMap2",b,x),o.call(G+"_mul",x,F,I),o.call(G+"_conjugate",i,B),o.call(G+"_mul",B,w,E),o.call(e+"__frobeniusMap3",E,S),o.call(G+"_mul",S,I,n))}const V=t.alloc(k),K=t.alloc(R);function H(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t0n;)Zc(a)?e.push(1):e.push(0),a>>=1n;return e}(0xd201000000010000n),z=t.alloc(G),T=3*s,M=G.length-1,U=G.reduce(((t,a)=>t+(0!=a?1:0)),0),Q=6*l,k=3*l*2+(U+M+1)*T,R=!0,N=15132376222941642752n;function D(a){const e=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n,151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n],[2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n,1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n,877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n,3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n,2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n,3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n]]],i=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[0n,4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[0n,1n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[0n,793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n]],[[1n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n]]],n=t.addFunction(O+"_frobeniusMap"+a);n.addParam("x","i32"),n.addParam("r","i32");const r=n.getCodeBuilder();for(let o=0;o<6;o++){const u=0==o?r.getLocal("x"):r.i32_add(r.getLocal("x"),r.i32_const(o*s)),_=u,g=r.i32_add(r.getLocal("x"),r.i32_const(o*s+c)),h=0==o?r.getLocal("r"):r.i32_add(r.getLocal("r"),r.i32_const(o*s)),p=h,L=r.i32_add(r.getLocal("r"),r.i32_const(o*s+c)),b=d(e[Math.floor(o/3)][a%12],i[o%3][a%6]),w=t.alloc([...Uc.bigInt2BytesLE(y(b[0]),l),...Uc.bigInt2BytesLE(y(b[1]),l)]);a%2==1?n.addCode(r.call(f+"_copy",_,p),r.call(f+"_neg",g,L),r.call(m+"_mul",h,r.i32_const(w),h)):n.addCode(r.call(m+"_mul",u,r.i32_const(w),h))}function d(t,a){const e=t[0],i=t[1],n=a[0],l=a[1],c=[(e*n-i*l)%o,(e*l+i*n)%o];return Wc(c[0])&&(c[0]=c[0]+o),c}}function $(a,o,i){const n=function(t){let a=t;const e=[];for(;a>0n;){if(Zc(a)){const t=2-Number(a%4n);e.push(t),a-=BigInt(t)}else e.push(0);a>>=1n}return e}(a).map((t=>-1==t?255:t)),l=t.alloc(n),c=t.addFunction(e+"__cyclotomicExp_"+i);c.addParam("x","i32"),c.addParam("r","i32"),c.addLocal("bit","i32"),c.addLocal("i","i32");const s=c.getCodeBuilder(),d=s.getLocal("x"),u=s.getLocal("r"),_=s.i32_const(t.alloc(r));c.addCode(s.call(O+"_conjugate",d,_),s.call(O+"_one",u),s.if(s.teeLocal("bit",s.i32_load8_s(s.i32_const(n.length-1),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.setLocal("i",s.i32_const(n.length-2)),s.block(s.loop(s.call(e+"__cyclotomicSquare",u,u),s.if(s.teeLocal("bit",s.i32_load8_s(s.getLocal("i"),l)),s.if(s.i32_eq(s.getLocal("bit"),s.i32_const(1)),s.call(O+"_mul",u,d,u),s.call(O+"_mul",u,_,u))),s.br_if(1,s.i32_eqz(s.getLocal("i"))),s.setLocal("i",s.i32_sub(s.getLocal("i"),s.i32_const(1))),s.br(0)))),o&&c.addCode(s.call(O+"_conjugate",u,u))}t.modules[e]={n64q:n,n64r:d,n8q:l,n8r:u,pG1gen:C,pG1zero:x,pG1b:h,pG2gen:B,pG2zero:v,pG2b:L,pq:t.modules.f1m.pq,pr:g,pOneT:S,r:i,q:o,prePSize:Q,preQSize:k},function(){const a=t.addFunction(q+"_mul1");a.addParam("pA","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC1"),s=e.getLocal("pR"),r=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),d=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),u=e.i32_const(t.alloc(2*c)),_=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_add",o,i,u),e.call(m+"_add",i,n,_),e.call(m+"_mul",i,l,d),e.call(m+"_mul",_,l,s),e.call(m+"_sub",s,d,s),e.call(m+"_mulNR",s,s),e.call(m+"_mul",u,l,r),e.call(m+"_sub",r,d,r))}(),function(){const a=t.addFunction(q+"_mul01");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(2*c)),n=e.i32_add(e.getLocal("pA"),e.i32_const(4*c)),l=e.getLocal("pC0"),s=e.getLocal("pC1"),r=e.getLocal("pR"),d=e.i32_add(e.getLocal("pR"),e.i32_const(2*c)),u=e.i32_add(e.getLocal("pR"),e.i32_const(4*c)),_=e.i32_const(t.alloc(2*c)),g=e.i32_const(t.alloc(2*c)),f=e.i32_const(t.alloc(2*c)),h=e.i32_const(t.alloc(2*c));a.addCode(e.call(m+"_mul",o,l,_),e.call(m+"_mul",i,s,g),e.call(m+"_add",o,i,f),e.call(m+"_add",o,n,h),e.call(m+"_add",i,n,r),e.call(m+"_mul",r,s,r),e.call(m+"_sub",r,g,r),e.call(m+"_mulNR",r,r),e.call(m+"_add",r,_,r),e.call(m+"_add",l,s,d),e.call(m+"_mul",d,f,d),e.call(m+"_sub",d,_,d),e.call(m+"_sub",d,g,d),e.call(m+"_mul",h,l,u),e.call(m+"_sub",u,_,u),e.call(m+"_add",u,g,u))}(),function(){const a=t.addFunction(O+"_mul014");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pC4","i32"),a.addParam("pR","i32");const e=a.getCodeBuilder(),o=e.getLocal("pA"),i=e.i32_add(e.getLocal("pA"),e.i32_const(6*c)),n=e.getLocal("pC0"),l=e.getLocal("pC1"),s=e.getLocal("pC4"),r=e.i32_const(t.alloc(6*c)),d=e.i32_const(t.alloc(6*c)),u=e.i32_const(t.alloc(2*c)),_=e.getLocal("pR"),g=e.i32_add(e.getLocal("pR"),e.i32_const(6*c));a.addCode(e.call(q+"_mul01",o,n,l,r),e.call(q+"_mul1",i,s,d),e.call(m+"_add",l,s,u),e.call(q+"_add",i,o,g),e.call(q+"_mul01",g,n,u,g),e.call(q+"_sub",g,r,g),e.call(q+"_sub",g,d,g),e.call(q+"_copy",d,_),e.call(q+"_mulNR",_,_),e.call(q+"_add",_,r,_))}(),function(){const a=t.addFunction(e+"_ell");a.addParam("pP","i32"),a.addParam("pCoefs","i32"),a.addParam("pF","i32");const o=a.getCodeBuilder(),i=o.getLocal("pP"),n=o.i32_add(o.getLocal("pP"),o.i32_const(l)),s=o.getLocal("pF"),r=o.getLocal("pCoefs"),d=o.i32_add(o.getLocal("pCoefs"),o.i32_const(c)),u=o.i32_add(o.getLocal("pCoefs"),o.i32_const(2*c)),_=o.i32_add(o.getLocal("pCoefs"),o.i32_const(3*c)),g=o.i32_add(o.getLocal("pCoefs"),o.i32_const(4*c)),h=t.alloc(2*c),p=o.i32_const(h),m=o.i32_const(h),L=o.i32_const(h+c),b=t.alloc(2*c),w=o.i32_const(b),y=o.i32_const(b),A=o.i32_const(b+c);a.addCode(o.call(f+"_mul",r,n,m),o.call(f+"_mul",d,n,L),o.call(f+"_mul",u,i,y),o.call(f+"_mul",_,i,A),o.call(O+"_mul014",s,g,w,p,s))}();const j=t.alloc(Q),V=t.alloc(k);function K(a){const o=t.addFunction(e+"_pairingEq"+a);for(let t=0;t>=1;return e}function as(t,a){return(Xc[t>>>24]|Xc[t>>>16&255]<<8|Xc[t>>>8&255]<<16|Xc[255&t]<<24)>>>32-a}function es(t){return(0!=(4294901760&t)?(t&=4294901760,16):0)|(0!=(4278255360&t)?(t&=4278255360,8):0)|(0!=(4042322160&t)?(t&=4042322160,4):0)|(0!=(3435973836&t)?(t&=3435973836,2):0)|0!=(2863311530&t)}function os(t,a){const e=new Uint8Array(a*t.length);for(let o=0;o0;){const t=l+c>ns?ns-l:c,a=new Uint8Array(this.buffers[n].buffer,this.buffers[n].byteOffset+l,t);if(t==e)return a.slice();i||(i=e<=ns?new Uint8Array(e):new ls(e)),i.set(a,e-c),c-=t,n++,l=0}return i}set(t,a){void 0===a&&(a=0);const e=t.byteLength;if(0==e)return;const o=Math.floor(a/ns);if(o==Math.floor((a+e-1)/ns))return t instanceof ls&&1==t.buffers.length?this.buffers[o].set(t.buffers[0],a%ns):this.buffers[o].set(t,a%ns);let i=o,n=a%ns,l=e;for(;l>0;){const a=n+l>ns?ns-n:l,o=t.slice(e-l,e-l+a);new Uint8Array(this.buffers[i].buffer,this.buffers[i].byteOffset+n,a).set(o),l-=a,i++,n=0}}}function cs(t,a,e,o){return async function(i){const n=Math.floor(i.byteLength/e);if(n*e!==i.byteLength)throw new Error("Invalid buffer size");const l=Math.floor(n/t.concurrency),c=[];for(let s=0;s=0;t--)this.w[t]=this.square(this.w[t+1]);if(!this.eq(this.w[0],this.one))throw new Error("Error calculating roots of unity");this.batchToMontgomery=cs(t,a+"_batchToMontgomery",this.n8,this.n8),this.batchFromMontgomery=cs(t,a+"_batchFromMontgomery",this.n8,this.n8)}op2(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op2Bool(t,a,e){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,e),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp2)}op1(t,a){return this.tm.setBuff(this.pOp1,a),this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op1Bool(t,a){return this.tm.setBuff(this.pOp1,a),!!this.tm.instance.exports[this.prefix+t](this.pOp1,this.pOp3)}add(t,a){return this.op2("_add",t,a)}eq(t,a){return this.op2Bool("_eq",t,a)}isZero(t){return this.op1Bool("_isZero",t)}sub(t,a){return this.op2("_sub",t,a)}neg(t){return this.op1("_neg",t)}inv(t){return this.op1("_inverse",t)}toMontgomery(t){return this.op1("_toMontgomery",t)}fromMontgomery(t){return this.op1("_fromMontgomery",t)}mul(t,a){return this.op2("_mul",t,a)}div(t,a){return this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_inverse"](this.pOp2,this.pOp2),this.tm.instance.exports[this.prefix+"_mul"](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}square(t){return this.op1("_square",t)}isSquare(t){return this.op1Bool("_isSquare",t)}sqrt(t){return this.op1("_sqrt",t)}exp(t,a){return a instanceof Uint8Array||(a=dl(Kn(a))),this.tm.setBuff(this.pOp1,t),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_exp"](this.pOp1,this.pOp2,a.byteLength,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}isNegative(t){return this.op1Bool("_isNegative",t)}e(t,a){if(t instanceof Uint8Array)return t;let e=Kn(t,a);!function(t){return BigInt(t)>=BigInt(32)):n+2<=a?(i.setUint16(n,Number(e&BigInt(65535)),!0),n+=2,e>>=BigInt(16)):(i.setUint8(n,Number(e&BigInt(255)),!0),n+=1,e>>=BigInt(8));if(e)throw new Error("Number does not fit in this length");return o}(e,this.n8);return this.toMontgomery(o)}toString(t,a){return rl(sl(this.fromMontgomery(t),0),a)}fromRng(t){let a;const e=new Uint8Array(this.n8);do{a=ul;for(let e=0;e=BigInt(i));var o,i;return cl(e,0,a,this.n8),e}random(){return this.fromRng(bl())}toObject(t){return sl(this.fromMontgomery(t),0)}fromObject(t){const a=new Uint8Array(this.n8);return cl(a,0,t,this.n8),this.toMontgomery(a)}toRprLE(t,a,e){t.set(this.fromMontgomery(e),a)}toRprBE(t,a,e){const o=this.fromMontgomery(e);for(let t=0;to.buffer.byteLength){const i=o.buffer.byteLength/65536;let n=Math.floor((e[0]+t)/65536)+1;n>a&&(n=a),o.grow(n-i)}return i}function l(t){const a=n(t.byteLength);return s(a,t),a}function c(t,a){const e=new Uint8Array(o.buffer);return new Uint8Array(e.buffer,e.byteOffset+t,a)}function s(t,a){new Uint8Array(o.buffer).set(new Uint8Array(a),t)}function r(t){if("INIT"==t[0].cmd)return i(t[0]);const a={vars:[],out:[]},r=new Uint32Array(o.buffer,0,1)[0];for(let o=0;o{this.reject=a,this.resolve=t}))}}const hs=function(t){return globalThis.btoa(t)}("("+_s.toString()+")(self)"),ps="data:application/javascript;base64,"+hs;class ms{constructor(){this.actionQueue=[],this.oldPFree=0}startSyncOp(){if(0!=this.oldPFree)throw new Error("Sync operation in progress");this.oldPFree=this.u32[0]}endSyncOp(){if(0==this.oldPFree)throw new Error("No sync operation in progress");this.u32[0]=this.oldPFree,this.oldPFree=0}postAction(t,a,e,o){if(this.working[t])throw new Error("Posting a job t a working worker");return this.working[t]=!0,this.pendingDeferreds[t]=o||new fs,this.workers[t].postMessage(a,e),this.pendingDeferreds[t].promise}processWorks(){for(let t=0;t0;t++)if(0==this.working[t]){const a=this.actionQueue.shift();this.postAction(t,a.data,a.transfers,a.deferred)}}queueAction(t,a){const e=new fs;if(this.singleThread){const a=this.taskManager(t);e.resolve(a)}else this.actionQueue.push({data:t,transfers:a,deferred:e}),this.processWorks();return e.promise}resetMemory(){this.u32[0]=this.initalPFree}allocBuff(t){const a=this.alloc(t.byteLength);return this.setBuff(a,t),a}getBuff(t,a){return this.u8.slice(t,t+a)}setBuff(t,a){this.u8.set(new Uint8Array(a),t)}alloc(t){for(;3&this.u32[0];)this.u32[0]++;const a=this.u32[0];return this.u32[0]+=t,a}async terminate(){for(let t=0;tsetTimeout(a,t))))}}function Ls(t,a){const e=t[a],o=t.Fr,i=t.tm;t[a].batchApplyKey=async function(t,n,l,c,s){let r,d,u,_,g;if(c=c||"affine",s=s||"affine","G1"==a)"jacobian"==c?(u=3*e.F.n8,r="g1m_batchApplyKey"):(u=2*e.F.n8,r="g1m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g1m_batchToAffine",g=2*e.F.n8);else if("G2"==a)"jacobian"==c?(u=3*e.F.n8,r="g2m_batchApplyKey"):(u=2*e.F.n8,r="g2m_batchApplyKeyMixed"),_=3*e.F.n8,"jacobian"==s?g=3*e.F.n8:(d="g2m_batchToAffine",g=2*e.F.n8);else{if("Fr"!=a)throw new Error("Invalid group: "+a);r="frm_batchApplyKey",u=e.n8,_=e.n8,g=e.n8}const f=Math.floor(t.byteLength/u),h=Math.floor(f/i.concurrency),p=[];l=o.e(l);let m=o.e(n);for(let a=0;a=0;t--){if(!e.isZero(h))for(let t=0;tr&&(h=r),h<1024&&(h=1024);const p=[];for(let a=0;a(c&&c.debug(`Multiexp end: ${s}: ${a}/${u}`),t))))}const m=await Promise.all(p);let L=e.zero;for(let t=m.length-1;t>=0;t--)L=e.add(L,m[t]);return L}e.multiExp=async function(t,a,e,o){return await n(t,a,"jacobian",e,o)},e.multiExpAffine=async function(t,a,e,o){return await n(t,a,"affine",e,o)}}function ys(t,a){const e=t[a],o=t.Fr,i=e.tm;async function n(t,c,s,r,d,u){s=s||"affine",r=r||"affine";let _,g,f,h,p,m,L,b;"G1"==a?("affine"==s?(_=2*e.F.n8,h="g1m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g1m_fftFinal"),L="g1m_fftJoin",m="g1m_fftMix","affine"==r?(f=2*e.F.n8,p="g1m_batchToAffine"):f=3*e.F.n8):"G2"==a?("affine"==s?(_=2*e.F.n8,h="g2m_batchToJacobian"):_=3*e.F.n8,g=3*e.F.n8,c&&(b="g2m_fftFinal"),L="g2m_fftJoin",m="g2m_fftMix","affine"==r?(f=2*e.F.n8,p="g2m_batchToAffine"):f=3*e.F.n8):"Fr"==a&&(_=e.n8,g=e.n8,f=e.n8,c&&(b="frm_fftFinal"),m="frm_fftMix",L="frm_fftJoin");let w=!1;Array.isArray(t)?(t=os(t,_),w=!0):t=t.slice(0,t.byteLength);const y=t.byteLength/_,A=es(y);if(1<1<<28?new ls(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u):await async function(t,a,e,i,c){let s,r;s=t.slice(0,t.byteLength/2),r=t.slice(t.byteLength/2,t.byteLength);const d=[];[s,r]=await l(s,r,"fftJoinExt",o.one,o.shift,a,"jacobian",i,c),d.push(n(s,!1,"jacobian",e,i,c)),d.push(n(r,!1,"jacobian",e,i,c));const u=await Promise.all(d);let _;_=u[0].byteLength>1<<28?new ls(2*u[0].byteLength):new Uint8Array(2*u[0].byteLength);return _.set(u[0]),_.set(u[1],u[0].byteLength),_}(t,s,r,d,u),w?is(a,f):a}let C,F,x;c&&(C=o.inv(o.e(y))),function(t,a){const e=t.byteLength/a,o=es(e);if(e!=1<e){const o=t.slice(i*a,(i+1)*a);t.set(t.slice(e*a,(e+1)*a),i*a),t.set(o,e*a)}}}(t,_);let I=Math.min(16384,y),B=y/I;for(;B=16;)B*=2,I/=2;const E=es(I),v=[];for(let a=0;a(d&&d.debug(`${u}: fft ${A} mix end: ${a}/${B}`),t))))}x=await Promise.all(v);for(let t=0;t(d&&d.debug(`${u}: fft ${A} join ${t}/${A} ${l+1}/${a} ${c}/${e/2}`),o))))}const l=await Promise.all(n);for(let t=0;t0;a--)F.set(x[a],t),t+=I*f,delete x[a];F.set(x[0].slice(0,(I-1)*f),t),delete x[0]}else for(let t=0;t65536&&(w=65536);const y=[];for(let a=0;a(u&&u.debug(`${_}: fftJoinExt End: ${a}/${b}`),t))))}const A=await Promise.all(y);let C,F;b*p>1<<28?(C=new ls(b*p),F=new ls(b*p)):(C=new Uint8Array(b*p),F=new Uint8Array(b*p));let x=0;for(let t=0;to.s+1)throw s&&s.error("lagrangeEvaluations input too big"),new Error("lagrangeEvaluations input too big");let g=t.slice(0,t.byteLength/2),f=t.slice(t.byteLength/2,t.byteLength);const h=o.exp(o.shift,u/2),p=o.inv(o.sub(o.one,h));[g,f]=await l(g,f,"prepareLagrangeEvaluation",p,o.shiftInv,i,"jacobian",s,r+" prep");const m=[];let L;return m.push(n(g,!0,"jacobian",c,s,r+" t0")),m.push(n(f,!0,"jacobian",c,s,r+" t1")),[g,f]=await Promise.all(m),L=g.byteLength>1<<28?new ls(2*g.byteLength):new Uint8Array(2*g.byteLength),L.set(g),L.set(f,g.byteLength),L},e.fftMix=async function(t){const n=3*e.F.n8;let l,c;if("G1"==a)l="g1m_fftMix",c="g1m_fftJoin";else if("G2"==a)l="g2m_fftMix",c="g2m_fftJoin";else{if("Fr"!=a)throw new Error("Invalid group");l="frm_fftMix",c="frm_fftJoin"}const s=Math.floor(t.byteLength/n),r=es(s);let d=1<=0;t--)g.set(_[t][0],f),f+=_[t][0].byteLength;return g}}async function As(t){const a=await async function(t,a){const e=new ms;e.memory=new WebAssembly.Memory({initial:gs}),e.u8=new Uint8Array(e.memory.buffer),e.u32=new Uint32Array(e.memory.buffer);const o=await WebAssembly.compile(t.code);if(e.instance=await WebAssembly.instantiate(o,{env:{memory:e.memory}}),e.singleThread=a,e.initalPFree=e.u32[0],e.pq=t.pq,e.pr=t.pr,e.pG1gen=t.pG1gen,e.pG1zero=t.pG1zero,e.pG2gen=t.pG2gen,e.pG2zero=t.pG2zero,e.pOneT=t.pOneT,a)e.code=t.code,e.taskManager=_s(),await e.taskManager([{cmd:"INIT",init:gs,code:e.code.slice()}]),e.concurrency=1;else{let a;e.workers=[],e.pendingDeferreds=[],e.working=[],a="object"==typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:Qa.cpus().length,0==a&&(a=2),a>64&&(a=64),e.concurrency=a;for(let t=0;t=this.length&&(this.length=t+1),!0}getKeys(){const t=new vs;for(let a=0;a1<<20?new vs:[];for(let t=0;t1<<20?new vs:[];for(let t=0;t1<<20?new vs:[];for(let t=0;t{let o="";return Object.keys(e).forEach((i=>{let n=a.varIdx2Name[i];"one"==n&&(n="1");let l=t.curve.Fr.toString(e[i]);"1"==l&&(l=""),"-1"==l&&(l="-"),""!=o&&"-"!=l[0]&&(l="+"+l),""!=o&&(l=" "+l),o=o+l+n})),o},n=`[ ${i(o[0])} ] * [ ${i(o[1])} ] - [ ${i(o[2])} ] = 0`;e&&e.info(n)}},info:async function(t,a){const e=await Gs(t);return fe.eq(e.prime,Ts)?a&&a.info("Curve: bn-128"):fe.eq(e.prime,zs)?a&&a.info("Curve: bls12-381"):a&&a.info(`Unknown Curve. Prime: ${fe.toString(e.prime)}`),a&&a.info(`# of Wires: ${e.nVars}`),a&&a.info(`# of Constraints: ${e.nConstraints}`),a&&a.info(`# of Private Inputs: ${e.nPrvInputs}`),a&&a.info(`# of Public Inputs: ${e.nPubInputs}`),a&&a.info(`# of Labels: ${e.nLabels}`),a&&a.info(`# of Outputs: ${e.nOutputs}`),e},exportJson:async function(t,a){const e=await Gs(t,!0,!0,!0,a),o=e.curve.Fr;return delete e.curve,delete e.F,Zo(o,e)}});async function Us(t){const a={labelIdx2Name:["one"],varIdx2Name:["one"],componentIdx2Name:[]},e=await Me(t),o=await e.read(e.totalSize),i=new TextDecoder("utf-8").decode(o).split("\n");for(let t=0;t Reading r1cs file");const{fd:o,sections:i}=await Ue(t,"r1cs",1),n=await Os(o,i,{loadConstraints:!1,loadCustomGates:!1});e&&e.info("> Reading witness file");const{fd:l,sections:c}=await Ue(a,"wtns",2),s=await Si(l,c);if(!fe.eq(n.prime,s.q))throw new Error("Curve of the witness does not match the curve of the proving key");const r=await Ke(l,c,2);await l.close();const d=(await async function(t){let a;if(fe.eq(t,We))a=await _e();else{if(!fe.eq(t,Ze))throw new Error(`Curve not supported: ${fe.toString(t)}`);a=await ge()}return a}(n.prime)).Fr,u=d.n8,_=await Ke(o,i,2);e&&(e.info("----------------------------"),e.info(" WITNESS CHECK"),e.info(` Curve: ${n.curve.name}`),e.info(` Vars (wires): ${n.nVars}`),e.info(` Outputs: ${n.nOutputs}`),e.info(` Public Inputs: ${n.nPubInputs}`),e.info(` Private Inputs: ${n.nPrvInputs}`),e.info(` Labels: ${n.nLabels}`),e.info(` Constraints: ${n.nConstraints}`),e.info(` Custom Gates: ${n.useCustomGates}`),e.info("----------------------------")),e&&e.info("> Checking witness correctness");let g=0,f=!0;for(let t=0;t{const o=function(t){return d.fromRprLE(r.slice(t*u,t*u+u))}(e),i=t[e];a=d.add(a,d.mul(o,i))})),a}function p(){const t={},a=_.slice(g,g+4);g+=4;const e=new DataView(a.buffer).getUint32(0,!0),o=_.slice(g,g+(4+n.n8)*e);g+=(4+n.n8)*e;const i=new DataView(o.buffer);for(let a=0;a=this.length&&(this.length=t+1),!0}getKeys(){const t=new $s;for(let a=0;a_)return o&&o.error(`circuit too big for this power of tau ceremony. ${h.nConstraints}*2 > 2**${_}`),-1;if(!d[12])return o&&o.error("Powers of tau is not prepared."),-1;const w=h.nOutputs+h.nPubInputs,y=2**b;await ke(p,1),await p.writeULE32(1),await Re(p),await ke(p,2);const A=u.q,C=8*(Math.floor((fe.bitLength(A)-1)/64)+1),F=u.r,x=8*(Math.floor((fe.bitLength(F)-1)/64)+1),I=fe.mod(fe.shl(1,8*x),F),B=u.Fr.e(fe.mod(fe.mul(I,I),F));let E,v,S;await p.writeULE32(C),await $e(p,A,C),await p.writeULE32(x),await $e(p,F,x),await p.writeULE32(h.nVars),await p.writeULE32(w),await p.writeULE32(y),E=await r.read(m,d[4][0].p),await p.write(E),E=await u.G1.batchLEMtoU(E),s.update(E),v=await r.read(m,d[5][0].p),await p.write(v),v=await u.G1.batchLEMtoU(v),s.update(v),S=await r.read(L,d[6][0].p),await p.write(S),S=await u.G2.batchLEMtoU(S),s.update(S);const P=new Uint8Array(m);u.G1.toRprLEM(P,0,u.G1.g);const q=new Uint8Array(L);u.G2.toRprLEM(q,0,u.G2.g);const O=new Uint8Array(m);u.G1.toRprUncompressed(O,0,u.G1.g);const G=new Uint8Array(L);u.G2.toRprUncompressed(G,0,u.G2.g),await p.write(q),await p.write(P),await p.write(q),s.update(G),s.update(O),s.update(G),await Re(p),o&&o.info("Reading r1cs");let z=await Ke(g,f,2);const T=new $s(h.nVars),M=new $s(h.nVars),U=new $s(h.nVars),Q=new $s(h.nVars-w-1),k=new Array(w+1);o&&o.info("Reading tauG1");let R=await Ke(r,d,12,(y-1)*m,y*m);o&&o.info("Reading tauG2");let N=await Ke(r,d,13,(y-1)*L,y*L);o&&o.info("Reading alphatauG1");let D=await Ke(r,d,14,(y-1)*m,y*m);o&&o.info("Reading betatauG1");let $=await Ke(r,d,15,(y-1)*m,y*m);await async function(){const t=new Uint8Array(12+u.Fr.n8),a=new DataView(t.buffer),e=new Uint8Array(u.Fr.n8);u.Fr.toRprLE(e,0,u.Fr.e(1));let s=0;function r(){const t=z.slice(s,s+4);s+=4;return new DataView(t.buffer).getUint32(0,!0)}const d=new $s;for(let t=0;t=0?u.Fr.fromRprLE(z.slice(o[3],o[3]+u.Fr.n8),0):u.Fr.fromRprLE(e,0);const n=u.Fr.mul(i,B);u.Fr.toRprLE(t,12,n),_.set(t,f),f+=t.length}await p.write(_),await Re(p)}(),await V(3,"G1",k,"IC"),await async function(){await ke(p,9);const t=new qa(y*m);if(b(o&&o.debug(`Writing points end ${i}: ${d}/${e.length}`),t)))),c+=n,t++}const r=await Promise.all(l);for(let t=0;t32768?(g=new qa(h*n),f=new qa(h*u.Fr.n8)):(g=new Uint8Array(h*n),f=new Uint8Array(h*u.Fr.n8));let p=0,m=0;const L=[R,N,D,$],b=new Uint8Array(u.Fr.n8);u.Fr.toRprLE(b,0,u.Fr.e(1));let w=0;for(let t=0;t=0?f.set(z.slice(a[t][i][2],a[t][i][2]+u.Fr.n8),w*u.Fr.n8):f.set(b,w*u.Fr.n8),w++;if(a.length>1){const t=[];t.push({cmd:"ALLOCSET",var:0,buff:g}),t.push({cmd:"ALLOCSET",var:1,buff:f}),t.push({cmd:"ALLOC",var:2,len:a.length*l}),p=0,m=0;let e=0;for(let o=0;o=0;t--){const a=d.contributions[t];o&&o.info("-------------------------"),o&&o.info(Uo(a.contributionHash,`contribution #${t+1} ${a.name?a.name:""}:`)),1==a.type&&(o&&o.info(`Beacon generator: ${Ho(a.beaconHash)}`),o&&o.info(`Beacon iterations Exp: ${a.numIterationsExp}`))}return o&&o.info("-------------------------"),o&&o.info("ZKey Ok!"),!0;async function L(t,a){const e=2*s.G1.F.n8,o=t.byteLength/e,i=s.tm.concurrency,n=Math.floor(o/i),l=[];for(let e=0;e Detected protocol: "+i.protocol),"groth16"===i.protocol)n=await async function(t,a,e){const o=await Xe(t.q),i=2*o.G1.F.n8,n=await o.pairing(t.vk_alpha_1,t.vk_beta_2);let l={protocol:t.protocol,curve:o.name,nPublic:t.nPublic,vk_alpha_1:o.G1.toObject(t.vk_alpha_1),vk_beta_2:o.G2.toObject(t.vk_beta_2),vk_gamma_2:o.G2.toObject(t.vk_gamma_2),vk_delta_2:o.G2.toObject(t.vk_delta_2),vk_alphabeta_12:o.Gt.toObject(n)};await Ne(a,e,3),l.IC=[];for(let e=0;e<=t.nPublic;e++){const t=await a.read(i),e=o.G1.toObject(t);l.IC.push(e)}return await De(a),l=Hs(l),l}(i,e,o);else if("plonk"===i.protocol)n=await async function(t){const a=await Xe(t.q);let e={protocol:t.protocol,curve:a.name,nPublic:t.nPublic,power:t.power,k1:a.Fr.toObject(t.k1),k2:a.Fr.toObject(t.k2),Qm:a.G1.toObject(t.Qm),Ql:a.G1.toObject(t.Ql),Qr:a.G1.toObject(t.Qr),Qo:a.G1.toObject(t.Qo),Qc:a.G1.toObject(t.Qc),S1:a.G1.toObject(t.S1),S2:a.G1.toObject(t.S2),S3:a.G1.toObject(t.S3),X_2:a.G2.toObject(t.X_2),w:a.Fr.toObject(a.Fr.w[t.power])};return e=Hs(e),e}(i);else{if(!i.protocolId||i.protocolId!==Xo)throw new Error("zkey file protocol unrecognized");n=await async function(t,a){const e=await Xe(t.q);let o={protocol:t.protocol,curve:e.name,nPublic:t.nPublic,power:t.power,k1:e.Fr.toObject(t.k1),k2:e.Fr.toObject(t.k2),w:e.Fr.toObject(e.Fr.w[t.power]),w3:e.Fr.toObject(t.w3),w4:e.Fr.toObject(t.w4),w8:e.Fr.toObject(t.w8),wr:e.Fr.toObject(t.wr),X_2:e.G2.toObject(t.X_2),C0:e.G1.toObject(t.C0)};return Hs(o)}(i)}return await e.close(),a&&a.info("EXPORT VERIFICATION KEY FINISHED"),n}var Ws={};const{unstringifyBigInts:Ys,stringifyBigInts:Js}=he;async function Xs(t,a,e){e&&e.info("FFLONK EXPORT SOLIDITY VERIFIER STARTED");const o=await to(t.curve);let i=r(t.w3);t.w3_2=d(o.Fr.square(i));let n=r(t.w4);t.w4_2=d(o.Fr.square(n)),t.w4_3=d(o.Fr.mul(o.Fr.square(n),n));let l=r(t.w8),c=o.Fr.one;for(let a=1;a<8;a++)c=o.Fr.mul(c,l),t["w8_"+a]=d(c);let s=a[t.protocol];return e&&e.info("FFLONK EXPORT SOLIDITY VERIFIER FINISHED"),Ws.render(s,t);function r(t){const a=Ys(t);return o.Fr.fromObject(a)}function d(t){const a=o.Fr.toObject(t);return Js(a)}}var tr=Object.freeze({__proto__:null,newZKey:js,exportBellman:async function(t,a,e){const{fd:o,sections:i}=await Ue(t,"zkey",2),n=await Ci(o,i);if("groth16"!=n.protocol)throw new Error("zkey file is not groth16");const l=await Xe(n.q),c=2*l.G1.F.n8,s=2*l.G2.F.n8,r=await xi(o,l,i),d=await Te(a);let u;await L(n.vk_alpha_1),await L(n.vk_beta_1),await b(n.vk_beta_2),await b(n.vk_gamma_2),await L(n.vk_delta_1),await b(n.vk_delta_2),u=await Ke(o,i,3),u=await l.G1.batchLEMtoU(u),await w("G1",u);const _=await Ke(o,i,9);let g,f,h,p,m;g=await l.G1.fft(_,"affine","jacobian",e),g=await l.G1.batchApplyKey(g,l.Fr.neg(l.Fr.e(2)),l.Fr.w[n.power+1],"jacobian","affine",e),g=g.slice(0,g.byteLength-c),g=await l.G1.batchLEMtoU(g),await w("G1",g),f=await Ke(o,i,8),f=await l.G1.batchLEMtoU(f),await w("G1",f),h=await Ke(o,i,5),h=await l.G1.batchLEMtoU(h),await w("G1",h),p=await Ke(o,i,6),p=await l.G1.batchLEMtoU(p),await w("G1",p),m=await Ke(o,i,7),m=await l.G2.batchLEMtoU(m),await w("G2",m),await d.write(r.csHash),await async function(t){const a=new Uint8Array(4);new DataView(a.buffer,a.byteOffset,a.byteLength).setUint32(0,t,!1),await d.write(a)}(r.contributions.length);for(let t=0;t_.contributions.length)return i&&i.error("The impoerted file does not include new contributions"),!1;for(let t=0;t=256)return n&&n.error("Maximum length of beacon hash is 255 bytes"),!1;if((i=parseInt(i))<10||i>63)return n&&n.error("Invalid numIterationsExp. (Must be between 10 and 63)"),!1;const{fd:c,sections:s}=await Ue(t,"zkey",2),r=await Ci(c,s);if("groth16"!=r.protocol)throw new Error("zkey file is not groth16");const d=await Xe(r.q),u=await xi(c,d,s),_=await Qe(a,"zkey",1,10),g=await Vo(l,i),f=ao.exports(64);f.update(u.csHash);for(let t=0;t{const o=this.curve.G1.toObject(this.polynomials[e]);t?a.polynomials[e]=o:a[e]=o})),Object.keys(this.evaluations).forEach((e=>{const o=this.curve.Fr.toObject(this.evaluations[e]);t?a.evaluations[e]=o:a[e]=o})),a}fromObjectProof(t){this.resetProof(),Object.keys(t.polynomials).forEach((a=>{this.polynomials[a]=this.curve.G1.fromObject(t.polynomials[a])})),Object.keys(t.evaluations).forEach((a=>{this.evaluations[a]=this.curve.Fr.fromObject(t.evaluations[a])}))}}var er,or={exports:{}}; /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/apps/etherscan/src/app/utils/networks.ts b/apps/etherscan/src/app/utils/networks.ts index 5609971a3f..bcb8993499 100644 --- a/apps/etherscan/src/app/utils/networks.ts +++ b/apps/etherscan/src/app/utils/networks.ts @@ -34,6 +34,7 @@ export const scanAPIurls = { 44787: 'https://api-alfajores.celoscan.io/api', 2888: 'https://api-testnet.bobascan.com/api', 84531: 'https://api-goerli.basescan.org/api', + 84532: "https://api-sepolia.basescan.org/api", 1442: 'https://api-testnet-zkevm.polygonscan.com/api', 59140: 'https://api-testnet.lineascan.build/api', } diff --git a/apps/learneth/README.md b/apps/learneth/README.md new file mode 100644 index 0000000000..a8e9909931 --- /dev/null +++ b/apps/learneth/README.md @@ -0,0 +1,134 @@ +# Remix LearnEth Plugin + +## Available Scripts + +In the project directory, you can run: + +### `npm run serve:plugin --plugin=learneth` + +Runs the app in the development mode.\ +Open [http://localhost:2024](http://localhost:2024) to view it in the browser. + +The page will reload if you make edits.\ +You will also see any lint errors in the console. + +### `npm run build:plugin --plugin=learneth` + +Builds the app for production to the `dist/apps/learneth` folder.\ +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.\ +Your app is ready to be deployed! + +## Loading the plugin in remix + +When testing with localhost you should use the HTTP version of either REMIX or REMIX ALPHA. Click on the plugin manager icon and +add the plugin 'Connect to a local plugin'. Your plugin will be at http://localhost:2024/. + +## Setting up the REMIX IDE for working with the plugin + +The plugin only works when a compiler environment is loaded as well, for example on the home screen of the IDE you select 'Solidity' or 'Vyper'. Without this the plugin +cannot compile and test files in the workshops. + +## Setting up your Github workshops repo + +You can create your own workshops that can be imported in the plugin. +When importing a github repo the plugin will look for a directory structure describing the workshops. +For example: https://github.com/ethereum/remix-workshops + +### Root directories + +Root directories are individual workshops, the name used will be the name of the workshop unless you override this with the name property in the config.yml. + +### README.md + +The readme in each directry contains an explanation of what the workshop is about. If an additional summary property is provided in the config.yml that will be used in the overview section of the plugin. + +### config.yml + +This config file contains meta data describing some properties of your workshop, for example + +``` +--- +id: someid +name: my workshop name +summary: something about this workshop +level: 4 +tags: + - solidity + - beginner +``` + +Level: a level of difficulty indicator ( 1 - 5 ) + +Tags: an array of tags + +id: this is used by the system to let REMIX call startTutorial(repo,branch,id). See below for more instructions. + +### Steps + +Each workshop contains what we call steps. +Each step is a directory containing: + +- a readme describing the step, what to do. +- sol files: + - these can be sol files and test sol files. The test files should be name yoursolname_test.sol + - ANSWER files: these are named yoursolname_answer.sol and can be used to show the solution or the correct answer. The plugin will load the + file in the IDE when a user clicks on 'Show Answer' +- js files +- vyper files + +## Functions to call the plugin from the IDE + +### Add a repository: + +``` +addRepository(repoName, branch) +``` + +### Start a tutorial + +``` +startTutorial(repoName,branch,id) +``` + +You don't need to add a seperate addRepository before calling startTutorial, this call will also add the repo. + +_Parameters_ + +id: this can be two things: + +- type of number, it specifies the n-th tutorial in the list +- type of string, this refers to the ID parameter in the config.yml file in the tutorial + for example: + +``` +--- +id: basics +name: 1 Basics of Solidity +summary: Some basic functions explained +level: 4 +tags: + - solidity +``` + +### How to call these functions in the REMIX IDE + +``` +(function () { +try { + // You don't need to add a seperate addRepository before calling startTutorial, this is just an example + remix.call('LearnEth', 'addRepository', "ethereum/remix-workshops", "master") + remix.call('LearnEth', 'startTutorial', "ethereum/remix-workshops", "master", "basics") + remix.call('LearnEth', 'startTutorial', "ethereum/remix-workshops", "master", 2) +} catch (e) { + console.log(e.message) +} +})() +``` + +Then call this in the REMIX console + +``` +remix.exeCurrent() +``` diff --git a/apps/learneth/project.json b/apps/learneth/project.json new file mode 100644 index 0000000000..a4db7488a7 --- /dev/null +++ b/apps/learneth/project.json @@ -0,0 +1,58 @@ +{ + "name": "learneth", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/learneth/src", + "projectType": "application", + "implicitDependencies": [], + "targets": { + "build": { + "executor": "@nrwl/webpack:webpack", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "development", + "options": { + "compiler": "babel", + "outputPath": "dist/apps/learneth", + "index": "apps/learneth/src/index.html", + "baseHref": "./", + "main": "apps/learneth/src/main.tsx", + "polyfills": "apps/learneth/src/polyfills.ts", + "tsConfig": "apps/learneth/tsconfig.app.json", + "assets": ["apps/learneth/src/profile.json"], + "styles": ["apps/learneth/src/index.css"], + "scripts": [], + "webpackConfig": "apps/learneth/webpack.config.js" + }, + "configurations": { + "development": { + }, + "production": { + "fileReplacements": [ + { + "replace": "apps/learneth/src/environments/environment.ts", + "with": "apps/learneth/src/environments/environment.prod.ts" + } + ] + } + } + }, + "serve": { + "executor": "@nrwl/webpack:dev-server", + "defaultConfiguration": "development", + "options": { + "buildTarget": "learneth:build", + "hmr": true, + "baseHref": "/" + }, + "configurations": { + "development": { + "buildTarget": "learneth:build:development", + "port": 2024 + }, + "production": { + "buildTarget": "learneth:build:production" + } + } + } + }, + "tags": [] +} diff --git a/apps/learneth/src/App.css b/apps/learneth/src/App.css new file mode 100644 index 0000000000..bf3b1f7aa8 --- /dev/null +++ b/apps/learneth/src/App.css @@ -0,0 +1,19 @@ +/* You can add global styles to this file, and also import other style files */ + + +h1{ + font-size: 1.2rem !important; + font-weight: 700; +} +h2{ + font-size: 1rem !important; + font-weight: 700; +} +h3{ + font-size: 1rem !important; +} + +p { + font-size: 0.9rem; +} + diff --git a/apps/learneth/src/App.tsx b/apps/learneth/src/App.tsx new file mode 100644 index 0000000000..e61fbf7b74 --- /dev/null +++ b/apps/learneth/src/App.tsx @@ -0,0 +1,41 @@ +import React from 'react' +import {createHashRouter, RouterProvider} from 'react-router-dom' +import {ToastContainer} from 'react-toastify' +import LoadingScreen from './components/LoadingScreen' +import LogoPage from './pages/Logo' +import HomePage from './pages/Home' +import StepListPage from './pages/StepList' +import StepDetailPage from './pages/StepDetail' +import 'react-toastify/dist/ReactToastify.css' +import './App.css' + +export const router = createHashRouter([ + { + path: '/', + element: , + }, + { + path: '/home', + element: , + }, + { + path: '/list', + element: , + }, + { + path: '/detail', + element: , + }, +]) + +function App(): JSX.Element { + return ( + <> + + + + + ) +} + +export default App diff --git a/apps/learneth/src/components/BackButton/index.scss b/apps/learneth/src/components/BackButton/index.scss new file mode 100644 index 0000000000..53b73037d5 --- /dev/null +++ b/apps/learneth/src/components/BackButton/index.scss @@ -0,0 +1,28 @@ +a { + .arrow { + display: inline-block; + opacity: 0; + transform: scale(0.5); + transition: all 0.3s; + } + span { + display: inline-block; + padding-left: 5px; + transform: translateX(-0.875em); // size of icon + transition: transform 0.3s; + } +} + +.workshoptitle{ + text-decoration: none; +} + +a:hover { + fa-icon { + opacity: 1; + transform: scale(1); + } + span { + transform: translateX(0); + } +} diff --git a/apps/learneth/src/components/BackButton/index.tsx b/apps/learneth/src/components/BackButton/index.tsx new file mode 100644 index 0000000000..14f8112d4f --- /dev/null +++ b/apps/learneth/src/components/BackButton/index.tsx @@ -0,0 +1,87 @@ +import React, {useState} from 'react' +import {Link, useLocation, useNavigate} from 'react-router-dom' +import {Button, Modal, Tooltip, OverlayTrigger} from 'react-bootstrap' +import './index.scss' + +function BackButton({entity}: any) { + const navigate = useNavigate() + const location = useLocation() + const [show, setShow] = useState(false) + const isDetailPage = location.pathname === '/detail' + const queryParams = new URLSearchParams(location.search) + const stepId = Number(queryParams.get('stepId')) + + return ( + + ) +} + +export default BackButton diff --git a/apps/learneth/src/components/LoadingScreen/index.css b/apps/learneth/src/components/LoadingScreen/index.css new file mode 100644 index 0000000000..88d2a5a3c7 --- /dev/null +++ b/apps/learneth/src/components/LoadingScreen/index.css @@ -0,0 +1,17 @@ +.spinnersOverlay { + background-color: rgba(51, 51, 51, 0.8); + z-index: 99; + opacity: 1; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; +} +.spinnersLoading { + left: 50%; + margin: 0; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} diff --git a/apps/learneth/src/components/LoadingScreen/index.tsx b/apps/learneth/src/components/LoadingScreen/index.tsx new file mode 100644 index 0000000000..06eb7e4fe7 --- /dev/null +++ b/apps/learneth/src/components/LoadingScreen/index.tsx @@ -0,0 +1,16 @@ +import React from 'react' +import BounceLoader from 'react-spinners/BounceLoader' +import './index.css' +import {useAppSelector} from '../../redux/hooks' + +const LoadingScreen: React.FC = () => { + const loading = useAppSelector((state) => state.loading.screen) + + return loading ? ( +
+ +
+ ) : null +} + +export default LoadingScreen diff --git a/apps/learneth/src/components/RepoImporter/index.css b/apps/learneth/src/components/RepoImporter/index.css new file mode 100644 index 0000000000..e46d1a9675 --- /dev/null +++ b/apps/learneth/src/components/RepoImporter/index.css @@ -0,0 +1,4 @@ +.arrow-icon{ + width: 3px; + display: inline-block; +} diff --git a/apps/learneth/src/components/RepoImporter/index.tsx b/apps/learneth/src/components/RepoImporter/index.tsx new file mode 100644 index 0000000000..47c1f73705 --- /dev/null +++ b/apps/learneth/src/components/RepoImporter/index.tsx @@ -0,0 +1,120 @@ +import React, {useState, useEffect} from 'react' +import {Button, Dropdown, Form, Tooltip, OverlayTrigger} from 'react-bootstrap' +import {useAppDispatch} from '../../redux/hooks' +import './index.css' + +function RepoImporter({list, selectedRepo}: any): JSX.Element { + const [open, setOpen] = useState(false) + const [name, setName] = useState('') + const [branch, setBranch] = useState('') + const dispatch = useAppDispatch() + + useEffect(() => { + setName(selectedRepo.name) + setBranch(selectedRepo.branch) + }, [selectedRepo]) + + const panelChange = () => { + setOpen(!open) + } + + const selectRepo = (repo: {name: string; branch: string}) => { + dispatch({type: 'workshop/loadRepo', payload: repo}) + } + + const importRepo = (event: {preventDefault: () => void}) => { + event.preventDefault() + dispatch({type: 'workshop/loadRepo', payload: {name, branch}}) + } + + const resetAll = () => { + dispatch({type: 'workshop/resetAll'}) + setName('') + setBranch('') + } + + return ( + <> + {selectedRepo.name && ( +
+ Tutorials from: +

{selectedRepo.name}

+ Date modified: {new Date(selectedRepo.datemodified).toLocaleString()} +
+ )} + +
+
+ +
+
Import another tutorial repo
+
+ + {open && ( +
+ + + Select a repo + + + {list.map((item: any) => ( + { + selectRepo(item) + }} + > + {item.name}-{item.branch} + + ))} + + +
+ reset list +
+
+ )} + +
+ + ) +} + +export default RepoImporter diff --git a/apps/learneth/src/components/SlideIn/index.css b/apps/learneth/src/components/SlideIn/index.css new file mode 100644 index 0000000000..4f6e45324f --- /dev/null +++ b/apps/learneth/src/components/SlideIn/index.css @@ -0,0 +1,21 @@ +.slide-enter { + transform: translateY(100px); + opacity: 0; +} + +.slide-enter-active { + transform: translateY(0); + opacity: 1; + transition: opacity 400ms, transform 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275); +} + +.slide-exit { + transform: translateY(0); + opacity: 1; +} + +.slide-exit-active { + transform: translateY(100px); + opacity: 0; + transition: opacity 400ms, transform 400ms cubic-bezier(0.6, 0.04, 0.98, 0.335); +} diff --git a/apps/learneth/src/components/SlideIn/index.tsx b/apps/learneth/src/components/SlideIn/index.tsx new file mode 100644 index 0000000000..4b034183c3 --- /dev/null +++ b/apps/learneth/src/components/SlideIn/index.tsx @@ -0,0 +1,18 @@ +import React, {type ReactNode, useEffect, useState} from 'react' +import {CSSTransition} from 'react-transition-group' +import './index.css' + +const SlideIn: React.FC<{children: ReactNode}> = ({children}) => { + const [show, setShow] = useState(false) + useEffect(() => { + setShow(true) + }, []) + + return ( + + {children} + + ) +} + +export default SlideIn diff --git a/apps/learneth/src/index.css b/apps/learneth/src/index.css new file mode 100644 index 0000000000..ec2585e8c0 --- /dev/null +++ b/apps/learneth/src/index.css @@ -0,0 +1,13 @@ +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} diff --git a/apps/learneth/src/index.html b/apps/learneth/src/index.html new file mode 100644 index 0000000000..21ecda7ec6 --- /dev/null +++ b/apps/learneth/src/index.html @@ -0,0 +1,18 @@ + + + + + Learn ETH + + + + + + + + +
+ + + diff --git a/apps/learneth/src/main.tsx b/apps/learneth/src/main.tsx new file mode 100644 index 0000000000..f710e14a4d --- /dev/null +++ b/apps/learneth/src/main.tsx @@ -0,0 +1,13 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import {Provider} from 'react-redux' +import './index.css' +import App from './App' +import {store} from './redux/store' + +const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement) +root.render( + + + +) diff --git a/apps/learneth/src/pages/Home/index.css b/apps/learneth/src/pages/Home/index.css new file mode 100644 index 0000000000..70c6426ea4 --- /dev/null +++ b/apps/learneth/src/pages/Home/index.css @@ -0,0 +1,24 @@ +.description-collapsed{ + height: 0px; + overflow: hidden; + word-wrap: break-word; + padding: 0px !important; + margin: 0px !important; +} + +.tag{ + display: inline; +} + +.arrow-icon{ + width: 12px; + display: inline-block; + cursor: pointer; +} + +.workshop-link { + cursor: pointer; +} +.workshop-link:hover { + text-decoration: underline; +} diff --git a/apps/learneth/src/pages/Home/index.tsx b/apps/learneth/src/pages/Home/index.tsx new file mode 100644 index 0000000000..6835901900 --- /dev/null +++ b/apps/learneth/src/pages/Home/index.tsx @@ -0,0 +1,96 @@ +import React, {useEffect} from 'react' +import {Link} from 'react-router-dom' +import Markdown from 'react-markdown' +import rehypeRaw from 'rehype-raw' +import remarkGfm from 'remark-gfm' +import {useAppDispatch, useAppSelector} from '../../redux/hooks' +import RepoImporter from '../../components/RepoImporter' +import './index.css' + +function HomePage(): JSX.Element { + const [openKeys, setOpenKeys] = React.useState([]) + + const isOpen = (key: string) => openKeys.includes(key) + const handleClick = (key: string) => { + setOpenKeys(isOpen(key) ? openKeys.filter((item) => item !== key) : [...openKeys, key]) + } + + const dispatch = useAppDispatch() + const {list, detail, selectedId} = useAppSelector((state) => state.workshop) + + const selectedRepo = detail[selectedId] + + const levelMap: any = { + 1: 'Beginner', + 2: 'Intermediate', + 3: 'Advanced', + } + + useEffect(() => { + dispatch({ + type: 'workshop/init', + }) + }, []) + + return ( +
+ + {selectedRepo && ( +
+ {Object.keys(selectedRepo.group).map((level) => ( +
+
{levelMap[level]}:
+ {selectedRepo.group[level].map((item: any) => ( +
+
+ { + handleClick(item.id) + }} + > + + + { + handleClick(item.id) + }} + > + {selectedRepo.entities[item.id].name} + + + + +
+
+ {levelMap[level] &&

{levelMap[level]}

} + + {selectedRepo.entities[item.id].metadata.data.tags?.map((tag: string) => ( +

+ {tag} +

+ ))} + + {selectedRepo.entities[item.id].steps &&
{selectedRepo.entities[item.id].steps.length} step(s)
} + +
+ + {selectedRepo.entities[item.id].description?.content} + +
+ +
+
+
+
+ ))} +
+ ))} +
+ )} +
+ ) +} + +export default HomePage diff --git a/apps/learneth/src/pages/Logo/index.tsx b/apps/learneth/src/pages/Logo/index.tsx new file mode 100644 index 0000000000..6fcb816633 --- /dev/null +++ b/apps/learneth/src/pages/Logo/index.tsx @@ -0,0 +1,20 @@ +import React, {useEffect} from 'react' +import {useAppDispatch} from '../../redux/hooks' + +const LogoPage: React.FC = () => { + const dispatch = useAppDispatch() + + useEffect(() => { + dispatch({type: 'remixide/connect'}) + }, []) + + return ( +
+
+ +
+
+ ) +} + +export default LogoPage diff --git a/apps/learneth/src/pages/StepDetail/index.scss b/apps/learneth/src/pages/StepDetail/index.scss new file mode 100644 index 0000000000..5b59a87727 --- /dev/null +++ b/apps/learneth/src/pages/StepDetail/index.scss @@ -0,0 +1,54 @@ +step-view { + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + overflow: hidden; +} + +header, footer { + padding: 10px 5px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.errorloadingspacer{ + padding-top: 44px; + +} + +.title{ + pointer-events: none; +} + +h1 { + text-align: left; + font-size: 1.2rem !important; + word-break: break-word; +} + +markdown { + display: block; + flex: 1; + overflow: auto; + padding: 0px; + + h1 { + font-size: 1.2rem !important; + } + + h2 { + font-size: 1rem; + } + + h3 { + font-size: 1rem; + } + + h4 { + font-size: 1rem; + } +} + + diff --git a/apps/learneth/src/pages/StepDetail/index.tsx b/apps/learneth/src/pages/StepDetail/index.tsx new file mode 100644 index 0000000000..2df3b9efe6 --- /dev/null +++ b/apps/learneth/src/pages/StepDetail/index.tsx @@ -0,0 +1,228 @@ +import React, {useEffect} from 'react' +import {useLocation, useNavigate} from 'react-router-dom' +import Markdown from 'react-markdown' +import rehypeRaw from 'rehype-raw' +import BackButton from '../../components/BackButton' +import {useAppSelector, useAppDispatch} from '../../redux/hooks' +import './index.scss' + +function StepDetailPage() { + const navigate = useNavigate() + const location = useLocation() + const dispatch = useAppDispatch() + const queryParams = new URLSearchParams(location.search) + const id = queryParams.get('id') as string + const stepId = Number(queryParams.get('stepId')) + const { + workshop: {detail, selectedId}, + remixide: {errorLoadingFile, errors, success}, + } = useAppSelector((state: any) => state) + const entity = detail[selectedId].entities[id] + const steps = entity.steps + const step = steps[stepId] + console.log(step) + + useEffect(() => { + dispatch({ + type: 'remixide/displayFile', + payload: step, + }) + dispatch({ + type: 'remixide/save', + payload: {errors: [], success: false}, + }) + window.scrollTo(0, 0) + }, [step]) + + useEffect(() => { + if (errors.length > 0 || success) { + window.scrollTo(0, document.documentElement.scrollHeight) + } + }, [errors, success]) + + return ( + <> +
+
+ +
+
+
+ {errorLoadingFile ? ( + <> +
+

{step.name}

+ +
+ + ) : ( + <> +
+

{step.name}

+ + )} +
+ {step.markdown?.content} +
+ {step.test?.content ? ( + <> + + {success && ( + + )} +
+ {success && ( +
+ Well done! No errors. +
+ )} + {errors.length > 0 && ( + <> + {!success && ( +
+ Errors +
+ )} + {errors.map((error: string, index: number) => ( +
+ {error} +
+ ))} + + )} +
+ + ) : ( + <> + + {stepId < steps.length - 1 && ( + + )} + {stepId === steps.length - 1 && ( + + )} + + )} + + ) +} + +export default StepDetailPage diff --git a/apps/learneth/src/pages/StepList/index.scss b/apps/learneth/src/pages/StepList/index.scss new file mode 100644 index 0000000000..eb56db2b90 --- /dev/null +++ b/apps/learneth/src/pages/StepList/index.scss @@ -0,0 +1,144 @@ +:host { + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +header { + padding: 10px 5px; +} + +.menuspacer{ + margin-top: 52px; +} + +.steplink { + text-decoration: none; +} + +.title{ + pointer-events: none; +} + +h1 { + text-align: left; + font-size: 1.2rem !important; + word-break: break-word; +} +section { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + .start { + padding: 5px 25px; + animation: jittery 2s 0.5s infinite; + box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.5); + color: white; + cursor: pointer; + } +} + +footer { + padding: 10px; + display: flex; + justify-content: space-between; + align-items: center; +} + +@keyframes jittery { + 5%, + 50% { + transform: scale(1); + box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.5); + } + 10% { + transform: scale(0.9); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + } + 15% { + transform: scale(1.15); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + } + 20% { + transform: scale(1.15) rotate(-5deg); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + } + 25% { + transform: scale(1.15) rotate(5deg); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + } + 30% { + transform: scale(1.15) rotate(-3deg); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + } + 35% { + transform: scale(1.15) rotate(2deg); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + } + 40% { + transform: scale(1.15) rotate(0); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + } +} + +.slide-in { + animation: slideIn 0.5s forwards; + visibility: hidden; +} + +@keyframes slideIn { + 0% { + transform: translateY(-100%); + visibility: visible; + } + 100% { + transform: translateY(0); + visibility: visible; + } +} + +@-moz-keyframes slideIn { + 0% { + transform: translateY(-100%); + visibility: visible; + } + 100% { + transform: translateY(0); + visibility: visible; + } +} + +@-webkit-keyframes slideIn { + 0% { + transform: translateY(-100%); + visibility: visible; + } + 100% { + transform: translateY(0); + visibility: visible; + } +} + +@-o-keyframes slideIn { + 0% { + transform: translateY(-100%); + visibility: visible; + } + 100% { + transform: translateY(0); + visibility: visible; + } +} + +@-ms-keyframes slideIn { + 0% { + transform: translateY(-100%); + visibility: visible; + } + 100% { + transform: translateY(0); + visibility: visible; + } +} diff --git a/apps/learneth/src/pages/StepList/index.tsx b/apps/learneth/src/pages/StepList/index.tsx new file mode 100644 index 0000000000..1c05930e24 --- /dev/null +++ b/apps/learneth/src/pages/StepList/index.tsx @@ -0,0 +1,41 @@ +import React from 'react' +import {Link, useLocation} from 'react-router-dom' +import Markdown from 'react-markdown' +import BackButton from '../../components/BackButton' +import SlideIn from '../../components/SlideIn' +import {useAppSelector} from '../../redux/hooks' +import './index.scss' + +function StepListPage(): JSX.Element { + const location = useLocation() + const queryParams = new URLSearchParams(location.search) + const id = queryParams.get('id') as string + const {detail, selectedId} = useAppSelector((state) => state.workshop) + const entity = detail[selectedId].entities[id] + + return ( + <> +
+
+ +
+
+
+

{entity.name}

+
+ {entity.text} +
+ +
+ {entity.steps.map((step: any, i: number) => ( + + {step.name} » + + ))} +
+
+ + ) +} + +export default StepListPage diff --git a/apps/learneth/src/polyfills.ts b/apps/learneth/src/polyfills.ts new file mode 100644 index 0000000000..53c485753e --- /dev/null +++ b/apps/learneth/src/polyfills.ts @@ -0,0 +1,7 @@ +/** + * Polyfill stable language features. These imports will be optimized by `@babel/preset-env`. + * + * See: https://github.com/zloirock/core-js#babel + */ +import 'core-js/stable' +import 'regenerator-runtime/runtime' diff --git a/apps/learneth/src/profile.json b/apps/learneth/src/profile.json new file mode 100644 index 0000000000..2eade4d42d --- /dev/null +++ b/apps/learneth/src/profile.json @@ -0,0 +1,21 @@ +{ + "name": "LearnEth", + "displayName": "LearnEth", + "description": "Learn Ethereum with Remix!", + "documentation": "https://remix-learneth-plugin.readthedocs.io/en/latest/index.html", + "version": "0.1.0", + "methods": [ + "startTutorial", + "addRepository" + ], + "kind": "none", + "icon": "assets/img/learnEthLogo.webp", + "location": "sidePanel", + "url": "plugins/learneth/index.html", + "repo": "https://github.com/ethereum/remix-project/tree/master/apps/learneth", + "maintainedBy": "Remix", + "authorContact": "", + "targets": [ + "remix" + ] +} diff --git a/apps/learneth/src/redux/hooks.ts b/apps/learneth/src/redux/hooks.ts new file mode 100644 index 0000000000..256734f44f --- /dev/null +++ b/apps/learneth/src/redux/hooks.ts @@ -0,0 +1,5 @@ +import {useDispatch, type TypedUseSelectorHook, useSelector} from 'react-redux' +import {type AppDispatch, type RootState} from './store' + +export const useAppDispatch: () => AppDispatch = useDispatch +export const useAppSelector: TypedUseSelectorHook = useSelector diff --git a/apps/learneth/src/redux/models/loading.ts b/apps/learneth/src/redux/models/loading.ts new file mode 100644 index 0000000000..38e09ef7c2 --- /dev/null +++ b/apps/learneth/src/redux/models/loading.ts @@ -0,0 +1,14 @@ +import {type ModelType} from '../store' + +const Model: ModelType = { + namespace: 'loading', + state: {screen: true}, + reducers: { + save(state, {payload}) { + return {...state, ...payload} + }, + }, + effects: {}, +} + +export default Model diff --git a/apps/learneth/src/redux/models/remixide.ts b/apps/learneth/src/redux/models/remixide.ts new file mode 100644 index 0000000000..2dea0d96f4 --- /dev/null +++ b/apps/learneth/src/redux/models/remixide.ts @@ -0,0 +1,229 @@ +import {toast} from 'react-toastify' +import {type ModelType} from '../store' +import remixClient from '../../remix-client' +import {router} from '../../App' + +function getFilePath(file: string): string { + const name = file.split('/') + return name.length > 1 ? `${name[name.length - 1]}` : '' +} + +const Model: ModelType = { + namespace: 'remixide', + state: { + errors: [], + success: false, + errorLoadingFile: false, + // theme: '', + }, + reducers: { + save(state, {payload}) { + return {...state, ...payload} + }, + }, + effects: { + *connect(_, {put}) { + toast.info('connecting to the REMIX IDE') + + yield put({ + type: 'loading/save', + payload: { + screen: true, + }, + }) + + yield remixClient.onload() + + toast.dismiss() + + yield put({ + type: 'loading/save', + payload: { + screen: false, + }, + }) + + yield router.navigate('/home') + }, + *displayFile({payload: step}, {select, put}) { + let content = '' + let path = '' + if (step.solidity?.file) { + content = step.solidity.content + path = getFilePath(step.solidity.file) + } + if (step.js?.file) { + content = step.js.content + path = getFilePath(step.js.file) + } + if (step.vy?.file) { + content = step.vy.content + path = getFilePath(step.vy.file) + } + + if (!content) { + return + } + + toast.info(`loading ${path} into IDE`) + yield put({ + type: 'loading/save', + payload: { + screen: true, + }, + }) + + const {detail, selectedId} = yield select((state) => state.workshop) + + const workshop = detail[selectedId] + console.log('loading ', step, workshop) + + path = `.learneth/${workshop.name}/${step.name}/${path}` + try { + const isExist = yield remixClient.call('fileManager', 'exists' as any, path) + if (!isExist) { + yield remixClient.call('fileManager', 'setFile', path, content) + } + yield remixClient.call('fileManager', 'switchFile', `${path}`) + yield put({ + type: 'remixide/save', + payload: {errorLoadingFile: false}, + }) + toast.dismiss() + } catch (error) { + toast.dismiss() + toast.error('File could not be loaded. Please try again.') + yield put({ + type: 'remixide/save', + payload: {errorLoadingFile: true}, + }) + } + yield put({ + type: 'loading/save', + payload: { + screen: false, + }, + }) + }, + *testStep({payload: step}, {select, put}) { + yield put({ + type: 'loading/save', + payload: { + screen: true, + }, + }) + + try { + yield put({ + type: 'remixide/save', + payload: {success: false}, + }) + const {detail, selectedId} = yield select((state) => state.workshop) + + const workshop = detail[selectedId] + + let path: string + if (step.solidity.file) { + path = getFilePath(step.solidity.file) + path = `.learneth/${workshop.name}/${step.name}/${path}` + yield remixClient.call('fileManager', 'switchFile', `${path}`) + } + + console.log('testing ', step.test.content) + + path = getFilePath(step.test.file) + path = `.learneth/${workshop.name}/${step.name}/${path}` + yield remixClient.call('fileManager', 'setFile', path, step.test.content) + + const result = yield remixClient.call('solidityUnitTesting', 'testFromPath', path) + console.log('result ', result) + + if (!result) { + yield put({ + type: 'remixide/save', + payload: {errors: ['Compiler failed to test this file']}, + }) + } else { + const success = result.totalFailing === 0 + + if (success) { + yield put({ + type: 'remixide/save', + payload: {errors: [], success: true}, + }) + } else { + yield put({ + type: 'remixide/save', + payload: { + errors: result.errors.map((error: {message: any}) => error.message), + }, + }) + } + } + } catch (err) { + console.log('TESTING ERROR', err) + yield put({ + type: 'remixide/save', + payload: {errors: [String(err)]}, + }) + } + yield put({ + type: 'loading/save', + payload: { + screen: false, + }, + }) + }, + *showAnswer({payload: step}, {select, put}) { + yield put({ + type: 'loading/save', + payload: { + screen: true, + }, + }) + + toast.info('loading answer into IDE') + + try { + console.log('loading ', step) + const content = step.answer.content + let path = getFilePath(step.answer.file) + + const {detail, selectedId} = yield select((state) => state.workshop) + + const workshop = detail[selectedId] + path = `.learneth/${workshop.name}/${step.name}/${path}` + yield remixClient.call('fileManager', 'setFile', path, content) + yield remixClient.call('fileManager', 'switchFile', `${path}`) + } catch (err) { + yield put({ + type: 'remixide/save', + payload: {errors: [String(err)]}, + }) + } + + toast.dismiss() + yield put({ + type: 'loading/save', + payload: { + screen: false, + }, + }) + }, + *testSolidityCompiler(_, {put, select}) { + try { + yield remixClient.call('solidity', 'getCompilationResult') + } catch (err) { + const errors = yield select((state) => state.remixide.errors) + yield put({ + type: 'remixide/save', + payload: { + errors: [...errors, "The `Solidity Compiler` is not yet activated.
Please activate it using the `SOLIDITY` button in the `Featured Plugins` section of the homepage."], + }, + }) + } + }, + }, +} + +export default Model diff --git a/apps/learneth/src/redux/models/workshop.ts b/apps/learneth/src/redux/models/workshop.ts new file mode 100644 index 0000000000..daf41b5ff9 --- /dev/null +++ b/apps/learneth/src/redux/models/workshop.ts @@ -0,0 +1,164 @@ +import axios from 'axios' +import {toast} from 'react-toastify' +import groupBy from 'lodash/groupBy' +import pick from 'lodash/pick' +import {type ModelType} from '../store' +import remixClient from '../../remix-client' +import {router} from '../../App' + +// const apiUrl = 'http://localhost:3001'; +const apiUrl = 'https://static.220.14.12.49.clients.your-server.de:3000' + +const Model: ModelType = { + namespace: 'workshop', + state: { + list: [], + detail: {}, + selectedId: '', + }, + reducers: { + save(state, {payload}) { + return {...state, ...payload} + }, + }, + effects: { + *init(_, {put}) { + const cache = localStorage.getItem('workshop.state') + + if (cache) { + const workshopState = JSON.parse(cache) + yield put({ + type: 'workshop/save', + payload: workshopState, + }) + } else { + yield put({ + type: 'workshop/loadRepo', + payload: { + name: 'ethereum/remix-workshops', + branch: 'master', + }, + }) + } + }, + *loadRepo({payload}, {put, select}) { + toast.info(`loading ${payload.name}/${payload.branch}`) + + yield put({ + type: 'loading/save', + payload: { + screen: true, + }, + }) + + const {list, detail} = yield select((state) => state.workshop) + + const url = `${apiUrl}/clone/${encodeURIComponent(payload.name)}/${payload.branch}?${Math.random()}` + console.log('loading ', url) + const {data} = yield axios.get(url) + console.log(data) + const repoId = `${payload.name}-${payload.branch}` + + for (let i = 0; i < data.ids.length; i++) { + const { + steps, + metadata: { + data: {steps: metadataSteps}, + }, + } = data.entities[data.ids[i]] + + let newSteps = [] + + if (metadataSteps) { + newSteps = metadataSteps.map((step: any) => { + return { + ...steps.find((item: any) => item.name === step.path), + name: step.name, + } + }) + } else { + newSteps = steps.map((step: any) => ({ + ...step, + name: step.name.replace('_', ' '), + })) + } + + const stepKeysWithFile = ['markdown', 'solidity', 'test', 'answer', 'js', 'vy'] + + for (let j = 0; j < newSteps.length; j++) { + const step = newSteps[j] + for (let k = 0; k < stepKeysWithFile.length; k++) { + const key = stepKeysWithFile[k] + if (step[key]) { + try { + step[key].content = (yield remixClient.call('contentImport', 'resolve', step[key].file)).content + } catch (error) { + console.error(error) + } + } + } + } + data.entities[data.ids[i]].steps = newSteps + } + + const workshopState = { + detail: { + ...detail, + [repoId]: { + ...data, + group: groupBy( + data.ids.map((id: string) => pick(data.entities[id], ['level', 'id'])), + (item: any) => item.level + ), + ...payload, + }, + }, + list: detail[repoId] ? list : [...list, payload], + selectedId: repoId, + } + yield put({ + type: 'workshop/save', + payload: workshopState, + }) + localStorage.setItem('workshop.state', JSON.stringify(workshopState)) + + toast.dismiss() + yield put({ + type: 'loading/save', + payload: { + screen: false, + }, + }) + + if (payload.id) { + const {detail, selectedId} = workshopState + const {ids, entities} = detail[selectedId] + for (let i = 0; i < ids.length; i++) { + const entity = entities[ids[i]] + if (entity.metadata.data.id === payload.id || i + 1 === payload.id) { + yield router.navigate(`/list?id=${ids[i]}`) + break + } + } + } + }, + *resetAll(_, {put}) { + yield put({ + type: 'workshop/save', + payload: { + list: [], + detail: {}, + selectedId: '', + }, + }) + + localStorage.removeItem('workshop.state') + + yield put({ + type: 'workshop/init', + }) + }, + }, +} + +export default Model diff --git a/apps/learneth/src/redux/store.ts b/apps/learneth/src/redux/store.ts new file mode 100644 index 0000000000..5092828cc6 --- /dev/null +++ b/apps/learneth/src/redux/store.ts @@ -0,0 +1,97 @@ +import {configureStore, createSlice, type PayloadAction, type Reducer} from '@reduxjs/toolkit' +import createSagaMiddleware from 'redux-saga' +import {call, put, takeEvery, delay, select, all, fork, type ForkEffect} from 'redux-saga/effects' + +// @ts-expect-error +const context = require.context('./models', false, /\.ts$/) +const models = context.keys().map((key: any) => context(key).default) + +export type StateType = Record +export interface ModelType { + namespace: string + state: StateType + reducers: Record) => StateType> + effects: Record< + string, + ( + action: PayloadAction, + effects: { + call: typeof call + put: typeof put + delay: typeof delay + select: typeof select + } + ) => Generator + > +} + +function createReducer(model: ModelType): Reducer { + const reducers = model.reducers + Object.keys(model.effects).forEach((key) => { + reducers[key] = (state: StateType, action: PayloadAction) => state + }) + const slice = createSlice({ + name: model.namespace, + initialState: model.state, + reducers, + }) + return slice.reducer +} + +const rootReducer = models.reduce((prev: any, model: ModelType) => { + return {...prev, [model.namespace]: createReducer(model)} +}, {}) + +function watchEffects(model: ModelType): ForkEffect { + return fork(function* () { + for (const key in model.effects) { + const effect = model.effects[key] + yield takeEvery(`${model.namespace}/${key}`, function* (action: PayloadAction) { + yield put({ + type: 'loading/save', + payload: { + [`${model.namespace}/${key}`]: true, + }, + }) + yield effect(action, { + call, + put, + delay, + select, + }) + yield put({ + type: 'loading/save', + payload: { + [`${model.namespace}/${key}`]: false, + }, + }) + }) + } + }) +} + +function* rootSaga(): Generator { + yield all(models.map((model: ModelType) => watchEffects(model))) +} + +const configureAppStore = (initialState = {}) => { + const reduxSagaMonitorOptions = {} + const sagaMiddleware = createSagaMiddleware(reduxSagaMonitorOptions) + + const middleware = [sagaMiddleware] + + const store = configureStore({ + reducer: rootReducer, + middleware: (gDM) => gDM().concat([...middleware]), + preloadedState: initialState, + devTools: process.env.NODE_ENV !== 'production', + }) + + sagaMiddleware.run(rootSaga) + return store +} + +export const store = configureAppStore() + +export type AppDispatch = typeof store.dispatch +export type RootState = ReturnType diff --git a/apps/learneth/src/remix-client.ts b/apps/learneth/src/remix-client.ts new file mode 100644 index 0000000000..4d4ab9844f --- /dev/null +++ b/apps/learneth/src/remix-client.ts @@ -0,0 +1,38 @@ +import {PluginClient} from '@remixproject/plugin' +import {createClient} from '@remixproject/plugin-webview' +import {store} from './redux/store' +import {router} from './App' + +class RemixClient extends PluginClient { + constructor() { + super() + createClient(this) + } + + startTutorial(name: any, branch: any, id: any): void { + console.log('start tutorial', name, branch, id) + void router.navigate('/home') + store.dispatch({ + type: 'workshop/loadRepo', + payload: { + name, + branch, + id, + }, + }) + } + + addRepository(name: any, branch: any) { + console.log('add repo', name, branch) + void router.navigate('/home') + store.dispatch({ + type: 'workshop/loadRepo', + payload: { + name, + branch, + }, + }) + } +} + +export default new RemixClient() diff --git a/apps/learneth/tsconfig.app.json b/apps/learneth/tsconfig.app.json new file mode 100644 index 0000000000..af84f21cfc --- /dev/null +++ b/apps/learneth/tsconfig.app.json @@ -0,0 +1,23 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "types": ["node"] + }, + "files": [ + "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", + "../../node_modules/@nrwl/react/typings/image.d.ts" + ], + "exclude": [ + "jest.config.ts", + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx" + ], + "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] +} diff --git a/apps/learneth/tsconfig.json b/apps/learneth/tsconfig.json new file mode 100644 index 0000000000..5aab5e7911 --- /dev/null +++ b/apps/learneth/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "jsx": "react-jsx", + "allowJs": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.app.json" + } + ] +} diff --git a/apps/learneth/webpack.config.js b/apps/learneth/webpack.config.js new file mode 100644 index 0000000000..4db6b9fc00 --- /dev/null +++ b/apps/learneth/webpack.config.js @@ -0,0 +1,90 @@ +const {composePlugins, withNx} = require('@nrwl/webpack') +const webpack = require('webpack') +const TerserPlugin = require('terser-webpack-plugin') +const CssMinimizerPlugin = require('css-minimizer-webpack-plugin') + +// Nx plugins for webpack. +module.exports = composePlugins(withNx(), (config) => { + // Update the webpack config as needed here. + // e.g. `config.plugins.push(new MyPlugin())` + // add fallback for node modules + config.resolve.fallback = { + ...config.resolve.fallback, + crypto: require.resolve('crypto-browserify'), + stream: require.resolve('stream-browserify'), + path: require.resolve('path-browserify'), + http: require.resolve('stream-http'), + https: require.resolve('https-browserify'), + constants: require.resolve('constants-browserify'), + os: false, //require.resolve("os-browserify/browser"), + timers: false, // require.resolve("timers-browserify"), + zlib: require.resolve('browserify-zlib'), + fs: false, + module: false, + tls: false, + net: false, + readline: false, + child_process: false, + buffer: require.resolve('buffer/'), + vm: require.resolve('vm-browserify'), + } + + // add externals + config.externals = { + ...config.externals, + solc: 'solc', + } + + // add public path + config.output.publicPath = './' + + // add copy & provide plugin + config.plugins.push( + new webpack.ProvidePlugin({ + Buffer: ['buffer', 'Buffer'], + url: ['url', 'URL'], + process: 'process/browser', + }) + ) + + // set the define plugin to load the WALLET_CONNECT_PROJECT_ID + config.plugins.push( + new webpack.DefinePlugin({ + WALLET_CONNECT_PROJECT_ID: JSON.stringify(process.env.WALLET_CONNECT_PROJECT_ID), + }) + ) + + // souce-map loader + config.module.rules.push({ + test: /\.js$/, + use: ['source-map-loader'], + enforce: 'pre', + }) + + config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings + + // set minimizer + config.optimization.minimizer = [ + new TerserPlugin({ + parallel: true, + terserOptions: { + ecma: 2015, + compress: false, + mangle: false, + format: { + comments: false, + }, + }, + extractComments: false, + }), + new CssMinimizerPlugin(), + ] + + config.watchOptions = { + ignored: /node_modules/, + } + + config.experiments.syncWebAssembly = true + + return config +}) diff --git a/apps/remix-ide-e2e/src/commands/addLocalPlugin.ts b/apps/remix-ide-e2e/src/commands/addLocalPlugin.ts index 06f4b25cdc..51358b730f 100644 --- a/apps/remix-ide-e2e/src/commands/addLocalPlugin.ts +++ b/apps/remix-ide-e2e/src/commands/addLocalPlugin.ts @@ -3,9 +3,9 @@ import EventEmitter from 'events' import { ExternalProfile, LocationProfile, Profile } from '@remixproject/plugin-utils' class AddLocalPlugin extends EventEmitter { - command (this: NightwatchBrowser, profile: Profile & LocationProfile & ExternalProfile): NightwatchBrowser { + command (this: NightwatchBrowser, profile: Profile & LocationProfile & ExternalProfile, focus: boolean): NightwatchBrowser { this.api.perform((done) => { - addLocalPlugin(this.api, profile, () => { + addLocalPlugin(this.api, profile, focus, () => { done() this.emit('complete') }) @@ -14,7 +14,7 @@ class AddLocalPlugin extends EventEmitter { } } -function addLocalPlugin (browser: NightwatchBrowser, profile: Profile & LocationProfile & ExternalProfile, callback: VoidFunction) { +function addLocalPlugin (browser: NightwatchBrowser, profile: Profile & LocationProfile & ExternalProfile, focus: boolean, callback: VoidFunction) { browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') .pause(3000).element('css selector', '*[data-id="pluginManagerComponentPluginManager"]', function (result) { if (result.status === 0) { @@ -38,8 +38,13 @@ function addLocalPlugin (browser: NightwatchBrowser, profile: Profile & Location .click(profile.location === 'sidePanel' ? '*[data-id="localPluginRadioButtonsidePanel"]' : '*[data-id="localPluginRadioButtonmainPanel"]') .click('*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalFooter-react"]') .click('*[data-id="pluginManagerLocalPluginModalDialog-modal-footer-ok-react') - .waitForElementVisible('[data-id="verticalIconsKindlocalPlugin"]') - .click('[data-id="verticalIconsKindlocalPlugin"]') + .perform((done) => { + if (focus) { + browser.waitForElementVisible(`[data-id="verticalIconsKind${profile.name}"]`) + .click(`[data-id="verticalIconsKind${profile.name}"]`) + } + done() + }) .perform(function () { callback() }) } diff --git a/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts b/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts index ed8fa54cbd..a6df7c94f3 100644 --- a/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts +++ b/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts @@ -2,9 +2,9 @@ import EventEmitter from 'events' import { NightwatchBrowser } from 'nightwatch' class CheckTerminalFilter extends EventEmitter { - command (this: NightwatchBrowser, filter: string, test: string): NightwatchBrowser { + command (this: NightwatchBrowser, filter: string, test: string, notContain: boolean): NightwatchBrowser { this.api.perform((done) => { - checkFilter(this.api, filter, test, () => { + checkFilter(this.api, filter, test, notContain, () => { done() this.emit('complete') }) @@ -13,20 +13,30 @@ class CheckTerminalFilter extends EventEmitter { } } -function checkFilter (browser: NightwatchBrowser, filter: string, test: string, done: VoidFunction) { - if (browser.options.desiredCapabilities.browserName === 'chrome') { // nightwatch deos not handle well that part.... works locally +function checkFilter (browser: NightwatchBrowser, filter: string, inputTest: string, notContain: boolean, done: VoidFunction) { + /*if (browser.options.desiredCapabilities.browserName === 'chrome') { // nightwatch deos not handle well that part.... works locally done() return - } - const filterClass = '[data-id="terminalInputSearch"]' - browser.setValue(filterClass, filter, function () { + }*/ + const filterClass = '[data-id="terminalInputSearchTerminal"]' + browser.clearValue(filterClass).setValue(filterClass, filter, function () { browser.execute(function () { - return document.querySelector('[data-id="terminalJournal"]').innerHTML === test || '' + return document.querySelector('[data-id="terminalJournal"]').innerHTML }, [], function (result) { - browser.clearValue(filterClass).setValue(filterClass, '', function () { - if (!result.value) { - browser.assert.fail('useFilter on ' + filter + ' ' + test, 'info about error', '') + console.log(notContain, result.value, filter) + if (!notContain) { + // the input text should be contained in the result + if ((result.value as string).indexOf(filter) === -1) { + browser.assert.fail('useFilter on ' + filter + ' ' + test, 'the input text should be contained in the result', '') + } + } + if (notContain) { + // the input text should not be contained in the result + if ((result.value as string).indexOf(filter) !== -1) { + browser.assert.fail('useFilter on ' + filter + ' ' + test, 'the input text should not be contained in the result', '') } + } + browser.clearValue(filterClass).perform(() => { done() }) }) diff --git a/apps/remix-ide-e2e/src/commands/getLastTransactionHash.ts b/apps/remix-ide-e2e/src/commands/getLastTransactionHash.ts index 586f166811..fed0c3799b 100644 --- a/apps/remix-ide-e2e/src/commands/getLastTransactionHash.ts +++ b/apps/remix-ide-e2e/src/commands/getLastTransactionHash.ts @@ -15,7 +15,7 @@ class GetLastTransactionHash extends EventEmitter { } function getLastTransactionHash (browser: NightwatchBrowser, callback: (hash: string) => void) { - browser.waitForElementPresent('*[data-shared="universalDappUiInstance"]') + browser.waitForElementPresent('*[data-id="terminalJournal"]') .execute(function () { const deployedContracts = document.querySelectorAll('*[data-id="terminalJournal"] > div') for (let i = deployedContracts.length - 1; i >= 0; i--) { diff --git a/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts b/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts index d5a23a3968..2f30848454 100644 --- a/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts +++ b/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts @@ -5,10 +5,10 @@ import EventEmitter from 'events' Checks if any child elements of journal (console) contains a matching value. */ class JournalChildIncludes extends EventEmitter { - command (this: NightwatchBrowser, val: string, opts = { shouldHaveOnlyOneOccurence: false }): NightwatchBrowser { + command (this: NightwatchBrowser, val: string, opts = { shouldHaveOnlyOneOccurrence: false }): NightwatchBrowser { let isTextFound = false const browser = this.api - let occurence = 0 + let occurrence = 0 this.api.elements('css selector', '*[data-id="terminalJournal"]', (res) => { Array.isArray(res.value) && res.value.forEach(function (jsonWebElement) { const jsonWebElementId = jsonWebElement[ELEMENT_KEY] || jsonWebElement[Object.keys(jsonWebElement)[0]] @@ -18,14 +18,14 @@ class JournalChildIncludes extends EventEmitter { if (typeof text === 'string' && text.indexOf(val) !== -1) { isTextFound = true - occurence++ + occurrence++ } }) }) }) browser.perform(() => { browser.assert.ok(isTextFound, isTextFound ? `<*[data-id="terminalJournal"]> contains ${val}.` : `${val} not found in <*[data-id="terminalJournal"]> div:last-child>`) - if (opts.shouldHaveOnlyOneOccurence) browser.assert.ok(occurence === 1, `${occurence} occurence found of "${val}"`) + if (opts.shouldHaveOnlyOneOccurrence) browser.assert.ok(occurrence === 1, `${occurrence} occurrence found of "${val}"`) this.emit('complete') }) return this diff --git a/apps/remix-ide-e2e/src/examples/example-contracts.ts b/apps/remix-ide-e2e/src/examples/example-contracts.ts index 3ab12305e2..2b38717ea6 100644 --- a/apps/remix-ide-e2e/src/examples/example-contracts.ts +++ b/apps/remix-ide-e2e/src/examples/example-contracts.ts @@ -4,7 +4,7 @@ const storage = `pragma solidity >=0.7.0 <0.9.0; /** * @title Storage - * @dev Store & retreive value in a variable + * @dev Store & retrieve value in a variable */ contract Storage { @@ -22,7 +22,7 @@ contract Storage { * @dev Return value * @return value of 'number' */ - function retreive() public view returns (uint256){ + function retrieve() public view returns (uint256){ return number; } }` @@ -301,7 +301,7 @@ contract BallotTest { Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name"); } - function checkWinninProposalWithReturnValue () public view returns (bool) { + function checkWinningProposalWithReturnValue () public view returns (bool) { return ballotToTest.winningProposal() == 0; } } diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 7e9c51e43f..dbdef20903 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -75,7 +75,7 @@ module.exports = { abortOnFailure: false, suppressNotFoundErrors: true, }) - // we are not changing the visibility for not checksumed contracts + // we are not changing the visibility for not checksummed contracts // .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) .clickLaunchIcon('filePanel') .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) @@ -118,7 +118,6 @@ module.exports = { .connectToExternalHttpProvider('http://localhost:8545', 'Custom') .clickLaunchIcon('solidity') .clickLaunchIcon('udapp') - .pause(2000) .clearValue('input[placeholder="bytes32[] proposalNames"]') .setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]') .click('*[data-id="Deploy - transact (not payable)"]') @@ -555,4 +554,4 @@ contract Retriever is Storage { return number; } } -` \ No newline at end of file +` diff --git a/apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts b/apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts index 09398a8968..61d08b5735 100644 --- a/apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts @@ -71,7 +71,7 @@ module.exports = { abortOnFailure: false, suppressNotFoundErrors: true, }) - // we are not changing the visibility for not checksumed contracts + // we are not changing the visibility for not checksummed contracts // .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) .clickLaunchIcon('filePanel') .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) @@ -94,7 +94,6 @@ module.exports = { .connectToExternalHttpProvider('http://localhost:8545', 'Custom') .clickLaunchIcon('solidity') .clickLaunchIcon('udapp') - .pause(2000) .clearValue('input[placeholder="uint8 _numProposals"]') .setValue('input[placeholder="uint8 _numProposals"]', '2') .click('*[data-id="Deploy - transact (not payable)"]') diff --git a/apps/remix-ide-e2e/src/tests/compiler_api.test.ts b/apps/remix-ide-e2e/src/tests/compiler_api.test.ts index 17d8a96815..63833d25be 100644 --- a/apps/remix-ide-e2e/src/tests/compiler_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/compiler_api.test.ts @@ -18,7 +18,7 @@ module.exports = { return sources }, - 'Should compile using "compileWithParamaters" API #group1': function (browser: NightwatchBrowser) { + 'Should compile using "compileWithParameters" API #group1': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompile.js', { content: jsCompile }) .executeScriptInTerminal('remix.exeCurrent()') @@ -26,7 +26,7 @@ module.exports = { .click('*[data-id="terminalClearConsole"]') }, - 'Should compile using "compileWithParamaters" API with optimization On #group2': function (browser: NightwatchBrowser) { + 'Should compile using "compileWithParameters" API with optimization On #group2': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization }) .executeScriptInTerminal('remix.exeCurrent()') @@ -34,7 +34,7 @@ module.exports = { .click('*[data-id="terminalClearConsole"]') }, - 'Should compile using "compileWithParamaters" API with optimization off check default runs #group3': function (browser: NightwatchBrowser) { + 'Should compile using "compileWithParameters" API with optimization off check default runs #group3': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault }) .executeScriptInTerminal('remix.exeCurrent()') @@ -65,7 +65,7 @@ const simpleContract = `pragma solidity >=0.4.22 <0.9.1; /** * @title Storage -* @dev Store & retreive value in a variable +* @dev Store & retrieve value in a variable */ contract StorageTestUpdateConfiguration { @@ -83,7 +83,7 @@ contract StorageTestUpdateConfiguration { * @dev Return value * @return value of 'number' */ - function retreive() public view returns (uint256){ + function retrieve() public view returns (uint256){ return number; } } diff --git a/apps/remix-ide-e2e/src/tests/file_explorer_dragdrop.test.ts b/apps/remix-ide-e2e/src/tests/file_explorer_dragdrop.test.ts index edcf90d881..949bf86d59 100644 --- a/apps/remix-ide-e2e/src/tests/file_explorer_dragdrop.test.ts +++ b/apps/remix-ide-e2e/src/tests/file_explorer_dragdrop.test.ts @@ -3,101 +3,101 @@ import { NightwatchBrowser } from 'nightwatch' import init from '../helpers/init' const checkBrowserIsChrome = function (browser: NightwatchBrowser) { - return browser.browserName.indexOf('chrome') > -1 + return browser.browserName.indexOf('chrome') > -1 } module.exports = { - '@disabled': true, - before: function (browser: NightwatchBrowser, done: VoidFunction) { - init(browser, done) - }, - 'drag and drop file from root to contracts #group1 ': function (browser: NightwatchBrowser) { - if (checkBrowserIsChrome(browser)) { - browser - .clickLaunchIcon('filePanel') - .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') - .findElement('*[data-id="treeViewLitreeViewItemcontracts"]', (el) => { - console.log((el as any).value.getId()) - const id = (el as any).value.getId() - browser - .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') - .dragAndDrop('li[data-id="treeViewLitreeViewItemREADME.txt"]', id) - .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) - .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/README.txt"]') - }) - } - }, + '@disabled': true, + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done) + }, + 'drag and drop file from root to contracts #group1 ': function (browser: NightwatchBrowser) { + if (checkBrowserIsChrome(browser)) { + browser + .clickLaunchIcon('filePanel') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') + .findElement('*[data-id="treeViewLitreeViewItemcontracts"]', (el) => { + console.log((el as any).value.getId()) + const id = (el as any).value.getId() + browser + .waitForElementVisible('li[data-id="treeViewLitreeViewItemREADME.txt"]') + .dragAndDrop('li[data-id="treeViewLitreeViewItemREADME.txt"]', id) + .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) + .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/README.txt"]') + }) + } + }, - 'drag and drop file from contracts to root #group1': function (browser: NightwatchBrowser) { - if (checkBrowserIsChrome(browser)) { - browser.findElement('*[data-id="treeViewUltreeViewMenu"]', (el) => { - console.log((el as any).value.getId()) - const id = (el as any).value.getId() - browser - .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]') - .dragAndDrop('li[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]', id) - .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) - }) - browser.pause(1000) - .waitForElementVisible('li[data-id="treeViewLitreeViewItem1_Storage.sol"]') - } - }, - 'drag and drop scripts from root to contracts #group1': function (browser: NightwatchBrowser) { - if (checkBrowserIsChrome(browser)) { - browser - .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') - .findElement('*[data-id="treeViewLitreeViewItemcontracts"]', (el) => { - console.log((el as any).value.getId()) - const id = (el as any).value.getId() - browser - .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') - .dragAndDrop('li[data-id="treeViewLitreeViewItemscripts"]', id) - .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) - .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/scripts"]') - }) - } - }, - 'drag scripts from contracts to root #group1': function (browser: NightwatchBrowser) { - if (checkBrowserIsChrome(browser)) { - browser.findElement('*[data-id="treeViewUltreeViewMenu"]', (el) => { - console.log((el as any).value.getId()) - const id = (el as any).value.getId() - browser - .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/scripts"]') - .dragAndDrop('li[data-id="treeViewLitreeViewItemcontracts/scripts"]', id) - .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) - }) - browser.pause(1000) - .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') - } - }, - 'drag into nested folder': function (browser: NightwatchBrowser) { - if (checkBrowserIsChrome(browser)) { - browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') - .rightClick('li[data-id="treeViewLitreeViewItemscripts"]') - .waitForElementPresent('[data-id="contextMenuItemnewFolder') - .click('[data-id="contextMenuItemnewFolder') - .waitForElementVisible('*[data-id$="fileExplorerTreeItemInput"]') - .sendKeys('*[data-id$="fileExplorerTreeItemInput"]', 'nested') - .sendKeys('*[data-id$="fileExplorerTreeItemInput"]', browser.Keys.ENTER) - .findElement('*[data-id="treeViewLitreeViewItemscripts/nested"]', (el) => { - console.log((el as any).value.getId()) - const id = (el as any).value.getId() - browser - .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/README.txt"]') - .dragAndDrop('li[data-id="treeViewLitreeViewItemcontracts/README.txt"]', id) - .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) - .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts/nested/README.txt"]') - }) - } + 'drag and drop file from contracts to root #group1': function (browser: NightwatchBrowser) { + if (checkBrowserIsChrome(browser)) { + browser.findElement('*[data-id="treeViewUltreeViewMenu"]', (el) => { + console.log((el as any).value.getId()) + const id = (el as any).value.getId() + browser + .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]') + .dragAndDrop('li[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]', id) + .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) + }) + browser.pause(1000) + .waitForElementVisible('li[data-id="treeViewLitreeViewItem1_Storage.sol"]') + } + }, + 'drag and drop scripts from root to contracts #group1': function (browser: NightwatchBrowser) { + if (checkBrowserIsChrome(browser)) { + browser + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') + .findElement('*[data-id="treeViewLitreeViewItemcontracts"]', (el) => { + console.log((el as any).value.getId()) + const id = (el as any).value.getId() + browser + .waitForElementVisible('div[data-id="treeViewDivDraggableItemscripts"]') + .dragAndDrop('div[data-id="treeViewDivDraggableItemscripts"]', id) + .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) + .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/scripts"]') + }) + } + }, + 'drag scripts from contracts to root #group1': function (browser: NightwatchBrowser) { + if (checkBrowserIsChrome(browser)) { + browser.findElement('*[data-id="treeViewUltreeViewMenu"]', (el) => { + console.log((el as any).value.getId()) + const id = (el as any).value.getId() + browser + .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/scripts"]') + .dragAndDrop('li[data-id="treeViewLitreeViewItemcontracts/scripts"]', id) + .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) + }) + browser.pause(1000) + .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') } + }, + 'drag into nested folder': function (browser: NightwatchBrowser) { + if (checkBrowserIsChrome(browser)) { + browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') + .rightClick('li[data-id="treeViewLitreeViewItemscripts"]') + .waitForElementPresent('[data-id="contextMenuItemnewFolder') + .click('[data-id="contextMenuItemnewFolder') + .waitForElementVisible('*[data-id$="fileExplorerTreeItemInput"]') + .sendKeys('*[data-id$="fileExplorerTreeItemInput"]', 'nested') + .sendKeys('*[data-id$="fileExplorerTreeItemInput"]', browser.Keys.ENTER) + .findElement('*[data-id="treeViewLitreeViewItemscripts/nested"]', (el) => { + console.log((el as any).value.getId()) + const id = (el as any).value.getId() + browser + .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/README.txt"]') + .dragAndDrop('li[data-id="treeViewLitreeViewItemcontracts/README.txt"]', id) + .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) + .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts/nested/README.txt"]') + }) + } + } -} \ No newline at end of file +} diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index b495527eab..ff0c60f23a 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -37,9 +37,9 @@ module.exports = { .addFile('File.sol', { content: '' }) .executeScriptInTerminal(`remix.loadgist('${gistid}')`) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) - .waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) + .waitForElementVisible(`[data-id="treeViewLitreeViewItemREADME.txt"]`) - .openFile(`gist-${gistid}/README.txt`) + .openFile(`README.txt`) // Remix publish to gist /* .click('*[data-id="fileExplorerNewFilepublishToGist"]') .pause(2000) @@ -110,8 +110,8 @@ module.exports = { .waitForElementVisible('[data-id="settingsTabRemoveGistToken"]') .click('[data-id="settingsTabRemoveGistToken"]') .clickLaunchIcon('filePanel') - .waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]') - .click('*[data-id="fileExplorerNewFilepublishToGist"]') + .click('*[data-id="workspacesMenuDropdown"]') + .click('*[data-id="workspacepublishToGist"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .pause(10000) @@ -142,9 +142,27 @@ module.exports = { .setValue('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]', testData.validGistId) .modalFooterOKClick('gisthandler') .pause(10000) - .openFile(`gist-${testData.validGistId}/README.txt`) - .waitForElementVisible(`div[data-path='default_workspace/gist-${testData.validGistId}/README.txt']`) - .assert.containsText(`div[data-path='default_workspace/gist-${testData.validGistId}/README.txt'] > span`, 'README.txt') - .end() - } + .openFile(`README.txt`) + .waitForElementVisible(`div[data-path='gist ${testData.validGistId}/README.txt']`) + .assert.containsText(`div[data-path='gist ${testData.validGistId}/README.txt'] > span`, 'README.txt') + }, + + 'Load Gist from URL and verify truncated files are loaded #group3': function (browser: NightwatchBrowser) { + const gistId = '1b179bf1b92c8b0664b4cbe61774e15d' + browser + .url('http://127.0.0.1:8080/#gist=' + gistId) // loading the gist + .refreshPage() + .currentWorkspaceIs('gist ' + gistId) + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 15000) + .waitForElementVisible(`#fileExplorerView li[data-path='contracts']`, 30000) + .openFile(`contracts/2_Owner.sol`) + .getEditorValue((content) => { + browser.assert.ok(content.indexOf('contract Owner {') !== -1) + }) + .click('*[data-id="workspacesMenuDropdown"]') + .click('*[data-id="workspacepublishToGist"]') + .modalFooterOKClick('fileSystem') + .waitForElementVisible('*[data-shared="tooltipPopup"]', 5000) + .assert.containsText('*[data-shared="tooltipPopup"]', 'Saving gist (' + gistId + ') ...') + } } diff --git a/apps/remix-ide-e2e/src/tests/pluginManager.test.ts b/apps/remix-ide-e2e/src/tests/pluginManager.test.ts index ed6b1315cb..a3c28f3405 100644 --- a/apps/remix-ide-e2e/src/tests/pluginManager.test.ts +++ b/apps/remix-ide-e2e/src/tests/pluginManager.test.ts @@ -12,12 +12,21 @@ const testData = { pluginUrl: 'https://zokrates.github.io/zokrates-remix-plugin/' } +const localPluginData = { + name: testData.pluginName, + displayName: testData.pluginDisplayName, + canActivate: [], + url: testData.pluginUrl, + location: 'sidePanel' +} + module.exports = { + '@disabled': true, before: function (browser: NightwatchBrowser, done: VoidFunction) { init(browser, done, 'http://127.0.0.1:8080', false) }, - 'Should Load Plugin Manager': function (browser: NightwatchBrowser) { + 'Should Load Plugin Manager #group1': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') .pause(3000) .click('*[plugin="pluginManager"]') @@ -26,7 +35,7 @@ module.exports = { .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'PLUGIN MANAGER') }, - 'Should Search for plugins': function (browser: NightwatchBrowser) { + 'Should Search for plugins #group1': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') .click('*[data-id="pluginManagerComponentSearchInput"]') .keys('debugger') @@ -45,7 +54,7 @@ module.exports = { .keys(browser.Keys.BACK_SPACE) }, - 'Should activate plugins': function (browser: NightwatchBrowser) { + 'Should activate plugins #group1': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') .click('*[data-id="pluginManagerComponentPluginManager"]') .scrollAndClick('*[data-id="pluginManagerComponentActivateButtondebugger"]') @@ -57,7 +66,7 @@ module.exports = { .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonZoKrates"]', 60000) }, - 'Should deactivate plugins': function (browser: NightwatchBrowser) { + 'Should deactivate plugins #group1': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') .click('*[data-id="pluginManagerComponentPluginManager"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]', 60000) @@ -69,45 +78,23 @@ module.exports = { .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonvyper"]', 60000) }, - 'Should connect a local plugin': function (browser: NightwatchBrowser) { - browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') - .execute(function () { - window.testmode = true - }) - .click('*[data-id="pluginManagerComponentPluginSearchButton"]') - .waitForElementVisible('*[data-id="pluginManagerLocalPluginModalDialogModalDialogContainer-react"]') - .click('*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalBody-react"]') - .waitForElementVisible('*[data-id="localPluginName"]') - .clearValue('*[data-id="localPluginName"]').setValue('*[data-id="localPluginName"]', testData.pluginName) - .clearValue('*[data-id="localPluginDisplayName"]').setValue('*[data-id="localPluginDisplayName"]', testData.pluginDisplayName) - .clearValue('*[data-id="localPluginUrl"]').setValue('*[data-id="localPluginUrl"]', testData.pluginUrl) - .click('*[data-id="localPluginRadioButtoniframe"]') - .click('*[data-id="localPluginRadioButtonsidePanel"]') - .click('*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalFooter-react"]') - .click('*[data-id="pluginManagerLocalPluginModalDialog-modal-footer-ok-react') + 'Should connect a local plugin #group2': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') + .pause(3000) + .click('*[plugin="pluginManager"]') + .clickLaunchIcon('filePanel') + .addLocalPlugin(localPluginData, false) + .pause(2000) }, - 'Should display error message for creating already existing plugin': function (browser: NightwatchBrowser) { + 'Should display error message for creating already existing plugin #group2': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') - .click('*[data-id="pluginManagerComponentPluginSearchButton"]') - .waitForElementVisible('*[data-id="pluginManagerLocalPluginModalDialogModalDialogContainer-react"]') - .click('*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalBody-react"]') - .waitForElementVisible('*[data-id="localPluginName"]') - .clearValue('*[data-id="localPluginName"]').setValue('*[data-id="localPluginName"]', testData.pluginName) - .clearValue('*[data-id="localPluginDisplayName"]').setValue('*[data-id="localPluginDisplayName"]', testData.pluginDisplayName) - .clearValue('*[data-id="localPluginUrl"]').setValue('*[data-id="localPluginUrl"]', testData.pluginUrl) - .click('*[data-id="localPluginRadioButtoniframe"]') - .click('*[data-id="localPluginRadioButtonsidePanel"]') - .waitForElementVisible('*[data-id="pluginManagerLocalPluginModalDialog-modal-footer-ok-react"]', 60000) - .click('*[data-id="pluginManagerLocalPluginModalDialog-modal-footer-ok-react"]') - // .modalFooterOKClick() - // .pause(2000) - .waitForElementVisible('*[data-shared="tooltipPopup"]', 60000) - .pause(5000) - .assert.containsText('*[data-shared="tooltipPopup"]', 'Cannot create Plugin : This name has already been used') + .clickLaunchIcon('filePanel') + .addLocalPlugin(localPluginData, false) + .waitForElementContainsText('*[data-shared="tooltipPopup"]', 'Cannot create Plugin : This name has already been used') }, - 'Should load back installed plugins after reload': function (browser: NightwatchBrowser) { + 'Should load back installed plugins after reload #group2': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="remixIdeSidePanel"]',3000) .waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') @@ -124,6 +111,5 @@ module.exports = { done() }) }) - .end() } } diff --git a/apps/remix-ide-e2e/src/tests/plugin_api.ts b/apps/remix-ide-e2e/src/tests/plugin_api.ts index 579466a050..69bbc140ca 100644 --- a/apps/remix-ide-e2e/src/tests/plugin_api.ts +++ b/apps/remix-ide-e2e/src/tests/plugin_api.ts @@ -128,6 +128,7 @@ const checkForAcceptAndRemember = async function (browser: NightwatchBrowser) { */ const clickAndCheckLog = async (browser: NightwatchBrowser, buttonText: string, methodResult: any, eventResult: any, payload: any, waitResult: boolean = true) => { // eslint-disable-line + console.log('clickAndCheckLog', buttonText, methodResult, eventResult, payload, waitResult) if (payload) { await setPayload(browser, payload) } else { @@ -167,7 +168,7 @@ module.exports = { }, 'Should connect a local plugin': function (browser: NightwatchBrowser) { - browser.addLocalPlugin(localPluginData) + browser.addLocalPlugin(localPluginData, true) // @ts-ignore .frame(0).useXpath() }, @@ -295,7 +296,7 @@ module.exports = { }, null, '/') }, 'Should get all workspaces #group2': async function (browser: NightwatchBrowser) { - await clickAndCheckLog(browser, 'filePanel:getWorkspaces', [{name:"default_workspace",isGitRepo:false,hasGitSubmodules:false}, {name:"emptyworkspace",isGitRepo:false,hasGitSubmodules:false}, {name:"testspace",isGitRepo:false,hasGitSubmodules:false}], null, null) + await clickAndCheckLog(browser, 'filePanel:getWorkspaces', [{name:"default_workspace",isGitRepo:false,hasGitSubmodules:false,isGist:null}, {name:"emptyworkspace",isGitRepo:false,hasGitSubmodules:false,isGist:null}, {name:"testspace",isGitRepo:false,hasGitSubmodules:false,isGist:null}], null, null) }, 'Should have set workspace event #group2': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'filePanel:createWorkspace', null, { event: 'setWorkspace', args: [{ name: 'newspace', isLocalhost: false }] }, 'newspace') @@ -309,11 +310,11 @@ module.exports = { 'Should rename workspace #group2': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'filePanel:renameWorkspace', null, null, ['default_workspace', 'renamed']) - await clickAndCheckLog(browser, 'filePanel:getWorkspaces', [{name:"emptyworkspace",isGitRepo:false,hasGitSubmodules:false},{name:"testspace",isGitRepo:false,hasGitSubmodules:false},{name:"newspace",isGitRepo:false,hasGitSubmodules:false},{name:"renamed",isGitRepo:false,hasGitSubmodules:false}], null, null) + await clickAndCheckLog(browser, 'filePanel:getWorkspaces', [{name:"emptyworkspace",isGitRepo:false,hasGitSubmodules:false,isGist:null},{name:"testspace",isGitRepo:false,hasGitSubmodules:false,isGist:null},{name:"newspace",isGitRepo:false,hasGitSubmodules:false,isGist:null},{name:"renamed",isGitRepo:false,hasGitSubmodules:false,isGist:null}], null, null) }, 'Should delete workspace #group2': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'filePanel:deleteWorkspace', null, null, ['testspace']) - await clickAndCheckLog(browser, 'filePanel:getWorkspaces', [{name:"emptyworkspace",isGitRepo:false,hasGitSubmodules:false},{name:"newspace",isGitRepo:false,hasGitSubmodules:false},{name:"renamed",isGitRepo:false,hasGitSubmodules:false}], null, null) + await clickAndCheckLog(browser, 'filePanel:getWorkspaces', [{name:"emptyworkspace",isGitRepo:false,hasGitSubmodules:false,isGist:null},{name:"newspace",isGitRepo:false,hasGitSubmodules:false,isGist:null},{name:"renamed",isGitRepo:false,hasGitSubmodules:false,isGist:null}], null, null) }, // DGIT 'Should have changes on new workspace #group3': async function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index b95264604e..f397ed8167 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -38,7 +38,7 @@ module.exports = { .openFile('ipfs/QmXYUS1ueS22EqNVRaKuZa31EgHLjKZ8uTM8vWhQLxa3pw') }, - /* Disableing the test untill refactoring and the new swarm usage + /* Disabling the test until refactoring and the new swarm usage 'Publish on Swarm': '' + function (browser: NightwatchBrowser) { browser .click('#publishOnSwarm') diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts index d689cb6f19..cebc84bc93 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts @@ -202,7 +202,7 @@ module.exports = { }, /* - * This test is using 3 differents services: + * This test is using 3 different services: * - Metamask for getting the transaction * - Source Verifier service for fetching the contract code * - Ropsten node for retrieving the trace and storage diff --git a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts index f154c42e23..a3019ee444 100644 --- a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts +++ b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts @@ -42,7 +42,7 @@ module.exports = { .clickLaunchIcon('udapp') .click('.udapp_contractActionsContainerSingle > div') .clickInstance(0) - .clickFunction('retunValues1 - transact (not payable)') + .clickFunction('returnValues1 - transact (not payable)') .testFunction('last', { status: '0x1 Transaction mined and execution succeed', @@ -53,7 +53,7 @@ module.exports = { 3: 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' } }) - .clickFunction('retunValues2 - transact (not payable)') + .clickFunction('returnValues2 - transact (not payable)') .testFunction('last', { status: '0x1 Transaction mined and execution succeed', @@ -70,7 +70,7 @@ module.exports = { 9: 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000' } }).pause(500) - .clickFunction('retunValues3 - transact (not payable)') + .clickFunction('returnValues3 - transact (not payable)') .testFunction('last', { status: '0x1 Transaction mined and execution succeed', @@ -150,6 +150,14 @@ module.exports = { .click('*[data-id="deployAndRunClearInstances"]') }, + 'Should filter displayed transactions #group2': function (browser: NightwatchBrowser) { + browser + // it should contain: 0xd9145CCE52D386f254917e481eB44e9943F39138 + .checkTerminalFilter('0xd9145CCE52D386f254917e481eB44e9943F39138', '0xd9145CCE52D386f254917e481eB44e9943F39138', false) + // it should not contain: 0xd9145CCE52D386f254917e481eB44e9943F39140 (it ends with 40) + .checkTerminalFilter('0xd9145CCE52D386f254917e481eB44e9943F39140', '0xd9145CCE52D386f254917e481eB44e9943F39138', true) + }, + 'Should Compile and Deploy a contract which define a custom error, the error should be logged in the terminal #group3': function (browser: NightwatchBrowser) { browser.testContracts('customError.sol', sources[4]['customError.sol'], ['C']) .clickLaunchIcon('udapp') @@ -312,10 +320,10 @@ const sources = [ contract TestContract { function f() public returns (uint) { return 8; } function g() public returns (uint, string memory, bool, uint) { uint payment = 345; - bool payed = true; + bool paid = true; string memory comment = "comment_comment_"; uint month = 4; - return (payment, comment, payed, month); } }` + return (payment, comment, paid, month); } }` } }, { @@ -323,14 +331,14 @@ const sources = [ content: ` contract testReturnValues { enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } - function retunValues1 () public returns (bool _b, uint _u, int _i, address _a) { + function returnValues1 () public returns (bool _b, uint _u, int _i, address _a) { _b = true; _u = 345; _i = -345; _a = msg.sender; } - function retunValues2 () public returns (bytes1 _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) { + function returnValues2 () public returns (bytes1 _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) { _b = 0x12; _b2 = 0x1223; _b5 = hex"043245"; @@ -342,7 +350,7 @@ const sources = [ _str = "this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string"; } - function retunValues3 () public returns (ActionChoices _en, int[5][] memory _a1) { + function returnValues3 () public returns (ActionChoices _en, int[5][] memory _a1) { _en = ActionChoices.GoStraight; int[5][] memory a = new int[5][](3); a[0] = [int(1),-45,-78,56,60]; diff --git a/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts b/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts index 3cbe497dd7..a1b7358456 100644 --- a/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts +++ b/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts @@ -7,7 +7,7 @@ module.exports = { init(browser, done, 'http://127.0.0.1:8080', false) }, - 'Checks vertical icons panelcontex menu': function (browser: NightwatchBrowser) { + 'Checks vertical icons panel context menu': function (browser: NightwatchBrowser) { browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="verticalIconsKindpluginManager"]') .click('*[data-id="verticalIconsKindpluginManager"]') @@ -19,7 +19,7 @@ module.exports = { .click('*[data-id="remixIdeIconPanel"]') }, - 'Checks vertical icons panel contex menu deactivate': function (browser: NightwatchBrowser) { + 'Checks vertical icons panel context menu deactivate': function (browser: NightwatchBrowser) { browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="verticalIconsKinddebugger"]', 7000) .pause(5000) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 5ef312d8a2..3ac5b65610 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -41,8 +41,30 @@ module.exports = { .openFile('examples/auctions/blind_auction.vy') }, + 'Context menu click to compile blind_auction should succeed #group1': function (browser: NightwatchBrowser) { + browser + .click('*[data-id="treeViewLitreeViewItemexamples/auctions/blind_auction.vy"]') + .rightClick('*[data-id="treeViewLitreeViewItemexamples/auctions/blind_auction.vy"]') + .waitForElementPresent('[data-id="contextMenuItemvyper"]') + .click('[data-id="contextMenuItemvyper"]') + .clickLaunchIcon('vyper') + // @ts-ignore + .frame(0) + .waitForElementVisible({ + selector:'[data-id="compilation-details"]', + timeout: 120000 + }) + .click('[data-id="compilation-details"]') + .frameParent() + .waitForElementVisible('[data-id="copy-abi"]') + .waitForElementVisible({ + selector: "//*[@class='variable-value' and contains(.,'highestBidder')]", + locateStrategy: 'xpath', + }) + }, + 'Compile blind_auction should success #group1': function (browser: NightwatchBrowser) { - browser.clickLaunchIcon('vyper') + browser // @ts-ignore .frame(0) .click('[data-id="remote-compiler"]') diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 1f1cb3dd06..6dedfef7af 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -501,7 +501,7 @@ module.exports = { .pause(2000) }, - 'Should change the current workspace in localstorage to a non existant value, reload the page and see the workspace created #group2': function (browser: NightwatchBrowser) { + 'Should change the current workspace in localstorage to a non existent value, reload the page and see the workspace created #group2': function (browser: NightwatchBrowser) { browser .execute(function () { localStorage.setItem('currentWorkspace', 'non_existing_workspace') diff --git a/apps/remix-ide-e2e/src/tests/workspace_git.test.ts b/apps/remix-ide-e2e/src/tests/workspace_git.test.ts index fb74ce1bee..16870069e3 100644 --- a/apps/remix-ide-e2e/src/tests/workspace_git.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace_git.test.ts @@ -209,7 +209,7 @@ module.exports = { .expect.element('[data-id="workspaceGit-newLocalBranch"]').text.to.contain('✓ ') }, - 'Should checkout to an exisiting local branch #group3': function (browser: NightwatchBrowser) { + 'Should checkout to an existing local branch #group3': function (browser: NightwatchBrowser) { browser .waitForElementVisible('[data-id="custom-dropdown-menu"]') .waitForElementPresent('[data-id="workspaceGitInput"]') @@ -239,7 +239,7 @@ module.exports = { .expect.element('[data-id="workspaceGit-main"]').text.to.contain('✓ ') }, - 'Should force checkout to a branch with exisiting local changes #group3': function (browser: NightwatchBrowser) { + 'Should force checkout to a branch with existing local changes #group3': function (browser: NightwatchBrowser) { browser .waitForElementVisible('[data-id="workspaceGit-dev"]') .click('[data-id="workspaceGit-dev"]') @@ -370,25 +370,23 @@ module.exports = { // GIT WORKSPACE E2E STARTS - 'Should create a git workspace (uniswapV4Periphery) #group4': function (browser: NightwatchBrowser) { + 'Should create a git workspace (uniswapV4Template) #group4': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspacesMenuDropdown"]') .click('*[data-id="workspacecreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button') .click('select[id="wstemplate"]') - .click('select[id="wstemplate"] option[value=uniswapV4Periphery]') + .click('select[id="wstemplate"] option[value=uniswapV4Template]') .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .pause(100) - .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') - .openFile('contracts') - .openFile('contracts/hooks') - .openFile('contracts/hooks/examples') - .openFile('contracts/hooks/examples/FullRange.sol') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemsrc"]') + .openFile('src') + .openFile('src/Counter.sol') .pause(1000) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`contract FullRange is BaseHook`) !== -1, + browser.assert.ok(content.indexOf(`contract Counter is BaseHook {`) !== -1, 'Incorrect content') }) }, @@ -406,4 +404,4 @@ url = https://github.com/bunsenstraat/empty3 [submodule "testactionsub"] path = testactionsub url = https://github.com/bunsenstraat/testactions -` \ No newline at end of file +` diff --git a/apps/remix-ide-e2e/src/types/index.d.ts b/apps/remix-ide-e2e/src/types/index.d.ts index 7de0101fa6..74f9e518fe 100644 --- a/apps/remix-ide-e2e/src/types/index.d.ts +++ b/apps/remix-ide-e2e/src/types/index.d.ts @@ -54,14 +54,14 @@ declare module 'nightwatch' { notContainsText(cssSelector: string, text: string): NightwatchBrowser sendLowLevelTx(address: string, value: string, callData: string): NightwatchBrowser journalLastChild(val: string): NightwatchBrowser - checkTerminalFilter(filter: string, test: string): NightwatchBrowser + checkTerminalFilter(filter: string, test: string, notContain: boolean): NightwatchBrowser noWorkerErrorFor(version: string): NightwatchBrowser validateValueInput(selector: string, valueTosSet: string[], expectedValue: string): NightwatchBrowser checkAnnotations(type: string): NightwatchBrowser checkAnnotationsNotPresent(type: string): NightwatchBrowser getLastTransactionHash(callback: (hash: string) => void) currentWorkspaceIs(name: string): NightwatchBrowser - addLocalPlugin(this: NightwatchBrowser, profile: Profile & LocationProfile & ExternalProfile): NightwatchBrowser + addLocalPlugin(this: NightwatchBrowser, profile: Profile & LocationProfile & ExternalProfile, focus: boolean): NightwatchBrowser acceptAndRemember(this: NightwatchBrowser, remember: boolean, accept: boolean): NightwatchBrowser clearConsole(this: NightwatchBrowser): NightwatchBrowser clearTransactions(this: NightwatchBrowser): NightwatchBrowser diff --git a/apps/remix-ide-e2e/yarn.lock b/apps/remix-ide-e2e/yarn.lock index ab8ede16e4..e5e1999010 100644 --- a/apps/remix-ide-e2e/yarn.lock +++ b/apps/remix-ide-e2e/yarn.lock @@ -1910,14 +1910,14 @@ internal-slot@^1.0.5: side-channel "^1.0.4" ip@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" - integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== + version "1.1.9" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396" + integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ== ip@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== is-accessor-descriptor@^0.1.6: version "0.1.6" diff --git a/apps/remix-ide/Dockerfile.dev b/apps/remix-ide/Dockerfile.dev index f4d6ba5738..803c929ba4 100644 --- a/apps/remix-ide/Dockerfile.dev +++ b/apps/remix-ide/Dockerfile.dev @@ -1,4 +1,4 @@ -# This dockerfile is to build each branch seperately (for dev purpouses) +# This dockerfile is to build each branch separately (for dev purpouses) FROM node:10 # Create Remix user, don't use root! # RUN yes | adduser --disabled-password remix && mkdir /app diff --git a/apps/remix-ide/ci/makeMockCompiler.js b/apps/remix-ide/ci/makeMockCompiler.js index 69b16a75c7..5e69758505 100644 --- a/apps/remix-ide/ci/makeMockCompiler.js +++ b/apps/remix-ide/ci/makeMockCompiler.js @@ -2,8 +2,8 @@ var fs = require('fs') var compiler = require('solc') -var compilerInput = require('@remix-project/remix-solidity').CompilerInput -var defaultVersion = 'soljson-v0.8.22+commit.4fc1097e.js' +var compilerInput = require('@remix-project/remix-solidity').compilerInputFactory +var defaultVersion = 'soljson-v0.8.24+commit.e11b9ed9.js' const path = require('path') compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => { diff --git a/apps/remix-ide/ci/sauceDisconnect.js b/apps/remix-ide/ci/sauceDisconnect.js index a8069a669e..48d58eb70c 100644 --- a/apps/remix-ide/ci/sauceDisconnect.js +++ b/apps/remix-ide/ci/sauceDisconnect.js @@ -18,7 +18,7 @@ function removeTunnel () { retrieveTunnel(data[k], function (error, result) { if (error) { console.log(error) - } else if (result.identtifier === tunnelName) { + } else if (result.identifier === tunnelName) { deleteTunnel(result.id, function () { console.log('tunnel deleted ' + data[k] + ' ' + tunnelName) }) @@ -35,7 +35,7 @@ function retrieveTunnel (tunnelid, callback) { if (error) { callback(error) } else { - callback(null, {'identtifier': JSON.parse(result).tunnel_identifier, 'id': tunnelid}) + callback(null, {'identifier': JSON.parse(result).tunnel_identifier, 'id': tunnelid}) } }) } diff --git a/apps/remix-ide/contracts/foundry/out/Script.sol/Script.json b/apps/remix-ide/contracts/foundry/out/Script.sol/Script.json index 116330506d..dd5b03a1c3 100644 --- a/apps/remix-ide/contracts/foundry/out/Script.sol/Script.json +++ b/apps/remix-ide/contracts/foundry/out/Script.sol/Script.json @@ -3355,7 +3355,7 @@ "id": 1818, "nodeType": "StructuredDocumentation", "src": "361:227:1", - "text": "@dev Compute the address a contract will be deployed at for a given deployer address and nonce\n @notice adapated from Solmate implementation (https://github.com/transmissions11/solmate/blob/main/src/utils/LibRLP.sol)" + "text": "@dev Compute the address a contract will be deployed at for a given deployer address and nonce\n @notice adapted from Solmate implementation (https://github.com/transmissions11/solmate/blob/main/src/utils/LibRLP.sol)" }, "implemented": true, "kind": "function", diff --git a/apps/remix-ide/meetings.md b/apps/remix-ide/meetings.md index 5f0fc27182..8534e70ac1 100644 --- a/apps/remix-ide/meetings.md +++ b/apps/remix-ide/meetings.md @@ -21,8 +21,8 @@ we move the documentation to the remix-ide repository ## medium post policy -Any post that relates to Ethereum could be put in the remix plublication. -Although that is not mandatory and left up to the writter. +Any post that relates to Ethereum could be put in the remix publication. +Although that is not mandatory and left up to the writer. ## guided tour @@ -32,7 +32,7 @@ It will work as a native plugin, started by default. Each other native plugin can request a guided tour with: `this.call('guidedtour', 'start', 'debugger')` Other type of plugin may be able to the native plugin guided tour but we won't push this if the integration is not working out of the box. -We rather update the remix-plugin doc saying that `guided tour framework name` is the prefferred one. +We rather update the remix-plugin doc saying that `guided tour framework name` is the preferred one. ## web site @@ -49,7 +49,7 @@ it will be set of file: - solidity contract - test contract -we only support md for now and move to supporting other format if needded. +we only support md for now and move to supporting other format if needed. It requires the "test" native plugin to extend its API. @rob/@francois are managing that. diff --git a/apps/remix-ide/project.json b/apps/remix-ide/project.json index 395b9f4a6f..67c0a39cd3 100644 --- a/apps/remix-ide/project.json +++ b/apps/remix-ide/project.json @@ -3,7 +3,7 @@ "$schema": "../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "apps/remix-ide/src", "projectType": "application", - "implicitDependencies": ["doc-gen", "doc-viewer", "etherscan", "vyper", "solhint", "walletconnect", "circuit-compiler"], + "implicitDependencies": ["doc-gen", "doc-viewer", "etherscan", "vyper", "solhint", "walletconnect", "circuit-compiler", "learneth"], "targets": { "build": { "executor": "@nrwl/webpack:webpack", diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index 98a027b714..ef1ecaca66 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -360,7 +360,7 @@ class Editor extends Plugin { /** * Path of the currently editing file - * returns `undefined` if no session is being editer + * returns `undefined` if no session is being edited * @return {String} path of the current session */ current () { @@ -449,7 +449,7 @@ class Editor extends Plugin { } /** - * Clears all the decorations for the given @arg filePath and @arg plugin, if none is given, the current sesssion is used. + * Clears all the decorations for the given @arg filePath and @arg plugin, if none is given, the current session is used. * An annotation has the following shape: column: -1 row: -1 @@ -502,7 +502,7 @@ class Editor extends Plugin { } /** - * Clears all the annotations for the given @arg filePath, the plugin name is retrieved from the context, if none is given, the current sesssion is used. + * Clears all the annotations for the given @arg filePath, the plugin name is retrieved from the context, if none is given, the current session is used. * An annotation has the following shape: column: -1 row: -1 diff --git a/apps/remix-ide/src/app/files/dgitProvider.ts b/apps/remix-ide/src/app/files/dgitProvider.ts index 63ac21e868..2fb0182f80 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.ts +++ b/apps/remix-ide/src/app/files/dgitProvider.ts @@ -692,7 +692,7 @@ class DGitProvider extends Plugin { dir }) } catch (e) { - this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occured! ${e}` }) + this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occurred! ${e}` }) console.log(e) } } @@ -702,7 +702,7 @@ class DGitProvider extends Plugin { }, 1000) } } catch (e) { - this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occured! ${e}` }) + this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occurred! ${e}` }) // do nothing } } diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 2e4feaf0e2..d8f55573f5 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -46,6 +46,7 @@ const profile = { 'loadTemplate', 'clone', 'isExpanded', + 'isGist' ], events: ['setWorkspace', 'workspaceRenamed', 'workspaceDeleted', 'workspaceCreated'], icon: 'assets/img/fileManager.webp', @@ -131,6 +132,20 @@ module.exports = class Filepanel extends ViewPlugin { }) } + /** + * return the gist id if the current workspace is a gist workspace, otherwise returns null + * @argument {String} workspaceName - the name of the workspace to check against. default to the current workspace. + * @returns {string} gist id or null + */ + isGist (workspaceName) { + workspaceName = workspaceName || this.currentWorkspaceMetadata && this.currentWorkspaceMetadata.name + const isGist = workspaceName.startsWith('gist') + if (isGist) { + return workspaceName.split(' ')[1] + } + return null + } + getCurrentWorkspace() { return this.currentWorkspaceMetadata } diff --git a/apps/remix-ide/src/app/plugins/code-format.ts b/apps/remix-ide/src/app/plugins/code-format.ts index 04266c1615..be6a34810c 100644 --- a/apps/remix-ide/src/app/plugins/code-format.ts +++ b/apps/remix-ide/src/app/plugins/code-format.ts @@ -9,7 +9,7 @@ import { filePathFilter, AnyFilter } from '@jsdevtools/file-path-filter' const profile = { name: 'codeFormatter', - desciption: 'prettier plugin for Remix', + description: 'prettier plugin for Remix', methods: ['format'], events: [''], version: '0.0.1' diff --git a/apps/remix-ide/src/app/plugins/compile-details.tsx b/apps/remix-ide/src/app/plugins/compile-details.tsx index 95e39803c3..dd2629ee01 100644 --- a/apps/remix-ide/src/app/plugins/compile-details.tsx +++ b/apps/remix-ide/src/app/plugins/compile-details.tsx @@ -45,7 +45,7 @@ export class CompilationDetailsPlugin extends ViewPlugin { async showDetails(sentPayload: any) { await this.call('tabs', 'focus', 'compilationDetails') setTimeout(() => { - // TODO: use the react API to render when the tab is focused and tbe plugin in the view. + // TODO: use the react API to render when the tab is focused and the plugin in the view. this.payload = sentPayload this.renderComponent() }, 2000) diff --git a/apps/remix-ide/src/app/plugins/contractFlattener.tsx b/apps/remix-ide/src/app/plugins/contractFlattener.tsx index 2c3640bcd9..a5f02719ca 100644 --- a/apps/remix-ide/src/app/plugins/contractFlattener.tsx +++ b/apps/remix-ide/src/app/plugins/contractFlattener.tsx @@ -2,6 +2,7 @@ import React from 'react' import {Plugin} from '@remixproject/engine' import {customAction} from '@remixproject/plugin-api' import {concatSourceFiles, getDependencyGraph, normalizeContractPath} from '@remix-ui/solidity-compiler' +import type {CompilerInput, CompilationSource } from '@remix-project/remix-solidity' const _paq = (window._paq = window._paq || []) @@ -25,7 +26,7 @@ export class ContractFlattener extends Plugin { if (data.sources && Object.keys(data.sources).length > 1) { if (this.triggerFlattenContract) { this.triggerFlattenContract = false - await this.flattenContract(source, file, data) + await this.flattenContract(source, file, data, JSON.parse(input)) } } }) @@ -47,17 +48,17 @@ export class ContractFlattener extends Plugin { * Takes the flattened result, writes it to a file and returns the result. * @returns {Promise} */ - async flattenContract(source: {sources: any; target: string}, filePath: string, data: {contracts: any; sources: any}): Promise { + async flattenContract(source: {sources: any; target: string}, filePath: string, data: {contracts: any; sources: any}, input: CompilerInput): Promise { const appendage = '_flattened.sol' const normalized = normalizeContractPath(filePath) const path = `${normalized[normalized.length - 2]}${appendage}` - const ast = data.sources + const ast: { [contractName: string]: CompilationSource } = data.sources let dependencyGraph let sorted let result let sources try { - dependencyGraph = getDependencyGraph(ast, filePath) + dependencyGraph = getDependencyGraph(ast, filePath, input.settings.remappings) sorted = dependencyGraph.isEmpty() ? [filePath] : dependencyGraph.sort().reverse() sources = source.sources result = concatSourceFiles(sorted, sources) diff --git a/apps/remix-ide/src/app/plugins/file-decorator.ts b/apps/remix-ide/src/app/plugins/file-decorator.ts index 34829b027b..071b62f4df 100644 --- a/apps/remix-ide/src/app/plugins/file-decorator.ts +++ b/apps/remix-ide/src/app/plugins/file-decorator.ts @@ -7,7 +7,7 @@ import { fileDecoration } from '@remix-ui/file-decorators' const profile = { name: 'fileDecorator', - desciption: 'Keeps decorators of the files', + description: 'Keeps decorators of the files', methods: ['setFileDecorators', 'clearFileDecorators', 'clearAllFileDecorators'], events: ['fileDecoratorsChanged'], version: '0.0.1' diff --git a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts index 2bfd3dc4ba..b1dc5f8c7a 100644 --- a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts +++ b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts @@ -35,7 +35,7 @@ type errorMarker = { } export default class CodeParserCompiler { plugin: CodeParser - compiler: any // used to compile the current file seperately from the main compiler + compiler: any // used to compile the current file separately from the main compiler onAstFinished: (success: any, data: CompilationResult, source: CompilationSourceCode, input: any, version: any) => Promise; errorState: boolean; gastEstimateTimeOut: any diff --git a/apps/remix-ide/src/app/plugins/remixd-handle.tsx b/apps/remix-ide/src/app/plugins/remixd-handle.tsx index dd31537378..cb627cb4b7 100644 --- a/apps/remix-ide/src/app/plugins/remixd-handle.tsx +++ b/apps/remix-ide/src/app/plugins/remixd-handle.tsx @@ -1,5 +1,6 @@ /* eslint-disable no-unused-vars */ import React, {useRef, useState, useEffect} from 'react' // eslint-disable-line +import {FormattedMessage} from 'react-intl' import {WebsocketPlugin} from '@remixproject/engine-web' import * as packageJson from '../../../../../package.json' // eslint-disable-next-line @nrwl/nx/enforce-module-boundaries @@ -84,7 +85,7 @@ export class RemixdHandle extends WebsocketPlugin { console.log(error) const alert: AlertModal = { id: 'connectionAlert', - message: 'Cannot connect to the remixd daemon. Please make sure you have the remixd running in the background.' + message: window._intl.formatMessage({id: 'remixd.connectionAlert1'}), } this.call('notification', 'alert', alert) this.canceled() @@ -95,7 +96,7 @@ export class RemixdHandle extends WebsocketPlugin { clearInterval(intervalId) const alert: AlertModal = { id: 'connectionAlert', - message: 'Connection to remixd terminated. Please make sure remixd is still running in the background.' + message: window._intl.formatMessage({id: 'remixd.connectionAlert2'}), } this.call('notification', 'alert', alert) this.canceled() @@ -115,10 +116,10 @@ export class RemixdHandle extends WebsocketPlugin { // warn the user only if he/she is in the browser context const mod: AppModal = { id: 'remixdConnect', - title: 'Access file system using remixd', + title: window._intl.formatMessage({id: 'remixd.remixdConnect'}), message: remixdDialog(), - okLabel: 'Connect', - cancelLabel: 'Cancel' + okLabel: window._intl.formatMessage({id: 'remixd.connect'}), + cancelLabel: window._intl.formatMessage({id: 'remixd.cancel'}), } const result = await this.call('notification', 'modal', mod) if (result) { @@ -159,45 +160,62 @@ function remixdDialog() { <>
- Access your local file system from Remix IDE using{' '} - - Remixd NPM package - - . + ( + + {chunks} + + ), + }} + />
- Remixd{' '} - - documentation - - . + ( + + {chunks} + + ), + }} + />
- The remixd command is: +
{commandText}
- The remixd command without options uses the terminal's current directory as the shared directory and the shared Remix domain can only be https://remix.ethereum.org, - https://remix-alpha.ethereum.org, or https://remix-beta.ethereum.org +
- Example command with flags:
+
{fullCommandText}
- For info about ports, see{' '} - - Remixd ports usage - + ( + + {chunks} + + ), + }} + /> +
+
+
-
This feature is still in Alpha. We recommend to keep a backup of the shared folder.
- Before using, make sure remixd version is latest i.e. v{remixdVersion} + v{remixdVersion}

- Read here how to update it +
diff --git a/apps/remix-ide/src/app/plugins/solidity-umlgen.tsx b/apps/remix-ide/src/app/plugins/solidity-umlgen.tsx index ebbb7b9bb2..3fd6b6bd51 100644 --- a/apps/remix-ide/src/app/plugins/solidity-umlgen.tsx +++ b/apps/remix-ide/src/app/plugins/solidity-umlgen.tsx @@ -11,6 +11,7 @@ import vizRenderStringSync from '@aduh95/viz.js/sync' import {PluginViewWrapper} from '@remix-ui/helper' import {customAction} from '@remixproject/plugin-api' import {ClassOptions} from 'sol2uml/lib/converterClass2Dot' +import type {CompilerInput} from '@remix-project/remix-solidity' const parser = (window as any).SolidityParser const _paq = (window._paq = window._paq || []) @@ -74,7 +75,7 @@ export class SolidityUmlGen extends ViewPlugin implements ISolidityUmlGen { try { if (data.sources && Object.keys(data.sources).length > 1) { // we should flatten first as there are multiple asts - result = await this.flattenContract(source, file, data) + result = await this.flattenContract(source, file, data, JSON.parse(input)) } const ast = result.length > 1 ? parser.parse(result) : parser.parse(source.sources[file].content) this.umlClasses = convertAST2UmlClasses(ast, this.currentFile) @@ -142,8 +143,8 @@ export class SolidityUmlGen extends ViewPlugin implements ISolidityUmlGen { * and assigns to a local property * @returns {Promise} */ - async flattenContract(source: any, filePath: string, data: any) { - const result = await this.call('contractflattener', 'flattenContract', source, filePath, data) + async flattenContract(source: any, filePath: string, data: any, input: CompilerInput) { + const result = await this.call('contractflattener', 'flattenContract', source, filePath, data, input) return result } diff --git a/apps/remix-ide/src/app/tabs/locales/en/editor.json b/apps/remix-ide/src/app/tabs/locales/en/editor.json new file mode 100644 index 0000000000..fac7f7a60e --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/en/editor.json @@ -0,0 +1,33 @@ +{ + "editor.keyboardShortcuts": "Keyboard Shortcuts", + "editor.keyboardShortcuts.text1": "Compile the current contract", + "editor.keyboardShortcuts.text2": "Open the File Explorer", + "editor.keyboardShortcuts.text3": "Open the Plugin Manager", + "editor.keyboardShortcuts.text4": "Compile the current contract & Run an associated script", + "editor.editorKeyboardShortcuts": "Editor Keyboard Shortcuts", + "editor.editorKeyboardShortcuts.text1": "Format the code in the current file", + "editor.importantLinks": "Important Links", + "editor.importantLinks.text1": "Official website about the Remix Project", + "editor.importantLinks.text2": "Official documentation", + "editor.title1": "Pasted Code Alert", + "editor.title1.message1": "You have just pasted a code snippet or contract in the editor.", + "editor.title1.message2": "Make sure you fully understand this code before deploying or interacting with it. Don't get scammed!", + "editor.title1.message3": "Running untrusted code can put your wallet at risk . In a worst-case scenario, you could lose all your money.", + "editor.title1.message4": "If you don't fully understand it, please don't run this code.", + "editor.title1.message5": "If you are not a smart contract developer, ask someone you trust who has the skills to determine if this code is safe to use.", + "editor.title1.message6": "See these recommendations for more information.", + "editor.zoomIn": "Zoom In", + "editor.zoomOut": "Zoom Out", + "editor.formatCode": "Format Code", + "editor.generateDocumentation": "Generate documentation for this function", + "editor.generateDocumentation2": "Generate documentation for the function \"{name}\"", + "editor.generateDocumentationByAI": "solidity code: {content}\n Generate the documentation for the function {currentFunction} using the Doxygen style syntax", + "editor.explainFunction": "Explain this function", + "editor.explainFunction2": "Explain the function \"{name}\"", + "editor.explainFunctionByAI": "solidity code: {content}\n Explain the function {currentFunction}", + "editor.executeFreeFunction": "Run a free function", + "editor.executeFreeFunction2": "Run the free function \"{name}\"", + "editor.toastText1": "This can only execute free function", + "editor.toastText2": "Please go to Remix settings and activate the code editor features or wait that the current editor context is loaded.", + "editor.text": "The file is opened in read-only mode." +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index 4f917fe861..05fef4beab 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -62,10 +62,12 @@ "filePanel.compileForNahmii": "Compile for Nahmii", "filePanel.createNewFile": "Create new file", "filePanel.createNewFolder": "Create new folder", - "filePanel.publishToGist": "Publish all files to GitHub gist", + "filePanel.publishToGist": "Publish to Gist", + "filePanel.workspace.publishToGist": "Publish workspace to GitHub gist", "filePanel.uploadFile": "Upload files", "filePanel.uploadFolder": "Upload folder", - "filePanel.updateGist": "Update the current [gist] explorer", + "filePanel.updateGist": "Update Gist", + "filePanel.workspace.updateGist": "Publish Gist update", "filePanel.viewAllBranches": "View all branches", "filePanel.createBranch": "Create branch", "filePanel.switchBranches": "Switch branches", @@ -113,7 +115,7 @@ "filePanel.hashchecker": "Hash Checker", "filePanel.rln": "Rate-Limiting Nullifier", "filePanel.breakthroughLabsUniswapv4Hooks": "Breakthrough-Labs Hooks", - "filePanel.uniswapV4Periphery": "v4 Periphery", + "filePanel.uniswapV4Template": "v4 Template", "filePanel.uniswapV4HookBookMultiSigSwapHook": "HookBook MultiSigSwapHook", "filePanel.transparent": "Transparent", "filePanel.initGitRepoTitle": "Check option to initialize workspace as a new git repository", diff --git a/apps/remix-ide/src/app/tabs/locales/en/home.json b/apps/remix-ide/src/app/tabs/locales/en/home.json index 020405292b..be2804d909 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/home.json +++ b/apps/remix-ide/src/app/tabs/locales/en/home.json @@ -1,4 +1,5 @@ { + "home.home": "Home", "home.scamAlert": "Scam Alert", "home.scamAlertText": "The only URL Remix uses is remix.ethereum.org", "home.scamAlertText2": "Beware of online videos promoting \"liquidity front runner bots\"", diff --git a/apps/remix-ide/src/app/tabs/locales/en/index.js b/apps/remix-ide/src/app/tabs/locales/en/index.js index 31c606f7a7..b3074531b9 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/index.js +++ b/apps/remix-ide/src/app/tabs/locales/en/index.js @@ -1,39 +1,13 @@ -import debuggerJson from './debugger.json'; -import filePanelJson from './filePanel.json'; -import homeJson from './home.json'; -import panelJson from './panel.json'; -import pluginManagerJson from './pluginManager.json'; -import searchJson from './search.json'; -import settingsJson from './settings.json'; -import solidityJson from './solidity.json'; -import terminalJson from './terminal.json'; -import udappJson from './udapp.json'; -import solidityUnitTestingJson from './solidityUnitTesting.json'; -import permissionHandlerJson from './permissionHandler.json'; -import electronJson from './electron.json'; -import solUmlGenJson from './solUmlGen.json' -import remixAppJson from './remixApp.json' -import remixUiTabsJson from './remixUiTabs.json' -import circuitJson from './circuit.json'; -import gitJson from './git.json' +function readAndCombineJsonFiles() { + const dataContext = require.context('./', true, /\.json$/) -export default { - ...debuggerJson, - ...filePanelJson, - ...homeJson, - ...panelJson, - ...pluginManagerJson, - ...searchJson, - ...settingsJson, - ...solidityJson, - ...terminalJson, - ...udappJson, - ...solidityUnitTestingJson, - ...permissionHandlerJson, - ...electronJson, - ...solUmlGenJson, - ...remixAppJson, - ...remixUiTabsJson, - ...circuitJson, - ...gitJson + let combinedData = {} + dataContext.keys().forEach((key) => { + const jsonData = dataContext(key) + combinedData = {...combinedData, ...jsonData} + }) + + return combinedData } + +export default readAndCombineJsonFiles() diff --git a/apps/remix-ide/src/app/tabs/locales/en/panel.json b/apps/remix-ide/src/app/tabs/locales/en/panel.json index c9ad7d8d05..013a68e199 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/panel.json @@ -4,6 +4,7 @@ "panel.documentation": "Documentation", "panel.description": "Description", "panel.maintainedByRemix": "Maintained by Remix", + "panel.maintainedExternally": "Not maintained by Remix", "panel.pluginInfo": "Plugin info", "panel.linkToDoc": "Link to documentation", "panel.makeAnissue": "Make an issue" diff --git a/apps/remix-ide/src/app/tabs/locales/en/permissionHandler.json b/apps/remix-ide/src/app/tabs/locales/en/permissionHandler.json index d41fe6c68e..d0e5f6e62b 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/permissionHandler.json +++ b/apps/remix-ide/src/app/tabs/locales/en/permissionHandler.json @@ -1,5 +1,5 @@ { - "permissionHandler.allPermissionsReset": "All permisssions have been reset.", + "permissionHandler.allPermissionsReset": "All permissions have been reset.", "permissionHandler.rememberText": "has changed and", "permissionHandler.permissionHandlerMessage": "\"{from}\" {rememberText} would like to access to \"{method}\" of \"{to}\"`", "permissionHandler.description": "Description", diff --git a/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json b/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json index b4991edf7c..f6de5d5e42 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json +++ b/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json @@ -33,6 +33,7 @@ "pluginManager.ok": "OK", "pluginManager.cancel": "Cancel", "pluginManager.maintainedByRemix": "Maintained by Remix", + "pluginManager.maintainedExternally": "Not maintained by Remix", "pluginManager.linkToDoc": "Link to documentation", "pluginManager.versionAlpha": "Version Alpha", "pluginManager.versionBeta": "Version Beta", diff --git a/apps/remix-ide/src/app/tabs/locales/en/publishToStorage.json b/apps/remix-ide/src/app/tabs/locales/en/publishToStorage.json new file mode 100644 index 0000000000..b319588c26 --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/en/publishToStorage.json @@ -0,0 +1,19 @@ +{ + "publishToStorage.title1": "Publish To Storage", + "publishToStorage.title1.message": "This contract may be abstract, it may not implement an abstract parent's methods completely or it may not invoke an inherited contract's constructor correctly.", + "publishToStorage.title2": "Published {name}'s Metadata and Sources", + "publishToStorage.title2.message": "Metadata and sources of \"{name}\" were published successfully.", + "publishToStorage.title3": "Swarm Publish Failed", + "publishToStorage.title4": "IPFS Settings", + "publishToStorage.title4.message1": "You have not set your own custom IPFS settings.", + "publishToStorage.title4.message2": "We won’t be providing a public endpoint anymore for publishing your contracts to IPFS.", + "publishToStorage.title4.message3": "Instead of that, 4 options are now available:", + "publishToStorage.title4.message4": "DEFAULT OPTION: Use the public INFURA node. This will not guarantee your data will persist.", + "publishToStorage.title4.message5": "Use your own INFURA IPFS node. This requires a subscription. Learn more", + "publishToStorage.title4.message6": "Use any external IPFS which doesn’t require any authentication.", + "publishToStorage.title4.message7": "Use your own local ipfs node (which usually runs under http://localhost:5001)", + "publishToStorage.title4.message8": "You can update your IPFS settings in the SETTINGS tab.", + "publishToStorage.title4.message9": "Now the default option will be used.", + "publishToStorage.title5": "IPFS Publish Failed", + "publishToStorage.title5.message": "Failed to publish metadata file and sources to {storage}, please check the {storage} gateways is available." +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/remixApp.json b/apps/remix-ide/src/app/tabs/locales/en/remixApp.json index a67504f413..c42f8531f3 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/remixApp.json +++ b/apps/remix-ide/src/app/tabs/locales/en/remixApp.json @@ -1,3 +1,20 @@ { - "remixApp.scrollToSeeAllTabs": "Scroll to see all tabs" + "remixApp.scrollToSeeAllTabs": "Scroll to see all tabs", + "remixApp.alert": "Alert", + "remixApp.ok": "OK", + "remixApp.enterText1": "Welcome to Remix IDE", + "remixApp.enterText2": "In order to understand your needs better, we would like to know how you typically use Remix", + "remixApp.enterText3": "Learning - discovering web3 development", + "remixApp.enterText4": "Prototyping - trying out concepts and techniques", + "remixApp.enterText5": "Developing projects - Remix as your main dev tool", + "remixApp.enterText6": "Production - only deployments", + "remixApp.matomoText1": "An Opt-in version of Matomo, an open source data analytics platform is being used to improve Remix IDE.", + "remixApp.matomoText2": "We realize that our users have sensitive information in their code and that their privacy - your privacy - must be protected.", + "remixApp.matomoText3": "All data collected through Matomo is stored on our own server - no data is ever given to third parties.", + "remixApp.matomoText4": "We do not collect nor store any personally identifiable information (PII).", + "remixApp.matomoText5": "For more info, see: Matomo Analytics on Remix iDE.", + "remixApp.matomoText6": "You can change your choice in the Settings panel anytime.", + "remixApp.matomoTitle": "Help us to improve Remix IDE", + "remixApp.accept": "Accept", + "remixApp.decline": "Decline" } diff --git a/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json index 1c60e9592d..df7628736a 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json +++ b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json @@ -1,7 +1,7 @@ { "remixUiTabs.tooltipText1": "Run script (CTRL + SHIFT + S)", "remixUiTabs.tooltipText2": "Compile CTRL + S", - "remixUiTabs.tooltipText3": "Select .sol or .yul file to compile or a .ts or .js file and run it", + "remixUiTabs.tooltipText3": "Select .sol, .vy or .yul file to compile or a .ts or .js file and run it", "remixUiTabs.zoomOut": "Zoom out", "remixUiTabs.zoomIn": "Zoom in" } diff --git a/apps/remix-ide/src/app/tabs/locales/en/remixd.json b/apps/remix-ide/src/app/tabs/locales/en/remixd.json new file mode 100644 index 0000000000..41dc822faa --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/en/remixd.json @@ -0,0 +1,16 @@ +{ + "remixd.connectionAlert1": "Cannot connect to the remixd daemon. Please make sure you have the remixd running in the background.", + "remixd.connectionAlert2": "Connection to remixd terminated. Please make sure remixd is still running in the background.", + "remixd.remixdConnect": "Access file system using remixd", + "remixd.connect": "Connect", + "remixd.cancel": "Cancel", + "remixd.text1": "Access your local file system from Remix IDE using Remixd NPM package.", + "remixd.text2": "Remixd documentation.", + "remixd.text3": "The remixd command is:", + "remixd.text4": "The remixd command without options uses the terminal's current directory as the shared directory and the shared Remix domain can only be https://remix.ethereum.org, https://remix-alpha.ethereum.org, or https://remix-beta.ethereum.org", + "remixd.text5": "Example command with flags:", + "remixd.text6": "For info about ports, see Remixd ports usage", + "remixd.text7": "This feature is still in Alpha. We recommend to keep a backup of the shared folder.", + "remixd.text8": "Before using, make sure remixd version is latest i.e.", + "remixd.text9": "Read here how to update it" +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/search.json b/apps/remix-ide/src/app/tabs/locales/en/search.json index 67b2a66c18..bfe7cdb070 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/search.json +++ b/apps/remix-ide/src/app/tabs/locales/en/search.json @@ -20,5 +20,5 @@ "search.no": "No", "search.loading": "Loading", "search.text1": "showing {count} results in {fileCount} files", - "search.text2": "Too many resuls to display...{br}Please narrow down your search." + "search.text2": "Too many results to display...{br}Please narrow down your search." } diff --git a/apps/remix-ide/src/app/tabs/locales/en/solidity.json b/apps/remix-ide/src/app/tabs/locales/en/solidity.json index adddb8dfdd..3fc0da579d 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/solidity.json +++ b/apps/remix-ide/src/app/tabs/locales/en/solidity.json @@ -1,5 +1,6 @@ { "solidity.displayName": "Solidity compiler", + "solidity.openaigptMessage": "solidity code: {content}\n error message: {messageText}\n explain why the error occurred and how to fix it.", "solidity._comment_compiler-container.tsx": "libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx", "solidity.compiler": "Compiler", @@ -45,7 +46,7 @@ "solidity.compileIconAttribute": "compiler is loading, please wait a few moments.", "solidity.compilerLicense": "Compiler License", "solidity.compilerLicenseMsg1": "Compiler is loading. License will be displayed once compiler is loaded", - "solidity.compilerLicenseMsg2": "Could not retreive license for selected compiler version", + "solidity.compilerLicenseMsg2": "Could not retrieve license for selected compiler version", "solidity.compilerLicenseMsg3": "License not available", "solidity.seeCompilerLicense": "See compiler license", @@ -68,7 +69,7 @@ "solidity.Assembly": "Assembly opcodes describing the contract including corresponding solidity source code", "solidity.Opcodes": "Assembly opcodes describing the contract", "solidity.name": "Name of the compiled contract", - "solidity.metadata": "Contains all informations related to the compilation", + "solidity.metadata": "Contains all information related to the compilation", "solidity.bytecode": "Bytecode being executed during contract creation", "solidity.abi": "ABI: describing all the functions (input/output params, scope, ...)", "solidity.web3Deploy": "Copy/paste this code to any JavaScript/Web3 console to deploy this contract", diff --git a/apps/remix-ide/src/app/tabs/locales/en/terminal.json b/apps/remix-ide/src/app/tabs/locales/en/terminal.json index 20dd9f8fd3..8a20e2e97a 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/terminal.json +++ b/apps/remix-ide/src/app/tabs/locales/en/terminal.json @@ -15,7 +15,7 @@ "terminal.welcomeText8": "Right click on a JavaScript file in the file explorer and then click `Run`", "terminal.welcomeText9": "The following libraries are accessible", "terminal.welcomeText10": "Type the library name to see available commands", - "terminal.text1": "This type of command has been deprecated and is not functionning anymore. Please run remix.help() to list available commands.", + "terminal.text1": "This type of command has been deprecated and is not functioning anymore. Please run remix.help() to list available commands.", "terminal.hideTerminal": "Hide Terminal", "terminal.showTerminal": "Show Terminal", "terminal.clearConsole": "Clear console", diff --git a/apps/remix-ide/src/app/tabs/locales/en/udapp.json b/apps/remix-ide/src/app/tabs/locales/en/udapp.json index 5d045b6acf..ccf96f0e66 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/en/udapp.json @@ -19,14 +19,14 @@ "udapp.publishTo": "Publish to", "udapp.atAddress": "At Address", "udapp.atAddressOptionsTitle1": "address of contract", - "udapp.atAddressOptionsTitle2": "Interact with the deployed contract - requires the .abi file or compiled .sol file to be selected in the editor (with the same compiler configuration)", + "udapp.atAddressOptionsTitle2": "Interact with the deployed contract - requires the .abi file or compiled .sol file to be selected in the editor (with the same compiler configuration)", "udapp.atAddressOptionsTitle3": "Compile a *.sol file or select a *.abi file.", "udapp.atAddressOptionsTitle4": "To interact with a deployed contract, either enter its address and compile its source *.sol file (with the same compiler settings) or select its .abi file in the editor. ", "udapp.contractOptionsTitle1": "Please compile *.sol file to deploy or access a contract", "udapp.contractOptionsTitle2": "Select a compiled contract to deploy or to use with At Address.", "udapp.contractOptionsTitle3": "Select and compile *.sol file to deploy or access a contract.", "udapp.contractOptionsTitle4": "When there is a compiled .sol file, choose the contract to deploy or to use with At Address.", - "udapp.checkSumWarning": "It seems you are not using a checksumed address.A checksummed address is an address that contains uppercase letters, as specified in {a}.Checksummed addresses are meant to help prevent users from sending transactions to the wrong address.", + "udapp.checkSumWarning": "It seems you are not using a checksummed address. A checksummed address is an address that contains uppercase letters, as specified in {a}. Checksummed addresses are meant to help prevent users from sending transactions to the wrong address.", "udapp.isOverSizePromptEip170": "Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fail if the current network has activated the eip 170. More info: {a}", "udapp.isOverSizePromptEip3860": "Contract creation init code exceeds the allowed max code size of 49152 bytes. The deployment will likely fail if the current network has activated the eip 3860. More info: {a}", "udapp.thisContractMayBeAbstract": "This contract may be abstract, it may not implement an abstract parent's methods completely or it may not invoke an inherited contract's constructor correctly.", @@ -123,7 +123,7 @@ "udapp.contractCreation": "Contract Creation", "udapp.transactionFee": "Transaction is invalid. Max fee should not be less than Base fee", "udapp.title1": "Represents the part of the tx fee that goes to the miner.", - "udapp.title2": "Represents the maximum amount of fee that you will pay for this transaction. The minimun needs to be set to base fee.", + "udapp.title2": "Represents the maximum amount of fee that you will pay for this transaction. The minimum needs to be set to base fee.", "udapp.gasPrice": "Gas price", "udapp.gweiText": "visit {a} for current gas price info.", "udapp.maxTransactionFee": "Max transaction fee", diff --git a/apps/remix-ide/src/app/tabs/locales/es/index.js b/apps/remix-ide/src/app/tabs/locales/es/index.js index ded9c45b14..d1dbf937cd 100644 --- a/apps/remix-ide/src/app/tabs/locales/es/index.js +++ b/apps/remix-ide/src/app/tabs/locales/es/index.js @@ -1,36 +1,17 @@ -import debuggerJson from './debugger.json'; -import filePanelJson from './filePanel.json'; -import homeJson from './home.json'; -import panelJson from './panel.json'; -import pluginManagerJson from './pluginManager.json'; -import searchJson from './search.json'; -import settingsJson from './settings.json'; -import solidityJson from './solidity.json'; -import terminalJson from './terminal.json'; -import udappJson from './udapp.json'; -import solidityUnitTestingJson from './solidityUnitTesting.json'; -import permissionHandlerJson from './permissionHandler.json'; -import solUmlGenJson from './solUmlGen.json' -import remixAppJson from './remixApp.json' -import remixUiTabsJson from './remixUiTabs.json' -import enJson from '../en'; +import enJson from '../en' + +function readAndCombineJsonFiles() { + const dataContext = require.context('./', true, /\.json$/) + + let combinedData = {} + dataContext.keys().forEach((key) => { + const jsonData = dataContext(key) + combinedData = {...combinedData, ...jsonData} + }) + + return combinedData +} // There may have some un-translated content. Always fill in the gaps with EN JSON. // No need for a defaultMessage prop when render a FormattedMessage component. -export default Object.assign({}, enJson, { - ...debuggerJson, - ...filePanelJson, - ...homeJson, - ...panelJson, - ...pluginManagerJson, - ...searchJson, - ...settingsJson, - ...solidityJson, - ...terminalJson, - ...udappJson, - ...solidityUnitTestingJson, - ...permissionHandlerJson, - ...solUmlGenJson, - ...remixAppJson, - ...remixUiTabsJson, -}) +export default Object.assign({}, enJson, readAndCombineJsonFiles()) diff --git a/apps/remix-ide/src/app/tabs/locales/fr/index.js b/apps/remix-ide/src/app/tabs/locales/fr/index.js index ded9c45b14..d1dbf937cd 100644 --- a/apps/remix-ide/src/app/tabs/locales/fr/index.js +++ b/apps/remix-ide/src/app/tabs/locales/fr/index.js @@ -1,36 +1,17 @@ -import debuggerJson from './debugger.json'; -import filePanelJson from './filePanel.json'; -import homeJson from './home.json'; -import panelJson from './panel.json'; -import pluginManagerJson from './pluginManager.json'; -import searchJson from './search.json'; -import settingsJson from './settings.json'; -import solidityJson from './solidity.json'; -import terminalJson from './terminal.json'; -import udappJson from './udapp.json'; -import solidityUnitTestingJson from './solidityUnitTesting.json'; -import permissionHandlerJson from './permissionHandler.json'; -import solUmlGenJson from './solUmlGen.json' -import remixAppJson from './remixApp.json' -import remixUiTabsJson from './remixUiTabs.json' -import enJson from '../en'; +import enJson from '../en' + +function readAndCombineJsonFiles() { + const dataContext = require.context('./', true, /\.json$/) + + let combinedData = {} + dataContext.keys().forEach((key) => { + const jsonData = dataContext(key) + combinedData = {...combinedData, ...jsonData} + }) + + return combinedData +} // There may have some un-translated content. Always fill in the gaps with EN JSON. // No need for a defaultMessage prop when render a FormattedMessage component. -export default Object.assign({}, enJson, { - ...debuggerJson, - ...filePanelJson, - ...homeJson, - ...panelJson, - ...pluginManagerJson, - ...searchJson, - ...settingsJson, - ...solidityJson, - ...terminalJson, - ...udappJson, - ...solidityUnitTestingJson, - ...permissionHandlerJson, - ...solUmlGenJson, - ...remixAppJson, - ...remixUiTabsJson, -}) +export default Object.assign({}, enJson, readAndCombineJsonFiles()) diff --git a/apps/remix-ide/src/app/tabs/locales/it/index.js b/apps/remix-ide/src/app/tabs/locales/it/index.js index ded9c45b14..d1dbf937cd 100644 --- a/apps/remix-ide/src/app/tabs/locales/it/index.js +++ b/apps/remix-ide/src/app/tabs/locales/it/index.js @@ -1,36 +1,17 @@ -import debuggerJson from './debugger.json'; -import filePanelJson from './filePanel.json'; -import homeJson from './home.json'; -import panelJson from './panel.json'; -import pluginManagerJson from './pluginManager.json'; -import searchJson from './search.json'; -import settingsJson from './settings.json'; -import solidityJson from './solidity.json'; -import terminalJson from './terminal.json'; -import udappJson from './udapp.json'; -import solidityUnitTestingJson from './solidityUnitTesting.json'; -import permissionHandlerJson from './permissionHandler.json'; -import solUmlGenJson from './solUmlGen.json' -import remixAppJson from './remixApp.json' -import remixUiTabsJson from './remixUiTabs.json' -import enJson from '../en'; +import enJson from '../en' + +function readAndCombineJsonFiles() { + const dataContext = require.context('./', true, /\.json$/) + + let combinedData = {} + dataContext.keys().forEach((key) => { + const jsonData = dataContext(key) + combinedData = {...combinedData, ...jsonData} + }) + + return combinedData +} // There may have some un-translated content. Always fill in the gaps with EN JSON. // No need for a defaultMessage prop when render a FormattedMessage component. -export default Object.assign({}, enJson, { - ...debuggerJson, - ...filePanelJson, - ...homeJson, - ...panelJson, - ...pluginManagerJson, - ...searchJson, - ...settingsJson, - ...solidityJson, - ...terminalJson, - ...udappJson, - ...solidityUnitTestingJson, - ...permissionHandlerJson, - ...solUmlGenJson, - ...remixAppJson, - ...remixUiTabsJson, -}) +export default Object.assign({}, enJson, readAndCombineJsonFiles()) diff --git a/apps/remix-ide/src/app/tabs/locales/zh/index.js b/apps/remix-ide/src/app/tabs/locales/zh/index.js index 1acd2ba1be..d1dbf937cd 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh/index.js +++ b/apps/remix-ide/src/app/tabs/locales/zh/index.js @@ -1,38 +1,17 @@ -import debuggerJson from './debugger.json'; -import filePanelJson from './filePanel.json'; -import homeJson from './home.json'; -import panelJson from './panel.json'; -import pluginManagerJson from './pluginManager.json'; -import searchJson from './search.json'; -import settingsJson from './settings.json'; -import solidityJson from './solidity.json'; -import terminalJson from './terminal.json'; -import udappJson from './udapp.json'; -import solidityUnitTestingJson from './solidityUnitTesting.json'; -import permissionHandlerJson from './permissionHandler.json'; -import solUmlGenJson from './solUmlGen.json' -import remixAppJson from './remixApp.json' -import remixUiTabsJson from './remixUiTabs.json' -import enJson from '../en'; -import circuitJson from './circuit.json'; +import enJson from '../en' + +function readAndCombineJsonFiles() { + const dataContext = require.context('./', true, /\.json$/) + + let combinedData = {} + dataContext.keys().forEach((key) => { + const jsonData = dataContext(key) + combinedData = {...combinedData, ...jsonData} + }) + + return combinedData +} // There may have some un-translated content. Always fill in the gaps with EN JSON. // No need for a defaultMessage prop when render a FormattedMessage component. -export default Object.assign({}, enJson, { - ...debuggerJson, - ...filePanelJson, - ...homeJson, - ...panelJson, - ...pluginManagerJson, - ...searchJson, - ...settingsJson, - ...solidityJson, - ...terminalJson, - ...udappJson, - ...solidityUnitTestingJson, - ...permissionHandlerJson, - ...solUmlGenJson, - ...remixAppJson, - ...remixUiTabsJson, - ...circuitJson -}) +export default Object.assign({}, enJson, readAndCombineJsonFiles()) diff --git a/apps/remix-ide/src/app/tabs/network-module.js b/apps/remix-ide/src/app/tabs/network-module.js index b59a075b79..768b56140e 100644 --- a/apps/remix-ide/src/app/tabs/network-module.js +++ b/apps/remix-ide/src/app/tabs/network-module.js @@ -20,7 +20,7 @@ export class NetworkModule extends Plugin { super(profile) this.blockchain = blockchain - // TODO: See with remix-lib to make sementic coherent + // TODO: See with remix-lib to make semantic coherent this.blockchain.event.register('contextChanged', (provider) => { this.emit('providerChanged', provider) }) diff --git a/apps/remix-ide/src/app/tabs/runTab/model/recorder.js b/apps/remix-ide/src/app/tabs/runTab/model/recorder.js index 01c87185b8..e27edcd3d9 100644 --- a/apps/remix-ide/src/app/tabs/runTab/model/recorder.js +++ b/apps/remix-ide/src/app/tabs/runTab/model/recorder.js @@ -84,7 +84,7 @@ class Recorder extends Plugin { const rawAddress = txResult.receipt.contractAddress if (!rawAddress) return // not a contract creation const address = addressToString(rawAddress) - // save back created addresses for the conversion from tokens to real adresses + // save back created addresses for the conversion from tokens to real addresses this.data._createdContracts[address] = timestamp this.data._createdContractsReverse[timestamp] = address }) @@ -98,7 +98,7 @@ class Recorder extends Plugin { } /** - * stop/start saving txs. If not listenning, is basically in replay mode + * stop/start saving txs. If not listening, is basically in replay mode * * @param {Bool} listen */ @@ -279,7 +279,7 @@ class Recorder extends Plugin { } if (rawAddress) { const address = addressToString(rawAddress) - // save back created addresses for the conversion from tokens to real adresses + // save back created addresses for the conversion from tokens to real addresses this.data._createdContracts[address] = tx.timestamp this.data._createdContractsReverse[tx.timestamp] = address newContractFn(abi, address, record.contractName) diff --git a/apps/remix-ide/src/app/tabs/styles/settings-tab-styles.js b/apps/remix-ide/src/app/tabs/styles/settings-tab-styles.js index 90a4e47069..53b6412169 100644 --- a/apps/remix-ide/src/app/tabs/styles/settings-tab-styles.js +++ b/apps/remix-ide/src/app/tabs/styles/settings-tab-styles.js @@ -29,7 +29,7 @@ const css = csjs` .heading { margin-bottom: 0; } - .explaination { + .explanation { margin-top: 3px; margin-bottom: 3px; } diff --git a/apps/remix-ide/src/app/tabs/theme-module.js b/apps/remix-ide/src/app/tabs/theme-module.js index 96cfef7bcd..53bb7f542d 100644 --- a/apps/remix-ide/src/app/tabs/theme-module.js +++ b/apps/remix-ide/src/app/tabs/theme-module.js @@ -146,7 +146,7 @@ export class ThemeModule extends Plugin { } /** - * fixes the invertion for images since this should be adjusted when we switch between dark/light qualified themes + * fixes the inversion for images since this should be adjusted when we switch between dark/light qualified themes * @param {element} [image] - the dom element which invert should be fixed to increase visibility */ fixInvert(image) { diff --git a/apps/remix-ide/src/app/tabs/web3-provider.js b/apps/remix-ide/src/app/tabs/web3-provider.js index 89b7528739..16c3a3dd17 100644 --- a/apps/remix-ide/src/app/tabs/web3-provider.js +++ b/apps/remix-ide/src/app/tabs/web3-provider.js @@ -1,6 +1,7 @@ import { Plugin } from '@remixproject/engine' import * as packageJson from '../../../../../package.json' import {isBigInt} from 'web3-validator' +import { addressToString } from "@remix-ui/helper" export const profile = { name: 'web3Provider', @@ -54,8 +55,13 @@ export class Web3ProviderModule extends Plugin { console.log('receipt available but contract address not present', receipt) return } - const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', receipt.contractAddress) - if (contractData) this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name) + const contractAddressStr = addressToString(receipt.contractAddress) + const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', contractAddressStr) + if (contractData) { + this.call('udapp', 'addInstance', contractAddressStr, contractData.contract.abi, contractData.name) + const data = await this.call('compilerArtefacts', 'getCompilerAbstract', contractData.file) + await this.call('compilerArtefacts', 'addResolvedContract', contractAddressStr, data) + } }, 50) } } diff --git a/apps/remix-ide/src/assets/js/parser/antlr.js b/apps/remix-ide/src/assets/js/parser/antlr.js index 90debb614f..8fda6f21ee 100644 --- a/apps/remix-ide/src/assets/js/parser/antlr.js +++ b/apps/remix-ide/src/assets/js/parser/antlr.js @@ -21298,9 +21298,9 @@ var SolidityParser = (() => { Dependents2[Dependents2["ANCESTORS"] = 3] = "ANCESTORS"; Dependents2[Dependents2["DESCENDANTS"] = 4] = "DESCENDANTS"; Dependents2[Dependents2["SIBLINGS"] = 5] = "SIBLINGS"; - Dependents2[Dependents2["PRECEEDING_SIBLINGS"] = 6] = "PRECEEDING_SIBLINGS"; + Dependents2[Dependents2["PRECEDING_SIBLINGS"] = 6] = "PRECEDING_SIBLINGS"; Dependents2[Dependents2["FOLLOWING_SIBLINGS"] = 7] = "FOLLOWING_SIBLINGS"; - Dependents2[Dependents2["PRECEEDING"] = 8] = "PRECEEDING"; + Dependents2[Dependents2["PRECEDING"] = 8] = "PRECEDING"; Dependents2[Dependents2["FOLLOWING"] = 9] = "FOLLOWING"; })(Dependents = exports.Dependents || (exports.Dependents = {})); } @@ -33949,7 +33949,7 @@ var SolidityParser = (() => { _toText(ctx) { const text = ctx.text; if (text === void 0) { - throw new Error("Assertion error: text should never be undefiend"); + throw new Error("Assertion error: text should never be undefined"); } return text; } diff --git a/apps/remix-ide/src/assets/js/parser/antlr.js.map b/apps/remix-ide/src/assets/js/parser/antlr.js.map index a145305c3c..8fafea8595 100644 --- a/apps/remix-ide/src/assets/js/parser/antlr.js.map +++ b/apps/remix-ide/src/assets/js/parser/antlr.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../process-shim.js", "../src/ANTLRErrorListener.ts", "../src/ANTLRErrorStrategy.ts", "../node_modules/has-symbols/shams.js", "../node_modules/has-tostringtag/shams.js", "../node_modules/has-symbols/index.js", "../node_modules/function-bind/implementation.js", "../node_modules/function-bind/index.js", "../node_modules/has/src/index.js", "../node_modules/get-intrinsic/index.js", "../node_modules/call-bind/index.js", "../node_modules/call-bind/callBound.js", "../node_modules/is-arguments/index.js", "../node_modules/is-generator-function/index.js", "../node_modules/is-callable/index.js", "../node_modules/for-each/index.js", "../node_modules/available-typed-arrays/index.js", "../node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js", "../node_modules/is-typed-array/index.js", "../node_modules/which-typed-array/index.js", "../node_modules/util/support/types.js", "../node_modules/util/support/isBufferBrowser.js", "../node_modules/inherits/inherits_browser.js", "../node_modules/util/util.js", "../node_modules/assert/build/internal/errors.js", "../node_modules/assert/build/internal/assert/assertion_error.js", "../node_modules/es6-object-assign/index.js", "../node_modules/object-keys/isArguments.js", "../node_modules/object-keys/implementation.js", "../node_modules/object-keys/index.js", "../node_modules/has-property-descriptors/index.js", "../node_modules/define-properties/index.js", "../node_modules/object-is/implementation.js", "../node_modules/object-is/polyfill.js", "../node_modules/object-is/shim.js", "../node_modules/object-is/index.js", "../node_modules/is-nan/implementation.js", "../node_modules/is-nan/polyfill.js", "../node_modules/is-nan/shim.js", "../node_modules/is-nan/index.js", "../node_modules/assert/build/internal/util/comparisons.js", "../node_modules/assert/build/assert.js", "../src/Decorators.ts", "../src/IntStream.ts", "../src/ANTLRInputStream.ts", "../src/atn/ATNState.ts", "../src/atn/ATNStateType.ts", "../src/RecognitionException.ts", "../src/atn/Transition.ts", "../src/atn/AbstractPredicateTransition.ts", "../src/misc/MurmurHash.ts", "../src/misc/ObjectEqualityComparator.ts", "../src/misc/DefaultEqualityComparator.ts", "../src/misc/Array2DHashSet.ts", "../src/misc/ArrayEqualityComparator.ts", "../src/misc/Utils.ts", "../src/atn/SemanticContext.ts", "../src/atn/PredicateTransition.ts", "../src/FailedPredicateException.ts", "../src/InputMismatchException.ts", "../src/misc/Arrays.ts", "../src/misc/IntegerList.ts", "../src/misc/Interval.ts", "../src/Token.ts", "../src/CommonToken.ts", "../src/CommonTokenFactory.ts", "../src/misc/IntegerStack.ts", "../src/dfa/AcceptStateInfo.ts", "../src/misc/Array2DHashMap.ts", "../src/atn/DecisionState.ts", "../src/atn/PredictionContextCache.ts", "../src/atn/PredictionContext.ts", "../src/atn/ATNConfig.ts", "../src/misc/BitSet.ts", "../src/atn/ATNConfigSet.ts", "../src/dfa/DFAState.ts", "../src/atn/ATNSimulator.ts", "../src/ConsoleErrorListener.ts", "../src/ProxyErrorListener.ts", "../src/Recognizer.ts", "../src/VocabularyImpl.ts", "../src/dfa/DFASerializer.ts", "../src/dfa/LexerDFASerializer.ts", "../src/atn/StarLoopEntryState.ts", "../src/dfa/DFA.ts", "../src/atn/BasicState.ts", "../src/atn/InvalidState.ts", "../src/atn/SetTransition.ts", "../src/atn/NotSetTransition.ts", "../src/atn/RuleStopState.ts", "../src/atn/RuleTransition.ts", "../src/atn/WildcardTransition.ts", "../src/atn/LL1Analyzer.ts", "../src/atn/ATN.ts", "../src/atn/LexerIndexedCustomAction.ts", "../src/atn/LexerActionExecutor.ts", "../src/LexerNoViableAltException.ts", "../src/atn/OrderedATNConfigSet.ts", "../src/atn/LexerATNSimulator.ts", "../src/Lexer.ts", "../src/misc/IntervalSet.ts", "../src/atn/ATNDeserializationOptions.ts", "../src/atn/ActionTransition.ts", "../src/atn/AtomTransition.ts", "../src/atn/BlockStartState.ts", "../src/atn/BasicBlockStartState.ts", "../src/atn/BlockEndState.ts", "../src/atn/EpsilonTransition.ts", "../src/atn/LexerChannelAction.ts", "../src/atn/LexerCustomAction.ts", "../src/atn/LexerModeAction.ts", "../src/atn/LexerMoreAction.ts", "../src/atn/LexerPopModeAction.ts", "../src/atn/LexerPushModeAction.ts", "../src/atn/LexerSkipAction.ts", "../src/atn/LexerTypeAction.ts", "../src/atn/LoopEndState.ts", "../src/atn/ConflictInfo.ts", "../src/tree/TerminalNode.ts", "../src/tree/ErrorNode.ts", "../src/tree/RuleNode.ts", "../src/tree/Trees.ts", "../src/RuleContext.ts", "../src/ParserRuleContext.ts", "../src/atn/PredictionMode.ts", "../src/atn/SimulatorState.ts", "../src/atn/ParserATNSimulator.ts", "../src/atn/PlusBlockStartState.ts", "../src/atn/PlusLoopbackState.ts", "../src/atn/PrecedencePredicateTransition.ts", "../src/atn/RangeTransition.ts", "../src/atn/RuleStartState.ts", "../src/atn/StarBlockStartState.ts", "../src/atn/StarLoopbackState.ts", "../src/atn/TokensStartState.ts", "../src/misc/UUID.ts", "../src/atn/ATNDeserializer.ts", "../src/atn/ParseInfo.ts", "../src/ProxyParserErrorListener.ts", "../src/misc/Character.ts", "../src/CodePointBuffer.ts", "../src/CodePointCharStream.ts", "../src/CharStreams.ts", "../src/BufferedTokenStream.ts", "../src/CommonTokenStream.ts", "../src/ListTokenSource.ts", "../src/misc/MultiMap.ts", "../src/misc/ParseCancellationException.ts", "../src/InterpreterRuleContext.ts", "../src/ParserInterpreter.ts", "../src/tree/pattern/ParseTreeMatch.ts", "../src/tree/xpath/XPathLexer.ts", "../src/tree/xpath/XPathLexerErrorListener.ts", "../src/tree/xpath/XPathElement.ts", "../src/tree/xpath/XPathRuleAnywhereElement.ts", "../src/tree/xpath/XPathRuleElement.ts", "../src/tree/xpath/XPathTokenAnywhereElement.ts", "../src/tree/xpath/XPathTokenElement.ts", "../src/tree/xpath/XPathWildcardAnywhereElement.ts", "../src/tree/xpath/XPathWildcardElement.ts", "../src/tree/xpath/XPath.ts", "../src/tree/pattern/ParseTreePattern.ts", "../src/tree/pattern/RuleTagToken.ts", "../src/tree/pattern/Chunk.ts", "../src/tree/pattern/TagChunk.ts", "../src/tree/pattern/TextChunk.ts", "../src/tree/pattern/TokenTagToken.ts", "../src/tree/pattern/ParseTreePatternMatcher.ts", "../src/atn/DecisionEventInfo.ts", "../src/atn/AmbiguityInfo.ts", "../src/atn/ContextSensitivityInfo.ts", "../src/atn/DecisionInfo.ts", "../src/atn/ErrorInfo.ts", "../src/atn/LookaheadEventInfo.ts", "../src/atn/PredicateEvalInfo.ts", "../src/atn/ProfilingATNSimulator.ts", "../src/Parser.ts", "../src/NoViableAltException.ts", "../src/DefaultErrorStrategy.ts", "../src/BailErrorStrategy.ts", "../src/CharStream.ts", "../src/Dependents.ts", "../src/DiagnosticErrorListener.ts", "../src/LexerInterpreter.ts", "../src/ParserErrorListener.ts", "../src/RuleContextWithAltNum.ts", "../src/RuleDependency.ts", "../src/RuleVersion.ts", "../src/TokenFactory.ts", "../src/TokenSource.ts", "../src/TokenStream.ts", "../src/TokenStreamRewriter.ts", "../src/Vocabulary.ts", "../src/WritableToken.ts", "../src/index.ts", "../src/tree/AbstractParseTreeVisitor.ts", "(disabled):fs", "../src/index.ts", "../src/parser.ts", "../src/antlr/SolidityLexer.ts", "../src/antlr/SolidityParser.ts", "../src/ast-types.ts", "../src/ASTBuilder.ts", "../src/ErrorListener.ts", "../node_modules/antlr4/src/antlr4/index.js", "../node_modules/antlr4/src/antlr4/utils/stringHashCode.js", "../node_modules/antlr4/src/antlr4/polyfills/codepointat.js", "../node_modules/antlr4/src/antlr4/polyfills/fromcodepoint.js", "../node_modules/antlr4/src/antlr4/atn/index.js", "../node_modules/antlr4/src/antlr4/atn/ATN.js", "../node_modules/antlr4/src/antlr4/atn/LL1Analyzer.js", "../node_modules/antlr4/src/antlr4/Token.js", "../node_modules/antlr4/src/antlr4/atn/ATNConfig.js", "../node_modules/antlr4/src/antlr4/atn/SemanticContext.js", "../node_modules/antlr4/src/antlr4/utils/equalArrays.js", "../node_modules/antlr4/src/antlr4/misc/HashCode.js", "../node_modules/antlr4/src/antlr4/misc/HashSet.js", "../node_modules/antlr4/src/antlr4/utils/standardHashCodeFunction.js", "../node_modules/antlr4/src/antlr4/utils/standardEqualsFunction.js", "../node_modules/antlr4/src/antlr4/utils/arrayToString.js", "../node_modules/antlr4/src/antlr4/utils/valueToString.js", "../node_modules/antlr4/src/antlr4/misc/IntervalSet.js", "../node_modules/antlr4/src/antlr4/misc/Interval.js", "../node_modules/antlr4/src/antlr4/state/RuleStopState.js", "../node_modules/antlr4/src/antlr4/state/ATNState.js", "../node_modules/antlr4/src/antlr4/transition/RuleTransition.js", "../node_modules/antlr4/src/antlr4/transition/Transition.js", "../node_modules/antlr4/src/antlr4/transition/NotSetTransition.js", "../node_modules/antlr4/src/antlr4/transition/SetTransition.js", "../node_modules/antlr4/src/antlr4/transition/WildcardTransition.js", "../node_modules/antlr4/src/antlr4/atn/AbstractPredicateTransition.js", "../node_modules/antlr4/src/antlr4/context/PredictionContextUtils.js", "../node_modules/antlr4/src/antlr4/context/RuleContext.js", "../node_modules/antlr4/src/antlr4/tree/RuleNode.js", "../node_modules/antlr4/src/antlr4/tree/ParseTree.js", "../node_modules/antlr4/src/antlr4/tree/SyntaxTree.js", "../node_modules/antlr4/src/antlr4/tree/Tree.js", "../node_modules/antlr4/src/antlr4/tree/Trees.js", "../node_modules/antlr4/src/antlr4/tree/ErrorNode.js", "../node_modules/antlr4/src/antlr4/tree/TerminalNode.js", "../node_modules/antlr4/src/antlr4/utils/escapeWhitespace.js", "../node_modules/antlr4/src/antlr4/context/PredictionContext.js", "../node_modules/antlr4/src/antlr4/context/ArrayPredictionContext.js", "../node_modules/antlr4/src/antlr4/context/SingletonPredictionContext.js", "../node_modules/antlr4/src/antlr4/context/EmptyPredictionContext.js", "../node_modules/antlr4/src/antlr4/misc/HashMap.js", "../node_modules/antlr4/src/antlr4/misc/BitSet.js", "../node_modules/antlr4/src/antlr4/atn/ATNDeserializer.js", "../node_modules/antlr4/src/antlr4/atn/ATNType.js", "../node_modules/antlr4/src/antlr4/state/BasicState.js", "../node_modules/antlr4/src/antlr4/state/DecisionState.js", "../node_modules/antlr4/src/antlr4/state/BlockStartState.js", "../node_modules/antlr4/src/antlr4/state/BlockEndState.js", "../node_modules/antlr4/src/antlr4/state/LoopEndState.js", "../node_modules/antlr4/src/antlr4/state/RuleStartState.js", "../node_modules/antlr4/src/antlr4/state/TokensStartState.js", "../node_modules/antlr4/src/antlr4/state/PlusLoopbackState.js", "../node_modules/antlr4/src/antlr4/state/StarLoopbackState.js", "../node_modules/antlr4/src/antlr4/state/StarLoopEntryState.js", "../node_modules/antlr4/src/antlr4/state/PlusBlockStartState.js", "../node_modules/antlr4/src/antlr4/state/StarBlockStartState.js", "../node_modules/antlr4/src/antlr4/state/BasicBlockStartState.js", "../node_modules/antlr4/src/antlr4/transition/AtomTransition.js", "../node_modules/antlr4/src/antlr4/transition/RangeTransition.js", "../node_modules/antlr4/src/antlr4/transition/ActionTransition.js", "../node_modules/antlr4/src/antlr4/transition/EpsilonTransition.js", "../node_modules/antlr4/src/antlr4/transition/PredicateTransition.js", "../node_modules/antlr4/src/antlr4/atn/Predicate.js", "../node_modules/antlr4/src/antlr4/transition/PrecedencePredicateTransition.js", "../node_modules/antlr4/src/antlr4/atn/PrecedencePredicate.js", "../node_modules/antlr4/src/antlr4/atn/ATNDeserializationOptions.js", "../node_modules/antlr4/src/antlr4/atn/LexerActionType.js", "../node_modules/antlr4/src/antlr4/action/LexerSkipAction.js", "../node_modules/antlr4/src/antlr4/action/LexerAction.js", "../node_modules/antlr4/src/antlr4/action/LexerChannelAction.js", "../node_modules/antlr4/src/antlr4/action/LexerCustomAction.js", "../node_modules/antlr4/src/antlr4/action/LexerMoreAction.js", "../node_modules/antlr4/src/antlr4/action/LexerTypeAction.js", "../node_modules/antlr4/src/antlr4/action/LexerPushModeAction.js", "../node_modules/antlr4/src/antlr4/action/LexerPopModeAction.js", "../node_modules/antlr4/src/antlr4/action/LexerModeAction.js", "../node_modules/antlr4/src/antlr4/atn/LexerATNSimulator.js", "../node_modules/antlr4/src/antlr4/Lexer.js", "../node_modules/antlr4/src/antlr4/Recognizer.js", "../node_modules/antlr4/src/antlr4/error/ConsoleErrorListener.js", "../node_modules/antlr4/src/antlr4/error/ErrorListener.js", "../node_modules/antlr4/src/antlr4/error/ProxyErrorListener.js", "../node_modules/antlr4/src/antlr4/CommonTokenFactory.js", "../node_modules/antlr4/src/antlr4/CommonToken.js", "../node_modules/antlr4/src/antlr4/error/RecognitionException.js", "../node_modules/antlr4/src/antlr4/error/LexerNoViableAltException.js", "../node_modules/antlr4/src/antlr4/atn/ATNSimulator.js", "../node_modules/antlr4/src/antlr4/dfa/DFAState.js", "../node_modules/antlr4/src/antlr4/atn/ATNConfigSet.js", "../node_modules/antlr4/src/antlr4/atn/OrderedATNConfigSet.js", "../node_modules/antlr4/src/antlr4/atn/LexerATNConfig.js", "../node_modules/antlr4/src/antlr4/atn/LexerActionExecutor.js", "../node_modules/antlr4/src/antlr4/action/LexerIndexedCustomAction.js", "../node_modules/antlr4/src/antlr4/atn/ParserATNSimulator.js", "../node_modules/antlr4/src/antlr4/dfa/PredPrediction.js", "../node_modules/antlr4/src/antlr4/atn/PredictionMode.js", "../node_modules/antlr4/src/antlr4/misc/AltDict.js", "../node_modules/antlr4/src/antlr4/error/NoViableAltException.js", "../node_modules/antlr4/src/antlr4/utils/DoubleDict.js", "../node_modules/antlr4/src/antlr4/dfa/index.js", "../node_modules/antlr4/src/antlr4/dfa/DFA.js", "../node_modules/antlr4/src/antlr4/dfa/DFASerializer.js", "../node_modules/antlr4/src/antlr4/dfa/LexerDFASerializer.js", "../node_modules/antlr4/src/antlr4/tree/index.js", "../node_modules/antlr4/src/antlr4/tree/ParseTreeListener.js", "../node_modules/antlr4/src/antlr4/tree/ParseTreeVisitor.js", "../node_modules/antlr4/src/antlr4/tree/ParseTreeWalker.js", "../node_modules/antlr4/src/antlr4/error/index.js", "../node_modules/antlr4/src/antlr4/error/InputMismatchException.js", "../node_modules/antlr4/src/antlr4/error/FailedPredicateException.js", "../node_modules/antlr4/src/antlr4/error/DiagnosticErrorListener.js", "../node_modules/antlr4/src/antlr4/error/BailErrorStrategy.js", "../node_modules/antlr4/src/antlr4/error/ParseCancellationException.js", "../node_modules/antlr4/src/antlr4/error/DefaultErrorStrategy.js", "../node_modules/antlr4/src/antlr4/error/ErrorStrategy.js", "../node_modules/antlr4/src/antlr4/CharStreams.js", "../node_modules/antlr4/src/antlr4/InputStream.js", "../node_modules/antlr4/src/antlr4/FileStream.js", "../node_modules/antlr4/src/antlr4/CommonTokenStream.js", "../node_modules/antlr4/src/antlr4/BufferedTokenStream.js", "../node_modules/antlr4/src/antlr4/TokenStream.js", "../node_modules/antlr4/src/antlr4/Parser.js", "../node_modules/antlr4/src/antlr4/TraceListener.js", "../node_modules/antlr4/src/antlr4/atn/PredictionContextCache.js", "../node_modules/antlr4/src/antlr4/context/ParserRuleContext.js", "../node_modules/antlr4/src/antlr4/tree/TerminalNodeImpl.js", "../node_modules/antlr4/src/antlr4/tree/ErrorNodeImpl.js", "../node_modules/antlr4/src/antlr4/utils/index.js", "../src/antlr/SolidityBlocksParser.ts", "../src/antlr/SolidityBlocksLexer.ts"], - "sourcesContent": ["export let process = {\n cwd: () => '',\n env: () => {}\n}\n\nexport let global = {}\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.7499997-07:00\r\n\r\n/** How to emit recognition errors. */\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\n\r\nexport interface ANTLRErrorListener {\r\n\t/**\r\n\t * Upon syntax error, notify any interested parties. This is not how to\r\n\t * recover from errors or compute error messages. {@link ANTLRErrorStrategy}\r\n\t * specifies how to recover from syntax errors and how to compute error\r\n\t * messages. This listener's job is simply to emit a computed message,\r\n\t * though it has enough information to create its own message in many cases.\r\n\t *\r\n\t * The {@link RecognitionException} is non-`undefined` for all syntax errors except\r\n\t * when we discover mismatched token errors that we can recover from\r\n\t * in-line, without returning from the surrounding rule (via the single\r\n\t * token insertion and deletion mechanism).\r\n\t *\r\n\t * @param recognizer\r\n\t * What parser got the error. From this\r\n\t * \t\t object, you can access the context as well\r\n\t * \t\t as the input stream.\r\n\t * @param offendingSymbol\r\n\t * The offending token in the input token\r\n\t * \t\t stream, unless recognizer is a lexer (then it's `undefined`). If\r\n\t * \t\t no viable alternative error, `e` has token at which we\r\n\t * \t\t started production for the decision.\r\n\t * @param line\r\n\t * \t\t The line number in the input where the error occurred.\r\n\t * @param charPositionInLine\r\n\t * \t\t The character position within that line where the error occurred.\r\n\t * @param msg\r\n\t * \t\t The message to emit.\r\n\t * @param e\r\n\t * The exception generated by the parser that led to\r\n\t * the reporting of an error. It is `undefined` in the case where\r\n\t * the parser was able to recover in line without exiting the\r\n\t * surrounding rule.\r\n\t */\r\n\tsyntaxError?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingSymbol: T | undefined,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\t/*@NotNull*/\r\n\t\tmsg: string,\r\n\t\te: RecognitionException | undefined) => void;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.9102174-07:00\r\n\r\nimport { Parser } from \"./Parser\";\r\nimport { Token } from \"./Token\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\n\r\n/**\r\n * The interface for defining strategies to deal with syntax errors encountered\r\n * during a parse by ANTLR-generated parsers. We distinguish between three\r\n * different kinds of errors:\r\n *\r\n * * The parser could not figure out which path to take in the ATN (none of\r\n * the available alternatives could possibly match)\r\n * * The current input does not match what we were looking for\r\n * * A predicate evaluated to false\r\n *\r\n * Implementations of this interface report syntax errors by calling\r\n * {@link Parser#notifyErrorListeners}.\r\n *\r\n * TODO: what to do about lexers\r\n */\r\nexport interface ANTLRErrorStrategy {\r\n\t/**\r\n\t * Reset the error handler state for the specified `recognizer`.\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\treset(/*@NotNull*/ recognizer: Parser): void;\r\n\r\n\t/**\r\n\t * This method is called when an unexpected symbol is encountered during an\r\n\t * inline match operation, such as {@link Parser#match}. If the error\r\n\t * strategy successfully recovers from the match failure, this method\r\n\t * returns the {@link Token} instance which should be treated as the\r\n\t * successful result of the match.\r\n\t *\r\n\t * This method handles the consumption of any tokens - the caller should\r\n\t * *not* call {@link Parser#consume} after a successful recovery.\r\n\t *\r\n\t * Note that the calling code will not report an error if this method\r\n\t * returns successfully. The error strategy implementation is responsible\r\n\t * for calling {@link Parser#notifyErrorListeners} as appropriate.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @ if the error strategy was not able to\r\n\t * recover from the unexpected input symbol\r\n\t */\r\n\trecoverInline(/*@NotNull*/ recognizer: Parser): Token;\r\n\r\n\t/**\r\n\t * This method is called to recover from exception `e`. This method is\r\n\t * called after {@link #reportError} by the default exception handler\r\n\t * generated for a rule method.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception to recover from\r\n\t * @ if the error strategy could not recover from\r\n\t * the recognition exception\r\n\t */\r\n\trecover(/*@NotNull*/ recognizer: Parser, /*@NotNull*/ e: RecognitionException): void;\r\n\r\n\t/**\r\n\t * This method provides the error handler with an opportunity to handle\r\n\t * syntactic or semantic errors in the input stream before they result in a\r\n\t * {@link RecognitionException}.\r\n\t *\r\n\t * The generated code currently contains calls to {@link #sync} after\r\n\t * entering the decision state of a closure block (`(...)*` or\r\n\t * `(...)+`).\r\n\t *\r\n\t * For an implementation based on Jim Idle's \"magic sync\" mechanism, see\r\n\t * {@link DefaultErrorStrategy#sync}.\r\n\t *\r\n\t * @see DefaultErrorStrategy#sync\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @ if an error is detected by the error\r\n\t * strategy but cannot be automatically recovered at the current state in\r\n\t * the parsing process\r\n\t */\r\n\tsync(/*@NotNull*/ recognizer: Parser): void;\r\n\r\n\t/**\r\n\t * Tests whether or not `recognizer` is in the process of recovering\r\n\t * from an error. In error recovery mode, {@link Parser#consume} adds\r\n\t * symbols to the parse tree by calling\r\n\t * {@link Parser#createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)} instead of\r\n\t * {@link Parser#createTerminalNode(ParserRuleContext, Token)}.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @returns `true` if the parser is currently recovering from a parse\r\n\t * error, otherwise `false`\r\n\t */\r\n\tinErrorRecoveryMode(/*@NotNull*/ recognizer: Parser): boolean;\r\n\r\n\t/**\r\n\t * This method is called by when the parser successfully matches an input\r\n\t * symbol.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\treportMatch(/*@NotNull*/ recognizer: Parser): void;\r\n\r\n\t/**\r\n\t * Report any kind of {@link RecognitionException}. This method is called by\r\n\t * the default exception handler generated for a rule method.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception to report\r\n\t */\r\n\treportError(\r\n\t\t/*@NotNull*/ recognizer: Parser,\r\n\t\t/*@NotNull*/ e: RecognitionException): void;\r\n}\r\n", "'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n", "'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n", "'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n", "'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n", "'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n", "'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n", "'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n", "'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n", "'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n/* globals document: false */\nvar documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (value === documentDotAll) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (typeof value === 'function' && !value.prototype) { return true; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (value === documentDotAll) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (typeof value === 'function' && !value.prototype) { return true; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\treturn strClass === fnClass || strClass === genClass;\n\t};\n", "'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n", "'use strict';\n\nvar possibleNames = [\n\t'BigInt64Array',\n\t'BigUint64Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Int8Array',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray'\n];\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\nmodule.exports = function availableTypedArrays() {\n\tvar out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n", "'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\ttoStrTags[typedArray] = descriptor.get;\n\t\t}\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar anyTrue = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!anyTrue) {\n\t\t\ttry {\n\t\t\t\tanyTrue = getter.call(value) === typedArray;\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn anyTrue;\n};\n\nmodule.exports = function isTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag || !(Symbol.toStringTag in value)) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\treturn $indexOf(typedArrays, tag) > -1;\n\t}\n\tif (!gOPD) { return false; }\n\treturn tryTypedArrays(value);\n};\n", "'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tif (typeof g[typedArray] === 'function') {\n\t\t\tvar arr = new g[typedArray]();\n\t\t\tif (Symbol.toStringTag in arr) {\n\t\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\t\tif (!descriptor) {\n\t\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t\t}\n\t\t\t\ttoStrTags[typedArray] = descriptor.get;\n\t\t\t}\n\t\t}\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar foundName = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!foundName) {\n\t\t\ttry {\n\t\t\t\tvar name = getter.call(value);\n\t\t\t\tif (name === typedArray) {\n\t\t\t\t\tfoundName = name;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\t\t}\n\t});\n\treturn foundName;\n};\n\nvar isTypedArray = require('is-typed-array');\n\nmodule.exports = function whichTypedArray(value) {\n\tif (!isTypedArray(value)) { return false; }\n\tif (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }\n\treturn tryTypedArrays(value);\n};\n", "// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n", "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n", "// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n\n/* eslint node-core/alphabetize-errors: \"error\" */\n\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n'use strict'; // The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar codes = {}; // Lazy loaded\n\nvar assert;\nvar util;\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inherits(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n var _this;\n\n _classCallCheck(this, NodeError);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3)));\n _this.code = code;\n return _this;\n }\n\n return NodeError;\n }(Base);\n\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = require('../assert');\n assert(typeof name === 'string', \"'name' must be a string\"); // determiner: 'must be' or 'must not be'\n\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } // TODO(BridgeAR): Improve the output by showing `null` and similar.\n\n\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = require('util/');\n var inspected = util.inspect(value);\n\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (assert === undefined) assert = require('../assert');\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;", "// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _require = require('util/'),\n inspect = _require.inspect;\n\nvar _require2 = require('../errors'),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\n\n\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n\n while (count) {\n str += str;\n count--;\n }\n\n str += str.substring(0, maxCount - str.length);\n return str;\n}\n\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n}; // Comparing short primitives should just show === / !== instead of using the\n// diff.\n\nvar kMaxShortLength = 10;\n\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\n\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\n\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = ''; // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n } // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n\n\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length; // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n } // Ignore the first characters.\n\n\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n } // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n\n\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n\n var maxLines = Math.max(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n'); // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the expected line to the cache.\n\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++; // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++; // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2; // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = ''; // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n } // Inspected object to big (Show ~20 rows max)\n\n\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\n\nvar AssertionError =\n/*#__PURE__*/\nfunction (_Error) {\n _inherits(AssertionError, _Error);\n\n function AssertionError(options) {\n var _this;\n\n _classCallCheck(this, AssertionError);\n\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n\n if (message != null) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, String(message)));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n } // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n\n\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, createErrDiff(actual, expected, operator)));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n'); // In case \"actual\" is an object, it should not be reference equal.\n\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n } // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (res.length > 27) {\n res.pop();\n }\n } // Only print a single input.\n\n\n if (res.length === 1) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \" \").concat(res[0])));\n } else {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\")));\n }\n } else {\n var _res = inspectValue(actual);\n\n var other = '';\n var knownOperators = kReadableOperator[operator];\n\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(_res).concat(other)));\n }\n }\n\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n } // Create error message including the error code in the name.\n\n\n _this.stack; // Reset the name.\n\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: inspect.custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread({}, ctx, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n\n return AssertionError;\n}(_wrapNativeSuper(Error));\n\nmodule.exports = AssertionError;", "/**\n * Code refactored from Mozilla Developer Network:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n */\n\n'use strict';\n\nfunction assign(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n var to = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n continue;\n }\n\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n}\n\nfunction polyfill() {\n if (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value: assign\n });\n }\n}\n\nmodule.exports = {\n assign: assign,\n polyfill: polyfill\n};\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n", "'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n", "'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n", "'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar supportsDescriptors = origDefineProperty && hasPropertyDescriptors;\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value; // eslint-disable-line no-param-reassign\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n", "'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n", "'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "'use strict';\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n", "'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar regexFlagsSupported = /a/g.flags !== undefined;\n\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\n\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\n\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : require('is-nan');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\n\nvar _require$types = require('util/').types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\n\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n } // The maximum size for an array is 2 ** 32 -1.\n\n\n return key.length === 10 && key >= Math.pow(2, 32);\n}\n\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n} // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}\n\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3; // Check if they have the same source and flags\n\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\n\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\n\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\n\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n} // Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n } // Check more closely if val1 and val2 are equal.\n\n\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n\n return false;\n }\n\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n\n if (val1Tag !== val2Tag) {\n return false;\n }\n\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n } // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n\n\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n } // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n\n\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (_keys.length !== _keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\n\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\n\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2); // The pair must have the same number of owned properties.\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n } // Cheap key test\n\n\n var i = 0;\n\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n\n if (symbolKeysA.length !== 0) {\n var count = 0;\n\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n } // Use memos to handle cycles.\n\n\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n\n memos.position++;\n }\n\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\n\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n\n return false;\n} // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\n\n\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n\n case 'object':\n // Only pass in null as object!\n return undefined;\n\n case 'symbol':\n return false;\n\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n\n }\n\n return true;\n}\n\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\n\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n\n if (altValue != null) {\n return altValue;\n }\n\n var curB = b.get(altValue);\n\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\n\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i]; // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n } // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n\n\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null values.\n\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(val);\n }\n }\n\n if (set !== null) {\n var bValues = arrayFromSet(b);\n\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i]; // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n\n return false;\n}\n\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null\n // keys.\n\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n }\n }\n }\n\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n\n return true;\n }\n }\n } // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n\n\n for (i = 0; i < keys.length; i++) {\n var _key = keys[i];\n\n if (!innerDeepEqual(a[_key], b[_key], strict, memos)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\n\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\n\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};", "// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = require('./internal/errors'),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\n\nvar AssertionError = require('./internal/assert/assertion_error');\n\nvar _require2 = require('util/'),\n inspect = _require2.inspect;\n\nvar _require$types = require('util/').types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\n\nvar objectAssign = Object.assign ? Object.assign : require('es6-object-assign').assign;\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\n\nfunction lazyLoadComparison() {\n var comparison = require('./internal/util/comparisons');\n\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n} // Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\n\n\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\n\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\n\nvar warned = false; // The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {}; // All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\n\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n\n if (argsLen === 2) operator = '!=';\n }\n\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n\n if (message !== undefined) {\n errArgs.message = message;\n }\n\n var err = new AssertionError(errArgs);\n\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n\n throw err;\n}\n\nassert.fail = fail; // The AssertionError is defined in internal/error.\n\nassert.AssertionError = AssertionError;\n\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n} // Pure assertion tests whether a value is truthy, as determined\n// by !!value.\n\n\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\n\nassert.ok = ok; // The equality assertion tests shallow, coercive equality with ==.\n\n/* eslint-disable no-restricted-properties */\n\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n}; // The non-equality assertion tests for whether two objects are not\n// equal with !=.\n\n\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n}; // The equivalence assertion tests a deep equality relation.\n\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n}; // The non-equivalence assertion tests for any deep inequality.\n\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\n\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\n\nvar Comparison = function Comparison(obj, keys, actual) {\n var _this = this;\n\n _classCallCheck(this, Comparison);\n\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && obj[key].test(actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n};\n\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\n\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return expected.test(actual); // assert.doesNotThrow does not accept objects.\n\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n } // Handle primitives properly.\n\n\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n\n var keys = Object.keys(expected); // Special handle errors to make sure the name and the message are compared\n // as well.\n\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && expected[key].test(actual[key])) {\n return;\n }\n\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n } // Guard instanceof against arrow functions as they don't have a prototype.\n\n\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n\n try {\n fn();\n } catch (e) {\n return e;\n }\n\n return NO_EXCEPTION_SENTINEL;\n}\n\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\n\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn(); // Fail in case no promise is returned.\n\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\n\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\n\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n\n throw actual;\n}\n\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\n\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\n\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\n\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\n\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n }); // Make sure we actually have a stack trace!\n\n var origStack = err.stack;\n\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift(); // Filter all frames existing in err.stack.\n\n var tmp1 = newErr.stack.split('\\n');\n\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n\n throw newErr;\n }\n}; // Expose a strict only variant of assert\n\n\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\n\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport function NotNull(\r\n\ttarget: any,\r\n\tpropertyKey: PropertyKey,\r\n\tpropertyDescriptor?: PropertyDescriptor | number) {\r\n\t// intentionally empty\r\n}\r\n\r\nexport function Nullable(\r\n\ttarget: any,\r\n\tpropertyKey: PropertyKey,\r\n\tpropertyDescriptor?: PropertyDescriptor | number) {\r\n\t// intentionally empty\r\n}\r\n\r\nexport function Override(\r\n\ttarget: any,\r\n\tpropertyKey: PropertyKey,\r\n\tpropertyDescriptor?: PropertyDescriptor) {\r\n\t// do something with 'target' ...\r\n}\r\n\r\nexport function SuppressWarnings(options: string) {\r\n\treturn (target: any, propertyKey: PropertyKey, descriptor?: PropertyDescriptor) => {\r\n\t\t// intentionally empty\r\n\t};\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.6934376-07:00\r\n\r\nexport namespace IntStream {\r\n\t/**\r\n\t * The value returned by {@link #LA LA()} when the end of the stream is\r\n\t * reached.\r\n\t */\r\n\texport const EOF: number = -1;\r\n\r\n\t/**\r\n\t * The value returned by {@link #getSourceName} when the actual name of the\r\n\t * underlying source is not known.\r\n\t */\r\n\texport const UNKNOWN_SOURCE_NAME: string = \"\";\r\n}\r\n\r\n/**\r\n * A simple stream of symbols whose values are represented as integers. This\r\n * interface provides *marked ranges* with support for a minimum level\r\n * of buffering necessary to implement arbitrary lookahead during prediction.\r\n * For more information on marked ranges, see {@link #mark}.\r\n *\r\n * **Initializing Methods:** Some methods in this interface have\r\n * unspecified behavior if no call to an initializing method has occurred after\r\n * the stream was constructed. The following is a list of initializing methods:\r\n *\r\n * * {@link #LA}\r\n * * {@link #consume}\r\n * * {@link #size}\r\n */\r\nexport interface IntStream {\r\n\t/**\r\n\t * Consumes the current symbol in the stream. This method has the following\r\n\t * effects:\r\n\t *\r\n\t * * **Forward movement:** The value of `index`\r\n\t * before calling this method is less than the value of `index`\r\n\t * after calling this method.\r\n\t * * **Ordered lookahead:** The value of `LA(1)` before\r\n\t * calling this method becomes the value of `LA(-1)` after calling\r\n\t * this method.\r\n\t *\r\n\t * Note that calling this method does not guarantee that `index` is\r\n\t * incremented by exactly 1, as that would preclude the ability to implement\r\n\t * filtering streams (e.g. {@link CommonTokenStream} which distinguishes\r\n\t * between \"on-channel\" and \"off-channel\" tokens).\r\n\t *\r\n\t * @throws IllegalStateException if an attempt is made to consume the\r\n\t * end of the stream (i.e. if `LA(1)==`{@link #EOF EOF} before calling\r\n\t * `consume`).\r\n\t */\r\n\tconsume(): void;\r\n\r\n\t/**\r\n\t * Gets the value of the symbol at offset `i` from the current\r\n\t * position. When `i==1`, this method returns the value of the current\r\n\t * symbol in the stream (which is the next symbol to be consumed). When\r\n\t * `i==-1`, this method returns the value of the previously read\r\n\t * symbol in the stream. It is not valid to call this method with\r\n\t * `i==0`, but the specific behavior is unspecified because this\r\n\t * method is frequently called from performance-critical code.\r\n\t *\r\n\t * This method is guaranteed to succeed if any of the following are true:\r\n\t *\r\n\t * * `i>0`\r\n\t * * `i==-1` and `index` returns a value greater\r\n\t * than the value of `index` after the stream was constructed\r\n\t * and `LA(1)` was called in that order. Specifying the current\r\n\t * `index` relative to the index after the stream was created\r\n\t * allows for filtering implementations that do not return every symbol\r\n\t * from the underlying source. Specifying the call to `LA(1)`\r\n\t * allows for lazily initialized streams.\r\n\t * * `LA(i)` refers to a symbol consumed within a marked region\r\n\t * that has not yet been released.\r\n\t *\r\n\t * If `i` represents a position at or beyond the end of the stream,\r\n\t * this method returns {@link #EOF}.\r\n\t *\r\n\t * The return value is unspecified if `i<0` and fewer than `-i`\r\n\t * calls to {@link #consume consume()} have occurred from the beginning of\r\n\t * the stream before calling this method.\r\n\t *\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * retrieving the value of the specified symbol\r\n\t */\r\n\tLA(i: number): number;\r\n\r\n\t/**\r\n\t * A mark provides a guarantee that {@link #seek seek()} operations will be\r\n\t * valid over a \"marked range\" extending from the index where `mark()`\r\n\t * was called to the current `index`. This allows the use of\r\n\t * streaming input sources by specifying the minimum buffering requirements\r\n\t * to support arbitrary lookahead during prediction.\r\n\t *\r\n\t * The returned mark is an opaque handle (type `int`) which is passed\r\n\t * to {@link #release release()} when the guarantees provided by the marked\r\n\t * range are no longer necessary. When calls to\r\n\t * `mark()`/`release()` are nested, the marks must be released\r\n\t * in reverse order of which they were obtained. Since marked regions are\r\n\t * used during performance-critical sections of prediction, the specific\r\n\t * behavior of invalid usage is unspecified (i.e. a mark is not released, or\r\n\t * a mark is released twice, or marks are not released in reverse order from\r\n\t * which they were created).\r\n\t *\r\n\t * The behavior of this method is unspecified if no call to an\r\n\t * {@link IntStream initializing method} has occurred after this stream was\r\n\t * constructed.\r\n\t *\r\n\t * This method does not change the current position in the input stream.\r\n\t *\r\n\t * The following example shows the use of {@link #mark mark()},\r\n\t * {@link #release release(mark)}, `index`, and\r\n\t * {@link #seek seek(index)} as part of an operation to safely work within a\r\n\t * marked region, then restore the stream position to its original value and\r\n\t * release the mark.\r\n\t *\r\n\t * ```\r\n\t * IntStream stream = ...;\r\n\t * int index = -1;\r\n\t * int mark = stream.mark();\r\n\t * try {\r\n\t * index = stream.index;\r\n\t * // perform work here...\r\n\t * } finally {\r\n\t * if (index != -1) {\r\n\t * stream.seek(index);\r\n\t * }\r\n\t * stream.release(mark);\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @returns An opaque marker which should be passed to\r\n\t * {@link #release release()} when the marked range is no longer required.\r\n\t */\r\n\tmark(): number;\r\n\r\n\t/**\r\n\t * This method releases a marked range created by a call to\r\n\t * {@link #mark mark()}. Calls to `release()` must appear in the\r\n\t * reverse order of the corresponding calls to `mark()`. If a mark is\r\n\t * released twice, or if marks are not released in reverse order of the\r\n\t * corresponding calls to `mark()`, the behavior is unspecified.\r\n\t *\r\n\t * For more information and an example, see {@link #mark}.\r\n\t *\r\n\t * @param marker A marker returned by a call to `mark()`.\r\n\t * @see #mark\r\n\t */\r\n\trelease(marker: number): void;\r\n\r\n\t/**\r\n\t * Return the index into the stream of the input symbol referred to by\r\n\t * `LA(1)`.\r\n\t *\r\n\t * The behavior of this method is unspecified if no call to an\r\n\t * {@link IntStream initializing method} has occurred after this stream was\r\n\t * constructed.\r\n\t */\r\n\treadonly index: number;\r\n\r\n\t/**\r\n\t * Set the input cursor to the position indicated by `index`. If the\r\n\t * specified index lies past the end of the stream, the operation behaves as\r\n\t * though `index` was the index of the EOF symbol. After this method\r\n\t * returns without throwing an exception, then at least one of the following\r\n\t * will be true.\r\n\t *\r\n\t * * `index` will return the index of the first symbol\r\n\t * appearing at or after the specified `index`. Specifically,\r\n\t * implementations which filter their sources should automatically\r\n\t * adjust `index` forward the minimum amount required for the\r\n\t * operation to target a non-ignored symbol.\r\n\t * * `LA(1)` returns {@link #EOF}\r\n\t *\r\n\t * This operation is guaranteed to not throw an exception if `index`\r\n\t * lies within a marked region. For more information on marked regions, see\r\n\t * {@link #mark}. The behavior of this method is unspecified if no call to\r\n\t * an {@link IntStream initializing method} has occurred after this stream\r\n\t * was constructed.\r\n\t *\r\n\t * @param index The absolute index to seek to.\r\n\t *\r\n\t * @throws IllegalArgumentException if `index` is less than 0\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * seeking to the specified index\r\n\t */\r\n\tseek(index: number): void;\r\n\r\n\t/**\r\n\t * Returns the total number of symbols in the stream, including a single EOF\r\n\t * symbol.\r\n\t *\r\n\t * @throws UnsupportedOperationException if the size of the stream is\r\n\t * unknown.\r\n\t */\r\n\treadonly size: number;\r\n\r\n\t/**\r\n\t * Gets the name of the underlying symbol source. This method returns a\r\n\t * non-undefined, non-empty string. If such a name is not known, this method\r\n\t * returns {@link #UNKNOWN_SOURCE_NAME}.\r\n\t */\r\n\t//@NotNull\r\n\treadonly sourceName: string;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n// ConvertTo-TS run at 2016-10-04T11:26:49.0828748-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Arrays } from \"./misc/Arrays\";\r\nimport { Override } from \"./Decorators\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\n\r\nconst READ_BUFFER_SIZE: number = 1024;\r\nconst INITIAL_BUFFER_SIZE: number = 1024;\r\n\r\n/**\r\n * Vacuum all input from a {@link Reader}/{@link InputStream} and then treat it\r\n * like a `char[]` buffer. Can also pass in a {@link String} or\r\n * `char[]` to use.\r\n *\r\n * If you need encoding, pass in stream/reader with correct encoding.\r\n *\r\n * @deprecated as of 4.7, please use `CharStreams` interface.\r\n */\r\nexport class ANTLRInputStream implements CharStream {\r\n\t/** The data being scanned */\r\n\tprotected data: string;\r\n\r\n\t/** How many characters are actually in the buffer */\r\n\tprotected n: number;\r\n\r\n\t/** 0..n-1 index into string of next char */\r\n\tprotected p: number = 0;\r\n\r\n\t/** What is name or source of this char stream? */\r\n\tpublic name?: string;\r\n\r\n\t/** Copy data in string to a local char array */\r\n\tconstructor(input: string) {\r\n\t\tthis.data = input;\r\n\t\tthis.n = input.length;\r\n\t}\r\n\r\n\t/** Reset the stream so that it's in the same state it was\r\n\t * when the object was created *except* the data array is not\r\n\t * touched.\r\n\t */\r\n\tpublic reset(): void {\r\n\t\tthis.p = 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic consume(): void {\r\n\t\tif (this.p >= this.n) {\r\n\t\t\tassert(this.LA(1) === IntStream.EOF);\r\n\t\t\tthrow new Error(\"cannot consume EOF\");\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"prev p=\"+p+\", c=\"+(char)data[p]);\r\n\t\tif (this.p < this.n) {\r\n\t\t\tthis.p++;\r\n\t\t\t//System.out.println(\"p moves to \"+p+\" (c='\"+(char)data[p]+\"')\");\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic LA(i: number): number {\r\n\t\tif (i === 0) {\r\n\t\t\treturn 0; // undefined\r\n\t\t}\r\n\t\tif (i < 0) {\r\n\t\t\ti++; // e.g., translate LA(-1) to use offset i=0; then data[p+0-1]\r\n\t\t\tif ((this.p + i - 1) < 0) {\r\n\t\t\t\treturn IntStream.EOF; // invalid; no char before first char\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((this.p + i - 1) >= this.n) {\r\n\t\t\t//System.out.println(\"char LA(\"+i+\")=EOF; p=\"+p);\r\n\t\t\treturn IntStream.EOF;\r\n\t\t}\r\n\t\t//System.out.println(\"char LA(\"+i+\")=\"+(char)data[p+i-1]+\"; p=\"+p);\r\n\t\t//System.out.println(\"LA(\"+i+\"); p=\"+p+\" n=\"+n+\" data.length=\"+data.length);\r\n\t\treturn this.data.charCodeAt(this.p + i - 1);\r\n\t}\r\n\r\n\tpublic LT(i: number): number {\r\n\t\treturn this.LA(i);\r\n\t}\r\n\r\n\t/** Return the current input symbol index 0..n where n indicates the\r\n\t * last symbol has been read. The index is the index of char to\r\n\t * be returned from LA(1).\r\n\t */\r\n\t@Override\r\n\tget index(): number {\r\n\t\treturn this.p;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.n;\r\n\t}\r\n\r\n\t/** mark/release do nothing; we have entire buffer */\r\n\t@Override\r\n\tpublic mark(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic release(marker: number): void {\r\n\t\t// No default implementation since this stream buffers the entire input\r\n\t}\r\n\r\n\t/** consume() ahead until p==index; can't just set p=index as we must\r\n\t * update line and charPositionInLine. If we seek backwards, just set p\r\n\t */\r\n\t@Override\r\n\tpublic seek(index: number): void {\r\n\t\tif (index <= this.p) {\r\n\t\t\tthis.p = index; // just jump; don't update stream state (line, ...)\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// seek forward, consume until p hits index or n (whichever comes first)\r\n\t\tindex = Math.min(index, this.n);\r\n\t\twhile (this.p < index) {\r\n\t\t\tthis.consume();\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getText(interval: Interval): string {\r\n\t\tlet start: number = interval.a;\r\n\t\tlet stop: number = interval.b;\r\n\t\tif (stop >= this.n) {\r\n\t\t\tstop = this.n - 1;\r\n\t\t}\r\n\t\tlet count: number = stop - start + 1;\r\n\t\tif (start >= this.n) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t// System.err.println(\"data: \"+Arrays.toString(data)+\", n=\"+n+\r\n\t\t// \t\t\t\t \", start=\"+start+\r\n\t\t// \t\t\t\t \", stop=\"+stop);\r\n\t\treturn this.data.substr(start, count);\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\tif (!this.name) {\r\n\t\t\treturn IntStream.UNKNOWN_SOURCE_NAME;\r\n\t\t}\r\n\t\treturn this.name;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString() { return this.data; }\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.4734328-07:00\r\n\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\n\r\nconst INITIAL_NUM_TRANSITIONS: number = 4;\r\n\r\n/**\r\n * The following images show the relation of states and\r\n * {@link ATNState#transitions} for various grammar constructs.\r\n *\r\n * * Solid edges marked with an ε indicate a required\r\n * {@link EpsilonTransition}.\r\n *\r\n * * Dashed edges indicate locations where any transition derived from\r\n * {@link Transition} might appear.\r\n *\r\n * * Dashed nodes are place holders for either a sequence of linked\r\n * {@link BasicState} states or the inclusion of a block representing a nested\r\n * construct in one of the forms below.\r\n *\r\n * * Nodes showing multiple outgoing alternatives with a `...` support\r\n * any number of alternatives (one or more). Nodes without the `...` only\r\n * support the exact number of alternatives shown in the diagram.\r\n *\r\n *

Basic Blocks

\r\n *\r\n *

Rule

\r\n *\r\n * \r\n *\r\n *

Block of 1 or more alternatives

\r\n *\r\n * \r\n *\r\n *

Greedy Loops

\r\n *\r\n *

Greedy Closure: `(...)*`

\r\n *\r\n * \r\n *\r\n *

Greedy Positive Closure: `(...)+`

\r\n *\r\n * \r\n *\r\n *

Greedy Optional: `(...)?`

\r\n *\r\n * \r\n *\r\n *

Non-Greedy Loops

\r\n *\r\n *

Non-Greedy Closure: `(...)*?`

\r\n *\r\n * \r\n *\r\n *

Non-Greedy Positive Closure: `(...)+?`

\r\n *\r\n * \r\n *\r\n *

Non-Greedy Optional: `(...)??`

\r\n *\r\n * \r\n */\r\nexport abstract class ATNState {\r\n\r\n\t/** Which ATN are we in? */\r\n\tpublic atn?: ATN;\r\n\r\n\tpublic stateNumber: number = ATNState.INVALID_STATE_NUMBER;\r\n\r\n\tpublic ruleIndex: number = 0; // at runtime, we don't have Rule objects\r\n\r\n\tpublic epsilonOnlyTransitions: boolean = false;\r\n\r\n\t/** Track the transitions emanating from this ATN state. */\r\n\tprotected transitions: Transition[] = [];\r\n\r\n\tprotected optimizedTransitions: Transition[] = this.transitions;\r\n\r\n\t/** Used to cache lookahead during parsing, not used during construction */\r\n\tpublic nextTokenWithinRule?: IntervalSet;\r\n\r\n\t/**\r\n\t * Gets the state number.\r\n\t *\r\n\t * @returns the state number\r\n\t */\r\n\tpublic getStateNumber(): number {\r\n\t\treturn this.stateNumber;\r\n\t}\r\n\r\n\t/**\r\n\t * For all states except {@link RuleStopState}, this returns the state\r\n\t * number. Returns -1 for stop states.\r\n\t *\r\n\t * @returns -1 for {@link RuleStopState}, otherwise the state number\r\n\t */\r\n\tget nonStopStateNumber(): number {\r\n\t\treturn this.getStateNumber();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.stateNumber;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\t// are these states same object?\r\n\t\tif (o instanceof ATNState) {\r\n\t\t\treturn this.stateNumber === o.stateNumber;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget isNonGreedyExitState(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn String(this.stateNumber);\r\n\t}\r\n\r\n\tpublic getTransitions(): Transition[] {\r\n\t\treturn this.transitions.slice(0);\r\n\t}\r\n\r\n\tget numberOfTransitions(): number {\r\n\t\treturn this.transitions.length;\r\n\t}\r\n\r\n\tpublic addTransition(e: Transition, index?: number): void {\r\n\t\tif (this.transitions.length === 0) {\r\n\t\t\tthis.epsilonOnlyTransitions = e.isEpsilon;\r\n\t\t}\r\n\t\telse if (this.epsilonOnlyTransitions !== e.isEpsilon) {\r\n\t\t\tthis.epsilonOnlyTransitions = false;\r\n\t\t\tthrow new Error(\"ATN state \" + this.stateNumber + \" has both epsilon and non-epsilon transitions.\");\r\n\t\t}\r\n\r\n\t\tthis.transitions.splice(index !== undefined ? index : this.transitions.length, 0, e);\r\n\t}\r\n\r\n\tpublic transition(i: number): Transition {\r\n\t\treturn this.transitions[i];\r\n\t}\r\n\r\n\tpublic setTransition(i: number, e: Transition): void {\r\n\t\tthis.transitions[i] = e;\r\n\t}\r\n\r\n\tpublic removeTransition(index: number): Transition {\r\n\t\treturn this.transitions.splice(index, 1)[0];\r\n\t}\r\n\r\n\tpublic abstract readonly stateType: ATNStateType;\r\n\r\n\tget onlyHasEpsilonTransitions(): boolean {\r\n\t\treturn this.epsilonOnlyTransitions;\r\n\t}\r\n\r\n\tpublic setRuleIndex(ruleIndex: number): void {\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\tget isOptimized(): boolean {\r\n\t\treturn this.optimizedTransitions !== this.transitions;\r\n\t}\r\n\r\n\tget numberOfOptimizedTransitions(): number {\r\n\t\treturn this.optimizedTransitions.length;\r\n\t}\r\n\r\n\tpublic getOptimizedTransition(i: number): Transition {\r\n\t\treturn this.optimizedTransitions[i];\r\n\t}\r\n\r\n\tpublic addOptimizedTransition(e: Transition): void {\r\n\t\tif (!this.isOptimized) {\r\n\t\t\tthis.optimizedTransitions = new Array();\r\n\t\t}\r\n\r\n\t\tthis.optimizedTransitions.push(e);\r\n\t}\r\n\r\n\tpublic setOptimizedTransition(i: number, e: Transition): void {\r\n\t\tif (!this.isOptimized) {\r\n\t\t\tthrow new Error(\"This ATNState is not optimized.\");\r\n\t\t}\r\n\r\n\t\tthis.optimizedTransitions[i] = e;\r\n\t}\r\n\r\n\tpublic removeOptimizedTransition(i: number): void {\r\n\t\tif (!this.isOptimized) {\r\n\t\t\tthrow new Error(\"This ATNState is not optimized.\");\r\n\t\t}\r\n\r\n\t\tthis.optimizedTransitions.splice(i, 1);\r\n\t}\r\n}\r\n\r\nexport namespace ATNState {\r\n\texport const INVALID_STATE_NUMBER: number = -1;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.4734328-07:00\r\n\r\nexport enum ATNStateType {\r\n\tINVALID_TYPE = 0,\r\n\tBASIC = 1,\r\n\tRULE_START = 2,\r\n\tBLOCK_START = 3,\r\n\tPLUS_BLOCK_START = 4,\r\n\tSTAR_BLOCK_START = 5,\r\n\tTOKEN_START = 6,\r\n\tRULE_STOP = 7,\r\n\tBLOCK_END = 8,\r\n\tSTAR_LOOP_BACK = 9,\r\n\tSTAR_LOOP_ENTRY = 10,\r\n\tPLUS_LOOP_BACK = 11,\r\n\tLOOP_END = 12,\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.0697674-07:00\r\nimport { CharStream } from \"./CharStream\";\r\nimport { IntervalSet } from \"./misc/IntervalSet\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { Token } from \"./Token\";\r\n\r\n\r\n/** The root of the ANTLR exception hierarchy. In general, ANTLR tracks just\r\n * 3 kinds of errors: prediction errors, failed predicate errors, and\r\n * mismatched input errors. In each case, the parser knows where it is\r\n * in the input, where it is in the ATN, the rule invocation stack,\r\n * and what kind of problem occurred.\r\n */\r\nexport class RecognitionException extends Error {\r\n\t// private static serialVersionUID: number = -3861826954750022374L;\r\n\r\n\t/** The {@link Recognizer} where this exception originated. */\r\n\tprivate _recognizer?: Recognizer;\r\n\r\n\tprivate ctx?: RuleContext;\r\n\r\n\tprivate input?: IntStream;\r\n\r\n\t/**\r\n\t * The current {@link Token} when an error occurred. Since not all streams\r\n\t * support accessing symbols by index, we have to track the {@link Token}\r\n\t * instance itself.\r\n\t */\r\n\tprivate offendingToken?: Token;\r\n\r\n\tprivate _offendingState: number = -1;\r\n\r\n\tconstructor(\r\n\t\tlexer: Lexer | undefined,\r\n\t\tinput: CharStream);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Recognizer | undefined,\r\n\t\tinput: IntStream | undefined,\r\n\t\tctx: ParserRuleContext | undefined);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Recognizer | undefined,\r\n\t\tinput: IntStream | undefined,\r\n\t\tctx: ParserRuleContext | undefined,\r\n\t\tmessage: string);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Lexer | Recognizer | undefined,\r\n\t\tinput: CharStream | IntStream | undefined,\r\n\t\tctx?: ParserRuleContext,\r\n\t\tmessage?: string) {\r\n\t\tsuper(message);\r\n\r\n\t\tthis._recognizer = recognizer;\r\n\t\tthis.input = input;\r\n\t\tthis.ctx = ctx;\r\n\t\tif (recognizer) {\r\n\t\t\tthis._offendingState = recognizer.state;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the ATN state number the parser was in at the time the error\r\n\t * occurred. For {@link NoViableAltException} and\r\n\t * {@link LexerNoViableAltException} exceptions, this is the\r\n\t * {@link DecisionState} number. For others, it is the state whose outgoing\r\n\t * edge we couldn't match.\r\n\t *\r\n\t * If the state number is not known, this method returns -1.\r\n\t */\r\n\tget offendingState(): number {\r\n\t\treturn this._offendingState;\r\n\t}\r\n\r\n\tprotected setOffendingState(offendingState: number): void {\r\n\t\tthis._offendingState = offendingState;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the set of input symbols which could potentially follow the\r\n\t * previously matched symbol at the time this exception was thrown.\r\n\t *\r\n\t * If the set of expected tokens is not known and could not be computed,\r\n\t * this method returns `undefined`.\r\n\t *\r\n\t * @returns The set of token types that could potentially follow the current\r\n\t * state in the ATN, or `undefined` if the information is not available.\r\n\t */\r\n\tget expectedTokens(): IntervalSet | undefined {\r\n\t\tif (this._recognizer) {\r\n\t\t\treturn this._recognizer.atn.getExpectedTokens(this._offendingState, this.ctx);\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the {@link RuleContext} at the time this exception was thrown.\r\n\t *\r\n\t * If the context is not available, this method returns `undefined`.\r\n\t *\r\n\t * @returns The {@link RuleContext} at the time this exception was thrown.\r\n\t * If the context is not available, this method returns `undefined`.\r\n\t */\r\n\tget context(): RuleContext | undefined {\r\n\t\treturn this.ctx;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the input stream which is the symbol source for the recognizer where\r\n\t * this exception was thrown.\r\n\t *\r\n\t * If the input stream is not available, this method returns `undefined`.\r\n\t *\r\n\t * @returns The input stream which is the symbol source for the recognizer\r\n\t * where this exception was thrown, or `undefined` if the stream is not\r\n\t * available.\r\n\t */\r\n\r\n\tget inputStream(): IntStream | undefined {\r\n\t\treturn this.input;\r\n\t}\r\n\r\n\tpublic getOffendingToken(recognizer?: Recognizer): Token | undefined {\r\n\t\tif (recognizer && recognizer !== this._recognizer) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\treturn this.offendingToken;\r\n\t}\r\n\r\n\tprotected setOffendingToken(\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingToken?: TSymbol): void {\r\n\t\tif (recognizer === this._recognizer) {\r\n\t\t\tthis.offendingToken = offendingToken;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the {@link Recognizer} where this exception occurred.\r\n\t *\r\n\t * If the recognizer is not available, this method returns `undefined`.\r\n\t *\r\n\t * @returns The recognizer where this exception occurred, or `undefined` if\r\n\t * the recognizer is not available.\r\n\t */\r\n\tget recognizer(): Recognizer | undefined {\r\n\t\treturn this._recognizer;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.8530496-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** An ATN transition between any two ATN states. Subclasses define\r\n * atom, set, epsilon, action, predicate, rule transitions.\r\n *\r\n * This is a one way link. It emanates from a state (usually via a list of\r\n * transitions) and has a target state.\r\n *\r\n * Since we never have to change the ATN transitions once we construct it,\r\n * we can fix these transitions as specific classes. The DFA transitions\r\n * on the other hand need to update the labels as it adds transitions to\r\n * the states. We'll use the term Edge for the DFA to distinguish them from\r\n * ATN transitions.\r\n */\r\nexport abstract class Transition {\r\n\tpublic static readonly serializationNames: string[] = [\r\n\t\t\"INVALID\",\r\n\t\t\"EPSILON\",\r\n\t\t\"RANGE\",\r\n\t\t\"RULE\",\r\n\t\t\"PREDICATE\",\r\n\t\t\"ATOM\",\r\n\t\t\"ACTION\",\r\n\t\t\"SET\",\r\n\t\t\"NOT_SET\",\r\n\t\t\"WILDCARD\",\r\n\t\t\"PRECEDENCE\",\r\n\t];\r\n\r\n\t// @SuppressWarnings(\"serial\")\r\n\t// static serializationTypes: Map, number> =\r\n\t// \tCollections.unmodifiableMap(new HashMap, Integer>() {{\r\n\t// \t\tput(EpsilonTransition.class, EPSILON);\r\n\t// \t\tput(RangeTransition.class, RANGE);\r\n\t// \t\tput(RuleTransition.class, RULE);\r\n\t// \t\tput(PredicateTransition.class, PREDICATE);\r\n\t// \t\tput(AtomTransition.class, ATOM);\r\n\t// \t\tput(ActionTransition.class, ACTION);\r\n\t// \t\tput(SetTransition.class, SET);\r\n\t// \t\tput(NotSetTransition.class, NOT_SET);\r\n\t// \t\tput(WildcardTransition.class, WILDCARD);\r\n\t// \t\tput(PrecedencePredicateTransition.class, PRECEDENCE);\r\n\t// \t}});\r\n\r\n\t/** The target of this transition. */\r\n\t@NotNull\r\n\tpublic target: ATNState;\r\n\r\n\tconstructor(@NotNull target: ATNState) {\r\n\t\tif (target == null) {\r\n\t\t\tthrow new Error(\"target cannot be null.\");\r\n\t\t}\r\n\r\n\t\tthis.target = target;\r\n\t}\r\n\r\n\tpublic abstract readonly serializationType: TransitionType;\r\n\r\n\t/**\r\n\t * Determines if the transition is an \"epsilon\" transition.\r\n\t *\r\n\t * The default implementation returns `false`.\r\n\t *\r\n\t * @returns `true` if traversing this transition in the ATN does not\r\n\t * consume an input symbol; otherwise, `false` if traversing this\r\n\t * transition consumes (matches) an input symbol.\r\n\t */\r\n\tget isEpsilon(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget label(): IntervalSet | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic abstract matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:24.6596177-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Transition } from \"./Transition\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport abstract class AbstractPredicateTransition extends Transition {\r\n\r\n\tconstructor(target: ATNState) {\r\n\t\tsuper(target);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:42.1239660-07:00\r\nimport { Equatable } from \"./Stubs\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport namespace MurmurHash {\r\n\r\n\tconst DEFAULT_SEED: number = 0;\r\n\r\n\t/**\r\n\t * Initialize the hash using the specified `seed`.\r\n\t *\r\n\t * @param seed the seed (optional)\r\n\t * @returns the intermediate hash value\r\n\t */\r\n\texport function initialize(seed: number = DEFAULT_SEED): number {\r\n\t\treturn seed;\r\n\t}\r\n\r\n\t/**\r\n\t * Update the intermediate hash value for the next input `value`.\r\n\t *\r\n\t * @param hash the intermediate hash value\r\n\t * @param value the value to add to the current hash\r\n\t * @returns the updated intermediate hash value\r\n\t */\r\n\texport function update(hash: number, value: number | string | Equatable | null | undefined): number {\r\n\t\tconst c1: number = 0xCC9E2D51;\r\n\t\tconst c2: number = 0x1B873593;\r\n\t\tconst r1: number = 15;\r\n\t\tconst r2: number = 13;\r\n\t\tconst m: number = 5;\r\n\t\tconst n: number = 0xE6546B64;\r\n\r\n\t\tif (value == null) {\r\n\t\t\tvalue = 0;\r\n\t\t} else if (typeof value === \"string\") {\r\n\t\t\tvalue = hashString(value);\r\n\t\t} else if (typeof value === \"object\") {\r\n\t\t\tvalue = value.hashCode();\r\n\t\t}\r\n\r\n\t\tlet k: number = value;\r\n\t\tk = Math.imul(k, c1);\r\n\t\tk = (k << r1) | (k >>> (32 - r1));\r\n\t\tk = Math.imul(k, c2);\r\n\r\n\t\thash = hash ^ k;\r\n\t\thash = (hash << r2) | (hash >>> (32 - r2));\r\n\t\thash = Math.imul(hash, m) + n;\r\n\r\n\t\treturn hash & 0xFFFFFFFF;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Apply the final computation steps to the intermediate value `hash`\r\n\t * to form the final result of the MurmurHash 3 hash function.\r\n\t *\r\n\t * @param hash the intermediate hash value\r\n\t * @param numberOfWords the number of integer values added to the hash\r\n\t * @returns the final hash result\r\n\t */\r\n\texport function finish(hash: number, numberOfWords: number): number {\r\n\t\thash = hash ^ (numberOfWords * 4);\r\n\t\thash = hash ^ (hash >>> 16);\r\n\t\thash = Math.imul(hash, 0x85EBCA6B);\r\n\t\thash = hash ^ (hash >>> 13);\r\n\t\thash = Math.imul(hash, 0xC2B2AE35);\r\n\t\thash = hash ^ (hash >>> 16);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Utility function to compute the hash code of an array using the\r\n\t * MurmurHash algorithm.\r\n\t *\r\n\t * @param the array element type\r\n\t * @param data the array data\r\n\t * @param seed the seed for the MurmurHash algorithm\r\n\t * @returns the hash code of the data\r\n\t */\r\n\texport function hashCode(data: Iterable, seed: number = DEFAULT_SEED): number {\r\n\t\tlet hash: number = initialize(seed);\r\n\t\tlet length = 0;\r\n\t\tfor (let value of data) {\r\n\t\t\thash = update(hash, value);\r\n\t\t\tlength++;\r\n\t\t}\r\n\r\n\t\thash = finish(hash, length);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Function to hash a string. Based on the implementation found here:\r\n\t * http://stackoverflow.com/a/7616484\r\n\t */\r\n\tfunction hashString(str: string): number {\r\n\t\tlet len = str.length;\r\n\t\tif (len === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tlet hash = 0;\r\n\t\tfor (let i = 0; i < len; i++) {\r\n\t\t\tlet c = str.charCodeAt(i);\r\n\t\t\thash = (((hash << 5) >>> 0) - hash) + c;\r\n\t\t\thash |= 0;\r\n\t\t}\r\n\r\n\t\treturn hash;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:42.2127260-07:00\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\n\r\n/**\r\n * This default implementation of {@link EqualityComparator} uses object equality\r\n * for comparisons by calling {@link Object#hashCode} and {@link Object#equals}.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ObjectEqualityComparator implements EqualityComparator {\r\n\tpublic static readonly INSTANCE: ObjectEqualityComparator = new ObjectEqualityComparator();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation returns\r\n\t * `obj.`{@link Object#hashCode hashCode()}.\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(obj: Equatable | null | undefined): number {\r\n\t\tif (obj == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn obj.hashCode();\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation relies on object equality. If both objects are\r\n\t * `undefined` or `null`, this method returns `true`. Otherwise if only\r\n\t * `a` is `undefined` or `null`, this method returns `false`. Otherwise,\r\n\t * this method returns the result of\r\n\t * `a.`{@link Object#equals equals}`(b)`.\r\n\t */\r\n\t@Override\r\n\tpublic equals(a: Equatable | null | undefined, b: Equatable | null | undefined): boolean {\r\n\t\tif (a == null) {\r\n\t\t\treturn b == null;\r\n\t\t}\r\n\r\n\t\treturn a.equals(b);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\nimport { ObjectEqualityComparator } from \"./ObjectEqualityComparator\";\r\n\r\n/**\r\n * This default implementation of {@link EqualityComparator} uses object equality\r\n * for comparisons by calling {@link Object#hashCode} and {@link Object#equals}.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class DefaultEqualityComparator implements EqualityComparator {\r\n\tpublic static readonly INSTANCE: DefaultEqualityComparator = new DefaultEqualityComparator();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation returns\r\n\t * `obj.`{@link Object#hashCode hashCode()}.\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(obj: any): number {\r\n\t\tif (obj == null) {\r\n\t\t\treturn 0;\r\n\t\t} else if (typeof obj === \"string\" || typeof obj === \"number\") {\r\n\t\t\treturn MurmurHash.hashCode([obj]);\r\n\t\t} else {\r\n\t\t\treturn ObjectEqualityComparator.INSTANCE.hashCode(obj as Equatable);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation relies on object equality. If both objects are\r\n\t * `undefined` or `null`, this method returns `true`. Otherwise if only\r\n\t * `a` is `undefined` or `null`, this method returns `false`. Otherwise,\r\n\t * this method returns the result of\r\n\t * `a.`{@link Object#equals equals}`(b)`.\r\n\t */\r\n\t@Override\r\n\tpublic equals(a: any, b: any): boolean {\r\n\t\tif (a == null) {\r\n\t\t\treturn b == null;\r\n\t\t} else if (typeof a === \"string\" || typeof a === \"number\") {\r\n\t\t\treturn a === b;\r\n\t\t} else {\r\n\t\t\treturn ObjectEqualityComparator.INSTANCE.equals(a as Equatable, b as Equatable);\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:41.7434086-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport { DefaultEqualityComparator } from \"./DefaultEqualityComparator\";\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { NotNull, Nullable, Override, SuppressWarnings } from \"../Decorators\";\r\nimport { JavaCollection, JavaSet } from \"./Stubs\";\r\nimport { ObjectEqualityComparator } from \"./ObjectEqualityComparator\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\n\r\n/** {@link Set} implementation with closed hashing (open addressing). */\r\n\r\n// NOTE: JavaScript's Set interface has on significant different diffrence from Java's:\r\n// \t\t e.g. the return type of add() differs!\r\n// For this reason I've commented tweaked the implements clause\r\n\r\nconst INITAL_CAPACITY: number = 16; // must be power of 2\r\nconst LOAD_FACTOR: number = 0.75;\r\n\r\nexport class Array2DHashSet implements JavaSet {\r\n\t@NotNull\r\n\tprotected comparator: EqualityComparator;\r\n\r\n\tprotected buckets: Array;\r\n\r\n\t/** How many elements in set */\r\n\tprotected n: number = 0;\r\n\r\n\tprotected threshold: number = Math.floor(INITAL_CAPACITY * LOAD_FACTOR); // when to expand\r\n\r\n\tconstructor(comparator?: EqualityComparator, initialCapacity?: number);\r\n\tconstructor(set: Array2DHashSet);\r\n\tconstructor(\r\n\t\tcomparatorOrSet?: EqualityComparator | Array2DHashSet,\r\n\t\tinitialCapacity: number = INITAL_CAPACITY) {\r\n\r\n\t\tif (comparatorOrSet instanceof Array2DHashSet) {\r\n\t\t\tthis.comparator = comparatorOrSet.comparator;\r\n\t\t\tthis.buckets = comparatorOrSet.buckets.slice(0);\r\n\t\t\tfor (let i = 0; i < this.buckets.length; i++) {\r\n\t\t\t\tlet bucket = this.buckets[i];\r\n\t\t\t\tif (bucket) {\r\n\t\t\t\t\tthis.buckets[i] = bucket.slice(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.n = comparatorOrSet.n;\r\n\t\t\tthis.threshold = comparatorOrSet.threshold;\r\n\t\t} else {\r\n\t\t\tthis.comparator = comparatorOrSet || DefaultEqualityComparator.INSTANCE;\r\n\t\t\tthis.buckets = this.createBuckets(initialCapacity);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Add `o` to set if not there; return existing value if already\r\n\t * there. This method performs the same operation as {@link #add} aside from\r\n\t * the return value.\r\n\t */\r\n\tpublic getOrAdd(o: T): T {\r\n\t\tif (this.n > this.threshold) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\t\treturn this.getOrAddImpl(o);\r\n\t}\r\n\r\n\tprotected getOrAddImpl(o: T): T {\r\n\t\tlet b: number = this.getBucket(o);\r\n\t\tlet bucket = this.buckets[b];\r\n\r\n\t\t// NEW BUCKET\r\n\t\tif (!bucket) {\r\n\t\t\tbucket = [o];\r\n\t\t\tthis.buckets[b] = bucket;\r\n\t\t\tthis.n++;\r\n\t\t\treturn o;\r\n\t\t}\r\n\r\n\t\t// LOOK FOR IT IN BUCKET\r\n\t\tfor (let existing of bucket) {\r\n\t\t\tif (this.comparator.equals(existing, o)) {\r\n\t\t\t\treturn existing; // found existing, quit\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// FULL BUCKET, expand and add to end\r\n\t\tbucket.push(o);\r\n\t\tthis.n++;\r\n\t\treturn o;\r\n\t}\r\n\r\n\tpublic get(o: T): T | undefined {\r\n\t\tif (o == null) {\r\n\t\t\treturn o;\r\n\t\t}\r\n\t\tlet b: number = this.getBucket(o);\r\n\t\tlet bucket = this.buckets[b];\r\n\t\tif (!bucket) {\r\n\t\t\t// no bucket\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tfor (let e of bucket) {\r\n\t\t\tif (this.comparator.equals(e, o)) {\r\n\t\t\t\treturn e;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tprotected getBucket(o: T): number {\r\n\t\tlet hash: number = this.comparator.hashCode(o);\r\n\t\tlet b: number = hash & (this.buckets.length - 1); // assumes len is power of 2\r\n\t\treturn b;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\thash = MurmurHash.update(hash, this.comparator.hashCode(o));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thash = MurmurHash.finish(hash, this.size);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (!(o instanceof Array2DHashSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (o.size !== this.size) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tlet same: boolean = this.containsAll(o);\r\n\t\treturn same;\r\n\t}\r\n\r\n\tprotected expand(): void {\r\n\t\tlet old = this.buckets;\r\n\t\tlet newCapacity: number = this.buckets.length * 2;\r\n\t\tlet newTable: Array = this.createBuckets(newCapacity);\r\n\t\tthis.buckets = newTable;\r\n\t\tthis.threshold = Math.floor(newCapacity * LOAD_FACTOR);\r\n//\t\tSystem.out.println(\"new size=\"+newCapacity+\", thres=\"+threshold);\r\n\t\t// rehash all existing entries\r\n\t\tlet oldSize: number = this.size;\r\n\t\tfor (let bucket of old) {\r\n\t\t\tif (!bucket) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tlet b: number = this.getBucket(o);\r\n\t\t\t\tlet newBucket: T[] | undefined = this.buckets[b];\r\n\t\t\t\tif (!newBucket) {\r\n\t\t\t\t\tnewBucket = [];\r\n\t\t\t\t\tthis.buckets[b] = newBucket;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnewBucket.push(o);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tassert(this.n === oldSize);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic add(t: T): boolean {\r\n\t\tlet existing: T = this.getOrAdd(t);\r\n\t\treturn existing === t;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.n;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.n === 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic contains(o: any): boolean {\r\n\t\treturn this.containsFast(this.asElementType(o));\r\n\t}\r\n\r\n\tpublic containsFast(@Nullable obj: T): boolean {\r\n\t\tif (obj == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.get(obj) != null;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic *[Symbol.iterator](): IterableIterator {\r\n\t\tyield* this.toArray();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toArray(): T[] {\r\n\t\tconst a = new Array(this.size);\r\n\r\n\t\t// Copy elements from the nested arrays into the destination array\r\n\t\tlet i: number = 0; // Position within destination array\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\ta[i++] = o;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn a;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic containsAll(collection: JavaCollection): boolean {\r\n\t\tif (collection instanceof Array2DHashSet) {\r\n\t\t\tlet s = collection as any as Array2DHashSet;\r\n\t\t\tfor (let bucket of s.buckets) {\r\n\t\t\t\tif (bucket == null) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfor (let o of bucket) {\r\n\t\t\t\t\tif (o == null) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!this.containsFast(this.asElementType(o))) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (let o of collection) {\r\n\t\t\t\tif (!this.containsFast(this.asElementType(o))) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic addAll(c: Iterable): boolean {\r\n\t\tlet changed: boolean = false;\r\n\r\n\t\tfor (let o of c) {\r\n\t\t\tlet existing: T = this.getOrAdd(o);\r\n\t\t\tif (existing !== o) {\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clear(): void {\r\n\t\tthis.buckets = this.createBuckets(INITAL_CAPACITY);\r\n\t\tthis.n = 0;\r\n\t\tthis.threshold = Math.floor(INITAL_CAPACITY * LOAD_FACTOR);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (this.size === 0) {\r\n\t\t\treturn \"{}\";\r\n\t\t}\r\n\r\n\t\tlet buf = \"{\";\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (first) {\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += \", \";\r\n\t\t\t\t}\r\n\t\t\t\tbuf += o.toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\tbuf += \"}\";\r\n\t\treturn buf;\r\n\t}\r\n\r\n\tpublic toTableString(): string {\r\n\t\tlet buf = \"\";\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tbuf += \"null\\n\";\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tbuf += \"[\";\r\n\t\t\tlet first: boolean = true;\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (first) {\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbuf += \"_\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += o.toString();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbuf += \"]\\n\";\r\n\t\t}\r\n\t\treturn buf;\r\n\t}\r\n\r\n\t/**\r\n\t * Return `o` as an instance of the element type `T`. If\r\n\t * `o` is non-undefined but known to not be an instance of `T`, this\r\n\t * method returns `undefined`. The base implementation does not perform any\r\n\t * type checks; override this method to provide strong type checks for the\r\n\t * {@link #contains} and {@link #remove} methods to ensure the arguments to\r\n\t * the {@link EqualityComparator} for the set always have the expected\r\n\t * types.\r\n\t *\r\n\t * @param o the object to try and cast to the element type of the set\r\n\t * @returns `o` if it could be an instance of `T`, otherwise\r\n\t * `undefined`.\r\n\t */\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tprotected asElementType(o: any): T {\r\n\t\treturn o as T;\r\n\t}\r\n\r\n\t/**\r\n\t * Return an array of `T[]` with length `capacity`.\r\n\t *\r\n\t * @param capacity the length of the array to return\r\n\t * @returns the newly constructed array\r\n\t */\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tprotected createBuckets(capacity: number): Array {\r\n\t\treturn new Array(capacity);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:42.2127260-07:00\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\nimport { ObjectEqualityComparator } from \"./ObjectEqualityComparator\";\r\n\r\n/**\r\n * This default implementation of {@link EqualityComparator} uses object equality\r\n * for comparisons by calling {@link Object#hashCode} and {@link Object#equals}.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ArrayEqualityComparator implements EqualityComparator {\r\n\tpublic static readonly INSTANCE: ArrayEqualityComparator = new ArrayEqualityComparator();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation returns\r\n\t * `obj.`{@link Object#hashCode hashCode()}.\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(obj: Equatable[]): number {\r\n\t\tif (obj == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn MurmurHash.hashCode(obj, 0);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation relies on object equality. If both objects are\r\n\t * `undefined`, this method returns `true`. Otherwise if only\r\n\t * `a` is `undefined`, this method returns `false`. Otherwise,\r\n\t * this method returns the result of\r\n\t * `a.`{@link Object#equals equals}`(b)`.\r\n\t */\r\n\t@Override\r\n\tpublic equals(a: Equatable[], b: Equatable[]): boolean {\r\n\t\tif (a == null) {\r\n\t\t\treturn b == null;\r\n\t\t} else if (b == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (a.length !== b.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < a.length; i++) {\r\n\t\t\tif (!ObjectEqualityComparator.INSTANCE.equals(a[i], b[i])) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:45.0833752-07:00\r\n\r\n// Taking a case-by-case approach to pporting this functionaltiy\r\n// as much of it may be supported natively by JavaScript. Or otherwise need\r\n// substantial rethink\r\n\r\nimport { NotNull } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\nimport { IntegerList } from \"./IntegerList\";\r\n\r\nexport function escapeWhitespace(s: string, escapeSpaces: boolean): string {\r\n\treturn escapeSpaces ? s.replace(/ /, \"\\u00B7\") : s\r\n\t\t.replace(/\\t/, \"\\\\t\")\r\n\t\t.replace(/\\n/, \"\\\\n\")\r\n\t\t.replace(/\\r/, \"\\\\r\");\r\n}\r\n\r\n// Seriously: why isn't this built in to java? ugh!\r\nexport function join(collection: Iterable, separator: string): string {\r\n\tlet buf = \"\";\r\n\tlet first = true;\r\n\tfor (let current of collection) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t} else {\r\n\t\t\tbuf += separator;\r\n\t\t}\r\n\r\n\t\tbuf += current;\r\n\t}\r\n\r\n\treturn buf;\r\n}\r\n\r\nexport function equals(x: Equatable | undefined, y: Equatable | undefined): boolean {\r\n\tif (x === y) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tif (x === undefined || y === undefined) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn x.equals(y);\r\n}\r\n\r\n// export function numNonnull(data: any[]): number {\r\n// \tlet n: number = 0;\r\n// \tif ( data == null ) return n;\r\n// \tfor (let o of data) {\r\n// \t\tif ( o!=null ) n++;\r\n// \t}\r\n// \treturn n;\r\n// }\r\n\r\n// export function removeAllElements(data: Collection, value: T): void {\r\n// \tif ( data==null ) return;\r\n// \twhile ( data.contains(value) ) data.remove(value);\r\n// }\r\n\r\n// export function writeFile(@NotNull file: File, @NotNull content: Uint8Array): void {\r\n// \tlet fos: FileOutputStream = new FileOutputStream(file);\r\n// \ttry {\r\n// \t\tfos.write(content);\r\n// \t} finally {\r\n// \t\tfos.close();\r\n// \t}\r\n// }\r\n\r\n// export function writeFile(@NotNull fileName: string, @NotNull content: string): void {\r\n// \twriteFile(fileName, content, null);\r\n// }\r\n\r\n// export function writeFile(@NotNull fileName: string, @NotNull content: string, @Nullable encoding: string): void {\r\n// \tlet f: File = new File(fileName);\r\n// \tlet fos: FileOutputStream = new FileOutputStream(f);\r\n// \tlet osw: OutputStreamWriter;\r\n// \tif (encoding != null) {\r\n// \t\tosw = new OutputStreamWriter(fos, encoding);\r\n// \t}\r\n// \telse {\r\n// \t\tosw = new OutputStreamWriter(fos);\r\n// \t}\r\n\r\n// \ttry {\r\n// \t\tosw.write(content);\r\n// \t}\r\n// \tfinally {\r\n// \t\tosw.close();\r\n// \t}\r\n// }\r\n\r\n// @NotNull\r\n// export function readFile(@NotNull fileName: string): char[] {\r\n// \treturn readFile(fileName, null);\r\n// }\r\n\r\n// @NotNull\r\n// export function readFile(@NotNull fileName: string, @Nullable encoding: string): char[] {\r\n// \tlet f: File = new File(fileName);\r\n// \tlet size: number = (int)f.length();\r\n// \tlet isr: InputStreamReader;\r\n// \tlet fis: FileInputStream = new FileInputStream(fileName);\r\n// \tif ( encoding!=null ) {\r\n// \t\tisr = new InputStreamReader(fis, encoding);\r\n// \t}\r\n// \telse {\r\n// \t\tisr = new InputStreamReader(fis);\r\n// \t}\r\n// \tlet data: char[] = null;\r\n// \ttry {\r\n// \t\tdata = new char[size];\r\n// \t\tlet n: number = isr.read(data);\r\n// \t\tif (n < data.length) {\r\n// \t\t\tdata = Arrays.copyOf(data, n);\r\n// \t\t}\r\n// \t}\r\n// \tfinally {\r\n// \t\tisr.close();\r\n// \t}\r\n// \treturn data;\r\n// }\r\n\r\n// export function removeAll(@NotNull predicate: List list,@NotNull Predicate): void {\r\n// \tlet j: number = 0;\r\n// \tfor (let i = 0; i < list.size; i++) {\r\n// \t\tlet item: T = list.get(i);\r\n// \t\tif (!predicate.eval(item)) {\r\n// \t\t\tif (j != i) {\r\n// \t\t\t\tlist.set(j, item);\r\n// \t\t\t}\r\n\r\n// \t\t\tj++;\r\n// \t\t}\r\n// \t}\r\n\r\n// \tif (j < list.size) {\r\n// \t\tlist.subList(j, list.size).clear();\r\n// \t}\r\n// }\r\n\r\n// export function removeAll(@NotNull predicate: Iterable iterable,@NotNull Predicate): void {\r\n// \tif (iterable instanceof List) {\r\n// \t\tremoveAll((List)iterable, predicate);\r\n// \t\treturn;\r\n// \t}\r\n\r\n// \tfor (Iterator iterator = iterable.iterator(); iterator.hasNext(); ) {\r\n// \t\tlet item: T = iterator.next();\r\n// \t\tif (predicate.eval(item)) {\r\n// \t\t\titerator.remove();\r\n// \t\t}\r\n// \t}\r\n// }\r\n\r\n/** Convert array of strings to string→index map. Useful for\r\n * converting rulenames to name→ruleindex map.\r\n */\r\nexport function toMap(keys: string[]): Map {\r\n\tlet m: Map = new Map();\r\n\tfor (let i = 0; i < keys.length; i++) {\r\n\t\tm.set(keys[i], i);\r\n\t}\r\n\r\n\treturn m;\r\n}\r\n\r\nexport function toCharArray(str: string): Uint16Array;\r\nexport function toCharArray(data: IntegerList): Uint16Array;\r\nexport function toCharArray(str: string | IntegerList): Uint16Array {\r\n\tif (typeof str === \"string\") {\r\n\t\tlet result = new Uint16Array(str.length);\r\n\t\tfor (let i = 0; i < str.length; i++) {\r\n\t\t\tresult[i] = str.charCodeAt(i);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t} else {\r\n\t\treturn str.toCharArray();\r\n\t}\r\n}\r\n\r\n// /**\r\n// \t* @since 4.5\r\n// \t*/\r\n// @NotNull\r\n// export function toSet(@NotNull bits: BitSet): IntervalSet {\r\n// \tlet s: IntervalSet = new IntervalSet();\r\n// \tlet i: number = bits.nextSetBit(0);\r\n// \twhile ( i >= 0 ) {\r\n// \t\ts.add(i);\r\n// \t\ti = bits.nextSetBit(i+1);\r\n// \t}\r\n// \treturn s;\r\n// }\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.9521478-07:00\r\n\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ArrayEqualityComparator } from \"../misc/ArrayEqualityComparator\";\r\nimport { Comparable } from \"../misc/Stubs\";\r\nimport { Equatable } from \"../misc/Stubs\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\nfunction max>(items: Iterable): T | undefined {\r\n\tlet result: T | undefined;\r\n\tfor (let current of items) {\r\n\t\tif (result === undefined) {\r\n\t\t\tresult = current;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tlet comparison = result.compareTo(current);\r\n\t\tif (comparison < 0) {\r\n\t\t\tresult = current;\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\nfunction min>(items: Iterable): T | undefined {\r\n\tlet result: T | undefined;\r\n\tfor (let current of items) {\r\n\t\tif (result === undefined) {\r\n\t\t\tresult = current;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tlet comparison = result.compareTo(current);\r\n\t\tif (comparison > 0) {\r\n\t\t\tresult = current;\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\n/** A tree structure used to record the semantic context in which\r\n * an ATN configuration is valid. It's either a single predicate,\r\n * a conjunction `p1&&p2`, or a sum of products `p1||p2`.\r\n *\r\n * I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of\r\n * {@link SemanticContext} within the scope of this outer class.\r\n */\r\nexport abstract class SemanticContext implements Equatable {\r\n\tprivate static _NONE: SemanticContext;\r\n\r\n\t/**\r\n\t * The default {@link SemanticContext}, which is semantically equivalent to\r\n\t * a predicate of the form `{true}?`.\r\n\t */\r\n\tstatic get NONE(): SemanticContext {\r\n\t\tif (SemanticContext._NONE === undefined) {\r\n\t\t\tSemanticContext._NONE = new SemanticContext.Predicate();\r\n\t\t}\r\n\r\n\t\treturn SemanticContext._NONE;\r\n\t}\r\n\r\n\t/**\r\n\t * For context independent predicates, we evaluate them without a local\r\n\t * context (i.e., unedfined context). That way, we can evaluate them without\r\n\t * having to create proper rule-specific context during prediction (as\r\n\t * opposed to the parser, which creates them naturally). In a practical\r\n\t * sense, this avoids a cast exception from RuleContext to myruleContext.\r\n\t *\r\n\t * For context dependent predicates, we must pass in a local context so that\r\n\t * references such as $arg evaluate properly as _localctx.arg. We only\r\n\t * capture context dependent predicates in the context in which we begin\r\n\t * prediction, so we passed in the outer context here in case of context\r\n\t * dependent predicate evaluation.\r\n\t */\r\n\tpublic abstract eval(parser: Recognizer, parserCallStack: RuleContext): boolean;\r\n\r\n\t/**\r\n\t * Evaluate the precedence predicates for the context and reduce the result.\r\n\t *\r\n\t * @param parser The parser instance.\r\n\t * @param parserCallStack\r\n\t * @returns The simplified semantic context after precedence predicates are\r\n\t * evaluated, which will be one of the following values.\r\n\t *\r\n\t * * {@link #NONE}: if the predicate simplifies to `true` after\r\n\t * precedence predicates are evaluated.\r\n\t * * `undefined`: if the predicate simplifies to `false` after\r\n\t * precedence predicates are evaluated.\r\n\t * * `this`: if the semantic context is not changed as a result of\r\n\t * precedence predicate evaluation.\r\n\t * * A non-`undefined` {@link SemanticContext}: the new simplified\r\n\t * semantic context after precedence predicates are evaluated.\r\n\t */\r\n\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\treturn this;\r\n\t}\r\n\r\n\tpublic abstract hashCode(): number;\r\n\r\n\tpublic abstract equals(obj: any): boolean;\r\n\r\n\tpublic static and(a: SemanticContext | undefined, b: SemanticContext): SemanticContext {\r\n\t\tif (!a || a === SemanticContext.NONE) {\r\n\t\t\treturn b;\r\n\t\t}\r\n\t\tif (b === SemanticContext.NONE) {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t\tlet result: SemanticContext.AND = new SemanticContext.AND(a, b);\r\n\t\tif (result.opnds.length === 1) {\r\n\t\t\treturn result.opnds[0];\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @see ParserATNSimulator#getPredsForAmbigAlts\r\n\t */\r\n\tpublic static or(a: SemanticContext | undefined, b: SemanticContext): SemanticContext {\r\n\t\tif (!a) {\r\n\t\t\treturn b;\r\n\t\t}\r\n\r\n\t\tif (a === SemanticContext.NONE || b === SemanticContext.NONE) {\r\n\t\t\treturn SemanticContext.NONE;\r\n\t\t}\r\n\t\tlet result: SemanticContext.OR = new SemanticContext.OR(a, b);\r\n\t\tif (result.opnds.length === 1) {\r\n\t\t\treturn result.opnds[0];\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n\r\nexport namespace SemanticContext {\r\n\t/**\r\n\t * This random 30-bit prime represents the value of `AND.class.hashCode()`.\r\n\t */\r\n\tconst AND_HASHCODE = 40363613;\r\n\t/**\r\n\t * This random 30-bit prime represents the value of `OR.class.hashCode()`.\r\n\t */\r\n\tconst OR_HASHCODE = 486279973;\r\n\r\n\tfunction filterPrecedencePredicates(collection: SemanticContext[]): SemanticContext.PrecedencePredicate[] {\r\n\t\tlet result: SemanticContext.PrecedencePredicate[] = [];\r\n\t\tfor (let i = 0; i < collection.length; i++) {\r\n\t\t\tlet context: SemanticContext = collection[i];\r\n\t\t\tif (context instanceof SemanticContext.PrecedencePredicate) {\r\n\t\t\t\tresult.push(context);\r\n\r\n\t\t\t\t// Remove the item from 'collection' and move i back so we look at the same index again\r\n\t\t\t\tcollection.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\texport class Predicate extends SemanticContext {\r\n\t\tpublic ruleIndex: number;\r\n\t\tpublic predIndex: number;\r\n\t\tpublic isCtxDependent: boolean; // e.g., $i ref in pred\r\n\r\n\t\tconstructor();\r\n\t\tconstructor(ruleIndex: number, predIndex: number, isCtxDependent: boolean);\r\n\r\n\t\tconstructor(ruleIndex: number = -1, predIndex: number = -1, isCtxDependent: boolean = false) {\r\n\t\t\tsuper();\r\n\t\t\tthis.ruleIndex = ruleIndex;\r\n\t\t\tthis.predIndex = predIndex;\r\n\t\t\tthis.isCtxDependent = isCtxDependent;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\tlet localctx: RuleContext | undefined = this.isCtxDependent ? parserCallStack : undefined;\r\n\t\t\treturn parser.sempred(localctx, this.ruleIndex, this.predIndex);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\tlet hashCode: number = MurmurHash.initialize();\r\n\t\t\thashCode = MurmurHash.update(hashCode, this.ruleIndex);\r\n\t\t\thashCode = MurmurHash.update(hashCode, this.predIndex);\r\n\t\t\thashCode = MurmurHash.update(hashCode, this.isCtxDependent ? 1 : 0);\r\n\t\t\thashCode = MurmurHash.finish(hashCode, 3);\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (!(obj instanceof Predicate)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn this.ruleIndex === obj.ruleIndex &&\r\n\t\t\t\tthis.predIndex === obj.predIndex &&\r\n\t\t\t\tthis.isCtxDependent === obj.isCtxDependent;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn \"{\" + this.ruleIndex + \":\" + this.predIndex + \"}?\";\r\n\t\t}\r\n\t}\r\n\r\n\texport class PrecedencePredicate extends SemanticContext implements Comparable {\r\n\t\tpublic precedence: number;\r\n\r\n\t\tconstructor(precedence: number) {\r\n\t\t\tsuper();\r\n\t\t\tthis.precedence = precedence;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\treturn parser.precpred(parserCallStack, this.precedence);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\t\tif (parser.precpred(parserCallStack, this.precedence)) {\r\n\t\t\t\treturn SemanticContext.NONE;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic compareTo(o: PrecedencePredicate): number {\r\n\t\t\treturn this.precedence - o.precedence;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\tlet hashCode: number = 1;\r\n\t\t\thashCode = 31 * hashCode + this.precedence;\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (!(obj instanceof PrecedencePredicate)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\treturn this.precedence === obj.precedence;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\t// precedence >= _precedenceStack.peek()\r\n\t\tpublic toString(): string {\r\n\t\t\treturn \"{\" + this.precedence + \">=prec}?\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This is the base class for semantic context \"operators\", which operate on\r\n\t * a collection of semantic context \"operands\".\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\texport abstract class Operator extends SemanticContext {\r\n\t\t/**\r\n\t\t * Gets the operands for the semantic context operator.\r\n\t\t *\r\n\t\t * @returns a collection of {@link SemanticContext} operands for the\r\n\t\t * operator.\r\n\t\t *\r\n\t\t * @since 4.3\r\n\t\t */\r\n\t\t// @NotNull\r\n\t\tpublic abstract readonly operands: Iterable;\r\n\t}\r\n\r\n\t/**\r\n\t * A semantic context which is true whenever none of the contained contexts\r\n\t * is false.\r\n\t */\r\n\texport class AND extends Operator {\r\n\t\tpublic opnds: SemanticContext[];\r\n\r\n\t\tconstructor(@NotNull a: SemanticContext, @NotNull b: SemanticContext) {\r\n\t\t\tsuper();\r\n\r\n\t\t\tlet operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\t\tif (a instanceof AND) {\r\n\t\t\t\toperands.addAll(a.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(a);\r\n\t\t\t}\r\n\r\n\t\t\tif (b instanceof AND) {\r\n\t\t\t\toperands.addAll(b.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(b);\r\n\t\t\t}\r\n\r\n\t\t\tthis.opnds = operands.toArray();\r\n\t\t\tlet precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds);\r\n\r\n\t\t\t// interested in the transition with the lowest precedence\r\n\t\t\tlet reduced = min(precedencePredicates);\r\n\t\t\tif (reduced) {\r\n\t\t\t\tthis.opnds.push(reduced);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tget operands(): Iterable {\r\n\t\t\treturn this.opnds;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif (!(obj instanceof AND)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn ArrayEqualityComparator.INSTANCE.equals(this.opnds, obj.opnds);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\treturn MurmurHash.hashCode(this.opnds, AND_HASHCODE);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * {@inheritDoc}\r\n\t\t *\r\n\t\t * The evaluation of predicates by this context is short-circuiting, but\r\n\t\t * unordered.\r\n\t\t */\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\tfor (let opnd of this.opnds) {\r\n\t\t\t\tif (!opnd.eval(parser, parserCallStack)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\t\tlet differs: boolean = false;\r\n\t\t\tlet operands: SemanticContext[] = [];\r\n\t\t\tfor (let context of this.opnds) {\r\n\t\t\t\tlet evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack);\r\n\t\t\t\tdiffers = differs || (evaluated !== context);\r\n\t\t\t\tif (evaluated == null) {\r\n\t\t\t\t\t// The AND context is false if any element is false\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\t\t\t\telse if (evaluated !== SemanticContext.NONE) {\r\n\t\t\t\t\t// Reduce the result by skipping true elements\r\n\t\t\t\t\toperands.push(evaluated);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!differs) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\r\n\t\t\tif (operands.length === 0) {\r\n\t\t\t\t// all elements were true, so the AND context is true\r\n\t\t\t\treturn SemanticContext.NONE;\r\n\t\t\t}\r\n\r\n\t\t\tlet result: SemanticContext = operands[0];\r\n\t\t\tfor (let i = 1; i < operands.length; i++) {\r\n\t\t\t\tresult = SemanticContext.and(result, operands[i]);\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn Utils.join(this.opnds, \"&&\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A semantic context which is true whenever at least one of the contained\r\n\t * contexts is true.\r\n\t */\r\n\texport class OR extends Operator {\r\n\t\tpublic opnds: SemanticContext[];\r\n\r\n\t\tconstructor(@NotNull a: SemanticContext, @NotNull b: SemanticContext) {\r\n\t\t\tsuper();\r\n\r\n\t\t\tlet operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\t\tif (a instanceof OR) {\r\n\t\t\t\toperands.addAll(a.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(a);\r\n\t\t\t}\r\n\r\n\t\t\tif (b instanceof OR) {\r\n\t\t\t\toperands.addAll(b.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(b);\r\n\t\t\t}\r\n\r\n\t\t\tthis.opnds = operands.toArray();\r\n\t\t\tlet precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds);\r\n\r\n\t\t\t// interested in the transition with the highest precedence\r\n\t\t\tlet reduced = max(precedencePredicates);\r\n\t\t\tif (reduced) {\r\n\t\t\t\tthis.opnds.push(reduced);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tget operands(): Iterable {\r\n\t\t\treturn this.opnds;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif (!(obj instanceof OR)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn ArrayEqualityComparator.INSTANCE.equals(this.opnds, obj.opnds);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\treturn MurmurHash.hashCode(this.opnds, OR_HASHCODE);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * {@inheritDoc}\r\n\t\t *\r\n\t\t * The evaluation of predicates by this context is short-circuiting, but\r\n\t\t * unordered.\r\n\t\t */\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\tfor (let opnd of this.opnds) {\r\n\t\t\t\tif (opnd.eval(parser, parserCallStack)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\t\tlet differs: boolean = false;\r\n\t\t\tlet operands: SemanticContext[] = [];\r\n\t\t\tfor (let context of this.opnds) {\r\n\t\t\t\tlet evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack);\r\n\t\t\t\tdiffers = differs || (evaluated !== context);\r\n\t\t\t\tif (evaluated === SemanticContext.NONE) {\r\n\t\t\t\t\t// The OR context is true if any element is true\r\n\t\t\t\t\treturn SemanticContext.NONE;\r\n\t\t\t\t} else if (evaluated) {\r\n\t\t\t\t\t// Reduce the result by skipping false elements\r\n\t\t\t\t\toperands.push(evaluated);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!differs) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\r\n\t\t\tif (operands.length === 0) {\r\n\t\t\t\t// all elements were false, so the OR context is false\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\r\n\t\t\tlet result: SemanticContext = operands[0];\r\n\t\t\tfor (let i = 1; i < operands.length; i++) {\r\n\t\t\t\tresult = SemanticContext.or(result, operands[i]);\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn Utils.join(this.opnds, \"||\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.2826960-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./AbstractPredicateTransition\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** TODO: this is old comment:\r\n * A tree of semantic predicates from the grammar AST if label==SEMPRED.\r\n * In the ATN, labels will always be exactly one predicate, but the DFA\r\n * may have to combine a bunch of them as it collects predicates from\r\n * multiple ATN configurations into a single DFA state.\r\n */\r\nexport class PredicateTransition extends AbstractPredicateTransition {\r\n\tpublic ruleIndex: number;\r\n\tpublic predIndex: number;\r\n\tpublic isCtxDependent: boolean; // e.g., $i ref in pred\r\n\r\n\tconstructor(@NotNull target: ATNState, ruleIndex: number, predIndex: number, isCtxDependent: boolean) {\r\n\t\tsuper(target);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t\tthis.predIndex = predIndex;\r\n\t\tthis.isCtxDependent = isCtxDependent;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.PREDICATE;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean { return true; }\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget predicate(): SemanticContext.Predicate {\r\n\t\treturn new SemanticContext.Predicate(this.ruleIndex, this.predIndex, this.isCtxDependent);\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \"pred_\" + this.ruleIndex + \":\" + this.predIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.4099946-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./atn/AbstractPredicateTransition\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { Parser } from \"./Parser\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { PredicateTransition } from \"./atn/PredicateTransition\";\r\n\r\n/** A semantic predicate failed during validation. Validation of predicates\r\n * occurs when normally parsing the alternative just like matching a token.\r\n * Disambiguating predicate evaluation occurs when we test a predicate during\r\n * prediction.\r\n */\r\nexport class FailedPredicateException extends RecognitionException {\r\n\t//private static serialVersionUID: number = 5379330841495778709L;\r\n\r\n\tprivate _ruleIndex: number;\r\n\tprivate _predicateIndex: number;\r\n\tprivate _predicate?: string;\r\n\r\n\tconstructor(@NotNull recognizer: Parser, predicate?: string, message?: string) {\r\n\t\tsuper(\r\n\t\t\trecognizer,\r\n\t\t\trecognizer.inputStream,\r\n\t\t\trecognizer.context,\r\n\t\t\tFailedPredicateException.formatMessage(predicate, message));\r\n\t\tlet s: ATNState = recognizer.interpreter.atn.states[recognizer.state];\r\n\r\n\t\tlet trans = s.transition(0) as AbstractPredicateTransition;\r\n\t\tif (trans instanceof PredicateTransition) {\r\n\t\t\tthis._ruleIndex = trans.ruleIndex;\r\n\t\t\tthis._predicateIndex = trans.predIndex;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._ruleIndex = 0;\r\n\t\t\tthis._predicateIndex = 0;\r\n\t\t}\r\n\r\n\t\tthis._predicate = predicate;\r\n\t\tsuper.setOffendingToken(recognizer, recognizer.currentToken);\r\n\t}\r\n\r\n\tget ruleIndex(): number {\r\n\t\treturn this._ruleIndex;\r\n\t}\r\n\r\n\tget predicateIndex(): number {\r\n\t\treturn this._predicateIndex;\r\n\t}\r\n\r\n\tget predicate(): string | undefined {\r\n\t\treturn this._predicate;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprivate static formatMessage(predicate: string | undefined, message: string | undefined): string {\r\n\t\tif (message) {\r\n\t\t\treturn message;\r\n\t\t}\r\n\r\n\t\treturn `failed predicate: {${predicate}}?`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.5187682-07:00\r\n\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/** This signifies any kind of mismatched input exceptions such as\r\n * when the current input does not match the expected token.\r\n */\r\nexport class InputMismatchException extends RecognitionException {\r\n\t//private static serialVersionUID: number = 1532568338707443067L;\r\n\r\n\tconstructor(/*@NotNull*/ recognizer: Parser);\r\n\tconstructor(/*@NotNull*/ recognizer: Parser, state: number, context: ParserRuleContext);\r\n\tconstructor(@NotNull recognizer: Parser, state?: number, context?: ParserRuleContext) {\r\n\t\tif (context === undefined) {\r\n\t\t\tcontext = recognizer.context;\r\n\t\t}\r\n\r\n\t\tsuper(recognizer, recognizer.inputStream, context);\r\n\r\n\t\tif (state !== undefined) {\r\n\t\t\tthis.setOffendingState(state);\r\n\t\t}\r\n\r\n\t\tthis.setOffendingToken(recognizer, recognizer.currentToken);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport namespace Arrays {\r\n\t/**\r\n\t * Searches the specified array of numbers for the specified value using the binary search algorithm. The array must\r\n\t * be sorted prior to making this call. If it is not sorted, the results are unspecified. If the array contains\r\n\t * multiple elements with the specified value, there is no guarantee which one will be found.\r\n\t *\r\n\t * @returns index of the search key, if it is contained in the array; otherwise, (-(insertion point) - 1). The\r\n\t * insertion point is defined as the point at which the key would be inserted into the array: the index of the first\r\n\t * element greater than the key, or array.length if all elements in the array are less than the specified key. Note\r\n\t * that this guarantees that the return value will be >= 0 if and only if the key is found.\r\n\t */\r\n\texport function binarySearch(array: ArrayLike, key: number, fromIndex?: number, toIndex?: number): number {\r\n\t\treturn binarySearch0(array, fromIndex !== undefined ? fromIndex : 0, toIndex !== undefined ? toIndex : array.length, key);\r\n\t}\r\n\r\n\tfunction binarySearch0(array: ArrayLike, fromIndex: number, toIndex: number, key: number): number {\r\n\t\tlet low: number = fromIndex;\r\n\t\tlet high: number = toIndex - 1;\r\n\r\n\t\twhile (low <= high) {\r\n\t\t\tlet mid: number = (low + high) >>> 1;\r\n\t\t\tlet midVal: number = array[mid];\r\n\r\n\t\t\tif (midVal < key) {\r\n\t\t\t\tlow = mid + 1;\r\n\t\t\t} else if (midVal > key) {\r\n\t\t\t\thigh = mid - 1;\r\n\t\t\t} else {\r\n\t\t\t\t// key found\r\n\t\t\t\treturn mid;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// key not found.\r\n\t\treturn -(low + 1);\r\n\t}\r\n\r\n\texport function toString(array: Iterable) {\r\n\t\tlet result = \"[\";\r\n\r\n\t\tlet first = true;\r\n\t\tfor (let element of array) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tresult += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tif (element === null) {\r\n\t\t\t\tresult += \"null\";\r\n\t\t\t} else if (element === undefined) {\r\n\t\t\t\tresult += \"undefined\";\r\n\t\t\t} else {\r\n\t\t\t\tresult += element;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresult += \"]\";\r\n\t\treturn result;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.5099429-07:00\r\n\r\nimport { Arrays } from \"./Arrays\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { JavaCollection } from \"./Stubs\";\r\n\r\nconst EMPTY_DATA: Int32Array = new Int32Array(0);\r\n\r\nconst INITIAL_SIZE: number = 4;\r\nconst MAX_ARRAY_SIZE: number = (((1 << 31) >>> 0) - 1) - 8;\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class IntegerList {\r\n\t@NotNull\r\n\tprivate _data: Int32Array;\r\n\r\n\tprivate _size: number;\r\n\r\n\tconstructor(arg?: number | IntegerList | Iterable) {\r\n\t\tif (!arg) {\r\n\t\t\tthis._data = EMPTY_DATA;\r\n\t\t\tthis._size = 0;\r\n\t\t} else if (arg instanceof IntegerList) {\r\n\t\t\tthis._data = arg._data.slice(0);\r\n\t\t\tthis._size = arg._size;\r\n\t\t} else if (typeof arg === \"number\") {\r\n\t\t\tif (arg === 0) {\r\n\t\t\t\tthis._data = EMPTY_DATA;\r\n\t\t\t\tthis._size = 0;\r\n\t\t\t} else {\r\n\t\t\t\tthis._data = new Int32Array(arg);\r\n\t\t\t\tthis._size = 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// arg is Iterable\r\n\t\t\tthis._data = EMPTY_DATA;\r\n\t\t\tthis._size = 0;\r\n\t\t\tfor (let value of arg) {\r\n\t\t\t\tthis.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic add(value: number): void {\r\n\t\tif (this._data.length === this._size) {\r\n\t\t\tthis.ensureCapacity(this._size + 1);\r\n\t\t}\r\n\r\n\t\tthis._data[this._size] = value;\r\n\t\tthis._size++;\r\n\t}\r\n\r\n\tpublic addAll(list: number[] | IntegerList | JavaCollection): void {\r\n\t\tif (Array.isArray(list)) {\r\n\t\t\tthis.ensureCapacity(this._size + list.length);\r\n\t\t\tthis._data.subarray(this._size, this._size + list.length).set(list);\r\n\t\t\tthis._size += list.length;\r\n\t\t} else if (list instanceof IntegerList) {\r\n\t\t\tthis.ensureCapacity(this._size + list._size);\r\n\t\t\tthis._data.subarray(this._size, this._size + list.size).set(list._data);\r\n\t\t\tthis._size += list._size;\r\n\t\t} else {\r\n\t\t\t// list is JavaCollection\r\n\t\t\tthis.ensureCapacity(this._size + list.size);\r\n\t\t\tlet current: number = 0;\r\n\t\t\tfor (let xi of list) {\r\n\t\t\t\tthis._data[this._size + current] = xi;\r\n\t\t\t\tcurrent++;\r\n\t\t\t}\r\n\r\n\t\t\tthis._size += list.size;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic get(index: number): number {\r\n\t\tif (index < 0 || index >= this._size) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\treturn this._data[index];\r\n\t}\r\n\r\n\tpublic contains(value: number): boolean {\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tif (this._data[i] === value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tpublic set(index: number, value: number): number {\r\n\t\tif (index < 0 || index >= this._size) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\tlet previous: number = this._data[index];\r\n\t\tthis._data[index] = value;\r\n\t\treturn previous;\r\n\t}\r\n\r\n\tpublic removeAt(index: number): number {\r\n\t\tlet value: number = this.get(index);\r\n\t\tthis._data.copyWithin(index, index + 1, this._size);\r\n\t\tthis._data[this._size - 1] = 0;\r\n\t\tthis._size--;\r\n\t\treturn value;\r\n\t}\r\n\r\n\tpublic removeRange(fromIndex: number, toIndex: number): void {\r\n\t\tif (fromIndex < 0 || toIndex < 0 || fromIndex > this._size || toIndex > this._size) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\tif (fromIndex > toIndex) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\tthis._data.copyWithin(toIndex, fromIndex, this._size);\r\n\t\tthis._data.fill(0, this._size - (toIndex - fromIndex), this._size);\r\n\t\tthis._size -= (toIndex - fromIndex);\r\n\t}\r\n\r\n\tget isEmpty(): boolean {\r\n\t\treturn this._size === 0;\r\n\t}\r\n\r\n\tget size(): number {\r\n\t\treturn this._size;\r\n\t}\r\n\r\n\tpublic trimToSize(): void {\r\n\t\tif (this._data.length === this._size) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._data = this._data.slice(0, this._size);\r\n\t}\r\n\r\n\tpublic clear(): void {\r\n\t\tthis._data.fill(0, 0, this._size);\r\n\t\tthis._size = 0;\r\n\t}\r\n\r\n\tpublic toArray(): number[] {\r\n\t\tif (this._size === 0) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\treturn Array.from(this._data.subarray(0, this._size));\r\n\t}\r\n\r\n\tpublic sort(): void {\r\n\t\tthis._data.subarray(0, this._size).sort();\r\n\t}\r\n\r\n\t/**\r\n\t * Compares the specified object with this list for equality. Returns\r\n\t * `true` if and only if the specified object is also an {@link IntegerList},\r\n\t * both lists have the same size, and all corresponding pairs of elements in\r\n\t * the two lists are equal. In other words, two lists are defined to be\r\n\t * equal if they contain the same elements in the same order.\r\n\t *\r\n\t * This implementation first checks if the specified object is this\r\n\t * list. If so, it returns `true`; if not, it checks if the\r\n\t * specified object is an {@link IntegerList}. If not, it returns `false`;\r\n\t * if so, it checks the size of both lists. If the lists are not the same size,\r\n\t * it returns `false`; otherwise it iterates over both lists, comparing\r\n\t * corresponding pairs of elements. If any comparison returns `false`,\r\n\t * this method returns `false`.\r\n\t *\r\n\t * @param o the object to be compared for equality with this list\r\n\t * @returns `true` if the specified object is equal to this list\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!(o instanceof IntegerList)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._size !== o._size) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tif (this._data[i] !== o._data[i]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the hash code value for this list.\r\n\t *\r\n\t * This implementation uses exactly the code that is used to define the\r\n\t * list hash function in the documentation for the {@link List#hashCode}\r\n\t * method.\r\n\t *\r\n\t * @returns the hash code value for this list\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hashCode: number = 1;\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\thashCode = 31 * hashCode + this._data[i];\r\n\t\t}\r\n\r\n\t\treturn hashCode;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a string representation of this list.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this._data.toString();\r\n\t}\r\n\r\n\tpublic binarySearch(key: number, fromIndex?: number, toIndex?: number): number {\r\n\t\tif (fromIndex === undefined) {\r\n\t\t\tfromIndex = 0;\r\n\t\t}\r\n\r\n\t\tif (toIndex === undefined) {\r\n\t\t\ttoIndex = this._size;\r\n\t\t}\r\n\r\n\t\tif (fromIndex < 0 || toIndex < 0 || fromIndex > this._size || toIndex > this._size) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tif (fromIndex > toIndex) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\treturn Arrays.binarySearch(this._data, key, fromIndex, toIndex);\r\n\t}\r\n\r\n\tprivate ensureCapacity(capacity: number): void {\r\n\t\tif (capacity < 0 || capacity > MAX_ARRAY_SIZE) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tlet newLength: number;\r\n\t\tif (this._data.length === 0) {\r\n\t\t\tnewLength = INITIAL_SIZE;\r\n\t\t} else {\r\n\t\t\tnewLength = this._data.length;\r\n\t\t}\r\n\r\n\t\twhile (newLength < capacity) {\r\n\t\t\tnewLength = newLength * 2;\r\n\t\t\tif (newLength < 0 || newLength > MAX_ARRAY_SIZE) {\r\n\t\t\t\tnewLength = MAX_ARRAY_SIZE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet tmp = new Int32Array(newLength);\r\n\t\ttmp.set(this._data);\r\n\t\tthis._data = tmp;\r\n\t}\r\n\r\n\t/** Convert the list to a UTF-16 encoded char array. If all values are less\r\n\t * than the 0xFFFF 16-bit code point limit then this is just a char array\r\n\t * of 16-bit char as usual. For values in the supplementary range, encode\r\n\t * them as two UTF-16 code units.\r\n\t */\r\n\tpublic toCharArray(): Uint16Array {\r\n\t\t// Optimize for the common case (all data values are < 0xFFFF) to avoid an extra scan\r\n\t\tlet resultArray: Uint16Array = new Uint16Array(this._size);\r\n\t\tlet resultIdx = 0;\r\n\t\tlet calculatedPreciseResultSize = false;\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tlet codePoint = this._data[i];\r\n\t\t\tif (codePoint >= 0 && codePoint < 0x10000) {\r\n\t\t\t\tresultArray[resultIdx] = codePoint;\r\n\t\t\t\tresultIdx++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Calculate the precise result size if we encounter a code point > 0xFFFF\r\n\t\t\tif (!calculatedPreciseResultSize) {\r\n\t\t\t\tlet newResultArray = new Uint16Array(this.charArraySize());\r\n\t\t\t\tnewResultArray.set(resultArray, 0);\r\n\t\t\t\tresultArray = newResultArray;\r\n\t\t\t\tcalculatedPreciseResultSize = true;\r\n\t\t\t}\r\n\r\n\t\t\t// This will throw RangeError if the code point is not a valid Unicode code point\r\n\t\t\tlet pair = String.fromCodePoint(codePoint);\r\n\t\t\tresultArray[resultIdx] = pair.charCodeAt(0);\r\n\t\t\tresultArray[resultIdx + 1] = pair.charCodeAt(1);\r\n\t\t\tresultIdx += 2;\r\n\t\t}\r\n\t\treturn resultArray;\r\n\t}\r\n\r\n\tprivate charArraySize(): number {\r\n\t\tlet result = 0;\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tresult += this._data[i] >= 0x10000 ? 2 : 1;\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.7402214-07:00\r\n\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\n\r\nconst INTERVAL_POOL_MAX_VALUE: number = 1000;\r\n\r\n/** An immutable inclusive interval a..b */\r\nexport class Interval implements Equatable {\r\n\tprivate static _INVALID: Interval = new Interval(-1, -2);\r\n\tstatic get INVALID(): Interval {\r\n\t\treturn Interval._INVALID;\r\n\t}\r\n\r\n\tprivate static readonly cache: Interval[] = new Array(INTERVAL_POOL_MAX_VALUE + 1);\r\n\r\n\t/**\r\n\t * @param a The start of the interval\r\n\t * @param b The end of the interval (inclusive)\r\n\t */\r\n\tconstructor(public a: number, public b: number) {\r\n\t}\r\n\r\n\t/** Interval objects are used readonly so share all with the\r\n\t * same single value a==b up to some max size. Use an array as a perfect hash.\r\n\t * Return shared object for 0..INTERVAL_POOL_MAX_VALUE or a new\r\n\t * Interval object with a..a in it. On Java.g4, 218623 IntervalSets\r\n\t * have a..a (set with 1 element).\r\n\t */\r\n\tpublic static of(a: number, b: number): Interval {\r\n\t\t// cache just a..a\r\n\t\tif (a !== b || a < 0 || a > INTERVAL_POOL_MAX_VALUE) {\r\n\t\t\treturn new Interval(a, b);\r\n\t\t}\r\n\r\n\t\tif (Interval.cache[a] == null) {\r\n\t\t\tInterval.cache[a] = new Interval(a, a);\r\n\t\t}\r\n\r\n\t\treturn Interval.cache[a];\r\n\t}\r\n\r\n\t/** return number of elements between a and b inclusively. x..x is length 1.\r\n\t * if b < a, then length is 0. 9..10 has length 2.\r\n\t */\r\n\tget length(): number {\r\n\t\tif (this.b < this.a) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn this.b - this.a + 1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if (!(o instanceof Interval)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.a === o.a && this.b === o.b;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = 23;\r\n\t\thash = hash * 31 + this.a;\r\n\t\thash = hash * 31 + this.b;\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/** Does this start completely before other? Disjoint */\r\n\tpublic startsBeforeDisjoint(other: Interval): boolean {\r\n\t\treturn this.a < other.a && this.b < other.a;\r\n\t}\r\n\r\n\t/** Does this start at or before other? Nondisjoint */\r\n\tpublic startsBeforeNonDisjoint(other: Interval): boolean {\r\n\t\treturn this.a <= other.a && this.b >= other.a;\r\n\t}\r\n\r\n\t/** Does this.a start after other.b? May or may not be disjoint */\r\n\tpublic startsAfter(other: Interval): boolean {\r\n\t\treturn this.a > other.a;\r\n\t}\r\n\r\n\t/** Does this start completely after other? Disjoint */\r\n\tpublic startsAfterDisjoint(other: Interval): boolean {\r\n\t\treturn this.a > other.b;\r\n\t}\r\n\r\n\t/** Does this start after other? NonDisjoint */\r\n\tpublic startsAfterNonDisjoint(other: Interval): boolean {\r\n\t\treturn this.a > other.a && this.a <= other.b; // this.b>=other.b implied\r\n\t}\r\n\r\n\t/** Are both ranges disjoint? I.e., no overlap? */\r\n\tpublic disjoint(other: Interval): boolean {\r\n\t\treturn this.startsBeforeDisjoint(other) || this.startsAfterDisjoint(other);\r\n\t}\r\n\r\n\t/** Are two intervals adjacent such as 0..41 and 42..42? */\r\n\tpublic adjacent(other: Interval): boolean {\r\n\t\treturn this.a === other.b + 1 || this.b === other.a - 1;\r\n\t}\r\n\r\n\tpublic properlyContains(other: Interval): boolean {\r\n\t\treturn other.a >= this.a && other.b <= this.b;\r\n\t}\r\n\r\n\t/** Return the interval computed from combining this and other */\r\n\tpublic union(other: Interval): Interval {\r\n\t\treturn Interval.of(Math.min(this.a, other.a), Math.max(this.b, other.b));\r\n\t}\r\n\r\n\t/** Return the interval in common between this and o */\r\n\tpublic intersection(other: Interval): Interval {\r\n\t\treturn Interval.of(Math.max(this.a, other.a), Math.min(this.b, other.b));\r\n\t}\r\n\r\n\t/** Return the interval with elements from `this` not in `other`;\r\n\t * `other` must not be totally enclosed (properly contained)\r\n\t * within `this`, which would result in two disjoint intervals\r\n\t * instead of the single one returned by this method.\r\n\t */\r\n\tpublic differenceNotProperlyContained(other: Interval): Interval | undefined {\r\n\t\tlet diff: Interval | undefined;\r\n\t\tif (other.startsBeforeNonDisjoint(this)) {\r\n\t\t\t// other.a to left of this.a (or same)\r\n\t\t\tdiff = Interval.of(Math.max(this.a, other.b + 1), this.b);\r\n\t\t} else if (other.startsAfterNonDisjoint(this)) {\r\n\t\t\t// other.a to right of this.a\r\n\t\t\tdiff = Interval.of(this.a, other.a - 1);\r\n\t\t}\r\n\r\n\t\treturn diff;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this.a + \"..\" + this.b;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.7862802-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { TokenStream } from \"./TokenStream\";\r\n\r\n/** A token has properties: text, type, line, character position in the line\r\n * (so we can ignore tabs), token channel, index, and source from which\r\n * we obtained this token.\r\n */\r\nexport interface Token {\r\n\t/**\r\n\t * Get the text of the token.\r\n\t */\r\n\treadonly text: string | undefined;\r\n\r\n\t/** Get the token type of the token */\r\n\treadonly type: number;\r\n\r\n\t/** The line number on which the 1st character of this token was matched,\r\n\t * line=1..n\r\n\t */\r\n\treadonly line: number;\r\n\r\n\t/** The index of the first character of this token relative to the\r\n\t * beginning of the line at which it occurs, 0..n-1\r\n\t */\r\n\treadonly charPositionInLine: number;\r\n\r\n\t/** Return the channel this token. Each token can arrive at the parser\r\n\t * on a different channel, but the parser only \"tunes\" to a single channel.\r\n\t * The parser ignores everything not on DEFAULT_CHANNEL.\r\n\t */\r\n\treadonly channel: number;\r\n\r\n\t/** An index from 0..n-1 of the token object in the input stream.\r\n\t * This must be valid in order to print token streams and\r\n\t * use TokenRewriteStream.\r\n\t *\r\n\t * Return -1 to indicate that this token was conjured up since\r\n\t * it doesn't have a valid index.\r\n\t */\r\n\treadonly tokenIndex: number;\r\n\r\n\t/** The starting character index of the token\r\n\t * This method is optional; return -1 if not implemented.\r\n\t */\r\n\treadonly startIndex: number;\r\n\r\n\t/** The last character index of the token.\r\n\t * This method is optional; return -1 if not implemented.\r\n\t */\r\n\treadonly stopIndex: number;\r\n\r\n\t/** Gets the {@link TokenSource} which created this token.\r\n\t */\r\n\treadonly tokenSource: TokenSource | undefined;\r\n\r\n\t/**\r\n\t * Gets the {@link CharStream} from which this token was derived.\r\n\t */\r\n\treadonly inputStream: CharStream | undefined;\r\n}\r\n\r\nexport namespace Token {\r\n\texport const INVALID_TYPE: number = 0;\r\n\r\n\t/** During lookahead operations, this \"token\" signifies we hit rule end ATN state\r\n\t * and did not follow it despite needing to.\r\n\t */\r\n\texport const EPSILON: number = -2;\r\n\r\n\texport const MIN_USER_TOKEN_TYPE: number = 1;\r\n\r\n\texport const EOF: number = IntStream.EOF;\r\n\r\n\t/** All tokens go to the parser (unless skip() is called in that rule)\r\n\t * on a particular \"channel\". The parser tunes to a particular channel\r\n\t * so that whitespace etc... can go to the parser on a \"hidden\" channel.\r\n\t */\r\n\texport const DEFAULT_CHANNEL: number = 0;\r\n\r\n\t/** Anything on different channel than DEFAULT_CHANNEL is not parsed\r\n\t * by parser.\r\n\t */\r\n\texport const HIDDEN_CHANNEL: number = 1;\r\n\r\n\t/**\r\n\t * This is the minimum constant value which can be assigned to a\r\n\t * user-defined token channel.\r\n\t *\r\n\t * The non-negative numbers less than {@link #MIN_USER_CHANNEL_VALUE} are\r\n\t * assigned to the predefined channels {@link #DEFAULT_CHANNEL} and\r\n\t * {@link #HIDDEN_CHANNEL}.\r\n\t *\r\n\t * @see `Token.channel`\r\n\t */\r\n\texport const MIN_USER_CHANNEL_VALUE: number = 2;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.1614404-07:00\r\n\r\nimport { ATNSimulator } from \"./atn/ATNSimulator\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { WritableToken } from \"./WritableToken\";\r\n\r\nexport class CommonToken implements WritableToken {\r\n\t/**\r\n\t * An empty {@link Tuple2} which is used as the default value of\r\n\t * {@link #source} for tokens that do not have a source.\r\n\t */\r\n\tprotected static readonly EMPTY_SOURCE: { source?: TokenSource, stream?: CharStream } =\r\n\t\t{ source: undefined, stream: undefined };\r\n\r\n\t/**\r\n\t * This is the backing field for `type`.\r\n\t */\r\n\tprivate _type: number;\r\n\t/**\r\n\t * This is the backing field for {@link #getLine} and {@link #setLine}.\r\n\t */\r\n\tprivate _line: number = 0;\r\n\t/**\r\n\t * This is the backing field for {@link #getCharPositionInLine} and\r\n\t * {@link #setCharPositionInLine}.\r\n\t */\r\n\tprivate _charPositionInLine: number = -1; // set to invalid position\r\n\t/**\r\n\t * This is the backing field for {@link #getChannel} and\r\n\t * {@link #setChannel}.\r\n\t */\r\n\tprivate _channel: number = Token.DEFAULT_CHANNEL;\r\n\t/**\r\n\t * This is the backing field for {@link #getTokenSource} and\r\n\t * {@link #getInputStream}.\r\n\t *\r\n\t * These properties share a field to reduce the memory footprint of\r\n\t * {@link CommonToken}. Tokens created by a {@link CommonTokenFactory} from\r\n\t * the same source and input stream share a reference to the same\r\n\t * {@link Tuple2} containing these values.\r\n\t */\r\n\t@NotNull\r\n\tprotected source: { source?: TokenSource, stream?: CharStream };\r\n\r\n\t/**\r\n\t * This is the backing field for {@link #getText} when the token text is\r\n\t * explicitly set in the constructor or via {@link #setText}.\r\n\t *\r\n\t * @see `text`\r\n\t */\r\n\tprivate _text?: string;\r\n\r\n\t/**\r\n\t * This is the backing field for `tokenIndex`.\r\n\t */\r\n\tprotected index: number = -1;\r\n\r\n\t/**\r\n\t * This is the backing field for `startIndex`.\r\n\t */\r\n\tprotected start: number;\r\n\r\n\t/**\r\n\t * This is the backing field for `stopIndex`.\r\n\t */\r\n\tprivate stop: number;\r\n\r\n\tconstructor(type: number, text?: string, @NotNull source: { source?: TokenSource, stream?: CharStream } = CommonToken.EMPTY_SOURCE, channel: number = Token.DEFAULT_CHANNEL, start: number = 0, stop: number = 0) {\r\n\t\tthis._text = text;\r\n\t\tthis._type = type;\r\n\t\tthis.source = source;\r\n\t\tthis._channel = channel;\r\n\t\tthis.start = start;\r\n\t\tthis.stop = stop;\r\n\t\tif (source.source != null) {\r\n\t\t\tthis._line = source.source.line;\r\n\t\t\tthis._charPositionInLine = source.source.charPositionInLine;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Constructs a new {@link CommonToken} as a copy of another {@link Token}.\r\n\t *\r\n\t * If `oldToken` is also a {@link CommonToken} instance, the newly\r\n\t * constructed token will share a reference to the {@link #text} field and\r\n\t * the {@link Tuple2} stored in {@link #source}. Otherwise, {@link #text} will\r\n\t * be assigned the result of calling {@link #getText}, and {@link #source}\r\n\t * will be constructed from the result of {@link Token#getTokenSource} and\r\n\t * {@link Token#getInputStream}.\r\n\t *\r\n\t * @param oldToken The token to copy.\r\n\t */\r\n\tpublic static fromToken(@NotNull oldToken: Token): CommonToken {\r\n\t\tlet result: CommonToken = new CommonToken(oldToken.type, undefined, CommonToken.EMPTY_SOURCE, oldToken.channel, oldToken.startIndex, oldToken.stopIndex);\r\n\t\tresult._line = oldToken.line;\r\n\t\tresult.index = oldToken.tokenIndex;\r\n\t\tresult._charPositionInLine = oldToken.charPositionInLine;\r\n\r\n\t\tif (oldToken instanceof CommonToken) {\r\n\t\t\tresult._text = oldToken._text;\r\n\t\t\tresult.source = oldToken.source;\r\n\t\t} else {\r\n\t\t\tresult._text = oldToken.text;\r\n\t\t\tresult.source = { source: oldToken.tokenSource, stream: oldToken.inputStream };\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tget type(): number {\r\n\t\treturn this._type;\r\n\t}\r\n\r\n\t// @Override\r\n\tset type(type: number) {\r\n\t\tthis._type = type;\r\n\t}\r\n\r\n\t@Override\r\n\tget line(): number {\r\n\t\treturn this._line;\r\n\t}\r\n\r\n\t// @Override\r\n\tset line(line: number) {\r\n\t\tthis._line = line;\r\n\t}\r\n\r\n\t@Override\r\n\tget text(): string | undefined {\r\n\t\tif (this._text != null) {\r\n\t\t\treturn this._text;\r\n\t\t}\r\n\r\n\t\tlet input: CharStream | undefined = this.inputStream;\r\n\t\tif (input == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet n: number = input.size;\r\n\t\tif (this.start < n && this.stop < n) {\r\n\t\t\treturn input.getText(Interval.of(this.start, this.stop));\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Explicitly set the text for this token. If {code text} is not\r\n\t * `undefined`, then {@link #getText} will return this value rather than\r\n\t * extracting the text from the input.\r\n\t *\r\n\t * @param text The explicit text of the token, or `undefined` if the text\r\n\t * should be obtained from the input along with the start and stop indexes\r\n\t * of the token.\r\n\t */\r\n\t// @Override\r\n\tset text(text: string | undefined) {\r\n\t\tthis._text = text;\r\n\t}\r\n\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\treturn this._charPositionInLine;\r\n\t}\r\n\r\n\t// @Override\r\n\tset charPositionInLine(charPositionInLine: number) {\r\n\t\tthis._charPositionInLine = charPositionInLine;\r\n\t}\r\n\r\n\t@Override\r\n\tget channel(): number {\r\n\t\treturn this._channel;\r\n\t}\r\n\r\n\t// @Override\r\n\tset channel(channel: number) {\r\n\t\tthis._channel = channel;\r\n\t}\r\n\r\n\t@Override\r\n\tget startIndex(): number {\r\n\t\treturn this.start;\r\n\t}\r\n\r\n\tset startIndex(start: number) {\r\n\t\tthis.start = start;\r\n\t}\r\n\r\n\t@Override\r\n\tget stopIndex(): number {\r\n\t\treturn this.stop;\r\n\t}\r\n\r\n\tset stopIndex(stop: number) {\r\n\t\tthis.stop = stop;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenIndex(): number {\r\n\t\treturn this.index;\r\n\t}\r\n\r\n\t// @Override\r\n\tset tokenIndex(index: number) {\r\n\t\tthis.index = index;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenSource(): TokenSource | undefined {\r\n\t\treturn this.source.source;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): CharStream | undefined {\r\n\t\treturn this.source.stream;\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(recognizer: Recognizer | undefined): string;\r\n\r\n\t@Override\r\n\tpublic toString(recognizer?: Recognizer): string {\r\n\t\tlet channelStr: string = \"\";\r\n\t\tif (this._channel > 0) {\r\n\t\t\tchannelStr = \",channel=\" + this._channel;\r\n\t\t}\r\n\r\n\t\tlet txt: string | undefined = this.text;\r\n\t\tif (txt != null) {\r\n\t\t\ttxt = txt.replace(/\\n/g, \"\\\\n\");\r\n\t\t\ttxt = txt.replace(/\\r/g, \"\\\\r\");\r\n\t\t\ttxt = txt.replace(/\\t/g, \"\\\\t\");\r\n\t\t} else {\r\n\t\t\ttxt = \"\";\r\n\t\t}\r\n\r\n\t\tlet typeString = String(this._type);\r\n\t\tif (recognizer) {\r\n\t\t\ttypeString = recognizer.vocabulary.getDisplayName(this._type);\r\n\t\t}\r\n\r\n\t\treturn \"[@\" + this.tokenIndex + \",\" + this.start + \":\" + this.stop + \"='\" + txt + \"',<\" + typeString + \">\" + channelStr + \",\" + this._line + \":\" + this.charPositionInLine + \"]\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.3010112-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CommonToken } from \"./CommonToken\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * This default implementation of {@link TokenFactory} creates\r\n * {@link CommonToken} objects.\r\n */\r\nexport class CommonTokenFactory implements TokenFactory {\r\n\t/**\r\n\t * Indicates whether {@link CommonToken#setText} should be called after\r\n\t * constructing tokens to explicitly set the text. This is useful for cases\r\n\t * where the input stream might not be able to provide arbitrary substrings\r\n\t * of text from the input after the lexer creates a token (e.g. the\r\n\t * implementation of {@link CharStream#getText} in\r\n\t * {@link UnbufferedCharStream}\r\n\t * {@link UnsupportedOperationException}). Explicitly setting the token text\r\n\t * allows {@link Token#getText} to be called at any time regardless of the\r\n\t * input stream implementation.\r\n\t *\r\n\t * The default value is `false` to avoid the performance and memory\r\n\t * overhead of copying text for every token unless explicitly requested.\r\n\t */\r\n\tprotected copyText: boolean;\r\n\r\n\t/**\r\n\t * Constructs a {@link CommonTokenFactory} with the specified value for\r\n\t * {@link #copyText}.\r\n\t *\r\n\t * When `copyText` is `false`, the {@link #DEFAULT} instance\r\n\t * should be used instead of constructing a new instance.\r\n\t *\r\n\t * @param copyText The value for {@link #copyText}.\r\n\t */\r\n\tconstructor(copyText: boolean = false) {\r\n\t\tthis.copyText = copyText;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic create(\r\n\t\tsource: { source?: TokenSource, stream?: CharStream },\r\n\t\ttype: number,\r\n\t\ttext: string | undefined,\r\n\t\tchannel: number,\r\n\t\tstart: number,\r\n\t\tstop: number,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number): CommonToken {\r\n\r\n\t\tlet t: CommonToken = new CommonToken(type, text, source, channel, start, stop);\r\n\t\tt.line = line;\r\n\t\tt.charPositionInLine = charPositionInLine;\r\n\t\tif (text == null && this.copyText && source.stream != null) {\r\n\t\t\tt.text = source.stream.getText(Interval.of(start, stop));\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic createSimple(type: number, text: string): CommonToken {\r\n\t\treturn new CommonToken(type, text);\r\n\t}\r\n}\r\n\r\nexport namespace CommonTokenFactory {\r\n\t/**\r\n\t * The default {@link CommonTokenFactory} instance.\r\n\t *\r\n\t * This token factory does not explicitly copy token text when constructing\r\n\t * tokens.\r\n\t */\r\n\texport const DEFAULT: TokenFactory = new CommonTokenFactory();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.6647101-07:00\r\n\r\nimport { IntegerList } from \"./IntegerList\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class IntegerStack extends IntegerList {\r\n\r\n\tconstructor(arg?: number | IntegerStack) {\r\n\t\tsuper(arg);\r\n\t}\r\n\r\n\tpublic push(value: number): void {\r\n\t\tthis.add(value);\r\n\t}\r\n\r\n\tpublic pop(): number {\r\n\t\treturn this.removeAt(this.size - 1);\r\n\t}\r\n\r\n\tpublic peek(): number {\r\n\t\treturn this.get(this.size - 1);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.1172076-07:00\r\n\r\nimport { LexerActionExecutor } from \"../atn/LexerActionExecutor\";\r\n\r\n/**\r\n * Stores information about a {@link DFAState} which is an accept state under\r\n * some condition. Certain settings, such as\r\n * {@link ParserATNSimulator#getPredictionMode()}, may be used in addition to\r\n * this information to determine whether or not a particular state is an accept\r\n * state.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class AcceptStateInfo {\r\n\tprivate readonly _prediction: number;\r\n\tprivate readonly _lexerActionExecutor?: LexerActionExecutor;\r\n\r\n\tconstructor(prediction: number);\r\n\tconstructor(prediction: number, lexerActionExecutor: LexerActionExecutor | undefined);\r\n\tconstructor(prediction: number, lexerActionExecutor?: LexerActionExecutor) {\r\n\t\tthis._prediction = prediction;\r\n\t\tthis._lexerActionExecutor = lexerActionExecutor;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the prediction made by this accept state. Note that this value\r\n\t * assumes the predicates, if any, in the {@link DFAState} evaluate to\r\n\t * `true`. If predicate evaluation is enabled, the final prediction of\r\n\t * the accept state will be determined by the result of predicate\r\n\t * evaluation.\r\n\t */\r\n\tget prediction(): number {\r\n\t\treturn this._prediction;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the {@link LexerActionExecutor} which can be used to execute actions\r\n\t * and/or commands after the lexer matches a token.\r\n\t */\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn this._lexerActionExecutor;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { Array2DHashSet } from \"./Array2DHashSet\";\r\nimport { DefaultEqualityComparator } from \"./DefaultEqualityComparator\";\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Equatable, JavaCollection, JavaMap, JavaSet } from \"./Stubs\";\r\n\r\n// Since `Array2DHashMap` is implemented on top of `Array2DHashSet`, we defined a bucket type which can store a\r\n// key-value pair. The value is optional since looking up values in the map by a key only needs to include the key.\r\ninterface Bucket { key: K; value?: V; }\r\n\r\nclass MapKeyEqualityComparator implements EqualityComparator> {\r\n\tprivate readonly keyComparator: EqualityComparator;\r\n\r\n\tconstructor(keyComparator: EqualityComparator) {\r\n\t\tthis.keyComparator = keyComparator;\r\n\t}\r\n\r\n\tpublic hashCode(obj: Bucket): number {\r\n\t\treturn this.keyComparator.hashCode(obj.key);\r\n\t}\r\n\r\n\tpublic equals(a: Bucket, b: Bucket): boolean {\r\n\t\treturn this.keyComparator.equals(a.key, b.key);\r\n\t}\r\n}\r\n\r\nexport class Array2DHashMap implements JavaMap {\r\n\tprivate backingStore: Array2DHashSet>;\r\n\r\n\tconstructor(keyComparer: EqualityComparator);\r\n\tconstructor(map: Array2DHashMap);\r\n\tconstructor(keyComparer: EqualityComparator | Array2DHashMap) {\r\n\t\tif (keyComparer instanceof Array2DHashMap) {\r\n\t\t\tthis.backingStore = new Array2DHashSet>(keyComparer.backingStore);\r\n\t\t} else {\r\n\t\t\tthis.backingStore = new Array2DHashSet>(new MapKeyEqualityComparator(keyComparer));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic clear(): void {\r\n\t\tthis.backingStore.clear();\r\n\t}\r\n\r\n\tpublic containsKey(key: K): boolean {\r\n\t\treturn this.backingStore.contains({ key });\r\n\t}\r\n\r\n\tpublic get(key: K): V | undefined {\r\n\t\tlet bucket = this.backingStore.get({ key });\r\n\t\tif (!bucket) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn bucket.value;\r\n\t}\r\n\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.backingStore.isEmpty;\r\n\t}\r\n\r\n\tpublic put(key: K, value: V): V | undefined {\r\n\t\tlet element = this.backingStore.get({ key, value });\r\n\t\tlet result: V | undefined;\r\n\t\tif (!element) {\r\n\t\t\tthis.backingStore.add({ key, value });\r\n\t\t} else {\r\n\t\t\tresult = element.value;\r\n\t\t\telement.value = value;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic putIfAbsent(key: K, value: V): V | undefined {\r\n\t\tlet element = this.backingStore.get({ key, value });\r\n\t\tlet result: V | undefined;\r\n\t\tif (!element) {\r\n\t\t\tthis.backingStore.add({ key, value });\r\n\t\t} else {\r\n\t\t\tresult = element.value;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tget size(): number {\r\n\t\treturn this.backingStore.size;\r\n\t}\r\n\r\n\tpublic hashCode(): number {\r\n\t\treturn this.backingStore.hashCode();\r\n\t}\r\n\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (!(o instanceof Array2DHashMap)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.backingStore.equals(o.backingStore);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.4381103-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\n\r\nexport abstract class DecisionState extends ATNState {\r\n\tpublic decision: number = -1;\r\n\tpublic nonGreedy: boolean = false;\r\n\tpublic sll: boolean = false;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.6390614-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { Override } from \"../Decorators\";\r\nimport { JavaMap } from \"../misc/Stubs\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport * as assert from \"assert\";\r\n\r\n/** Used to cache {@link PredictionContext} objects. Its used for the shared\r\n * context cash associated with contexts in DFA states. This cache\r\n * can be used for both lexers and parsers.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class PredictionContextCache {\r\n\tpublic static UNCACHED: PredictionContextCache = new PredictionContextCache(false);\r\n\r\n\tprivate contexts: JavaMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\tprivate childContexts: JavaMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\tprivate joinContexts: JavaMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\r\n\tprivate enableCache: boolean;\r\n\r\n\tconstructor(enableCache: boolean = true) {\r\n\t\tthis.enableCache = enableCache;\r\n\t}\r\n\r\n\tpublic getAsCached(context: PredictionContext): PredictionContext {\r\n\t\tif (!this.enableCache) {\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\tlet result = this.contexts.get(context);\r\n\t\tif (!result) {\r\n\t\t\tresult = context;\r\n\t\t\tthis.contexts.put(context, context);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic getChild(context: PredictionContext, invokingState: number): PredictionContext {\r\n\t\tif (!this.enableCache) {\r\n\t\t\treturn context.getChild(invokingState);\r\n\t\t}\r\n\r\n\t\tlet operands: PredictionContextCache.PredictionContextAndInt = new PredictionContextCache.PredictionContextAndInt(context, invokingState);\r\n\t\tlet result = this.childContexts.get(operands);\r\n\t\tif (!result) {\r\n\t\t\tresult = context.getChild(invokingState);\r\n\t\t\tresult = this.getAsCached(result);\r\n\t\t\tthis.childContexts.put(operands, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic join(x: PredictionContext, y: PredictionContext): PredictionContext {\r\n\t\tif (!this.enableCache) {\r\n\t\t\treturn PredictionContext.join(x, y, this);\r\n\t\t}\r\n\r\n\t\tlet operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(x, y);\r\n\t\tlet result = this.joinContexts.get(operands);\r\n\t\tif (result) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\tresult = PredictionContext.join(x, y, this);\r\n\t\tresult = this.getAsCached(result);\r\n\t\tthis.joinContexts.put(operands, result);\r\n\t\treturn result;\r\n\t}\r\n}\r\n\r\nexport namespace PredictionContextCache {\r\n\texport class PredictionContextAndInt {\r\n\t\tprivate obj: PredictionContext;\r\n\t\tprivate value: number;\r\n\r\n\t\tconstructor(obj: PredictionContext, value: number) {\r\n\t\t\tthis.obj = obj;\r\n\t\t\tthis.value = value;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (!(obj instanceof PredictionContextAndInt)) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (obj === this) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tlet other: PredictionContextAndInt = obj;\r\n\t\t\treturn this.value === other.value\r\n\t\t\t\t&& (this.obj === other.obj || (this.obj != null && this.obj.equals(other.obj)));\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\tlet hashCode: number = 5;\r\n\t\t\thashCode = 7 * hashCode + (this.obj != null ? this.obj.hashCode() : 0);\r\n\t\t\thashCode = 7 * hashCode + this.value;\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\t}\r\n\r\n\texport class IdentityCommutativePredictionContextOperands {\r\n\t\tprivate _x: PredictionContext;\r\n\t\tprivate _y: PredictionContext;\r\n\r\n\t\tconstructor(x: PredictionContext, y: PredictionContext) {\r\n\t\t\tassert(x != null);\r\n\t\t\tassert(y != null);\r\n\t\t\tthis._x = x;\r\n\t\t\tthis._y = y;\r\n\t\t}\r\n\r\n\t\tget x(): PredictionContext {\r\n\t\t\treturn this._x;\r\n\t\t}\r\n\r\n\t\tget y(): PredictionContext {\r\n\t\t\treturn this._y;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(o: any): boolean {\r\n\t\t\tif (!(o instanceof IdentityCommutativePredictionContextOperands)) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (this === o) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tlet other: IdentityCommutativePredictionContextOperands = o;\r\n\t\t\treturn (this._x === other._x && this._y === other._y) || (this._x === other._y && this._y === other._x);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\treturn this._x.hashCode() ^ this._y.hashCode();\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.3812636-07:00\r\n\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { Arrays } from \"../misc/Arrays\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { EqualityComparator } from \"../misc/EqualityComparator\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { Equatable, JavaSet } from \"../misc/Stubs\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\nconst INITIAL_HASH: number = 1;\r\n\r\nexport abstract class PredictionContext implements Equatable {\r\n\t/**\r\n\t * Stores the computed hash code of this {@link PredictionContext}. The hash\r\n\t * code is computed in parts to match the following reference algorithm.\r\n\t *\r\n\t * ```\r\n\t * private int referenceHashCode() {\r\n\t * int hash = {@link MurmurHash#initialize MurmurHash.initialize}({@link #INITIAL_HASH});\r\n\t *\r\n\t * for (int i = 0; i < this.size; i++) {\r\n\t * hash = {@link MurmurHash#update MurmurHash.update}(hash, {@link #getParent getParent}(i));\r\n\t * }\r\n\t *\r\n\t * for (int i = 0; i < this.size; i++) {\r\n\t * hash = {@link MurmurHash#update MurmurHash.update}(hash, {@link #getReturnState getReturnState}(i));\r\n\t * }\r\n\t *\r\n\t * hash = {@link MurmurHash#finish MurmurHash.finish}(hash, 2 * this.size);\r\n\t * return hash;\r\n\t * }\r\n\t * ```\r\n\t */\r\n\tprivate readonly cachedHashCode: number;\r\n\r\n\tconstructor(cachedHashCode: number) {\r\n\t\tthis.cachedHashCode = cachedHashCode;\r\n\t}\r\n\r\n\tprotected static calculateEmptyHashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize(INITIAL_HASH);\r\n\t\thash = MurmurHash.finish(hash, 0);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\tprotected static calculateSingleHashCode(parent: PredictionContext, returnState: number): number {\r\n\t\tlet hash: number = MurmurHash.initialize(INITIAL_HASH);\r\n\t\thash = MurmurHash.update(hash, parent);\r\n\t\thash = MurmurHash.update(hash, returnState);\r\n\t\thash = MurmurHash.finish(hash, 2);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\tprotected static calculateHashCode(parents: PredictionContext[], returnStates: number[]): number {\r\n\t\tlet hash: number = MurmurHash.initialize(INITIAL_HASH);\r\n\r\n\t\tfor (let parent of parents) {\r\n\t\t\thash = MurmurHash.update(hash, parent);\r\n\t\t}\r\n\r\n\t\tfor (let returnState of returnStates) {\r\n\t\t\thash = MurmurHash.update(hash, returnState);\r\n\t\t}\r\n\r\n\t\thash = MurmurHash.finish(hash, 2 * parents.length);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\tpublic abstract readonly size: number;\r\n\r\n\tpublic abstract getReturnState(index: number): number;\r\n\r\n\tpublic abstract findReturnState(returnState: number): number;\r\n\r\n\t// @NotNull\r\n\tpublic abstract getParent(index: number): PredictionContext;\r\n\r\n\tprotected abstract addEmptyContext(): PredictionContext;\r\n\r\n\tprotected abstract removeEmptyContext(): PredictionContext;\r\n\r\n\tpublic static fromRuleContext(atn: ATN, outerContext: RuleContext, fullContext: boolean = true): PredictionContext {\r\n\t\tif (outerContext.isEmpty) {\r\n\t\t\treturn fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL;\r\n\t\t}\r\n\r\n\t\tlet parent: PredictionContext;\r\n\t\tif (outerContext._parent) {\r\n\t\t\tparent = PredictionContext.fromRuleContext(atn, outerContext._parent, fullContext);\r\n\t\t} else {\r\n\t\t\tparent = fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL;\r\n\t\t}\r\n\r\n\t\tlet state: ATNState = atn.states[outerContext.invokingState];\r\n\t\tlet transition: RuleTransition = state.transition(0) as RuleTransition;\r\n\t\treturn parent.getChild(transition.followState.stateNumber);\r\n\t}\r\n\r\n\tprivate static addEmptyContext(context: PredictionContext): PredictionContext {\r\n\t\treturn context.addEmptyContext();\r\n\t}\r\n\r\n\tprivate static removeEmptyContext(context: PredictionContext): PredictionContext {\r\n\t\treturn context.removeEmptyContext();\r\n\t}\r\n\r\n\tpublic static join(@NotNull context0: PredictionContext, @NotNull context1: PredictionContext, @NotNull contextCache: PredictionContextCache = PredictionContextCache.UNCACHED): PredictionContext {\r\n\t\tif (context0 === context1) {\r\n\t\t\treturn context0;\r\n\t\t}\r\n\r\n\t\tif (context0.isEmpty) {\r\n\t\t\treturn PredictionContext.isEmptyLocal(context0) ? context0 : PredictionContext.addEmptyContext(context1);\r\n\t\t} else if (context1.isEmpty) {\r\n\t\t\treturn PredictionContext.isEmptyLocal(context1) ? context1 : PredictionContext.addEmptyContext(context0);\r\n\t\t}\r\n\r\n\t\tlet context0size: number = context0.size;\r\n\t\tlet context1size: number = context1.size;\r\n\t\tif (context0size === 1 && context1size === 1 && context0.getReturnState(0) === context1.getReturnState(0)) {\r\n\t\t\tlet merged: PredictionContext = contextCache.join(context0.getParent(0), context1.getParent(0));\r\n\t\t\tif (merged === context0.getParent(0)) {\r\n\t\t\t\treturn context0;\r\n\t\t\t} else if (merged === context1.getParent(0)) {\r\n\t\t\t\treturn context1;\r\n\t\t\t} else {\r\n\t\t\t\treturn merged.getChild(context0.getReturnState(0));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet count: number = 0;\r\n\t\tlet parentsList: PredictionContext[] = new Array(context0size + context1size);\r\n\t\tlet returnStatesList: number[] = new Array(parentsList.length);\r\n\t\tlet leftIndex: number = 0;\r\n\t\tlet rightIndex: number = 0;\r\n\t\tlet canReturnLeft: boolean = true;\r\n\t\tlet canReturnRight: boolean = true;\r\n\t\twhile (leftIndex < context0size && rightIndex < context1size) {\r\n\t\t\tif (context0.getReturnState(leftIndex) === context1.getReturnState(rightIndex)) {\r\n\t\t\t\tparentsList[count] = contextCache.join(context0.getParent(leftIndex), context1.getParent(rightIndex));\r\n\t\t\t\treturnStatesList[count] = context0.getReturnState(leftIndex);\r\n\t\t\t\tcanReturnLeft = canReturnLeft && parentsList[count] === context0.getParent(leftIndex);\r\n\t\t\t\tcanReturnRight = canReturnRight && parentsList[count] === context1.getParent(rightIndex);\r\n\t\t\t\tleftIndex++;\r\n\t\t\t\trightIndex++;\r\n\t\t\t} else if (context0.getReturnState(leftIndex) < context1.getReturnState(rightIndex)) {\r\n\t\t\t\tparentsList[count] = context0.getParent(leftIndex);\r\n\t\t\t\treturnStatesList[count] = context0.getReturnState(leftIndex);\r\n\t\t\t\tcanReturnRight = false;\r\n\t\t\t\tleftIndex++;\r\n\t\t\t} else {\r\n\t\t\t\tassert(context1.getReturnState(rightIndex) < context0.getReturnState(leftIndex));\r\n\t\t\t\tparentsList[count] = context1.getParent(rightIndex);\r\n\t\t\t\treturnStatesList[count] = context1.getReturnState(rightIndex);\r\n\t\t\t\tcanReturnLeft = false;\r\n\t\t\t\trightIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tcount++;\r\n\t\t}\r\n\r\n\t\twhile (leftIndex < context0size) {\r\n\t\t\tparentsList[count] = context0.getParent(leftIndex);\r\n\t\t\treturnStatesList[count] = context0.getReturnState(leftIndex);\r\n\t\t\tleftIndex++;\r\n\t\t\tcanReturnRight = false;\r\n\t\t\tcount++;\r\n\t\t}\r\n\r\n\t\twhile (rightIndex < context1size) {\r\n\t\t\tparentsList[count] = context1.getParent(rightIndex);\r\n\t\t\treturnStatesList[count] = context1.getReturnState(rightIndex);\r\n\t\t\trightIndex++;\r\n\t\t\tcanReturnLeft = false;\r\n\t\t\tcount++;\r\n\t\t}\r\n\r\n\t\tif (canReturnLeft) {\r\n\t\t\treturn context0;\r\n\t\t} else if (canReturnRight) {\r\n\t\t\treturn context1;\r\n\t\t}\r\n\r\n\t\tif (count < parentsList.length) {\r\n\t\t\tparentsList = parentsList.slice(0, count);\r\n\t\t\treturnStatesList = returnStatesList.slice(0, count);\r\n\t\t}\r\n\r\n\t\tif (parentsList.length === 0) {\r\n\t\t\t// if one of them was EMPTY_LOCAL, it would be empty and handled at the beginning of the method\r\n\t\t\treturn PredictionContext.EMPTY_FULL;\r\n\t\t} else if (parentsList.length === 1) {\r\n\t\t\treturn new SingletonPredictionContext(parentsList[0], returnStatesList[0]);\r\n\t\t} else {\r\n\t\t\treturn new ArrayPredictionContext(parentsList, returnStatesList);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static isEmptyLocal(context: PredictionContext): boolean {\r\n\t\treturn context === PredictionContext.EMPTY_LOCAL;\r\n\t}\r\n\r\n\tpublic static getCachedContext(\r\n\t\t@NotNull context: PredictionContext,\r\n\t\t@NotNull contextCache: Array2DHashMap,\r\n\t\t@NotNull visited: PredictionContext.IdentityHashMap): PredictionContext {\r\n\t\tif (context.isEmpty) {\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\tlet existing = visited.get(context);\r\n\t\tif (existing) {\r\n\t\t\treturn existing;\r\n\t\t}\r\n\r\n\t\texisting = contextCache.get(context);\r\n\t\tif (existing) {\r\n\t\t\tvisited.put(context, existing);\r\n\t\t\treturn existing;\r\n\t\t}\r\n\r\n\t\tlet changed: boolean = false;\r\n\t\tlet parents: PredictionContext[] = new Array(context.size);\r\n\t\tfor (let i = 0; i < parents.length; i++) {\r\n\t\t\tlet parent: PredictionContext = PredictionContext.getCachedContext(context.getParent(i), contextCache, visited);\r\n\t\t\tif (changed || parent !== context.getParent(i)) {\r\n\t\t\t\tif (!changed) {\r\n\t\t\t\t\tparents = new Array(context.size);\r\n\t\t\t\t\tfor (let j = 0; j < context.size; j++) {\r\n\t\t\t\t\t\tparents[j] = context.getParent(j);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tparents[i] = parent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!changed) {\r\n\t\t\texisting = contextCache.putIfAbsent(context, context);\r\n\t\t\tvisited.put(context, existing != null ? existing : context);\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\t// We know parents.length>0 because context.isEmpty is checked at the beginning of the method.\r\n\t\tlet updated: PredictionContext;\r\n\t\tif (parents.length === 1) {\r\n\t\t\tupdated = new SingletonPredictionContext(parents[0], context.getReturnState(0));\r\n\t\t} else {\r\n\t\t\tlet returnStates: number[] = new Array(context.size);\r\n\t\t\tfor (let i = 0; i < context.size; i++) {\r\n\t\t\t\treturnStates[i] = context.getReturnState(i);\r\n\t\t\t}\r\n\r\n\t\t\tupdated = new ArrayPredictionContext(parents, returnStates, context.hashCode());\r\n\t\t}\r\n\r\n\t\texisting = contextCache.putIfAbsent(updated, updated);\r\n\t\tvisited.put(updated, existing || updated);\r\n\t\tvisited.put(context, existing || updated);\r\n\r\n\t\treturn updated;\r\n\t}\r\n\r\n\tpublic appendSingleContext(returnContext: number, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn this.appendContext(PredictionContext.EMPTY_FULL.getChild(returnContext), contextCache);\r\n\t}\r\n\r\n\tpublic abstract appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext;\r\n\r\n\tpublic getChild(returnState: number): PredictionContext {\r\n\t\treturn new SingletonPredictionContext(this, returnState);\r\n\t}\r\n\r\n\tpublic abstract readonly isEmpty: boolean;\r\n\r\n\tpublic abstract readonly hasEmpty: boolean;\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.cachedHashCode;\r\n\t}\r\n\r\n\t// @Override\r\n\tpublic abstract equals(o: any): boolean;\r\n\r\n\tpublic toStrings(recognizer: Recognizer | undefined, currentState: number, stop: PredictionContext = PredictionContext.EMPTY_FULL): string[] {\r\n\t\tlet result: string[] = [];\r\n\r\n\t\touter:\r\n\t\tfor (let perm = 0; ; perm++) {\r\n\t\t\tlet offset: number = 0;\r\n\t\t\tlet last: boolean = true;\r\n\t\t\tlet p: PredictionContext = this;\r\n\t\t\tlet stateNumber: number = currentState;\r\n\t\t\tlet localBuffer: string = \"\";\r\n\t\t\tlocalBuffer += \"[\";\r\n\t\t\twhile (!p.isEmpty && p !== stop) {\r\n\t\t\t\tlet index: number = 0;\r\n\t\t\t\tif (p.size > 0) {\r\n\t\t\t\t\tlet bits: number = 1;\r\n\t\t\t\t\twhile (((1 << bits) >>> 0) < p.size) {\r\n\t\t\t\t\t\tbits++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet mask: number = ((1 << bits) >>> 0) - 1;\r\n\t\t\t\t\tindex = (perm >> offset) & mask;\r\n\t\t\t\t\tlast = last && index >= p.size - 1;\r\n\t\t\t\t\tif (index >= p.size) {\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toffset += bits;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (recognizer) {\r\n\t\t\t\t\tif (localBuffer.length > 1) {\r\n\t\t\t\t\t\t// first char is '[', if more than that this isn't the first rule\r\n\t\t\t\t\t\tlocalBuffer += \" \";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet atn: ATN = recognizer.atn;\r\n\t\t\t\t\tlet s: ATNState = atn.states[stateNumber];\r\n\t\t\t\t\tlet ruleName: string = recognizer.ruleNames[s.ruleIndex];\r\n\t\t\t\t\tlocalBuffer += ruleName;\r\n\t\t\t\t} else if (p.getReturnState(index) !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tif (!p.isEmpty) {\r\n\t\t\t\t\t\tif (localBuffer.length > 1) {\r\n\t\t\t\t\t\t\t// first char is '[', if more than that this isn't the first rule\r\n\t\t\t\t\t\t\tlocalBuffer += \" \";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlocalBuffer += p.getReturnState(index);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstateNumber = p.getReturnState(index);\r\n\t\t\t\tp = p.getParent(index);\r\n\t\t\t}\r\n\r\n\t\t\tlocalBuffer += \"]\";\r\n\t\t\tresult.push(localBuffer);\r\n\r\n\t\t\tif (last) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n\r\nclass EmptyPredictionContext extends PredictionContext {\r\n\tprivate fullContext: boolean;\r\n\r\n\tconstructor(fullContext: boolean) {\r\n\t\tsuper(PredictionContext.calculateEmptyHashCode());\r\n\t\tthis.fullContext = fullContext;\r\n\t}\r\n\r\n\tget isFullContext(): boolean {\r\n\t\treturn this.fullContext;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected addEmptyContext(): PredictionContext {\r\n\t\treturn this;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected removeEmptyContext(): PredictionContext {\r\n\t\tthrow new Error(\"Cannot remove the empty context from itself.\");\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getParent(index: number): PredictionContext {\r\n\t\tthrow new Error(\"index out of bounds\");\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getReturnState(index: number): number {\r\n\t\tthrow new Error(\"index out of bounds\");\r\n\t}\r\n\r\n\t@Override\r\n\tpublic findReturnState(returnState: number): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendSingleContext(returnContext: number, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn contextCache.getChild(this, returnContext);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn suffix;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasEmpty(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\treturn this === o;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toStrings(recognizer: any, currentState: number, stop?: PredictionContext): string[] {\r\n\t\treturn [\"[]\"];\r\n\t}\r\n\r\n}\r\n\r\nclass ArrayPredictionContext extends PredictionContext {\r\n\t@NotNull\r\n\tpublic parents: PredictionContext[];\r\n\r\n\t@NotNull\r\n\tpublic returnStates: number[];\r\n\r\n\tconstructor( @NotNull parents: PredictionContext[], returnStates: number[], hashCode?: number) {\r\n\t\tsuper(hashCode || PredictionContext.calculateHashCode(parents, returnStates));\r\n\t\tassert(parents.length === returnStates.length);\r\n\t\tassert(returnStates.length > 1 || returnStates[0] !== PredictionContext.EMPTY_FULL_STATE_KEY, \"Should be using PredictionContext.EMPTY instead.\");\r\n\r\n\t\tthis.parents = parents;\r\n\t\tthis.returnStates = returnStates;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getParent(index: number): PredictionContext {\r\n\t\treturn this.parents[index];\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getReturnState(index: number): number {\r\n\t\treturn this.returnStates[index];\r\n\t}\r\n\r\n\t@Override\r\n\tpublic findReturnState(returnState: number): number {\r\n\t\treturn Arrays.binarySearch(this.returnStates, returnState);\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.returnStates.length;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasEmpty(): boolean {\r\n\t\treturn this.returnStates[this.returnStates.length - 1] === PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected addEmptyContext(): PredictionContext {\r\n\t\tif (this.hasEmpty) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tlet parents2: PredictionContext[] = this.parents.slice(0);\r\n\t\tlet returnStates2: number[] = this.returnStates.slice(0);\r\n\t\tparents2.push(PredictionContext.EMPTY_FULL);\r\n\t\treturnStates2.push(PredictionContext.EMPTY_FULL_STATE_KEY);\r\n\t\treturn new ArrayPredictionContext(parents2, returnStates2);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected removeEmptyContext(): PredictionContext {\r\n\t\tif (!this.hasEmpty) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (this.returnStates.length === 2) {\r\n\t\t\treturn new SingletonPredictionContext(this.parents[0], this.returnStates[0]);\r\n\t\t} else {\r\n\t\t\tlet parents2: PredictionContext[] = this.parents.slice(0, this.parents.length - 1);\r\n\t\t\tlet returnStates2: number[] = this.returnStates.slice(0, this.returnStates.length - 1);\r\n\t\t\treturn new ArrayPredictionContext(parents2, returnStates2);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn ArrayPredictionContext.appendContextImpl(this, suffix, new PredictionContext.IdentityHashMap());\r\n\t}\r\n\r\n\tprivate static appendContextImpl(context: PredictionContext, suffix: PredictionContext, visited: PredictionContext.IdentityHashMap): PredictionContext {\r\n\t\tif (suffix.isEmpty) {\r\n\t\t\tif (PredictionContext.isEmptyLocal(suffix)) {\r\n\t\t\t\tif (context.hasEmpty) {\r\n\t\t\t\t\treturn PredictionContext.EMPTY_LOCAL;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthrow new Error(\"what to do here?\");\r\n\t\t\t}\r\n\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\tif (suffix.size !== 1) {\r\n\t\t\tthrow new Error(\"Appending a tree suffix is not yet supported.\");\r\n\t\t}\r\n\r\n\t\tlet result = visited.get(context);\r\n\t\tif (!result) {\r\n\t\t\tif (context.isEmpty) {\r\n\t\t\t\tresult = suffix;\r\n\t\t\t} else {\r\n\t\t\t\tlet parentCount: number = context.size;\r\n\t\t\t\tif (context.hasEmpty) {\r\n\t\t\t\t\tparentCount--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet updatedParents: PredictionContext[] = new Array(parentCount);\r\n\t\t\t\tlet updatedReturnStates: number[] = new Array(parentCount);\r\n\t\t\t\tfor (let i = 0; i < parentCount; i++) {\r\n\t\t\t\t\tupdatedReturnStates[i] = context.getReturnState(i);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let i = 0; i < parentCount; i++) {\r\n\t\t\t\t\tupdatedParents[i] = ArrayPredictionContext.appendContextImpl(context.getParent(i), suffix, visited);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (updatedParents.length === 1) {\r\n\t\t\t\t\tresult = new SingletonPredictionContext(updatedParents[0], updatedReturnStates[0]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tassert(updatedParents.length > 1);\r\n\t\t\t\t\tresult = new ArrayPredictionContext(updatedParents, updatedReturnStates);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (context.hasEmpty) {\r\n\t\t\t\t\tresult = PredictionContext.join(result, suffix);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvisited.put(context, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (this === o) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(o instanceof ArrayPredictionContext)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this.hashCode() !== o.hashCode()) {\r\n\t\t\t// can't be same if hash is different\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet other: ArrayPredictionContext = o;\r\n\t\treturn this.equalsImpl(other, new Array2DHashSet());\r\n\t}\r\n\r\n\tprivate equalsImpl(other: ArrayPredictionContext, visited: JavaSet): boolean {\r\n\t\tlet selfWorkList: PredictionContext[] = [];\r\n\t\tlet otherWorkList: PredictionContext[] = [];\r\n\t\tselfWorkList.push(this);\r\n\t\totherWorkList.push(other);\r\n\t\twhile (true) {\r\n\t\t\tlet currentSelf = selfWorkList.pop();\r\n\t\t\tlet currentOther = otherWorkList.pop();\r\n\t\t\tif (!currentSelf || !currentOther) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tlet operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(currentSelf, currentOther);\r\n\t\t\tif (!visited.add(operands)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet selfSize: number = operands.x.size;\r\n\t\t\tif (selfSize === 0) {\r\n\t\t\t\tif (!operands.x.equals(operands.y)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet otherSize: number = operands.y.size;\r\n\t\t\tif (selfSize !== otherSize) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < selfSize; i++) {\r\n\t\t\t\tif (operands.x.getReturnState(i) !== operands.y.getReturnState(i)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet selfParent: PredictionContext = operands.x.getParent(i);\r\n\t\t\t\tlet otherParent: PredictionContext = operands.y.getParent(i);\r\n\t\t\t\tif (selfParent.hashCode() !== otherParent.hashCode()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (selfParent !== otherParent) {\r\n\t\t\t\t\tselfWorkList.push(selfParent);\r\n\t\t\t\t\totherWorkList.push(otherParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nexport class SingletonPredictionContext extends PredictionContext {\r\n\r\n\t@NotNull\r\n\tpublic parent: PredictionContext;\r\n\tpublic returnState: number;\r\n\r\n\tconstructor(@NotNull parent: PredictionContext, returnState: number) {\r\n\t\tsuper(PredictionContext.calculateSingleHashCode(parent, returnState));\r\n\t\t// assert(returnState != PredictionContext.EMPTY_FULL_STATE_KEY && returnState != PredictionContext.EMPTY_LOCAL_STATE_KEY);\r\n\t\tthis.parent = parent;\r\n\t\tthis.returnState = returnState;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getParent(index: number): PredictionContext {\r\n\t\t// assert(index == 0);\r\n\t\treturn this.parent;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getReturnState(index: number): number {\r\n\t\t// assert(index == 0);\r\n\t\treturn this.returnState;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic findReturnState(returnState: number): number {\r\n\t\treturn this.returnState === returnState ? 0 : -1;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn 1;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasEmpty(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn contextCache.getChild(this.parent.appendContext(suffix, contextCache), this.returnState);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected addEmptyContext(): PredictionContext {\r\n\t\tlet parents: PredictionContext[] = [this.parent, PredictionContext.EMPTY_FULL];\r\n\t\tlet returnStates: number[] = [this.returnState, PredictionContext.EMPTY_FULL_STATE_KEY];\r\n\t\treturn new ArrayPredictionContext(parents, returnStates);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected removeEmptyContext(): PredictionContext {\r\n\t\treturn this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(o instanceof SingletonPredictionContext)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet other: SingletonPredictionContext = o;\r\n\t\tif (this.hashCode() !== other.hashCode()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.returnState === other.returnState\r\n\t\t\t&& this.parent.equals(other.parent);\r\n\t}\r\n}\r\n\r\nexport namespace PredictionContext {\r\n\texport const EMPTY_LOCAL: PredictionContext = new EmptyPredictionContext(false);\r\n\texport const EMPTY_FULL: PredictionContext = new EmptyPredictionContext(true);\r\n\texport const EMPTY_LOCAL_STATE_KEY: number = -((1 << 31) >>> 0);\r\n\texport const EMPTY_FULL_STATE_KEY: number = ((1 << 31) >>> 0) - 1;\r\n\r\n\texport class IdentityHashMap extends Array2DHashMap {\r\n\t\tconstructor() {\r\n\t\t\tsuper(IdentityEqualityComparator.INSTANCE);\r\n\t\t}\r\n\t}\r\n\r\n\texport class IdentityEqualityComparator implements EqualityComparator {\r\n\t\tpublic static readonly INSTANCE: IdentityEqualityComparator = new IdentityEqualityComparator();\r\n\r\n\t\tprivate IdentityEqualityComparator() {\r\n\t\t\t// intentionally empty\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(obj: PredictionContext): number {\r\n\t\t\treturn obj.hashCode();\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(a: PredictionContext, b: PredictionContext): boolean {\r\n\t\t\treturn a === b;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.2796692-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Equatable } from \"../misc/Stubs\";\r\nimport { LexerActionExecutor } from \"./LexerActionExecutor\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\n/**\r\n * This field stores the bit mask for implementing the\r\n * {@link #isPrecedenceFilterSuppressed} property as a bit within the\r\n * existing {@link #altAndOuterContextDepth} field.\r\n */\r\nconst SUPPRESS_PRECEDENCE_FILTER: number = 0x80000000;\r\n\r\n/**\r\n * Represents a location with context in an ATN. The location is identified by the following values:\r\n *\r\n * * The current ATN state\r\n * * The predicted alternative\r\n * * The semantic context which must be true for this configuration to be enabled\r\n * * The syntactic context, which is represented as a graph-structured stack whose path(s) lead to the root of the rule\r\n * invocations leading to this state\r\n *\r\n * In addition to these values, `ATNConfig` stores several properties about paths taken to get to the location which\r\n * were added over time to help with performance, correctness, and/or debugging.\r\n *\r\n * * `reachesIntoOuterContext`:: Used to ensure semantic predicates are not evaluated in the wrong context.\r\n * * `hasPassedThroughNonGreedyDecision`: Used for enabling first-match-wins instead of longest-match-wins after\r\n * crossing a non-greedy decision.\r\n * * `lexerActionExecutor`: Used for tracking the lexer action(s) to execute should this instance be selected during\r\n * lexing.\r\n * * `isPrecedenceFilterSuppressed`: A state variable for one of the dynamic disambiguation strategies employed by\r\n * `ParserATNSimulator.applyPrecedenceFilter`.\r\n *\r\n * Due to the use of a graph-structured stack, a single `ATNConfig` is capable of representing many individual ATN\r\n * configurations which reached the same location in an ATN by following different paths.\r\n *\r\n * PERF: To conserve memory, `ATNConfig` is split into several different concrete types. `ATNConfig` itself stores the\r\n * minimum amount of information typically used to define an `ATNConfig` instance. Various derived types provide\r\n * additional storage space for cases where a non-default value is used for some of the object properties. The\r\n * `ATNConfig.create` and `ATNConfig.transform` methods automatically select the smallest concrete type capable of\r\n * representing the unique information for any given `ATNConfig`.\r\n */\r\nexport class ATNConfig implements Equatable {\r\n\t/** The ATN state associated with this configuration */\r\n\t@NotNull\r\n\tprivate _state: ATNState;\r\n\r\n\t/**\r\n\t * This is a bit-field currently containing the following values.\r\n\t *\r\n\t * * 0x00FFFFFF: Alternative\r\n\t * * 0x7F000000: Outer context depth\r\n\t * * 0x80000000: Suppress precedence filter\r\n\t */\r\n\tprivate altAndOuterContextDepth: number;\r\n\r\n\t/** The stack of invoking states leading to the rule/states associated\r\n\t * with this config. We track only those contexts pushed during\r\n\t * execution of the ATN simulator.\r\n\t */\r\n\t@NotNull\r\n\tprivate _context: PredictionContext;\r\n\r\n\tconstructor(/*@NotNull*/ state: ATNState, alt: number, /*@NotNull*/ context: PredictionContext);\r\n\tconstructor(/*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, /*@NotNull*/ context: PredictionContext);\r\n\r\n\tconstructor(@NotNull state: ATNState, altOrConfig: number | ATNConfig, @NotNull context: PredictionContext) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tassert((altOrConfig & 0xFFFFFF) === altOrConfig);\r\n\t\t\tthis._state = state;\r\n\t\t\tthis.altAndOuterContextDepth = altOrConfig;\r\n\t\t\tthis._context = context;\r\n\t\t} else {\r\n\t\t\tthis._state = state;\r\n\t\t\tthis.altAndOuterContextDepth = altOrConfig.altAndOuterContextDepth;\r\n\t\t\tthis._context = context;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static create(/*@NotNull*/ state: ATNState, alt: number, context: PredictionContext): ATNConfig;\r\n\r\n\tpublic static create(/*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, /*@NotNull*/ semanticContext: SemanticContext): ATNConfig;\r\n\r\n\tpublic static create(/*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, /*@*/ semanticContext: SemanticContext, lexerActionExecutor: LexerActionExecutor | undefined): ATNConfig;\r\n\r\n\tpublic static create(@NotNull state: ATNState, alt: number, context: PredictionContext, @NotNull semanticContext: SemanticContext = SemanticContext.NONE, lexerActionExecutor?: LexerActionExecutor): ATNConfig {\r\n\t\tif (semanticContext !== SemanticContext.NONE) {\r\n\t\t\tif (lexerActionExecutor != null) {\r\n\t\t\t\treturn new ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, state, alt, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn new SemanticContextATNConfig(semanticContext, state, alt, context);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (lexerActionExecutor != null) {\r\n\t\t\treturn new ActionATNConfig(lexerActionExecutor, state, alt, context, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn new ATNConfig(state, alt, context);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Gets the ATN state associated with this configuration */\r\n\t@NotNull\r\n\tget state(): ATNState {\r\n\t\treturn this._state;\r\n\t}\r\n\r\n\t/** What alt (or lexer rule) is predicted by this configuration */\r\n\tget alt(): number {\r\n\t\treturn this.altAndOuterContextDepth & 0x00FFFFFF;\r\n\t}\r\n\r\n\t@NotNull\r\n\tget context(): PredictionContext {\r\n\t\treturn this._context;\r\n\t}\r\n\r\n\tset context(@NotNull context: PredictionContext) {\r\n\t\tthis._context = context;\r\n\t}\r\n\r\n\tget reachesIntoOuterContext(): boolean {\r\n\t\treturn this.outerContextDepth !== 0;\r\n\t}\r\n\r\n\t/**\r\n\t * We cannot execute predicates dependent upon local context unless\r\n\t * we know for sure we are in the correct context. Because there is\r\n\t * no way to do this efficiently, we simply cannot evaluate\r\n\t * dependent predicates unless we are in the rule that initially\r\n\t * invokes the ATN simulator.\r\n\t *\r\n\t * closure() tracks the depth of how far we dip into the outer context:\r\n\t * depth > 0. Note that it may not be totally accurate depth since I\r\n\t * don't ever decrement. TODO: make it a boolean then\r\n\t */\r\n\tget outerContextDepth(): number {\r\n\t\treturn (this.altAndOuterContextDepth >>> 24) & 0x7F;\r\n\t}\r\n\r\n\tset outerContextDepth(outerContextDepth: number) {\r\n\t\tassert(outerContextDepth >= 0);\r\n\t\t// saturate at 0x7F - everything but zero/positive is only used for debug information anyway\r\n\t\touterContextDepth = Math.min(outerContextDepth, 0x7F);\r\n\t\tthis.altAndOuterContextDepth = ((outerContextDepth << 24) | (this.altAndOuterContextDepth & ~0x7F000000) >>> 0);\r\n\t}\r\n\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@NotNull\r\n\tget semanticContext(): SemanticContext {\r\n\t\treturn SemanticContext.NONE;\r\n\t}\r\n\r\n\tget hasPassedThroughNonGreedyDecision(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clone(): ATNConfig {\r\n\t\treturn this.transform(this.state, false);\r\n\t}\r\n\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, /*@NotNull*/ semanticContext: SemanticContext): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, context: PredictionContext): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, lexerActionExecutor: LexerActionExecutor): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, arg2?: SemanticContext | PredictionContext | LexerActionExecutor): ATNConfig {\r\n\t\tif (arg2 == null) {\r\n\t\t\treturn this.transformImpl(state, this._context, this.semanticContext, checkNonGreedy, this.lexerActionExecutor);\r\n\t\t} else if (arg2 instanceof PredictionContext) {\r\n\t\t\treturn this.transformImpl(state, arg2, this.semanticContext, checkNonGreedy, this.lexerActionExecutor);\r\n\t\t} else if (arg2 instanceof SemanticContext) {\r\n\t\t\treturn this.transformImpl(state, this._context, arg2, checkNonGreedy, this.lexerActionExecutor);\r\n\t\t} else {\r\n\t\t\treturn this.transformImpl(state, this._context, this.semanticContext, checkNonGreedy, arg2);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate transformImpl(@NotNull state: ATNState, context: PredictionContext, @NotNull semanticContext: SemanticContext, checkNonGreedy: boolean, lexerActionExecutor: LexerActionExecutor | undefined): ATNConfig {\r\n\t\tlet passedThroughNonGreedy: boolean = checkNonGreedy && ATNConfig.checkNonGreedyDecision(this, state);\r\n\t\tif (semanticContext !== SemanticContext.NONE) {\r\n\t\t\tif (lexerActionExecutor != null || passedThroughNonGreedy) {\r\n\t\t\t\treturn new ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, state, this, context, passedThroughNonGreedy);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn new SemanticContextATNConfig(semanticContext, state, this, context);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (lexerActionExecutor != null || passedThroughNonGreedy) {\r\n\t\t\treturn new ActionATNConfig(lexerActionExecutor, state, this, context, passedThroughNonGreedy);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn new ATNConfig(state, this, context);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static checkNonGreedyDecision(source: ATNConfig, target: ATNState): boolean {\r\n\t\treturn source.hasPassedThroughNonGreedyDecision\r\n\t\t\t|| target instanceof DecisionState && target.nonGreedy;\r\n\t}\r\n\r\n\tpublic appendContext(context: number, contextCache: PredictionContextCache): ATNConfig;\r\n\tpublic appendContext(context: PredictionContext, contextCache: PredictionContextCache): ATNConfig;\r\n\tpublic appendContext(context: number | PredictionContext, contextCache: PredictionContextCache): ATNConfig {\r\n\t\tif (typeof context === \"number\") {\r\n\t\t\tlet appendedContext: PredictionContext = this.context.appendSingleContext(context, contextCache);\r\n\t\t\tlet result: ATNConfig = this.transform(this.state, false, appendedContext);\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tlet appendedContext: PredictionContext = this.context.appendContext(context, contextCache);\r\n\t\t\tlet result: ATNConfig = this.transform(this.state, false, appendedContext);\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Determines if this `ATNConfig` fully contains another `ATNConfig`.\r\n\t *\r\n\t * An ATN configuration represents a position (including context) in an ATN during parsing. Since `ATNConfig` stores\r\n\t * the context as a graph, a single `ATNConfig` instance is capable of representing many ATN configurations which\r\n\t * are all in the same \"location\" but have different contexts. These `ATNConfig` instances are again merged when\r\n\t * they are added to an `ATNConfigSet`. This method supports `ATNConfigSet.contains` by evaluating whether a\r\n\t * particular `ATNConfig` contains all of the ATN configurations represented by another `ATNConfig`.\r\n\t *\r\n\t * An `ATNConfig` _a_ contains another `ATNConfig` _b_ if all of the following conditions are met:\r\n\t *\r\n\t * * The configurations are in the same state (`state`)\r\n\t * * The configurations predict the same alternative (`alt`)\r\n\t * * The semantic context of _a_ implies the semantic context of _b_ (this method performs a weaker equality check)\r\n\t * * Joining the prediction contexts of _a_ and _b_ results in the prediction context of _a_\r\n\t *\r\n\t * This method implements a conservative approximation of containment. As a result, when this method returns `true`\r\n\t * it is known that parsing from `subconfig` can only recognize a subset of the inputs which can be recognized\r\n\t * starting at the current `ATNConfig`. However, due to the imprecise evaluation of implication for the semantic\r\n\t * contexts, no assumptions can be made about the relationship between the configurations when this method returns\r\n\t * `false`.\r\n\t *\r\n\t * @param subconfig The sub configuration.\r\n\t * @returns `true` if this configuration contains `subconfig`; otherwise, `false`.\r\n\t */\r\n\tpublic contains(subconfig: ATNConfig): boolean {\r\n\t\tif (this.state.stateNumber !== subconfig.state.stateNumber\r\n\t\t\t|| this.alt !== subconfig.alt\r\n\t\t\t|| !this.semanticContext.equals(subconfig.semanticContext)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet leftWorkList: PredictionContext[] = [];\r\n\t\tlet rightWorkList: PredictionContext[] = [];\r\n\t\tleftWorkList.push(this.context);\r\n\t\trightWorkList.push(subconfig.context);\r\n\t\twhile (true) {\r\n\t\t\tlet left = leftWorkList.pop();\r\n\t\t\tlet right = rightWorkList.pop();\r\n\t\t\tif (!left || !right) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (left === right) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tif (left.size < right.size) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (right.isEmpty) {\r\n\t\t\t\treturn left.hasEmpty;\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = 0; i < right.size; i++) {\r\n\t\t\t\t\tlet index: number = left.findReturnState(right.getReturnState(i));\r\n\t\t\t\t\tif (index < 0) {\r\n\t\t\t\t\t\t// assumes invokingStates has no duplicate entries\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tleftWorkList.push(left.getParent(index));\r\n\t\t\t\t\trightWorkList.push(right.getParent(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget isPrecedenceFilterSuppressed(): boolean {\r\n\t\treturn (this.altAndOuterContextDepth & SUPPRESS_PRECEDENCE_FILTER) !== 0;\r\n\t}\r\n\r\n\tset isPrecedenceFilterSuppressed(value: boolean) {\r\n\t\tif (value) {\r\n\t\t\tthis.altAndOuterContextDepth |= SUPPRESS_PRECEDENCE_FILTER;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.altAndOuterContextDepth &= ~SUPPRESS_PRECEDENCE_FILTER;\r\n\t\t}\r\n\t}\r\n\r\n\t/** An ATN configuration is equal to another if both have\r\n\t * the same state, they predict the same alternative, and\r\n\t * syntactic/semantic contexts are the same.\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (this === o) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(o instanceof ATNConfig)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.state.stateNumber === o.state.stateNumber\r\n\t\t\t&& this.alt === o.alt\r\n\t\t\t&& this.reachesIntoOuterContext === o.reachesIntoOuterContext\r\n\t\t\t&& this.context.equals(o.context)\r\n\t\t\t&& this.semanticContext.equals(o.semanticContext)\r\n\t\t\t&& this.isPrecedenceFilterSuppressed === o.isPrecedenceFilterSuppressed\r\n\t\t\t&& this.hasPassedThroughNonGreedyDecision === o.hasPassedThroughNonGreedyDecision\r\n\t\t\t&& ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor, o.lexerActionExecutor);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hashCode: number = MurmurHash.initialize(7);\r\n\t\thashCode = MurmurHash.update(hashCode, this.state.stateNumber);\r\n\t\thashCode = MurmurHash.update(hashCode, this.alt);\r\n\t\thashCode = MurmurHash.update(hashCode, this.reachesIntoOuterContext ? 1 : 0);\r\n\t\thashCode = MurmurHash.update(hashCode, this.context);\r\n\t\thashCode = MurmurHash.update(hashCode, this.semanticContext);\r\n\t\thashCode = MurmurHash.update(hashCode, this.hasPassedThroughNonGreedyDecision ? 1 : 0);\r\n\t\thashCode = MurmurHash.update(hashCode, this.lexerActionExecutor);\r\n\t\thashCode = MurmurHash.finish(hashCode, 7);\r\n\t\treturn hashCode;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a graphical representation of the current `ATNConfig` in Graphviz format. The graph can be stored to a\r\n\t * **.dot** file and then rendered to an image using Graphviz.\r\n\t *\r\n\t * @returns A Graphviz graph representing the current `ATNConfig`.\r\n\t *\r\n\t * @see http://www.graphviz.org/\r\n\t */\r\n\tpublic toDotString(): string {\r\n\t\tlet builder = \"\";\r\n\t\tbuilder += (\"digraph G {\\n\");\r\n\t\tbuilder += (\"rankdir=LR;\\n\");\r\n\r\n\t\tlet visited = new Array2DHashMap(PredictionContext.IdentityEqualityComparator.INSTANCE);\r\n\t\tlet workList: PredictionContext[] = [];\r\n\t\tfunction getOrAddContext(context: PredictionContext): number {\r\n\t\t\tlet newNumber = visited.size;\r\n\t\t\tlet result = visited.putIfAbsent(context, newNumber);\r\n\t\t\tif (result != null) {\r\n\t\t\t\t// Already saw this context\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\r\n\t\t\tworkList.push(context);\r\n\t\t\treturn newNumber;\r\n\t\t}\r\n\r\n\t\tworkList.push(this.context);\r\n\t\tvisited.put(this.context, 0);\r\n\t\twhile (true) {\r\n\t\t\tlet current = workList.pop();\r\n\t\t\tif (!current) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < current.size; i++) {\r\n\t\t\t\tbuilder += (\" s\") + (getOrAddContext(current));\r\n\t\t\t\tbuilder += (\"->\");\r\n\t\t\t\tbuilder += (\"s\") + (getOrAddContext(current.getParent(i)));\r\n\t\t\t\tbuilder += (\"[label=\\\"\") + (current.getReturnState(i)) + (\"\\\"];\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbuilder += (\"}\\n\");\r\n\t\treturn builder.toString();\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(recog: Recognizer | undefined, showAlt: boolean): string;\r\n\tpublic toString(recog: Recognizer | undefined, showAlt: boolean, showContext: boolean): string;\r\n\tpublic toString(recog?: Recognizer, showAlt?: boolean, showContext?: boolean): string {\r\n\t\t// Must check showContext before showAlt to preserve original overload behavior\r\n\t\tif (showContext == null) {\r\n\t\t\tshowContext = showAlt != null;\r\n\t\t}\r\n\r\n\t\tif (showAlt == null) {\r\n\t\t\tshowAlt = true;\r\n\t\t}\r\n\r\n\t\tlet buf = \"\";\r\n\t\t// if (this.state.ruleIndex >= 0) {\r\n\t\t// \tif (recog != null) {\r\n\t\t// \t\tbuf += (recog.ruleNames[this.state.ruleIndex] + \":\");\r\n\t\t// \t} else {\r\n\t\t// \t\tbuf += (this.state.ruleIndex + \":\");\r\n\t\t// \t}\r\n\t\t// }\r\n\t\tlet contexts: string[];\r\n\t\tif (showContext) {\r\n\t\t\tcontexts = this.context.toStrings(recog, this.state.stateNumber);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcontexts = [\"?\"];\r\n\t\t}\r\n\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let contextDesc of contexts) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbuf += (\", \");\r\n\t\t\t}\r\n\r\n\t\t\tbuf += (\"(\");\r\n\t\t\tbuf += (this.state);\r\n\t\t\tif (showAlt) {\r\n\t\t\t\tbuf += (\",\");\r\n\t\t\t\tbuf += (this.alt);\r\n\t\t\t}\r\n\t\t\tif (this.context) {\r\n\t\t\t\tbuf += (\",\");\r\n\t\t\t\tbuf += (contextDesc);\r\n\t\t\t}\r\n\t\t\tif (this.semanticContext !== SemanticContext.NONE) {\r\n\t\t\t\tbuf += (\",\");\r\n\t\t\t\tbuf += (this.semanticContext);\r\n\t\t\t}\r\n\t\t\tif (this.reachesIntoOuterContext) {\r\n\t\t\t\tbuf += (\",up=\") + (this.outerContextDepth);\r\n\t\t\t}\r\n\t\t\tbuf += (\")\");\r\n\t\t}\r\n\t\treturn buf.toString();\r\n\t}\r\n}\r\n\r\n/**\r\n * This class was derived from `ATNConfig` purely as a memory optimization. It allows for the creation of an `ATNConfig`\r\n * with a non-default semantic context.\r\n *\r\n * See the `ATNConfig` documentation for more information about conserving memory through the use of several concrete\r\n * types.\r\n */\r\nclass SemanticContextATNConfig extends ATNConfig {\r\n\t@NotNull\r\n\tprivate _semanticContext: SemanticContext;\r\n\r\n\tconstructor(semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext);\r\n\tconstructor(semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext);\r\n\tconstructor(semanticContext: SemanticContext, @NotNull state: ATNState, @NotNull altOrConfig: number | ATNConfig, context: PredictionContext) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t} else {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t}\r\n\r\n\t\tthis._semanticContext = semanticContext;\r\n\t}\r\n\r\n\t@Override\r\n\tget semanticContext(): SemanticContext {\r\n\t\treturn this._semanticContext;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * This class was derived from `ATNConfig` purely as a memory optimization. It allows for the creation of an `ATNConfig`\r\n * with a lexer action.\r\n *\r\n * See the `ATNConfig` documentation for more information about conserving memory through the use of several concrete\r\n * types.\r\n */\r\nclass ActionATNConfig extends ATNConfig {\r\n\tprivate _lexerActionExecutor?: LexerActionExecutor;\r\n\tprivate passedThroughNonGreedyDecision: boolean;\r\n\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull state: ATNState, @NotNull altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t} else {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t\tif (altOrConfig.semanticContext !== SemanticContext.NONE) {\r\n\t\t\t\tthrow new Error(\"Not supported\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._lexerActionExecutor = lexerActionExecutor;\r\n\t\tthis.passedThroughNonGreedyDecision = passedThroughNonGreedyDecision;\r\n\t}\r\n\r\n\t@Override\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn this._lexerActionExecutor;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasPassedThroughNonGreedyDecision(): boolean {\r\n\t\treturn this.passedThroughNonGreedyDecision;\r\n\t}\r\n}\r\n\r\n/**\r\n * This class was derived from `SemanticContextATNConfig` purely as a memory optimization. It allows for the creation of\r\n * an `ATNConfig` with both a lexer action and a non-default semantic context.\r\n *\r\n * See the `ATNConfig` documentation for more information about conserving memory through the use of several concrete\r\n * types.\r\n */\r\nclass ActionSemanticContextATNConfig extends SemanticContextATNConfig {\r\n\tprivate _lexerActionExecutor?: LexerActionExecutor;\r\n\tprivate passedThroughNonGreedyDecision: boolean;\r\n\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull semanticContext: SemanticContext, @NotNull state: ATNState, altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tsuper(semanticContext, state, altOrConfig, context);\r\n\t\t} else {\r\n\t\t\tsuper(semanticContext, state, altOrConfig, context);\r\n\t\t}\r\n\r\n\t\tthis._lexerActionExecutor = lexerActionExecutor;\r\n\t\tthis.passedThroughNonGreedyDecision = passedThroughNonGreedyDecision;\r\n\t}\r\n\r\n\t@Override\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn this._lexerActionExecutor;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasPassedThroughNonGreedyDecision(): boolean {\r\n\t\treturn this.passedThroughNonGreedyDecision;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport * as assert from \"assert\";\r\nimport * as util from \"util\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\n\r\n/**\r\n * Private empty array used to construct empty BitSets\r\n */\r\nconst EMPTY_DATA: Uint16Array = new Uint16Array(0);\r\n\r\n/**\r\n * Gets the word index of the `UInt16` element in `BitSet.data` containing the bit with the specified index.\r\n */\r\nfunction getIndex(bitNumber: number) {\r\n\treturn bitNumber >>> 4;\r\n}\r\n\r\n/**\r\n * Convert a word index into the bit index of the LSB of that word\r\n */\r\n\r\nfunction unIndex(n: number) {\r\n\treturn n * 16;\r\n}\r\n\r\n/**\r\n * Get's the bit number of the least signficant bit set LSB which is set in a word non-zero word;\r\n * Bit numbers run from LSB to MSB starting with 0.\r\n */\r\nfunction findLSBSet(word: number) {\r\n\tlet bit = 1;\r\n\tfor (let i = 0; i < 16; i++) {\r\n\t\tif ((word & bit) !== 0) {\r\n\t\t\treturn i;\r\n\t\t}\r\n\t\tbit = (bit << 1) >>> 0;\r\n\t}\r\n\tthrow new RangeError(\"No specified bit found\");\r\n}\r\n\r\nfunction findMSBSet(word: number) {\r\n\tlet bit = (1 << 15) >>> 0;\r\n\tfor (let i = 15; i >= 0; i--) {\r\n\t\tif ((word & bit) !== 0) {\r\n\t\t\treturn i;\r\n\t\t}\r\n\t\tbit = bit >>> 1;\r\n\t}\r\n\tthrow new RangeError(\"No specified bit found\");\r\n}\r\n\r\n/**\r\n * Gets a 16-bit mask with bit numbers fromBit to toBit (inclusive) set.\r\n * Bit numbers run from LSB to MSB starting with 0.\r\n */\r\nfunction bitsFor(fromBit: number, toBit: number): number {\r\n\tfromBit &= 0xF;\r\n\ttoBit &= 0xF;\r\n\tif (fromBit === toBit) {\r\n\t\treturn (1 << fromBit) >>> 0;\r\n\t}\r\n\treturn ((0xFFFF >>> (15 - toBit)) ^ (0xFFFF >>> (16 - fromBit)));\r\n}\r\n\r\n/**\r\n * A lookup table for number of set bits in a 16-bit integer. This is used to quickly count the cardinality (number of unique elements) of a BitSet.\r\n */\r\nconst POP_CNT: Uint8Array = new Uint8Array(65536);\r\nfor (let i = 0; i < 16; i++) {\r\n\tconst stride = (1 << i) >>> 0;\r\n\tlet index = 0;\r\n\twhile (index < POP_CNT.length) {\r\n\t\t// skip the numbers where the bit isn't set\r\n\t\tindex += stride;\r\n\r\n\t\t// increment the ones where the bit is set\r\n\t\tfor (let j = 0; j < stride; j++) {\r\n\t\t\tPOP_CNT[index]++;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport class BitSet implements Iterable{\r\n\tprivate data: Uint16Array;\r\n\r\n\t/**\r\n\t * Creates a new bit set. All bits are initially `false`.\r\n\t */\r\n\tconstructor();\r\n\r\n\t/**\r\n\t * Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range `0`\r\n\t * through `nbits-1`. All bits are initially `false`.\r\n\t */\r\n\tconstructor(nbits: number);\r\n\r\n\t/**\r\n\t * Creates a bit set from a iterable list of numbers (including another BitSet);\r\n\t */\r\n\tconstructor(numbers: Iterable);\r\n\r\n\t/*\r\n\t** constructor implementation\r\n\t*/\r\n\tconstructor(arg?: number | Iterable) {\r\n\t\tif (!arg) {\r\n\t\t\t// covering the case of unspecified and nbits===0\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t} else if (typeof arg === \"number\") {\r\n\t\t\tif (arg < 0) {\r\n\t\t\t\tthrow new RangeError(\"nbits cannot be negative\");\r\n\t\t\t} else {\r\n\t\t\t\tthis.data = new Uint16Array(getIndex(arg - 1) + 1);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (arg instanceof BitSet) {\r\n\t\t\t\tthis.data = arg.data.slice(0); // Clone the data\r\n\t\t\t} else {\r\n\t\t\t\tlet max = -1;\r\n\t\t\t\tfor (let v of arg) {\r\n\t\t\t\t\tif (max < v) {\r\n\t\t\t\t\t\tmax = v;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.data = new Uint16Array(getIndex(max - 1) + 1);\r\n\t\t\t\tfor (let v of arg) {\r\n\t\t\t\t\tthis.set(v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Performs a logical **AND** of this target bit set with the argument bit set. This bit set is modified so that\r\n\t * each bit in it has the value `true` if and only if it both initially had the value `true` and the corresponding\r\n\t * bit in the bit set argument also had the value `true`.\r\n\t */\r\n\tpublic and(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst words = Math.min(data.length, other.length);\r\n\r\n\t\tlet lastWord = -1;\t// Keep track of index of last non-zero word\r\n\r\n\t\tfor (let i = 0; i < words; i++) {\r\n\t\t\tlet value = data[i] &= other[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t}\r\n\r\n\t\tif (lastWord < data.length - 1) {\r\n\t\t\tthis.data = data.slice(0, lastWord + 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clears all of the bits in this `BitSet` whose corresponding bit is set in the specified `BitSet`.\r\n\t */\r\n\tpublic andNot(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst words = Math.min(data.length, other.length);\r\n\r\n\t\tlet lastWord = -1;\t// Keep track of index of last non-zero word\r\n\r\n\t\tfor (let i = 0; i < words; i++) {\r\n\t\t\tlet value = data[i] &= (other[i] ^ 0xFFFF);\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t}\r\n\r\n\t\tif (lastWord < data.length - 1) {\r\n\t\t\tthis.data = data.slice(0, lastWord + 1);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Returns the number of bits set to `true` in this `BitSet`.\r\n\t */\r\n\tpublic cardinality(): number {\r\n\t\tif (this.isEmpty) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet result = 0;\r\n\r\n\t\tfor (let i = 0; i < length; i++) {\r\n\t\t\tresult += POP_CNT[data[i]];\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets all of the bits in this `BitSet` to `false`.\r\n\t */\r\n\tpublic clear(): void;\r\n\r\n\t/**\r\n\t * Sets the bit specified by the index to `false`.\r\n\t *\r\n\t * @param bitIndex the index of the bit to be cleared\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic clear(bitIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to `false`.\r\n\t *\r\n\t * @param fromIndex index of the first bit to be cleared\r\n\t * @param toIndex index after the last bit to be cleared\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic clear(fromIndex: number, toIndex: number): void;\r\n\tpublic clear(fromIndex?: number, toIndex?: number): void {\r\n\t\tif (fromIndex == null) {\r\n\t\t\tthis.data.fill(0);\r\n\t\t} else if (toIndex == null) {\r\n\t\t\tthis.set(fromIndex, false);\r\n\t\t} else {\r\n\t\t\tthis.set(fromIndex, toIndex, false);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the bit at the specified index to the complement of its current value.\r\n\t *\r\n\t * @param bitIndex the index of the bit to flip\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic flip(bitIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets each bit from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to the complement\r\n\t * of its current value.\r\n\t *\r\n\t * @param fromIndex index of the first bit to flip\r\n\t * @param toIndex index after the last bit to flip\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic flip(fromIndex: number, toIndex: number): void;\r\n\tpublic flip(fromIndex: number, toIndex?: number): void {\r\n\t\tif (toIndex == null) {\r\n\t\t\ttoIndex = fromIndex;\r\n\t\t}\r\n\t\tif (fromIndex < 0 || toIndex < fromIndex) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tconst lastWord = getIndex(toIndex);\r\n\r\n\t\tif (word === lastWord) {\r\n\t\t\tthis.data[word] ^= bitsFor(fromIndex, toIndex);\r\n\t\t} else {\r\n\t\t\tthis.data[word++] ^= bitsFor(fromIndex, 15);\r\n\t\t\twhile (word < lastWord) {\r\n\t\t\t\tthis.data[word++] ^= 0xFFFF;\r\n\t\t\t}\r\n\t\t\tthis.data[word++] ^= bitsFor(0, toIndex);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the value of the bit with the specified index. The value is `true` if the bit with the index `bitIndex`\r\n\t * is currently set in this `BitSet`; otherwise, the result is `false`.\r\n\t *\r\n\t * @param bitIndex the bit index\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic get(bitIndex: number): boolean;\r\n\r\n\t/**\r\n\t * Returns a new `BitSet` composed of bits from this `BitSet` from `fromIndex` (inclusive) to `toIndex` (exclusive).\r\n\t *\r\n\t * @param fromIndex index of the first bit to include\r\n\t * @param toIndex index after the last bit to include\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic get(fromIndex: number, toIndex: number): BitSet;\r\n\tpublic get(fromIndex: number, toIndex?: number): boolean | BitSet {\r\n\t\tif (toIndex === undefined) {\r\n\t\t\treturn !!(this.data[getIndex(fromIndex)] & bitsFor(fromIndex, fromIndex));\r\n\t\t} else {\r\n\t\t\t// return a BitSet\r\n\t\t\tlet result = new BitSet(toIndex + 1);\r\n\t\t\tfor (let i = fromIndex; i <= toIndex; i++) {\r\n\t\t\t\tresult.set(i, this.get(i));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns true if the specified `BitSet` has any bits set to `true` that are also set to `true` in this `BitSet`.\r\n\t *\r\n\t * @param set `BitSet` to intersect with\r\n\t */\r\n\tpublic intersects(set: BitSet): boolean {\r\n\t\tlet smallerLength = Math.min(this.length(), set.length());\r\n\t\tif (smallerLength === 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet bound = getIndex(smallerLength - 1);\r\n\t\tfor (let i = 0; i <= bound; i++) {\r\n\t\t\tif ((this.data[i] & set.data[i]) !== 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns true if this `BitSet` contains no bits that are set to `true`.\r\n\t */\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.length() === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the \"logical size\" of this `BitSet`: the index of the highest set bit in the `BitSet` plus one. Returns\r\n\t * zero if the `BitSet` contains no set bits.\r\n\t */\r\n\tpublic length(): number {\r\n\t\tif (!this.data.length) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn this.previousSetBit(unIndex(this.data.length) - 1) + 1;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index of the first bit that is set to `false` that occurs on or after the specified starting index,\r\n\t * If no such bit exists then `-1` is returned.\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic nextClearBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word > length) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\tlet ignore = 0xFFFF ^ bitsFor(fromIndex, 15);\r\n\r\n\t\tif ((data[word] | ignore) === 0xFFFF) {\r\n\t\t\tword++;\r\n\t\t\tignore = 0;\r\n\t\t\tfor (; word < length; word++) {\r\n\t\t\t\tif (data[word] !== 0xFFFF) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word === length) {\r\n\t\t\t\t// Hit the end\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findLSBSet((data[word] | ignore) ^ 0xFFFF);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index of the first bit that is set to `true` that occurs on or after the specified starting index.\r\n\t * If no such bit exists then `-1` is returned.\r\n\t *\r\n\t * To iterate over the `true` bits in a `BitSet`, use the following loop:\r\n\t *\r\n\t * ```\r\n\t * for (let i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) {\r\n\t * // operate on index i here\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic nextSetBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word > length) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tlet mask = bitsFor(fromIndex, 15);\r\n\r\n\t\tif ((data[word] & mask) === 0) {\r\n\t\t\tword++;\r\n\t\t\tmask = 0xFFFF;\r\n\t\t\tfor (; word < length; word++) {\r\n\t\t\t\tif (data[word] !== 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word >= length) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findLSBSet(data[word] & mask);\r\n\t}\r\n\r\n\t/**\r\n\t * Performs a logical **OR** of this bit set with the bit set argument. This bit set is modified so that a bit in it\r\n\t * has the value `true` if and only if it either already had the value `true` or the corresponding bit in the bit\r\n\t * set argument has the value `true`.\r\n\t */\r\n\tpublic or(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst minWords = Math.min(data.length, other.length);\r\n\t\tconst words = Math.max(data.length, other.length);\r\n\t\tconst dest = data.length === words ? data : new Uint16Array(words);\r\n\r\n\t\tlet lastWord = -1;\r\n\r\n\t\t// Or those words both sets have in common\r\n\r\n\t\tfor (let i = 0; i < minWords; i++) {\r\n\t\t\tlet value = dest[i] = data[i] | other[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy words from larger set (if there is one)\r\n\r\n\t\tconst longer = data.length > other.length ? data : other;\r\n\t\tfor (let i = minWords; i < words; i++) {\r\n\t\t\tlet value = dest[i] = longer[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t} else if (dest.length === lastWord + 1) {\r\n\t\t\tthis.data = dest;\r\n\t\t} else {\r\n\t\t\tthis.data = dest.slice(0, lastWord);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index of the nearest bit that is set to `false` that occurs on or before the specified starting\r\n\t * index. If no such bit exists, or if `-1` is given as the starting index, then `-1` is returned.\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is less than `-1`\r\n\t */\r\n\tpublic previousClearBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word >= length) {\r\n\t\t\tword = length - 1;\r\n\t\t}\r\n\r\n\t\tlet ignore = 0xFFFF ^ bitsFor(0, fromIndex);\r\n\r\n\t\tif ((data[word] | ignore) === 0xFFFF) {\r\n\t\t\tignore = 0;\r\n\t\t\tword--;\r\n\t\t\tfor (; word >= 0; word--) {\r\n\t\t\t\tif (data[word] !== 0xFFFF) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word < 0) {\r\n\t\t\t\t// Hit the end\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findMSBSet((data[word] | ignore) ^ 0xFFFF);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Returns the index of the nearest bit that is set to `true` that occurs on or before the specified starting index.\r\n\t * If no such bit exists, or if `-1` is given as the starting index, then `-1` is returned.\r\n\t *\r\n\t * To iterate over the `true` bits in a `BitSet`, use the following loop:\r\n\t *\r\n\t * ```\r\n\t * for (let i = bs.length(); (i = bs.previousSetBit(i-1)) >= 0; ) {\r\n\t * // operate on index i here\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is less than `-1`\r\n\t */\r\n\tpublic previousSetBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word >= length) {\r\n\t\t\tword = length - 1;\r\n\t\t}\r\n\r\n\t\tlet mask = bitsFor(0, fromIndex);\r\n\r\n\t\tif ((data[word] & mask) === 0) {\r\n\t\t\tword--;\r\n\t\t\tmask = 0xFFFF;\r\n\t\t\tfor (; word >= 0; word--) {\r\n\t\t\t\tif (data[word] !== 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word < 0) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findMSBSet(data[word] & mask);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the bit at the specified index to `true`.\r\n\t *\r\n\t * @param bitIndex a bit index\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic set(bitIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets the bit at the specified index to the specified value.\r\n\t *\r\n\t * @param bitIndex a bit index\r\n\t * @param value a boolean value to set\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic set(bitIndex: number, value: boolean): void;\r\n\r\n\t/**\r\n\t * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to `true`.\r\n\t *\r\n\t * @param fromIndex index of the first bit to be set\r\n\t * @param toIndex index after the last bit to be set\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic set(fromIndex: number, toIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to the specified\r\n\t * value.\r\n\t *\r\n\t * @param fromIndex index of the first bit to be set\r\n\t * @param toIndex index after the last bit to be set\r\n\t * @param value value to set the selected bits to\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic set(fromIndex: number, toIndex: number, value: boolean): void;\r\n\tpublic set(fromIndex: number, toIndex?: boolean | number, value?: boolean): void {\r\n\t\tif (toIndex === undefined) {\r\n\t\t\ttoIndex = fromIndex;\r\n\t\t\tvalue = true;\r\n\t\t} else if (typeof toIndex === \"boolean\") {\r\n\t\t\tvalue = toIndex;\r\n\t\t\ttoIndex = fromIndex;\r\n\t\t}\r\n\r\n\t\tif (value === undefined) {\r\n\t\t\tvalue = true;\r\n\t\t}\r\n\r\n\t\tif (fromIndex < 0 || fromIndex > toIndex) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tlet lastWord = getIndex(toIndex);\r\n\r\n\t\tif (value && lastWord >= this.data.length) {\r\n\t\t\t// Grow array \"just enough\" for bits we need to set\r\n\t\t\tlet temp = new Uint16Array(lastWord + 1);\r\n\t\t\tthis.data.forEach((value, index) => temp[index] = value);\r\n\t\t\tthis.data = temp;\r\n\t\t} else if (!value) {\r\n\t\t\t// But there is no need to grow array to clear bits.\r\n\t\t\tif (word >= this.data.length) {\r\n\t\t\t\t// Early exit\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (lastWord >= this.data.length) {\r\n\t\t\t\t// Adjust work to fit array\r\n\t\t\t\tlastWord = this.data.length - 1;\r\n\t\t\t\ttoIndex = this.data.length * 16 - 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (word === lastWord) {\r\n\t\t\tthis._setBits(word, value, bitsFor(fromIndex, toIndex));\r\n\t\t} else {\r\n\t\t\tthis._setBits(word++, value, bitsFor(fromIndex, 15));\r\n\t\t\twhile (word < lastWord) {\r\n\t\t\t\tthis.data[word++] = value ? 0xFFFF : 0;\r\n\t\t\t}\r\n\t\t\tthis._setBits(word, value, bitsFor(0, toIndex));\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _setBits(word: number, value: boolean, mask: number) {\r\n\t\tif (value) {\r\n\t\t\tthis.data[word] |= mask;\r\n\t\t} else {\r\n\t\t\tthis.data[word] &= 0xFFFF ^ mask;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of bits of space actually in use by this `BitSet` to represent bit values. The maximum element\r\n\t * in the set is the size - 1st element.\r\n\t */\r\n\tget size(): number {\r\n\t\treturn this.data.byteLength * 8;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new byte array containing all the bits in this bit set.\r\n\t *\r\n\t * More precisely, if\r\n\t * `let bytes = s.toByteArray();`\r\n\t * then `bytes.length === (s.length()+7)/8` and `s.get(n) === ((bytes[n/8] & (1<<(n%8))) != 0)` for all\r\n\t * `n < 8 * bytes.length`.\r\n\t */\r\n\t// toByteArray(): Int8Array {\r\n\t// \tthrow new Error(\"NOT IMPLEMENTED\");\r\n\t// }\r\n\r\n\t/**\r\n\t * Returns a new integer array containing all the bits in this bit set.\r\n\t *\r\n\t * More precisely, if\r\n\t * `let integers = s.toIntegerArray();`\r\n\t * then `integers.length === (s.length()+31)/32` and `s.get(n) === ((integers[n/32] & (1<<(n%32))) != 0)` for all\r\n\t * `n < 32 * integers.length`.\r\n\t */\r\n\t// toIntegerArray(): Int32Array {\r\n\t// \tthrow new Error(\"NOT IMPLEMENTED\");\r\n\t// }\r\n\r\n\tpublic hashCode(): number {\r\n\t\treturn MurmurHash.hashCode(this.data, 22);\r\n\t}\r\n\r\n\t/**\r\n\t * Compares this object against the specified object. The result is `true` if and only if the argument is not\r\n\t * `undefined` and is a `Bitset` object that has exactly the same set of bits set to `true` as this bit set. That\r\n\t * is, for every nonnegative index `k`,\r\n\t *\r\n\t * ```\r\n\t * ((BitSet)obj).get(k) == this.get(k)\r\n\t * ```\r\n\t *\r\n\t * must be true. The current sizes of the two bit sets are not compared.\r\n\t */\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof BitSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tconst len = this.length();\r\n\r\n\t\tif (len !== obj.length()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (len === 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tlet bound = getIndex(len - 1);\r\n\t\tfor (let i = 0; i <= bound; i++) {\r\n\t\t\tif (this.data[i] !== obj.data[i]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a string representation of this bit set. For every index for which this `BitSet` contains a bit in the\r\n\t * set state, the decimal representation of that index is included in the result. Such indices are listed in order\r\n\t * from lowest to highest, separated by \", \" (a comma and a space) and surrounded by braces, resulting in the usual\r\n\t * mathematical notation for a set of integers.\r\n\t *\r\n\t * Example:\r\n\t *\r\n\t * BitSet drPepper = new BitSet();\r\n\t *\r\n\t * Now `drPepper.toString()` returns `\"{}\"`.\r\n\t *\r\n\t * drPepper.set(2);\r\n\t *\r\n\t * Now `drPepper.toString()` returns `\"{2}\"`.\r\n\t *\r\n\t * drPepper.set(4);\r\n\t * drPepper.set(10);\r\n\t *\r\n\t * Now `drPepper.toString()` returns `\"{2, 4, 10}\"`.\r\n\t */\r\n\tpublic toString(): string {\r\n\t\tlet result = \"{\";\r\n\r\n\t\tlet first = true;\r\n\t\tfor (let i = this.nextSetBit(0); i >= 0; i = this.nextSetBit(i + 1)) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tresult += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tresult += i;\r\n\t\t}\r\n\r\n\t\tresult += \"}\";\r\n\t\treturn result;\r\n\t}\r\n\r\n\t// static valueOf(bytes: Int8Array): BitSet;\r\n\t// static valueOf(buffer: ArrayBuffer): BitSet;\r\n\t// static valueOf(integers: Int32Array): BitSet;\r\n\t// static valueOf(data: Int8Array | Int32Array | ArrayBuffer): BitSet {\r\n\t// \tthrow new Error(\"NOT IMPLEMENTED\");\r\n\t// }\r\n\r\n\t/**\r\n\t * Performs a logical **XOR** of this bit set with the bit set argument. This bit set is modified so that a bit in\r\n\t * it has the value `true` if and only if one of the following statements holds:\r\n\t *\r\n\t * * The bit initially has the value `true`, and the corresponding bit in the argument has the value `false`.\r\n\t * * The bit initially has the value `false`, and the corresponding bit in the argument has the value `true`.\r\n\t */\r\n\tpublic xor(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst minWords = Math.min(data.length, other.length);\r\n\t\tconst words = Math.max(data.length, other.length);\r\n\t\tconst dest = data.length === words ? data : new Uint16Array(words);\r\n\r\n\t\tlet lastWord = -1;\r\n\r\n\t\t// Xor those words both sets have in common\r\n\r\n\t\tfor (let i = 0; i < minWords; i++) {\r\n\t\t\tlet value = dest[i] = data[i] ^ other[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy words from larger set (if there is one)\r\n\r\n\t\tconst longer = data.length > other.length ? data : other;\r\n\t\tfor (let i = minWords; i < words; i++) {\r\n\t\t\tlet value = dest[i] = longer[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t} else if (dest.length === lastWord + 1) {\r\n\t\t\tthis.data = dest;\r\n\t\t} else {\r\n\t\t\tthis.data = dest.slice(0, lastWord + 1);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic clone() {\r\n\t\treturn new BitSet(this);\r\n\t}\r\n\r\n\tpublic [Symbol.iterator](): IterableIterator {\r\n\t\treturn new BitSetIterator(this.data);\r\n\t}\r\n\r\n\t// Overrides formatting for nodejs assert etc.\r\n\tpublic [(util.inspect as any).custom](): string {\r\n\t\treturn \"BitSet \" + this.toString();\r\n\t}\r\n}\r\n\r\nclass BitSetIterator implements IterableIterator{\r\n\tprivate index = 0;\r\n\tprivate mask = 0xFFFF;\r\n\r\n\tconstructor(private data: Uint16Array) { }\r\n\r\n\tpublic next() {\r\n\t\twhile (this.index < this.data.length) {\r\n\t\t\tconst bits = this.data[this.index] & this.mask;\r\n\t\t\tif (bits !== 0) {\r\n\t\t\t\tconst bitNumber = unIndex(this.index) + findLSBSet(bits);\r\n\t\t\t\tthis.mask = bitsFor(bitNumber + 1, 15);\r\n\t\t\t\treturn { done: false, value: bitNumber };\r\n\t\t\t}\r\n\t\t\tthis.index++;\r\n\t\t\tthis.mask = 0xFFFF;\r\n\t\t}\r\n\t\treturn { done: true, value: -1 };\r\n\t}\r\n\r\n\tpublic [Symbol.iterator](): IterableIterator { return this; }\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.5488013-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ArrayEqualityComparator } from \"../misc/ArrayEqualityComparator\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { ConflictInfo } from \"./ConflictInfo\";\r\nimport { EqualityComparator } from \"../misc/EqualityComparator\";\r\nimport { JavaSet } from \"../misc/Stubs\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\n\r\nimport * as assert from \"assert\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\ninterface KeyType { state: number; alt: number; }\r\n\r\nclass KeyTypeEqualityComparer implements EqualityComparator {\r\n\tpublic hashCode(key: KeyType) {\r\n\t\treturn key.state ^ key.alt;\r\n\t}\r\n\r\n\tpublic equals(a: KeyType, b: KeyType) {\r\n\t\treturn a.state === b.state && a.alt === b.alt;\r\n\t}\r\n\r\n\tpublic static readonly INSTANCE = new KeyTypeEqualityComparer();\r\n}\r\n\r\nfunction NewKeyedConfigMap(map?: Array2DHashMap) {\r\n\tif (map) {\r\n\t\treturn new Array2DHashMap(map);\r\n\t} else {\r\n\t\treturn new Array2DHashMap(KeyTypeEqualityComparer.INSTANCE);\r\n\t}\r\n}\r\n\r\n/**\r\n * Represents a set of ATN configurations (see `ATNConfig`). As configurations are added to the set, they are merged\r\n * with other `ATNConfig` instances already in the set when possible using the graph-structured stack.\r\n *\r\n * An instance of this class represents the complete set of positions (with context) in an ATN which would be associated\r\n * with a single DFA state. Its internal representation is more complex than traditional state used for NFA to DFA\r\n * conversion due to performance requirements (both improving speed and reducing memory overhead) as well as supporting\r\n * features such as semantic predicates and non-greedy operators in a form to support ANTLR's prediction algorithm.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ATNConfigSet implements JavaSet {\r\n\t/**\r\n\t * This maps (state, alt) -> merged {@link ATNConfig}. The key does not account for\r\n\t * the {@link ATNConfig#getSemanticContext} of the value, which is only a problem if a single\r\n\t * `ATNConfigSet` contains two configs with the same state and alternative\r\n\t * but different semantic contexts. When this case arises, the first config\r\n\t * added to this map stays, and the remaining configs are placed in {@link #unmerged}.\r\n\t *\r\n\t * This map is only used for optimizing the process of adding configs to the set,\r\n\t * and is `undefined` for read-only sets stored in the DFA.\r\n\t */\r\n\tprivate mergedConfigs?: Array2DHashMap;\r\n\r\n\t/**\r\n\t * This is an \"overflow\" list holding configs which cannot be merged with one\r\n\t * of the configs in {@link #mergedConfigs} but have a colliding key. This\r\n\t * occurs when two configs in the set have the same state and alternative but\r\n\t * different semantic contexts.\r\n\t *\r\n\t * This list is only used for optimizing the process of adding configs to the set,\r\n\t * and is `undefined` for read-only sets stored in the DFA.\r\n\t */\r\n\tprivate unmerged?: ATNConfig[];\r\n\r\n\t/**\r\n\t * This is a list of all configs in this set.\r\n\t */\r\n\tprivate configs: ATNConfig[];\r\n\r\n\tprivate _uniqueAlt: number = 0;\r\n\tprivate _conflictInfo?: ConflictInfo;\r\n\t// Used in parser and lexer. In lexer, it indicates we hit a pred\r\n\t// while computing a closure operation. Don't make a DFA state from this.\r\n\tprivate _hasSemanticContext: boolean = false;\r\n\tprivate _dipsIntoOuterContext: boolean = false;\r\n\t/**\r\n\t * When `true`, this config set represents configurations where the entire\r\n\t * outer context has been consumed by the ATN interpreter. This prevents the\r\n\t * {@link ParserATNSimulator#closure} from pursuing the global FOLLOW when a\r\n\t * rule stop state is reached with an empty prediction context.\r\n\t *\r\n\t * Note: `outermostConfigSet` and {@link #dipsIntoOuterContext} should never\r\n\t * be true at the same time.\r\n\t */\r\n\tprivate outermostConfigSet: boolean = false;\r\n\r\n\tprivate cachedHashCode: number = -1;\r\n\r\n\tconstructor();\r\n\tconstructor(set: ATNConfigSet, readonly: boolean);\r\n\tconstructor(set?: ATNConfigSet, readonly?: boolean) {\r\n\t\tif (!set) {\r\n\t\t\tthis.mergedConfigs = NewKeyedConfigMap();\r\n\t\t\tthis.unmerged = [];\r\n\t\t\tthis.configs = [];\r\n\r\n\t\t\tthis._uniqueAlt = ATN.INVALID_ALT_NUMBER;\r\n\t\t} else {\r\n\r\n\t\t\tif (readonly) {\r\n\t\t\t\tthis.mergedConfigs = undefined;\r\n\t\t\t\tthis.unmerged = undefined;\r\n\t\t\t} else if (!set.isReadOnly) {\r\n\t\t\t\tthis.mergedConfigs = NewKeyedConfigMap(set.mergedConfigs);\r\n\t\t\t\tthis.unmerged = (set.unmerged as ATNConfig[]).slice(0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.mergedConfigs = NewKeyedConfigMap();\r\n\t\t\t\tthis.unmerged = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.configs = set.configs.slice(0);\r\n\r\n\t\t\tthis._dipsIntoOuterContext = set._dipsIntoOuterContext;\r\n\t\t\tthis._hasSemanticContext = set._hasSemanticContext;\r\n\t\t\tthis.outermostConfigSet = set.outermostConfigSet;\r\n\r\n\t\t\tif (readonly || !set.isReadOnly) {\r\n\t\t\t\tthis._uniqueAlt = set._uniqueAlt;\r\n\t\t\t\tthis._conflictInfo = set._conflictInfo;\r\n\t\t\t}\r\n\r\n\t\t\t// if (!readonly && set.isReadOnly) -> addAll is called from clone()\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the set of all alternatives represented by configurations in this\r\n\t * set.\r\n\t */\r\n\t@NotNull\r\n\tpublic getRepresentedAlternatives(): BitSet {\r\n\t\tif (this._conflictInfo != null) {\r\n\t\t\treturn this._conflictInfo.conflictedAlts.clone();\r\n\t\t}\r\n\r\n\t\tlet alts: BitSet = new BitSet();\r\n\t\tfor (let config of this) {\r\n\t\t\talts.set(config.alt);\r\n\t\t}\r\n\r\n\t\treturn alts;\r\n\t}\r\n\r\n\tget isReadOnly(): boolean {\r\n\t\treturn this.mergedConfigs == null;\r\n\t}\r\n\r\n\tget isOutermostConfigSet(): boolean {\r\n\t\treturn this.outermostConfigSet;\r\n\t}\r\n\r\n\tset isOutermostConfigSet(outermostConfigSet: boolean) {\r\n\t\tif (this.outermostConfigSet && !outermostConfigSet) {\r\n\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t}\r\n\r\n\t\tassert(!outermostConfigSet || !this._dipsIntoOuterContext);\r\n\t\tthis.outermostConfigSet = outermostConfigSet;\r\n\t}\r\n\r\n\tpublic getStates(): Array2DHashSet {\r\n\t\tlet states = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\tfor (let c of this.configs) {\r\n\t\t\tstates.add(c.state);\r\n\t\t}\r\n\r\n\t\treturn states;\r\n\t}\r\n\r\n\tpublic optimizeConfigs(interpreter: ATNSimulator): void {\r\n\t\tif (this.configs.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (let config of this.configs) {\r\n\t\t\tconfig.context = interpreter.atn.getCachedContext(config.context);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic clone(readonly: boolean): ATNConfigSet {\r\n\t\tlet copy: ATNConfigSet = new ATNConfigSet(this, readonly);\r\n\t\tif (!readonly && this.isReadOnly) {\r\n\t\t\tcopy.addAll(this.configs);\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.configs.length;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.configs.length === 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic contains(o: any): boolean {\r\n\t\tif (!(o instanceof ATNConfig)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this.mergedConfigs && this.unmerged) {\r\n\t\t\tlet config: ATNConfig = o;\r\n\t\t\tlet configKey = this.getKey(config);\r\n\t\t\tlet mergedConfig = this.mergedConfigs.get(configKey);\r\n\t\t\tif (mergedConfig != null && this.canMerge(config, configKey, mergedConfig)) {\r\n\t\t\t\treturn mergedConfig.contains(config);\r\n\t\t\t}\r\n\r\n\t\t\tfor (let c of this.unmerged) {\r\n\t\t\t\tif (c.contains(o)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (let c of this.configs) {\r\n\t\t\t\tif (c.contains(o)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic *[Symbol.iterator](): IterableIterator {\r\n\t\tyield* this.configs;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toArray(): ATNConfig[] {\r\n\t\treturn this.configs;\r\n\t}\r\n\r\n\tpublic add(e: ATNConfig): boolean;\r\n\tpublic add(e: ATNConfig, contextCache: PredictionContextCache | undefined): boolean;\r\n\tpublic add(e: ATNConfig, contextCache?: PredictionContextCache): boolean {\r\n\t\tthis.ensureWritable();\r\n\t\tif (!this.mergedConfigs || !this.unmerged) {\r\n\t\t\tthrow new Error(\"Covered by ensureWritable but duplicated here for strict null check limitation\");\r\n\t\t}\r\n\r\n\t\tassert(!this.outermostConfigSet || !e.reachesIntoOuterContext);\r\n\r\n\t\tif (contextCache == null) {\r\n\t\t\tcontextCache = PredictionContextCache.UNCACHED;\r\n\t\t}\r\n\r\n\t\tlet addKey: boolean;\r\n\t\tlet key = this.getKey(e);\r\n\t\tlet mergedConfig = this.mergedConfigs.get(key);\r\n\t\taddKey = (mergedConfig == null);\r\n\t\tif (mergedConfig != null && this.canMerge(e, key, mergedConfig)) {\r\n\t\t\tmergedConfig.outerContextDepth = Math.max(mergedConfig.outerContextDepth, e.outerContextDepth);\r\n\t\t\tif (e.isPrecedenceFilterSuppressed) {\r\n\t\t\t\tmergedConfig.isPrecedenceFilterSuppressed = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet joined: PredictionContext = PredictionContext.join(mergedConfig.context, e.context, contextCache);\r\n\t\t\tthis.updatePropertiesForMergedConfig(e);\r\n\t\t\tif (mergedConfig.context === joined) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tmergedConfig.context = joined;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < this.unmerged.length; i++) {\r\n\t\t\tlet unmergedConfig: ATNConfig = this.unmerged[i];\r\n\t\t\tif (this.canMerge(e, key, unmergedConfig)) {\r\n\t\t\t\tunmergedConfig.outerContextDepth = Math.max(unmergedConfig.outerContextDepth, e.outerContextDepth);\r\n\t\t\t\tif (e.isPrecedenceFilterSuppressed) {\r\n\t\t\t\t\tunmergedConfig.isPrecedenceFilterSuppressed = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet joined: PredictionContext = PredictionContext.join(unmergedConfig.context, e.context, contextCache);\r\n\t\t\t\tthis.updatePropertiesForMergedConfig(e);\r\n\t\t\t\tif (unmergedConfig.context === joined) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tunmergedConfig.context = joined;\r\n\r\n\t\t\t\tif (addKey) {\r\n\t\t\t\t\tthis.mergedConfigs.put(key, unmergedConfig);\r\n\t\t\t\t\tthis.unmerged.splice(i, 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.configs.push(e);\r\n\t\tif (addKey) {\r\n\t\t\tthis.mergedConfigs.put(key, e);\r\n\t\t} else {\r\n\t\t\tthis.unmerged.push(e);\r\n\t\t}\r\n\r\n\t\tthis.updatePropertiesForAddedConfig(e);\r\n\t\treturn true;\r\n\t}\r\n\r\n\tprivate updatePropertiesForMergedConfig(config: ATNConfig): void {\r\n\t\t// merged configs can't change the alt or semantic context\r\n\t\tthis._dipsIntoOuterContext = this._dipsIntoOuterContext || config.reachesIntoOuterContext;\r\n\t\tassert(!this.outermostConfigSet || !this._dipsIntoOuterContext);\r\n\t}\r\n\r\n\tprivate updatePropertiesForAddedConfig(config: ATNConfig): void {\r\n\t\tif (this.configs.length === 1) {\r\n\t\t\tthis._uniqueAlt = config.alt;\r\n\t\t} else if (this._uniqueAlt !== config.alt) {\r\n\t\t\tthis._uniqueAlt = ATN.INVALID_ALT_NUMBER;\r\n\t\t}\r\n\r\n\t\tthis._hasSemanticContext = this._hasSemanticContext || !SemanticContext.NONE.equals(config.semanticContext);\r\n\t\tthis._dipsIntoOuterContext = this._dipsIntoOuterContext || config.reachesIntoOuterContext;\r\n\t\tassert(!this.outermostConfigSet || !this._dipsIntoOuterContext);\r\n\t}\r\n\r\n\tprotected canMerge(left: ATNConfig, leftKey: { state: number, alt: number }, right: ATNConfig): boolean {\r\n\t\tif (left.state.stateNumber !== right.state.stateNumber) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (leftKey.alt !== right.alt) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn left.semanticContext.equals(right.semanticContext);\r\n\t}\r\n\r\n\tprotected getKey(e: ATNConfig): { state: number, alt: number } {\r\n\t\treturn { state: e.state.stateNumber, alt: e.alt };\r\n\t}\r\n\r\n\t@Override\r\n\tpublic containsAll(c: Iterable): boolean {\r\n\t\tfor (let o of c) {\r\n\t\t\tif (!(o instanceof ATNConfig)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (!this.contains(o)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic addAll(c: Iterable): boolean;\r\n\tpublic addAll(c: Iterable, contextCache: PredictionContextCache): boolean;\r\n\tpublic addAll(c: Iterable, contextCache?: PredictionContextCache): boolean {\r\n\t\tthis.ensureWritable();\r\n\r\n\t\tlet changed: boolean = false;\r\n\t\tfor (let group of c) {\r\n\t\t\tif (this.add(group, contextCache)) {\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clear(): void {\r\n\t\tthis.ensureWritable();\r\n\t\tif (!this.mergedConfigs || !this.unmerged) {\r\n\t\t\tthrow new Error(\"Covered by ensureWritable but duplicated here for strict null check limitation\");\r\n\t\t}\r\n\r\n\t\tthis.mergedConfigs.clear();\r\n\t\tthis.unmerged.length = 0;\r\n\t\tthis.configs.length = 0;\r\n\r\n\t\tthis._dipsIntoOuterContext = false;\r\n\t\tthis._hasSemanticContext = false;\r\n\t\tthis._uniqueAlt = ATN.INVALID_ALT_NUMBER;\r\n\t\tthis._conflictInfo = undefined;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (this === obj) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!(obj instanceof ATNConfigSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.outermostConfigSet === obj.outermostConfigSet\r\n\t\t\t&& Utils.equals(this._conflictInfo, obj._conflictInfo)\r\n\t\t\t&& ArrayEqualityComparator.INSTANCE.equals(this.configs, obj.configs);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tif (this.isReadOnly && this.cachedHashCode !== -1) {\r\n\t\t\treturn this.cachedHashCode;\r\n\t\t}\r\n\r\n\t\tlet hashCode: number = 1;\r\n\t\thashCode = 5 * hashCode ^ (this.outermostConfigSet ? 1 : 0);\r\n\t\thashCode = 5 * hashCode ^ ArrayEqualityComparator.INSTANCE.hashCode(this.configs);\r\n\r\n\t\tif (this.isReadOnly) {\r\n\t\t\tthis.cachedHashCode = hashCode;\r\n\t\t}\r\n\r\n\t\treturn hashCode;\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(showContext: boolean): string;\r\n\tpublic toString(showContext?: boolean): string {\r\n\t\tif (showContext == null) {\r\n\t\t\tshowContext = false;\r\n\t\t}\r\n\r\n\t\tlet buf = \"\";\r\n\t\tlet sortedConfigs = this.configs.slice(0);\r\n\t\tsortedConfigs.sort((o1, o2) => {\r\n\t\t\tif (o1.alt !== o2.alt) {\r\n\t\t\t\treturn o1.alt - o2.alt;\r\n\t\t\t}\r\n\t\t\telse if (o1.state.stateNumber !== o2.state.stateNumber) {\r\n\t\t\t\treturn o1.state.stateNumber - o2.state.stateNumber;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn o1.semanticContext.toString().localeCompare(o2.semanticContext.toString());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbuf += (\"[\");\r\n\t\tfor (let i = 0; i < sortedConfigs.length; i++) {\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tbuf += (\", \");\r\n\t\t\t}\r\n\t\t\tbuf += (sortedConfigs[i].toString(undefined, true, showContext));\r\n\t\t}\r\n\t\tbuf += (\"]\");\r\n\r\n\t\tif (this._hasSemanticContext) {\r\n\t\t\tbuf += (\",hasSemanticContext=\") + (this._hasSemanticContext);\r\n\t\t}\r\n\t\tif (this._uniqueAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\tbuf += (\",uniqueAlt=\") + (this._uniqueAlt);\r\n\t\t}\r\n\t\tif (this._conflictInfo != null) {\r\n\t\t\tbuf += (\",conflictingAlts=\") + (this._conflictInfo.conflictedAlts);\r\n\t\t\tif (!this._conflictInfo.isExact) {\r\n\t\t\t\tbuf += (\"*\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this._dipsIntoOuterContext) {\r\n\t\t\tbuf += (\",dipsIntoOuterContext\");\r\n\t\t}\r\n\t\treturn buf.toString();\r\n\t}\r\n\r\n\tget uniqueAlt(): number {\r\n\t\treturn this._uniqueAlt;\r\n\t}\r\n\r\n\tget hasSemanticContext(): boolean {\r\n\t\treturn this._hasSemanticContext;\r\n\t}\r\n\r\n\tset hasSemanticContext(value: boolean) {\r\n\t\tthis.ensureWritable();\r\n\t\tthis._hasSemanticContext = value;\r\n\t}\r\n\r\n\tget conflictInfo(): ConflictInfo | undefined {\r\n\t\treturn this._conflictInfo;\r\n\t}\r\n\r\n\tset conflictInfo(conflictInfo: ConflictInfo | undefined) {\r\n\t\tthis.ensureWritable();\r\n\t\tthis._conflictInfo = conflictInfo;\r\n\t}\r\n\r\n\tget conflictingAlts(): BitSet | undefined {\r\n\t\tif (this._conflictInfo == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this._conflictInfo.conflictedAlts;\r\n\t}\r\n\r\n\tget isExactConflict(): boolean {\r\n\t\tif (this._conflictInfo == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._conflictInfo.isExact;\r\n\t}\r\n\r\n\tget dipsIntoOuterContext(): boolean {\r\n\t\treturn this._dipsIntoOuterContext;\r\n\t}\r\n\r\n\tpublic get(index: number): ATNConfig {\r\n\t\treturn this.configs[index];\r\n\t}\r\n\r\n\tprotected ensureWritable(): void {\r\n\t\tif (this.isReadOnly) {\r\n\t\t\tthrow new Error(\"This ATNConfigSet is read only.\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.7771056-07:00\r\n\r\nimport { AcceptStateInfo } from \"./AcceptStateInfo\";\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { ATNConfigSet } from \"../atn/ATNConfigSet\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { LexerActionExecutor } from \"../atn/LexerActionExecutor\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { PredictionContext } from \"../atn/PredictionContext\";\r\nimport { SemanticContext } from \"../atn/SemanticContext\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\n/** A DFA state represents a set of possible ATN configurations.\r\n * As Aho, Sethi, Ullman p. 117 says \"The DFA uses its state\r\n * to keep track of all possible states the ATN can be in after\r\n * reading each input symbol. That is to say, after reading\r\n * input a1a2..an, the DFA is in a state that represents the\r\n * subset T of the states of the ATN that are reachable from the\r\n * ATN's start state along some path labeled a1a2..an.\"\r\n * In conventional NFA→DFA conversion, therefore, the subset T\r\n * would be a bitset representing the set of states the\r\n * ATN could be in. We need to track the alt predicted by each\r\n * state as well, however. More importantly, we need to maintain\r\n * a stack of states, tracking the closure operations as they\r\n * jump from rule to rule, emulating rule invocations (method calls).\r\n * I have to add a stack to simulate the proper lookahead sequences for\r\n * the underlying LL grammar from which the ATN was derived.\r\n *\r\n * I use a set of ATNConfig objects not simple states. An ATNConfig\r\n * is both a state (ala normal conversion) and a RuleContext describing\r\n * the chain of rules (if any) followed to arrive at that state.\r\n *\r\n * A DFA state may have multiple references to a particular state,\r\n * but with different ATN contexts (with same or different alts)\r\n * meaning that state was reached via a different set of rule invocations.\r\n */\r\nexport class DFAState {\r\n\tpublic stateNumber: number = -1;\r\n\r\n\t@NotNull\r\n\tpublic configs: ATNConfigSet;\r\n\r\n\t/** `edges.get(symbol)` points to target of symbol.\r\n\t */\r\n\t@NotNull\r\n\tprivate readonly edges: Map;\r\n\r\n\tprivate _acceptStateInfo: AcceptStateInfo | undefined;\r\n\r\n\t/** These keys for these edges are the top level element of the global context. */\r\n\t@NotNull\r\n\tprivate readonly contextEdges: Map;\r\n\r\n\t/** Symbols in this set require a global context transition before matching an input symbol. */\r\n\tprivate contextSymbols: BitSet | undefined;\r\n\r\n\t/**\r\n\t * This list is computed by {@link ParserATNSimulator#predicateDFAState}.\r\n\t */\r\n\tpublic predicates: DFAState.PredPrediction[] | undefined;\r\n\r\n\t/**\r\n\t * Constructs a new `DFAState`.\r\n\t *\r\n\t * @param configs The set of ATN configurations defining this state.\r\n\t */\r\n\tconstructor(configs: ATNConfigSet) {\r\n\t\tthis.configs = configs;\r\n\t\tthis.edges = new Map();\r\n\t\tthis.contextEdges = new Map();\r\n\t}\r\n\r\n\tget isContextSensitive(): boolean {\r\n\t\treturn !!this.contextSymbols;\r\n\t}\r\n\r\n\tpublic isContextSymbol(symbol: number): boolean {\r\n\t\tif (!this.isContextSensitive) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.contextSymbols!.get(symbol);\r\n\t}\r\n\r\n\tpublic setContextSymbol(symbol: number): void {\r\n\t\tassert(this.isContextSensitive);\r\n\t\tthis.contextSymbols!.set(symbol);\r\n\t}\r\n\r\n\tpublic setContextSensitive(atn: ATN): void {\r\n\t\tassert(!this.configs.isOutermostConfigSet);\r\n\t\tif (this.isContextSensitive) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this.contextSymbols) {\r\n\t\t\tthis.contextSymbols = new BitSet();\r\n\t\t}\r\n\t}\r\n\r\n\tget acceptStateInfo(): AcceptStateInfo | undefined {\r\n\t\treturn this._acceptStateInfo;\r\n\t}\r\n\r\n\tset acceptStateInfo(acceptStateInfo: AcceptStateInfo | undefined) {\r\n\t\tthis._acceptStateInfo = acceptStateInfo;\r\n\t}\r\n\r\n\tget isAcceptState(): boolean {\r\n\t\treturn !!this._acceptStateInfo;\r\n\t}\r\n\r\n\tget prediction(): number {\r\n\t\tif (!this._acceptStateInfo) {\r\n\t\t\treturn ATN.INVALID_ALT_NUMBER;\r\n\t\t}\r\n\r\n\t\treturn this._acceptStateInfo.prediction;\r\n\t}\r\n\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\tif (!this._acceptStateInfo) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this._acceptStateInfo.lexerActionExecutor;\r\n\t}\r\n\r\n\tpublic getTarget(symbol: number): DFAState | undefined {\r\n\t\treturn this.edges.get(symbol);\r\n\t}\r\n\r\n\tpublic setTarget(symbol: number, target: DFAState): void {\r\n\t\tthis.edges.set(symbol, target);\r\n\t}\r\n\r\n\tpublic getEdgeMap(): Map {\r\n\t\treturn this.edges;\r\n\t}\r\n\r\n\tpublic getContextTarget(invokingState: number): DFAState | undefined {\r\n\t\tif (invokingState === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\tinvokingState = -1;\r\n\t\t}\r\n\r\n\t\treturn this.contextEdges.get(invokingState);\r\n\t}\r\n\r\n\tpublic setContextTarget(invokingState: number, target: DFAState): void {\r\n\t\tif (!this.isContextSensitive) {\r\n\t\t\tthrow new Error(\"The state is not context sensitive.\");\r\n\t\t}\r\n\r\n\t\tif (invokingState === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\tinvokingState = -1;\r\n\t\t}\r\n\r\n\t\tthis.contextEdges.set(invokingState, target);\r\n\t}\r\n\r\n\tpublic getContextEdgeMap(): Map {\r\n\t\tlet map = new Map(this.contextEdges);\r\n\t\tlet existing = map.get(-1);\r\n\t\tif (existing !== undefined) {\r\n\t\t\tif (map.size === 1) {\r\n\t\t\t\tlet result = new Map();\r\n\t\t\t\tresult.set(PredictionContext.EMPTY_FULL_STATE_KEY, existing);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tmap.delete(-1);\r\n\t\t\t\tmap.set(PredictionContext.EMPTY_FULL_STATE_KEY, existing);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize(7);\r\n\t\thash = MurmurHash.update(hash, this.configs.hashCode());\r\n\t\thash = MurmurHash.finish(hash, 1);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Two {@link DFAState} instances are equal if their ATN configuration sets\r\n\t * are the same. This method is used to see if a state already exists.\r\n\t *\r\n\t * Because the number of alternatives and number of ATN configurations are\r\n\t * finite, there is a finite number of DFA states that can be processed.\r\n\t * This is necessary to show that the algorithm terminates.\r\n\t *\r\n\t * Cannot test the DFA state numbers here because in\r\n\t * {@link ParserATNSimulator#addDFAState} we need to know if any other state\r\n\t * exists that has this exact set of ATN configurations. The\r\n\t * {@link #stateNumber} is irrelevant.\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\t// compare set of ATN configurations in this set with other\r\n\t\tif (this === o) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!(o instanceof DFAState)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet other: DFAState = o;\r\n\t\tlet sameSet: boolean = this.configs.equals(other.configs);\r\n//\t\tSystem.out.println(\"DFAState.equals: \"+configs+(sameSet?\"==\":\"!=\")+other.configs);\r\n\t\treturn sameSet;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet buf = \"\";\r\n\t\tbuf += (this.stateNumber) + (\":\") + (this.configs);\r\n\t\tif (this.isAcceptState) {\r\n\t\t\tbuf += (\"=>\");\r\n\t\t\tif (this.predicates) {\r\n\t\t\t\tbuf += this.predicates;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbuf += (this.prediction);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn buf.toString();\r\n\t}\r\n}\r\n\r\nexport namespace DFAState {\r\n\t/** Map a predicate to a predicted alternative. */\r\n\texport class PredPrediction {\r\n\t\t@NotNull\r\n\t\tpublic pred: SemanticContext; // never null; at least SemanticContext.NONE\r\n\t\tpublic alt: number;\r\n\t\tconstructor(@NotNull pred: SemanticContext, alt: number) {\r\n\t\t\tthis.alt = alt;\r\n\t\t\tthis.pred = pred;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn \"(\" + this.pred + \", \" + this.alt + \")\";\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.3184311-07:00\r\n\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\n\r\nexport abstract class ATNSimulator {\r\n\t/** Must distinguish between missing edge and edge we know leads nowhere */\r\n\tprivate static _ERROR: DFAState;\r\n\t@NotNull\r\n\tstatic get ERROR(): DFAState {\r\n\t\tif (!ATNSimulator._ERROR) {\r\n\t\t\tATNSimulator._ERROR = new DFAState(new ATNConfigSet());\r\n\t\t\tATNSimulator._ERROR.stateNumber = PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t}\r\n\r\n\t\treturn ATNSimulator._ERROR;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic atn: ATN;\r\n\r\n\tconstructor(@NotNull atn: ATN) {\r\n\t\tthis.atn = atn;\r\n\t}\r\n\r\n\tpublic abstract reset(): void;\r\n\r\n\t/**\r\n\t * Clear the DFA cache used by the current instance. Since the DFA cache may\r\n\t * be shared by multiple ATN simulators, this method may affect the\r\n\t * performance (but not accuracy) of other parsers which are being used\r\n\t * concurrently.\r\n\t *\r\n\t * @ if the current instance does not\r\n\t * support clearing the DFA.\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\tpublic clearDFA(): void {\r\n\t\tthis.atn.clearDFA();\r\n\t}\r\n}\r\n\r\nexport namespace ATNSimulator {\r\n\tconst RULE_VARIANT_DELIMITER: string = \"$\";\r\n\tconst RULE_LF_VARIANT_MARKER: string = \"$lf$\";\r\n\tconst RULE_NOLF_VARIANT_MARKER: string = \"$nolf$\";\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.5479602-07:00\r\n\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ConsoleErrorListener implements ANTLRErrorListener {\r\n\t/**\r\n\t * Provides a default instance of {@link ConsoleErrorListener}.\r\n\t */\r\n\tpublic static readonly INSTANCE: ConsoleErrorListener = new ConsoleErrorListener();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation prints messages to {@link System#err} containing the\r\n\t * values of `line`, `charPositionInLine`, and `msg` using\r\n\t * the following format.\r\n\t *\r\n\t *
\r\n\t * line *line*:*charPositionInLine* *msg*\r\n\t * 
\r\n\t */\r\n\tpublic syntaxError(\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingSymbol: T,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\tmsg: string,\r\n\t\te: RecognitionException | undefined): void {\r\n\t\tconsole.error(`line ${line}:${charPositionInLine} ${msg}`);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:56.8126690-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Override, NotNull } from \"./Decorators\";\r\n\r\n/**\r\n * This implementation of {@link ANTLRErrorListener} dispatches all calls to a\r\n * collection of delegate listeners. This reduces the effort required to support multiple\r\n * listeners.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ProxyErrorListener> implements ANTLRErrorListener {\r\n\r\n\tconstructor(private delegates: TListener[]) {\r\n\t\tif (!delegates) {\r\n\t\t\tthrow new Error(\"Invalid delegates\");\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getDelegates(): ReadonlyArray {\r\n\t\treturn this.delegates;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic syntaxError(\r\n\t\t@NotNull recognizer: Recognizer,\r\n\t\toffendingSymbol: T | undefined,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\t@NotNull msg: string,\r\n\t\te: RecognitionException | undefined): void {\r\n\t\tthis.delegates.forEach((listener) => {\r\n\t\t\tif (listener.syntaxError) {\r\n\t\t\t\tlistener.syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.1954441-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNSimulator } from \"./atn/ATNSimulator\";\r\nimport { ConsoleErrorListener } from \"./ConsoleErrorListener\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { ParseInfo } from \"./atn/ParseInfo\";\r\nimport { ProxyErrorListener } from \"./ProxyErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { SuppressWarnings, NotNull } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\nimport { VocabularyImpl } from \"./VocabularyImpl\";\r\n\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\nexport abstract class Recognizer {\r\n\tpublic static readonly EOF: number = -1;\r\n\r\n\tprivate static tokenTypeMapCache =\r\n\t\tnew WeakMap>();\r\n\tprivate static ruleIndexMapCache =\r\n\t\tnew WeakMap>();\r\n\r\n\t@SuppressWarnings(\"serial\")\r\n\t@NotNull\r\n\tprivate readonly _listeners: Array> = [ConsoleErrorListener.INSTANCE];\r\n\r\n\tprotected _interp!: ATNInterpreter;\r\n\r\n\tprivate _stateNumber = -1;\r\n\r\n\tpublic abstract readonly ruleNames: string[];\r\n\r\n\t/**\r\n\t * Get the vocabulary used by the recognizer.\r\n\t *\r\n\t * @returns A {@link Vocabulary} instance providing information about the\r\n\t * vocabulary used by the grammar.\r\n\t */\r\n\tpublic abstract readonly vocabulary: Vocabulary;\r\n\r\n\t/**\r\n\t * Get a map from token names to token types.\r\n\t *\r\n\t * Used for XPath and tree pattern compilation.\r\n\t */\r\n\t@NotNull\r\n\tpublic getTokenTypeMap(): ReadonlyMap {\r\n\t\tlet vocabulary: Vocabulary = this.vocabulary;\r\n\t\tlet result = Recognizer.tokenTypeMapCache.get(vocabulary);\r\n\t\tif (result == null) {\r\n\t\t\tlet intermediateResult = new Map();\r\n\t\t\tfor (let i = 0; i <= this.atn.maxTokenType; i++) {\r\n\t\t\t\tlet literalName = vocabulary.getLiteralName(i);\r\n\t\t\t\tif (literalName != null) {\r\n\t\t\t\t\tintermediateResult.set(literalName, i);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet symbolicName = vocabulary.getSymbolicName(i);\r\n\t\t\t\tif (symbolicName != null) {\r\n\t\t\t\t\tintermediateResult.set(symbolicName, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tintermediateResult.set(\"EOF\", Token.EOF);\r\n\t\t\tresult = intermediateResult;\r\n\t\t\tRecognizer.tokenTypeMapCache.set(vocabulary, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Get a map from rule names to rule indexes.\r\n\t *\r\n\t * Used for XPath and tree pattern compilation.\r\n\t */\r\n\t@NotNull\r\n\tpublic getRuleIndexMap(): ReadonlyMap {\r\n\t\tlet ruleNames: string[] = this.ruleNames;\r\n\t\tif (ruleNames == null) {\r\n\t\t\tthrow new Error(\"The current recognizer does not provide a list of rule names.\");\r\n\t\t}\r\n\r\n\t\tlet result: ReadonlyMap | undefined = Recognizer.ruleIndexMapCache.get(ruleNames);\r\n\t\tif (result == null) {\r\n\t\t\tresult = Utils.toMap(ruleNames);\r\n\t\t\tRecognizer.ruleIndexMapCache.set(ruleNames, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic getTokenType(tokenName: string): number {\r\n\t\tlet ttype = this.getTokenTypeMap().get(tokenName);\r\n\t\tif (ttype != null) {\r\n\t\t\treturn ttype;\r\n\t\t}\r\n\t\treturn Token.INVALID_TYPE;\r\n\t}\r\n\r\n\t/**\r\n\t * If this recognizer was generated, it will have a serialized ATN\r\n\t * representation of the grammar.\r\n\t *\r\n\t * For interpreters, we don't know their serialized ATN despite having\r\n\t * created the interpreter from it.\r\n\t */\r\n\t@NotNull\r\n\tget serializedATN(): string {\r\n\t\tthrow new Error(\"there is no serialized ATN\");\r\n\t}\r\n\r\n\t/** For debugging and other purposes, might want the grammar name.\r\n\t * Have ANTLR generate an implementation for this method.\r\n\t */\r\n\tpublic abstract readonly grammarFileName: string;\r\n\r\n\t/**\r\n\t * Get the {@link ATN} used by the recognizer for prediction.\r\n\t *\r\n\t * @returns The {@link ATN} used by the recognizer for prediction.\r\n\t */\r\n\t@NotNull\r\n\tget atn(): ATN {\r\n\t\treturn this._interp.atn;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the ATN interpreter used by the recognizer for prediction.\r\n\t *\r\n\t * @returns The ATN interpreter used by the recognizer for prediction.\r\n\t */\r\n\t@NotNull\r\n\tget interpreter(): ATNInterpreter {\r\n\t\treturn this._interp;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the ATN interpreter used by the recognizer for prediction.\r\n\t *\r\n\t * @param interpreter The ATN interpreter used by the recognizer for\r\n\t * prediction.\r\n\t */\r\n\tset interpreter(@NotNull interpreter: ATNInterpreter) {\r\n\t\tthis._interp = interpreter;\r\n\t}\r\n\r\n\t/** If profiling during the parse/lex, this will return DecisionInfo records\r\n\t * for each decision in recognizer in a ParseInfo object.\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\tget parseInfo(): Promise {\r\n\t\treturn Promise.resolve(undefined);\r\n\t}\r\n\r\n\t/** What is the error header, normally line/character position information? */\r\n\t@NotNull\r\n\tpublic getErrorHeader(@NotNull e: RecognitionException): string {\r\n\t\tlet token = e.getOffendingToken();\r\n\t\tif (!token) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tlet line = token.line;\r\n\t\tlet charPositionInLine: number = token.charPositionInLine;\r\n\t\treturn \"line \" + line + \":\" + charPositionInLine;\r\n\t}\r\n\r\n\t/**\r\n\t * @exception NullPointerException if `listener` is `undefined`.\r\n\t */\r\n\tpublic addErrorListener(@NotNull listener: ANTLRErrorListener): void {\r\n\t\tif (!listener) {\r\n\t\t\tthrow new TypeError(\"listener must not be null\");\r\n\t\t}\r\n\t\tthis._listeners.push(listener);\r\n\t}\r\n\r\n\tpublic removeErrorListener(@NotNull listener: ANTLRErrorListener): void {\r\n\t\tlet position = this._listeners.indexOf(listener);\r\n\t\tif (position !== -1) {\r\n\t\t\tthis._listeners.splice(position, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic removeErrorListeners(): void {\r\n\t\tthis._listeners.length = 0;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getErrorListeners(): Array> {\r\n\t\treturn this._listeners.slice(0);\r\n\t}\r\n\r\n\tpublic getErrorListenerDispatch(): ANTLRErrorListener {\r\n\t\treturn new ProxyErrorListener>(this.getErrorListeners());\r\n\t}\r\n\r\n\t// subclass needs to override these if there are sempreds or actions\r\n\t// that the ATN interp needs to execute\r\n\tpublic sempred(\r\n\t\t_localctx: RuleContext | undefined,\r\n\t\truleIndex: number,\r\n\t\tactionIndex: number): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic precpred(\r\n\t\tlocalctx: RuleContext | undefined,\r\n\t\tprecedence: number): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic action(\r\n\t\t_localctx: RuleContext | undefined,\r\n\t\truleIndex: number,\r\n\t\tactionIndex: number): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\tget state(): number {\r\n\t\treturn this._stateNumber;\r\n\t}\r\n\r\n\t/** Indicate that the recognizer has changed internal state that is\r\n\t * consistent with the ATN state passed in. This way we always know\r\n\t * where we are in the ATN as the parser goes along. The rule\r\n\t * context objects form a stack that lets us see the stack of\r\n\t * invoking rules. Combine this and we have complete ATN\r\n\t * configuration information.\r\n\t */\r\n\tset state(atnState: number) {\r\n//\t\tSystem.err.println(\"setState \"+atnState);\r\n\t\tthis._stateNumber = atnState;\r\n//\t\tif ( traceATNStates ) _ctx.trace(atnState);\r\n\t}\r\n\r\n\tpublic abstract readonly inputStream: IntStream | undefined;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:59.5829654-07:00\r\n\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\n\r\n/**\r\n * This class provides a default implementation of the {@link Vocabulary}\r\n * interface.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class VocabularyImpl implements Vocabulary {\r\n\t/**\r\n\t * Gets an empty {@link Vocabulary} instance.\r\n\t *\r\n\t * No literal or symbol names are assigned to token types, so\r\n\t * {@link #getDisplayName(int)} returns the numeric value for all tokens\r\n\t * except {@link Token#EOF}.\r\n\t */\r\n\t@NotNull\r\n\tpublic static readonly EMPTY_VOCABULARY: VocabularyImpl = new VocabularyImpl([], [], []);\r\n\r\n\t@NotNull\r\n\tprivate readonly literalNames: Array;\r\n\t@NotNull\r\n\tprivate readonly symbolicNames: Array;\r\n\t@NotNull\r\n\tprivate readonly displayNames: Array;\r\n\r\n\tprivate _maxTokenType: number;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link VocabularyImpl} from the specified\r\n\t * literal, symbolic, and display token names.\r\n\t *\r\n\t * @param literalNames The literal names assigned to tokens, or an empty array\r\n\t * if no literal names are assigned.\r\n\t * @param symbolicNames The symbolic names assigned to tokens, or\r\n\t * an empty array if no symbolic names are assigned.\r\n\t * @param displayNames The display names assigned to tokens, or an empty array\r\n\t * to use the values in `literalNames` and `symbolicNames` as\r\n\t * the source of display names, as described in\r\n\t * {@link #getDisplayName(int)}.\r\n\t *\r\n\t * @see #getLiteralName(int)\r\n\t * @see #getSymbolicName(int)\r\n\t * @see #getDisplayName(int)\r\n\t */\r\n\tconstructor(literalNames: Array, symbolicNames: Array, displayNames: Array) {\r\n\t\tthis.literalNames = literalNames;\r\n\t\tthis.symbolicNames = symbolicNames;\r\n\t\tthis.displayNames = displayNames;\r\n\t\t// See note here on -1 part: https://github.com/antlr/antlr4/pull/1146\r\n\t\tthis._maxTokenType =\r\n\t\t\tMath.max(this.displayNames.length,\r\n\t\t\t\tMath.max(this.literalNames.length, this.symbolicNames.length)) - 1;\r\n\t}\r\n\r\n\t@Override\r\n\tget maxTokenType(): number {\r\n\t\treturn this._maxTokenType;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getLiteralName(tokenType: number): string | undefined {\r\n\t\tif (tokenType >= 0 && tokenType < this.literalNames.length) {\r\n\t\t\treturn this.literalNames[tokenType];\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getSymbolicName(tokenType: number): string | undefined {\r\n\t\tif (tokenType >= 0 && tokenType < this.symbolicNames.length) {\r\n\t\t\treturn this.symbolicNames[tokenType];\r\n\t\t}\r\n\r\n\t\tif (tokenType === Token.EOF) {\r\n\t\t\treturn \"EOF\";\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic getDisplayName(tokenType: number): string {\r\n\t\tif (tokenType >= 0 && tokenType < this.displayNames.length) {\r\n\t\t\tlet displayName = this.displayNames[tokenType];\r\n\t\t\tif (displayName) {\r\n\t\t\t\treturn displayName;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet literalName = this.getLiteralName(tokenType);\r\n\t\tif (literalName) {\r\n\t\t\treturn literalName;\r\n\t\t}\r\n\r\n\t\tlet symbolicName = this.getSymbolicName(tokenType);\r\n\t\tif (symbolicName) {\r\n\t\t\treturn symbolicName;\r\n\t\t}\r\n\r\n\t\treturn String(tokenType);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.5097925-07:00\r\n\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { ATNSimulator } from \"../atn/ATNSimulator\";\r\nimport { ATNState } from \"../atn/ATNState\";\r\nimport { DFA } from \"./DFA\";\r\nimport { DFAState } from \"./DFAState\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { PredictionContext } from \"../atn/PredictionContext\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\n/** A DFA walker that knows how to dump them to serialized strings. */\r\nexport class DFASerializer {\r\n\t@NotNull\r\n\tprivate dfa: DFA;\r\n\t@NotNull\r\n\tprivate vocabulary: Vocabulary;\r\n\r\n\tpublic ruleNames?: string[];\r\n\r\n\tpublic atn?: ATN;\r\n\r\n\tconstructor(/*@NotNull*/ dfa: DFA, /*@NotNull*/ vocabulary: Vocabulary);\r\n\tconstructor(/*@NotNull*/ dfa: DFA, /*@Nullable*/ parser: Recognizer | undefined);\r\n\tconstructor(/*@NotNull*/ dfa: DFA, /*@NotNull*/ vocabulary: Vocabulary, /*@Nullable*/ ruleNames: string[] | undefined, /*@Nullable*/ atn: ATN | undefined);\r\n\tconstructor(dfa: DFA, vocabulary: Vocabulary | Recognizer | undefined, ruleNames?: string[], atn?: ATN) {\r\n\t\tif (vocabulary instanceof Recognizer) {\r\n\t\t\truleNames = vocabulary.ruleNames;\r\n\t\t\tatn = vocabulary.atn;\r\n\t\t\tvocabulary = vocabulary.vocabulary;\r\n\t\t} else if (!vocabulary) {\r\n\t\t\tvocabulary = VocabularyImpl.EMPTY_VOCABULARY;\r\n\t\t}\r\n\r\n\t\tthis.dfa = dfa;\r\n\t\tthis.vocabulary = vocabulary;\r\n\t\tthis.ruleNames = ruleNames;\r\n\t\tthis.atn = atn;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (!this.dfa.s0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet buf = \"\";\r\n\r\n\t\tif (this.dfa.states) {\r\n\t\t\tlet states: DFAState[] = new Array(...this.dfa.states.toArray());\r\n\t\t\tstates.sort((o1, o2) => o1.stateNumber - o2.stateNumber);\r\n\r\n\t\t\tfor (let s of states) {\r\n\t\t\t\tlet edges: Map = s.getEdgeMap();\r\n\t\t\t\tlet edgeKeys = [...edges.keys()].sort((a, b) => a - b);\r\n\t\t\t\tlet contextEdges: Map = s.getContextEdgeMap();\r\n\t\t\t\tlet contextEdgeKeys = [...contextEdges.keys()].sort((a, b) => a - b);\r\n\t\t\t\tfor (let entry of edgeKeys) {\r\n\t\t\t\t\tlet value = edges.get(entry);\r\n\t\t\t\t\tif ((value == null || value === ATNSimulator.ERROR) && !s.isContextSymbol(entry)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet contextSymbol: boolean = false;\r\n\t\t\t\t\tbuf += (this.getStateString(s)) + (\"-\") + (this.getEdgeLabel(entry)) + (\"->\");\r\n\t\t\t\t\tif (s.isContextSymbol(entry)) {\r\n\t\t\t\t\t\tbuf += (\"!\");\r\n\t\t\t\t\t\tcontextSymbol = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet t: DFAState | undefined = value;\r\n\t\t\t\t\tif (t && t.stateNumber !== ATNSimulator.ERROR.stateNumber) {\r\n\t\t\t\t\t\tbuf += (this.getStateString(t)) + (\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (contextSymbol) {\r\n\t\t\t\t\t\tbuf += (\"ctx\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (s.isContextSensitive) {\r\n\t\t\t\t\tfor (let entry of contextEdgeKeys) {\r\n\t\t\t\t\t\tbuf += (this.getStateString(s))\r\n\t\t\t\t\t\t\t+ (\"-\")\r\n\t\t\t\t\t\t\t+ (this.getContextLabel(entry))\r\n\t\t\t\t\t\t\t+ (\"->\")\r\n\t\t\t\t\t\t\t+ (this.getStateString(contextEdges.get(entry)!))\r\n\t\t\t\t\t\t\t+ (\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet output: string = buf;\r\n\t\tif (output.length === 0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t//return Utils.sortLinesInString(output);\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprotected getContextLabel(i: number): string {\r\n\t\tif (i === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\treturn \"ctx:EMPTY_FULL\";\r\n\t\t}\r\n\t\telse if (i === PredictionContext.EMPTY_LOCAL_STATE_KEY) {\r\n\t\t\treturn \"ctx:EMPTY_LOCAL\";\r\n\t\t}\r\n\r\n\t\tif (this.atn && i > 0 && i <= this.atn.states.length) {\r\n\t\t\tlet state: ATNState = this.atn.states[i];\r\n\t\t\tlet ruleIndex: number = state.ruleIndex;\r\n\t\t\tif (this.ruleNames && ruleIndex >= 0 && ruleIndex < this.ruleNames.length) {\r\n\t\t\t\treturn \"ctx:\" + String(i) + \"(\" + this.ruleNames[ruleIndex] + \")\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn \"ctx:\" + String(i);\r\n\t}\r\n\r\n\tprotected getEdgeLabel(i: number): string {\r\n\t\treturn this.vocabulary.getDisplayName(i);\r\n\t}\r\n\r\n\tpublic getStateString(s: DFAState): string {\r\n\t\tif (s === ATNSimulator.ERROR) {\r\n\t\t\treturn \"ERROR\";\r\n\t\t}\r\n\r\n\t\tlet n: number = s.stateNumber;\r\n\t\tlet stateStr: string = \"s\" + n;\r\n\t\tif (s.isAcceptState) {\r\n\t\t\tif (s.predicates) {\r\n\t\t\t\tstateStr = \":s\" + n + \"=>\" + s.predicates;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstateStr = \":s\" + n + \"=>\" + s.prediction;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s.isContextSensitive) {\r\n\t\t\tstateStr += \"*\";\r\n\t\t\tfor (let config of s.configs) {\r\n\t\t\t\tif (config.reachesIntoOuterContext) {\r\n\t\t\t\t\tstateStr += \"*\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn stateStr;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:39.2167238-07:00\r\n\r\nimport { DFA } from \"./DFA\";\r\nimport { DFASerializer } from \"./DFASerializer\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\nexport class LexerDFASerializer extends DFASerializer {\r\n\tconstructor( @NotNull dfa: DFA) {\r\n\t\tsuper(dfa, VocabularyImpl.EMPTY_VOCABULARY);\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tprotected getEdgeLabel(i: number): string {\r\n\t\treturn \"'\" + String.fromCodePoint(i) + \"'\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.7099201-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\nimport { StarLoopbackState } from \"./StarLoopbackState\";\r\n\r\nexport class StarLoopEntryState extends DecisionState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic loopBackState!: StarLoopbackState;\r\n\r\n\t/**\r\n\t * Indicates whether this state can benefit from a precedence DFA during SLL\r\n\t * decision making.\r\n\t *\r\n\t * This is a computed property that is calculated during ATN deserialization\r\n\t * and stored for use in {@link ParserATNSimulator} and\r\n\t * {@link ParserInterpreter}.\r\n\t *\r\n\t * @see `DFA.isPrecedenceDfa`\r\n\t */\r\n\tpublic precedenceRuleDecision: boolean = false;\r\n\r\n\t/**\r\n\t * For precedence decisions, this set marks states *S* which have all\r\n\t * of the following characteristics:\r\n\t *\r\n\t * * One or more invocation sites of the current rule returns to\r\n\t * *S*.\r\n\t * * The closure from *S* includes the current decision without\r\n\t * passing through any rule invocations or stepping out of the current\r\n\t * rule.\r\n\t *\r\n\t * This field is not used when {@link #precedenceRuleDecision} is\r\n\t * `false`.\r\n\t */\r\n\tpublic precedenceLoopbackStates: BitSet = new BitSet();\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.STAR_LOOP_ENTRY;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.3567094-07:00\r\n\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { ATNConfigSet } from \"../atn/ATNConfigSet\";\r\nimport { ATNState } from \"../atn/ATNState\";\r\nimport { ATNType } from \"../atn/ATNType\";\r\nimport { DecisionState } from \"../atn/DecisionState\";\r\nimport { DFASerializer } from \"./DFASerializer\";\r\nimport { DFAState } from \"./DFAState\";\r\nimport { LexerATNSimulator } from \"../atn/LexerATNSimulator\";\r\nimport { LexerDFASerializer } from \"./LexerDFASerializer\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { StarLoopEntryState } from \"../atn/StarLoopEntryState\";\r\nimport { Token } from \"../Token\";\r\nimport { TokensStartState } from \"../atn/TokensStartState\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\nexport class DFA {\r\n\t/**\r\n\t * A set of all states in the `DFA`.\r\n\t *\r\n\t * Note that this collection of states holds the DFA states for both SLL and LL prediction. Only the start state\r\n\t * needs to be differentiated for these cases, which is tracked by the `s0` and `s0full` fields.\r\n\t */\r\n\t@NotNull\r\n\tpublic readonly states: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\r\n\tpublic s0: DFAState | undefined;\r\n\r\n\tpublic s0full: DFAState | undefined;\r\n\r\n\tpublic readonly decision: number;\r\n\r\n\t/** From which ATN state did we create this DFA? */\r\n\t@NotNull\r\n\tpublic atnStartState: ATNState;\r\n\t/**\r\n\t * Note: this field is accessed as `atnStartState.atn` in other targets. The TypeScript target keeps a separate copy\r\n\t * to avoid a number of additional null/undefined checks each time the ATN is accessed.\r\n\t */\r\n\t@NotNull\r\n\tpublic atn: ATN;\r\n\r\n\tprivate nextStateNumber: number = 0;\r\n\r\n\t/**\r\n\t * `true` if this DFA is for a precedence decision; otherwise,\r\n\t * `false`. This is the backing field for {@link #isPrecedenceDfa}.\r\n\t */\r\n\tprivate precedenceDfa: boolean;\r\n\r\n\t/**\r\n\t * Constructs a `DFA` instance associated with a lexer mode.\r\n\t *\r\n\t * The start state for a `DFA` constructed with this constructor should be a `TokensStartState`, which is the start\r\n\t * state for a lexer mode. The prediction made by this DFA determines the lexer rule which matches the current\r\n\t * input.\r\n\t *\r\n\t * @param atnStartState The start state for the mode.\r\n\t */\r\n\tconstructor(atnStartState: TokensStartState);\r\n\t/**\r\n\t * Constructs a `DFA` instance associated with a decision.\r\n\t *\r\n\t * @param atnStartState The decision associated with this DFA.\r\n\t * @param decision The decision number.\r\n\t */\r\n\tconstructor(atnStartState: DecisionState, decision: number);\r\n\tconstructor(@NotNull atnStartState: ATNState, decision: number = 0) {\r\n\t\tif (!atnStartState.atn) {\r\n\t\t\tthrow new Error(\"The ATNState must be associated with an ATN\");\r\n\t\t}\r\n\r\n\t\tthis.atnStartState = atnStartState;\r\n\t\tthis.atn = atnStartState.atn;\r\n\t\tthis.decision = decision;\r\n\r\n\t\t// Precedence DFAs are associated with the special precedence decision created for left-recursive rules which\r\n\t\t// evaluate their alternatives using a precedence hierarchy. When such a decision is encountered, we mark this\r\n\t\t// DFA instance as a precedence DFA and initialize the initial states s0 and s0full to special DFAState\r\n\t\t// instances which use outgoing edges to link to the actual start state used for each precedence level.\r\n\t\tlet isPrecedenceDfa: boolean = false;\r\n\t\tif (atnStartState instanceof StarLoopEntryState) {\r\n\t\t\tif (atnStartState.precedenceRuleDecision) {\r\n\t\t\t\tisPrecedenceDfa = true;\r\n\t\t\t\tthis.s0 = new DFAState(new ATNConfigSet());\r\n\t\t\t\tthis.s0full = new DFAState(new ATNConfigSet());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.precedenceDfa = isPrecedenceDfa;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether this DFA is a precedence DFA. Precedence DFAs use a special\r\n\t * start state {@link #s0} which is not stored in {@link #states}. The\r\n\t * {@link DFAState#edges} array for this start state contains outgoing edges\r\n\t * supplying individual start states corresponding to specific precedence\r\n\t * values.\r\n\t *\r\n\t * @returns `true` if this is a precedence DFA; otherwise,\r\n\t * `false`.\r\n\t * @see Parser.precedence\r\n\t */\r\n\tget isPrecedenceDfa(): boolean {\r\n\t\treturn this.precedenceDfa;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the start state for a specific precedence value.\r\n\t *\r\n\t * @param precedence The current precedence.\r\n\t * @returns The start state corresponding to the specified precedence, or\r\n\t * `undefined` if no start state exists for the specified precedence.\r\n\t *\r\n\t * @ if this is not a precedence DFA.\r\n\t * @see `isPrecedenceDfa`\r\n\t */\r\n\tpublic getPrecedenceStartState(precedence: number, fullContext: boolean): DFAState | undefined {\r\n\t\tif (!this.isPrecedenceDfa) {\r\n\t\t\tthrow new Error(\"Only precedence DFAs may contain a precedence start state.\");\r\n\t\t}\r\n\r\n\t\t// s0 and s0full are never null for a precedence DFA\r\n\t\tif (fullContext) {\r\n\t\t\treturn (this.s0full as DFAState).getTarget(precedence);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn (this.s0 as DFAState).getTarget(precedence);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set the start state for a specific precedence value.\r\n\t *\r\n\t * @param precedence The current precedence.\r\n\t * @param startState The start state corresponding to the specified\r\n\t * precedence.\r\n\t *\r\n\t * @ if this is not a precedence DFA.\r\n\t * @see `isPrecedenceDfa`\r\n\t */\r\n\tpublic setPrecedenceStartState(precedence: number, fullContext: boolean, startState: DFAState): void {\r\n\t\tif (!this.isPrecedenceDfa) {\r\n\t\t\tthrow new Error(\"Only precedence DFAs may contain a precedence start state.\");\r\n\t\t}\r\n\r\n\t\tif (precedence < 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (fullContext) {\r\n\t\t\t// s0full is never null for a precedence DFA\r\n\t\t\t(this.s0full as DFAState).setTarget(precedence, startState);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// s0 is never null for a precedence DFA\r\n\t\t\t(this.s0 as DFAState).setTarget(precedence, startState);\r\n\t\t}\r\n\t}\r\n\r\n\tget isEmpty(): boolean {\r\n\t\tif (this.isPrecedenceDfa) {\r\n\t\t\t// s0 and s0full are never null for a precedence DFA\r\n\t\t\treturn this.s0!.getEdgeMap().size === 0 && this.s0full!.getEdgeMap().size === 0;\r\n\t\t}\r\n\r\n\t\treturn this.s0 == null && this.s0full == null;\r\n\t}\r\n\r\n\tget isContextSensitive(): boolean {\r\n\t\tif (this.isPrecedenceDfa) {\r\n\t\t\t// s0full is never null for a precedence DFA\r\n\t\t\treturn (this.s0full as DFAState).getEdgeMap().size > 0;\r\n\t\t}\r\n\r\n\t\treturn this.s0full != null;\r\n\t}\r\n\r\n\tpublic addState(state: DFAState): DFAState {\r\n\t\tstate.stateNumber = this.nextStateNumber++;\r\n\t\treturn this.states.getOrAdd(state);\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(/*@NotNull*/ vocabulary: Vocabulary): string;\r\n\tpublic toString(/*@NotNull*/ vocabulary: Vocabulary, ruleNames: string[] | undefined): string;\r\n\tpublic toString(vocabulary?: Vocabulary, ruleNames?: string[]): string {\r\n\t\tif (!vocabulary) {\r\n\t\t\tvocabulary = VocabularyImpl.EMPTY_VOCABULARY;\r\n\t\t}\r\n\r\n\t\tif (!this.s0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet serializer: DFASerializer;\r\n\t\tif (ruleNames) {\r\n\t\t\tserializer = new DFASerializer(this, vocabulary, ruleNames, this.atnStartState.atn);\r\n\t\t} else {\r\n\t\t\tserializer = new DFASerializer(this, vocabulary);\r\n\t\t}\r\n\r\n\t\treturn serializer.toString();\r\n\t}\r\n\r\n\tpublic toLexerString(): string {\r\n\t\tif (!this.s0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet serializer: DFASerializer = new LexerDFASerializer(this);\r\n\t\treturn serializer.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.8389930-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class BasicState extends ATNState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.BASIC;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BasicState } from \"./BasicState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class InvalidState extends BasicState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.INVALID_TYPE;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.3060135-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull, Nullable } from \"../Decorators\";\r\nimport { Token } from \"../Token\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** A transition containing a set of values. */\r\nexport class SetTransition extends Transition {\r\n\t@NotNull\r\n\tpublic set: IntervalSet;\r\n\r\n\t// TODO (sam): should we really allow undefined here?\r\n\tconstructor(@NotNull target: ATNState, @Nullable set: IntervalSet) {\r\n\t\tsuper(target);\r\n\t\tif (set == null) {\r\n\t\t\tset = IntervalSet.of(Token.INVALID_TYPE);\r\n\t\t}\r\n\r\n\t\tthis.set = set;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.SET;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tget label(): IntervalSet {\r\n\t\treturn this.set;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn this.set.contains(symbol);\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn this.set.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.8483617-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull, Nullable } from \"../Decorators\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class NotSetTransition extends SetTransition {\r\n\tconstructor(@NotNull target: ATNState, @Nullable set: IntervalSet) {\r\n\t\tsuper(target, set);\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.NOT_SET;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn symbol >= minVocabSymbol\r\n\t\t\t&& symbol <= maxVocabSymbol\r\n\t\t\t&& !super.matches(symbol, minVocabSymbol, maxVocabSymbol);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"~\" + super.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.7513856-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The last node in the ATN for a rule, unless that rule is the start symbol.\r\n * In that case, there is one transition to EOF. Later, we might encode\r\n * references to all calls to this rule to compute FOLLOW sets for\r\n * error handling.\r\n */\r\nexport class RuleStopState extends ATNState {\r\n\r\n\t@Override\r\n\tget nonStopStateNumber(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.RULE_STOP;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.8294453-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { RuleStartState } from \"./RuleStartState\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** */\r\nexport class RuleTransition extends Transition {\r\n\t/** Ptr to the rule definition object for this rule ref */\r\n\tpublic ruleIndex: number; // no Rule object at runtime\r\n\r\n\tpublic precedence: number;\r\n\r\n\t/** What node to begin computations following ref to rule */\r\n\t@NotNull\r\n\tpublic followState: ATNState;\r\n\r\n\tpublic tailCall: boolean = false;\r\n\tpublic optimizedTailCall: boolean = false;\r\n\r\n\tconstructor(@NotNull ruleStart: RuleStartState, ruleIndex: number, precedence: number, @NotNull followState: ATNState) {\r\n\t\tsuper(ruleStart);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t\tthis.precedence = precedence;\r\n\t\tthis.followState = followState;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.RULE;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.9456839-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class WildcardTransition extends Transition {\r\n\tconstructor(@NotNull target: ATNState) {\r\n\t\tsuper(target);\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.WILDCARD;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn symbol >= minVocabSymbol && symbol <= maxVocabSymbol;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \".\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.4445360-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./AbstractPredicateTransition\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { NotSetTransition } from \"./NotSetTransition\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { Token } from \"../Token\";\r\nimport { Transition } from \"./Transition\";\r\nimport { WildcardTransition } from \"./WildcardTransition\";\r\n\r\nexport class LL1Analyzer {\r\n\t/** Special value added to the lookahead sets to indicate that we hit\r\n\t * a predicate during analysis if `seeThruPreds==false`.\r\n\t */\r\n\tpublic static readonly HIT_PRED: number = Token.INVALID_TYPE;\r\n\r\n\t@NotNull\r\n\tpublic atn: ATN;\r\n\r\n\tconstructor(@NotNull atn: ATN) { this.atn = atn; }\r\n\r\n\t/**\r\n\t * Calculates the SLL(1) expected lookahead set for each outgoing transition\r\n\t * of an {@link ATNState}. The returned array has one element for each\r\n\t * outgoing transition in `s`. If the closure from transition\r\n\t * *i* leads to a semantic predicate before matching a symbol, the\r\n\t * element at index *i* of the result will be `undefined`.\r\n\t *\r\n\t * @param s the ATN state\r\n\t * @returns the expected symbols for each outgoing transition of `s`.\r\n\t */\r\n\tpublic getDecisionLookahead(s: ATNState | undefined): Array | undefined {\r\n//\t\tSystem.out.println(\"LOOK(\"+s.stateNumber+\")\");\r\n\t\tif (s == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet look: Array = new Array(s.numberOfTransitions);\r\n\t\tfor (let alt = 0; alt < s.numberOfTransitions; alt++) {\r\n\t\t\tlet current: IntervalSet | undefined = new IntervalSet();\r\n\t\t\tlook[alt] = current;\r\n\t\t\tlet lookBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\t\tlet seeThruPreds: boolean = false; // fail to get lookahead upon pred\r\n\t\t\tthis._LOOK(s.transition(alt).target, undefined, PredictionContext.EMPTY_LOCAL,\r\n\t\t\t\tcurrent, lookBusy, new BitSet(), seeThruPreds, false);\r\n\t\t\t// Wipe out lookahead for this alternative if we found nothing\r\n\t\t\t// or we had a predicate when we !seeThruPreds\r\n\t\t\tif (current.size === 0 || current.contains(LL1Analyzer.HIT_PRED)) {\r\n\t\t\t\tcurrent = undefined;\r\n\t\t\t\tlook[alt] = current;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn look;\r\n\t}\r\n\r\n\t/**\r\n\t * Compute set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t *\r\n\t * If `ctx` is `undefined` and the end of the rule containing\r\n\t * `s` is reached, {@link Token#EPSILON} is added to the result set.\r\n\t * If `ctx` is not `undefined` and the end of the outermost rule is\r\n\t * reached, {@link Token#EOF} is added to the result set.\r\n\t *\r\n\t * @param s the ATN state\r\n\t * @param ctx the complete parser context, or `undefined` if the context\r\n\t * should be ignored\r\n\t *\r\n\t * @returns The set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t */\r\n\t// @NotNull\r\n\tpublic LOOK(/*@NotNull*/ s: ATNState, /*@NotNull*/ ctx: PredictionContext): IntervalSet;\r\n\r\n\t/**\r\n\t * Compute set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t *\r\n\t * If `ctx` is `undefined` and the end of the rule containing\r\n\t * `s` is reached, {@link Token#EPSILON} is added to the result set.\r\n\t * If `ctx` is not `PredictionContext#EMPTY_LOCAL` and the end of the outermost rule is\r\n\t * reached, {@link Token#EOF} is added to the result set.\r\n\t *\r\n\t * @param s the ATN state\r\n\t * @param stopState the ATN state to stop at. This can be a\r\n\t * {@link BlockEndState} to detect epsilon paths through a closure.\r\n\t * @param ctx the complete parser context, or `undefined` if the context\r\n\t * should be ignored\r\n\t *\r\n\t * @returns The set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t */\r\n\t// @NotNull\r\n\tpublic LOOK(/*@NotNull*/ s: ATNState, /*@NotNull*/ ctx: PredictionContext, stopState: ATNState | null): IntervalSet;\r\n\r\n\t@NotNull\r\n\tpublic LOOK(@NotNull s: ATNState, @NotNull ctx: PredictionContext, stopState?: ATNState | null): IntervalSet {\r\n\t\tif (stopState === undefined) {\r\n\t\t\tif (s.atn == null) {\r\n\t\t\t\tthrow new Error(\"Illegal state\");\r\n\t\t\t}\r\n\r\n\t\t\tstopState = s.atn.ruleToStopState[s.ruleIndex];\r\n\t\t} else if (stopState === null) {\r\n\t\t\t// This is an explicit request to pass undefined as the stopState to _LOOK. Used to distinguish an overload\r\n\t\t\t// from the method which simply omits the stopState parameter.\r\n\t\t\tstopState = undefined;\r\n\t\t}\r\n\r\n\t\tlet r: IntervalSet = new IntervalSet();\r\n\t\tlet seeThruPreds: boolean = true; // ignore preds; get all lookahead\r\n\t\tlet addEOF: boolean = true;\r\n\t\tthis._LOOK(s, stopState, ctx, r, new Array2DHashSet(), new BitSet(), seeThruPreds, addEOF);\r\n\t\treturn r;\r\n\t}\r\n\r\n\t/**\r\n\t * Compute set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t *

\r\n\t * If `ctx` is {@link PredictionContext#EMPTY_LOCAL} and\r\n\t * `stopState` or the end of the rule containing `s` is reached,\r\n\t * {@link Token#EPSILON} is added to the result set. If `ctx` is not\r\n\t * {@link PredictionContext#EMPTY_LOCAL} and `addEOF` is `true`\r\n\t * and `stopState` or the end of the outermost rule is reached,\r\n\t * {@link Token#EOF} is added to the result set.\r\n\t *\r\n\t * @param s the ATN state.\r\n\t * @param stopState the ATN state to stop at. This can be a\r\n\t * {@link BlockEndState} to detect epsilon paths through a closure.\r\n\t * @param ctx The outer context, or {@link PredictionContext#EMPTY_LOCAL} if\r\n\t * the outer context should not be used.\r\n\t * @param look The result lookahead set.\r\n\t * @param lookBusy A set used for preventing epsilon closures in the ATN\r\n\t * from causing a stack overflow. Outside code should pass\r\n\t * `new HashSet` for this argument.\r\n\t * @param calledRuleStack A set used for preventing left recursion in the\r\n\t * ATN from causing a stack overflow. Outside code should pass\r\n\t * `new BitSet()` for this argument.\r\n\t * @param seeThruPreds `true` to true semantic predicates as\r\n\t * implicitly `true` and \"see through them\", otherwise `false`\r\n\t * to treat semantic predicates as opaque and add {@link #HIT_PRED} to the\r\n\t * result if one is encountered.\r\n\t * @param addEOF Add {@link Token#EOF} to the result if the end of the\r\n\t * outermost context is reached. This parameter has no effect if `ctx`\r\n\t * is {@link PredictionContext#EMPTY_LOCAL}.\r\n\t */\r\n\tprotected _LOOK(\r\n\t\t@NotNull s: ATNState,\r\n\t\tstopState: ATNState | undefined,\r\n\t\t@NotNull ctx: PredictionContext,\r\n\t\t@NotNull look: IntervalSet,\r\n\t\t@NotNull lookBusy: Array2DHashSet,\r\n\t\t@NotNull calledRuleStack: BitSet,\r\n\t\tseeThruPreds: boolean,\r\n\t\taddEOF: boolean): void {\r\n//\t\tSystem.out.println(\"_LOOK(\"+s.stateNumber+\", ctx=\"+ctx);\r\n\t\tlet c: ATNConfig = ATNConfig.create(s, 0, ctx);\r\n\t\tif (!lookBusy.add(c)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (s === stopState) {\r\n\t\t\tif (PredictionContext.isEmptyLocal(ctx)) {\r\n\t\t\t\tlook.add(Token.EPSILON);\r\n\t\t\t\treturn;\r\n\t\t\t} else if (ctx.isEmpty) {\r\n\t\t\t\tif (addEOF) {\r\n\t\t\t\t\tlook.add(Token.EOF);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s instanceof RuleStopState) {\r\n\t\t\tif (ctx.isEmpty && !PredictionContext.isEmptyLocal(ctx)) {\r\n\t\t\t\tif (addEOF) {\r\n\t\t\t\t\tlook.add(Token.EOF);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tlet removed: boolean = calledRuleStack.get(s.ruleIndex);\r\n\t\t\ttry {\r\n\t\t\t\tcalledRuleStack.clear(s.ruleIndex);\r\n\t\t\t\tfor (let i = 0; i < ctx.size; i++) {\r\n\t\t\t\t\tif (ctx.getReturnState(i) === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet returnState: ATNState = this.atn.states[ctx.getReturnState(i)];\r\n//\t\t\t\t\tSystem.out.println(\"popping back to \"+retState);\r\n\t\t\t\t\tthis._LOOK(returnState, stopState, ctx.getParent(i), look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tif (removed) {\r\n\t\t\t\t\tcalledRuleStack.set(s.ruleIndex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet n: number = s.numberOfTransitions;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet t: Transition = s.transition(i);\r\n\t\t\tif (t instanceof RuleTransition) {\r\n\t\t\t\tif (calledRuleStack.get(t.ruleIndex)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet newContext: PredictionContext = ctx.getChild(t.followState.stateNumber);\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcalledRuleStack.set(t.ruleIndex);\r\n\t\t\t\t\tthis._LOOK(t.target, stopState, newContext, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tcalledRuleStack.clear(t.ruleIndex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (t instanceof AbstractPredicateTransition) {\r\n\t\t\t\tif (seeThruPreds) {\r\n\t\t\t\t\tthis._LOOK(t.target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlook.add(LL1Analyzer.HIT_PRED);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (t.isEpsilon) {\r\n\t\t\t\tthis._LOOK(t.target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t}\r\n\t\t\telse if (t instanceof WildcardTransition) {\r\n\t\t\t\tlook.addAll(IntervalSet.of(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType));\r\n\t\t\t}\r\n\t\t\telse {\r\n//\t\t\t\tSystem.out.println(\"adding \"+ t);\r\n\t\t\t\tlet set: IntervalSet | undefined = t.label;\r\n\t\t\t\tif (set != null) {\r\n\t\t\t\t\tif (t instanceof NotSetTransition) {\r\n\t\t\t\t\t\tset = set.complement(IntervalSet.of(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlook.addAll(set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.1063510-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNType } from \"./ATNType\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { InvalidState } from \"./InvalidState\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LL1Analyzer } from \"./LL1Analyzer\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleStartState } from \"./RuleStartState\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { Token } from \"../Token\";\r\nimport { TokensStartState } from \"./TokensStartState\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\n/** */\r\nexport class ATN {\r\n\t@NotNull\r\n\tpublic readonly states: ATNState[] = [];\r\n\r\n\t/** Each subrule/rule is a decision point and we must track them so we\r\n\t * can go back later and build DFA predictors for them. This includes\r\n\t * all the rules, subrules, optional blocks, ()+, ()* etc...\r\n\t */\r\n\t@NotNull\r\n\tpublic decisionToState: DecisionState[] = [];\r\n\r\n\t/**\r\n\t * Maps from rule index to starting state number.\r\n\t */\r\n\tpublic ruleToStartState!: RuleStartState[];\r\n\r\n\t/**\r\n\t * Maps from rule index to stop state number.\r\n\t */\r\n\tpublic ruleToStopState!: RuleStopState[];\r\n\r\n\t@NotNull\r\n\tpublic modeNameToStartState: Map =\r\n\t\tnew Map();\r\n\r\n\t/**\r\n\t * The type of the ATN.\r\n\t */\r\n\tpublic grammarType: ATNType;\r\n\r\n\t/**\r\n\t * The maximum value for any symbol recognized by a transition in the ATN.\r\n\t */\r\n\tpublic maxTokenType: number;\r\n\r\n\t/**\r\n\t * For lexer ATNs, this maps the rule index to the resulting token type.\r\n\t * For parser ATNs, this maps the rule index to the generated bypass token\r\n\t * type if the\r\n\t * {@link ATNDeserializationOptions#isGenerateRuleBypassTransitions}\r\n\t * deserialization option was specified; otherwise, this is `undefined`.\r\n\t */\r\n\tpublic ruleToTokenType!: Int32Array;\r\n\r\n\t/**\r\n\t * For lexer ATNs, this is an array of {@link LexerAction} objects which may\r\n\t * be referenced by action transitions in the ATN.\r\n\t */\r\n\tpublic lexerActions!: LexerAction[];\r\n\r\n\t@NotNull\r\n\tpublic modeToStartState: TokensStartState[] = [];\r\n\r\n\tprivate contextCache: Array2DHashMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\r\n\t@NotNull\r\n\tpublic decisionToDFA: DFA[] = [];\r\n\t@NotNull\r\n\tpublic modeToDFA: DFA[] = [];\r\n\r\n\tpublic LL1Table: Map = new Map();\r\n\r\n\t/** Used for runtime deserialization of ATNs from strings */\r\n\tconstructor(@NotNull grammarType: ATNType, maxTokenType: number) {\r\n\t\tthis.grammarType = grammarType;\r\n\t\tthis.maxTokenType = maxTokenType;\r\n\t}\r\n\r\n\tpublic clearDFA(): void {\r\n\t\tthis.decisionToDFA = new Array(this.decisionToState.length);\r\n\t\tfor (let i = 0; i < this.decisionToDFA.length; i++) {\r\n\t\t\tthis.decisionToDFA[i] = new DFA(this.decisionToState[i], i);\r\n\t\t}\r\n\r\n\t\tthis.modeToDFA = new Array(this.modeToStartState.length);\r\n\t\tfor (let i = 0; i < this.modeToDFA.length; i++) {\r\n\t\t\tthis.modeToDFA[i] = new DFA(this.modeToStartState[i]);\r\n\t\t}\r\n\r\n\t\tthis.contextCache.clear();\r\n\t\tthis.LL1Table.clear();\r\n\t}\r\n\r\n\tget contextCacheSize(): number {\r\n\t\treturn this.contextCache.size;\r\n\t}\r\n\r\n\tpublic getCachedContext(context: PredictionContext): PredictionContext {\r\n\t\treturn PredictionContext.getCachedContext(context, this.contextCache, new PredictionContext.IdentityHashMap());\r\n\t}\r\n\r\n\tpublic getDecisionToDFA(): DFA[] {\r\n\t\tassert(this.decisionToDFA != null && this.decisionToDFA.length === this.decisionToState.length);\r\n\t\treturn this.decisionToDFA;\r\n\t}\r\n\r\n\t/** Compute the set of valid tokens that can occur starting in state `s`.\r\n\t * If `ctx` is {@link PredictionContext#EMPTY_LOCAL}, the set of tokens will not include what can follow\r\n\t * the rule surrounding `s`. In other words, the set will be\r\n\t * restricted to tokens reachable staying within `s`'s rule.\r\n\t */\r\n\t// @NotNull\r\n\tpublic nextTokens(s: ATNState, /*@NotNull*/ ctx: PredictionContext): IntervalSet;\r\n\r\n\t/**\r\n\t * Compute the set of valid tokens that can occur starting in `s` and\r\n\t * staying in same rule. {@link Token#EPSILON} is in set if we reach end of\r\n\t * rule.\r\n\t */\r\n\t// @NotNull\r\n\tpublic nextTokens(/*@NotNull*/ s: ATNState): IntervalSet;\r\n\r\n\t@NotNull\r\n\tpublic nextTokens(s: ATNState, ctx?: PredictionContext): IntervalSet {\r\n\t\tif (ctx) {\r\n\t\t\tlet anal: LL1Analyzer = new LL1Analyzer(this);\r\n\t\t\tlet next: IntervalSet = anal.LOOK(s, ctx);\r\n\t\t\treturn next;\r\n\t\t} else {\r\n\t\t\tif (s.nextTokenWithinRule) {\r\n\t\t\t\treturn s.nextTokenWithinRule;\r\n\t\t\t}\r\n\r\n\t\t\ts.nextTokenWithinRule = this.nextTokens(s, PredictionContext.EMPTY_LOCAL);\r\n\t\t\ts.nextTokenWithinRule.setReadonly(true);\r\n\t\t\treturn s.nextTokenWithinRule;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic addState(state: ATNState): void {\r\n\t\tstate.atn = this;\r\n\t\tstate.stateNumber = this.states.length;\r\n\t\tthis.states.push(state);\r\n\t}\r\n\r\n\tpublic removeState(@NotNull state: ATNState): void {\r\n\t\t// just replace the state, don't shift states in list\r\n\t\tlet invalidState = new InvalidState();\r\n\t\tinvalidState.atn = this;\r\n\t\tinvalidState.stateNumber = state.stateNumber;\r\n\t\tthis.states[state.stateNumber] = invalidState;\r\n\t}\r\n\r\n\tpublic defineMode(@NotNull name: string, @NotNull s: TokensStartState): void {\r\n\t\tthis.modeNameToStartState.set(name, s);\r\n\t\tthis.modeToStartState.push(s);\r\n\t\tthis.modeToDFA.push(new DFA(s));\r\n\t\tthis.defineDecisionState(s);\r\n\t}\r\n\r\n\tpublic defineDecisionState(@NotNull s: DecisionState): number {\r\n\t\tthis.decisionToState.push(s);\r\n\t\ts.decision = this.decisionToState.length - 1;\r\n\t\tthis.decisionToDFA.push(new DFA(s, s.decision));\r\n\t\treturn s.decision;\r\n\t}\r\n\r\n\tpublic getDecisionState(decision: number): DecisionState | undefined {\r\n\t\tif (this.decisionToState.length > 0) {\r\n\t\t\treturn this.decisionToState[decision];\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tget numberOfDecisions(): number {\r\n\t\treturn this.decisionToState.length;\r\n\t}\r\n\r\n\t/**\r\n\t * Computes the set of input symbols which could follow ATN state number\r\n\t * `stateNumber` in the specified full `context`. This method\r\n\t * considers the complete parser context, but does not evaluate semantic\r\n\t * predicates (i.e. all predicates encountered during the calculation are\r\n\t * assumed true). If a path in the ATN exists from the starting state to the\r\n\t * {@link RuleStopState} of the outermost context without matching any\r\n\t * symbols, {@link Token#EOF} is added to the returned set.\r\n\t *\r\n\t * If `context` is `undefined`, it is treated as\r\n\t * {@link ParserRuleContext#EMPTY}.\r\n\t *\r\n\t * Note that this does NOT give you the set of all tokens that could\r\n\t * appear at a given token position in the input phrase. In other words, it\r\n\t * does not answer:\r\n\t *\r\n\t * > Given a specific partial input phrase, return the set of all\r\n\t * > tokens that can follow the last token in the input phrase.\r\n\t *\r\n\t * The big difference is that with just the input, the parser could land\r\n\t * right in the middle of a lookahead decision. Getting all\r\n\t * *possible* tokens given a partial input stream is a separate\r\n\t * computation. See https://github.com/antlr/antlr4/issues/1428\r\n\t *\r\n\t * For this function, we are specifying an ATN state and call stack to\r\n\t * compute what token(s) can come next and specifically: outside of a\r\n\t * lookahead decision. That is what you want for error reporting and\r\n\t * recovery upon parse error.\r\n\t *\r\n\t * @param stateNumber the ATN state number\r\n\t * @param context the full parse context\r\n\t * @returns The set of potentially valid input symbols which could follow the\r\n\t * specified state in the specified context.\r\n\t * @ if the ATN does not contain a state with\r\n\t * number `stateNumber`\r\n\t */\r\n\t@NotNull\r\n\tpublic getExpectedTokens(stateNumber: number, context: RuleContext | undefined): IntervalSet {\r\n\t\tif (stateNumber < 0 || stateNumber >= this.states.length) {\r\n\t\t\tthrow new RangeError(\"Invalid state number.\");\r\n\t\t}\r\n\r\n\t\tlet ctx: RuleContext | undefined = context;\r\n\t\tlet s: ATNState = this.states[stateNumber];\r\n\t\tlet following: IntervalSet = this.nextTokens(s);\r\n\t\tif (!following.contains(Token.EPSILON)) {\r\n\t\t\treturn following;\r\n\t\t}\r\n\r\n\t\tlet expected: IntervalSet = new IntervalSet();\r\n\t\texpected.addAll(following);\r\n\t\texpected.remove(Token.EPSILON);\r\n\t\twhile (ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {\r\n\t\t\tlet invokingState: ATNState = this.states[ctx.invokingState];\r\n\t\t\tlet rt: RuleTransition = invokingState.transition(0) as RuleTransition;\r\n\t\t\tfollowing = this.nextTokens(rt.followState);\r\n\t\t\texpected.addAll(following);\r\n\t\t\texpected.remove(Token.EPSILON);\r\n\t\t\tctx = ctx._parent;\r\n\t\t}\r\n\r\n\t\tif (following.contains(Token.EPSILON)) {\r\n\t\t\texpected.add(Token.EOF);\r\n\t\t}\r\n\r\n\t\treturn expected;\r\n\t}\r\n}\r\n\r\nexport namespace ATN {\r\n\texport const INVALID_ALT_NUMBER: number = 0;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.7613038-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * This implementation of {@link LexerAction} is used for tracking input offsets\r\n * for position-dependent actions within a {@link LexerActionExecutor}.\r\n *\r\n * This action is not serialized as part of the ATN, and is only required for\r\n * position-dependent lexer actions which appear at a location other than the\r\n * end of a rule. For more information about DFA optimizations employed for\r\n * lexer actions, see {@link LexerActionExecutor#append} and\r\n * {@link LexerActionExecutor#fixOffsetBeforeMatch}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerIndexedCustomAction implements LexerAction {\r\n\tprivate readonly _offset: number;\r\n\tprivate readonly _action: LexerAction;\r\n\r\n\t/**\r\n\t * Constructs a new indexed custom action by associating a character offset\r\n\t * with a {@link LexerAction}.\r\n\t *\r\n\t * Note: This class is only required for lexer actions for which\r\n\t * {@link LexerAction#isPositionDependent} returns `true`.\r\n\t *\r\n\t * @param offset The offset into the input {@link CharStream}, relative to\r\n\t * the token start index, at which the specified lexer action should be\r\n\t * executed.\r\n\t * @param action The lexer action to execute at a particular offset in the\r\n\t * input {@link CharStream}.\r\n\t */\r\n\tconstructor(offset: number, @NotNull action: LexerAction) {\r\n\t\tthis._offset = offset;\r\n\t\tthis._action = action;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the location in the input {@link CharStream} at which the lexer\r\n\t * action should be executed. The value is interpreted as an offset relative\r\n\t * to the token start index.\r\n\t *\r\n\t * @returns The location in the input {@link CharStream} at which the lexer\r\n\t * action should be executed.\r\n\t */\r\n\tget offset(): number {\r\n\t\treturn this._offset;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the lexer action to execute.\r\n\t *\r\n\t * @returns A {@link LexerAction} object which executes the lexer action.\r\n\t */\r\n\t@NotNull\r\n\tget action(): LexerAction {\r\n\t\treturn this._action;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * @returns This method returns the result of calling {@link #getActionType}\r\n\t * on the {@link LexerAction} returned by {@link #getAction}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn this._action.actionType;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `true`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This method calls {@link #execute} on the result of {@link #getAction}\r\n\t * using the provided `lexer`.\r\n\t */\r\n\t@Override\r\n\tpublic execute(lexer: Lexer): void {\r\n\t\t// assume the input stream position was properly set by the calling code\r\n\t\tthis._action.execute(lexer);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this._offset);\r\n\t\thash = MurmurHash.update(hash, this._action);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerIndexedCustomAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._offset === obj._offset\r\n\t\t\t&& this._action.equals(obj._action);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.8810453-07:00\r\n\r\nimport { ArrayEqualityComparator } from \"../misc/ArrayEqualityComparator\";\r\nimport { CharStream } from \"../CharStream\";\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerIndexedCustomAction } from \"./LexerIndexedCustomAction\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Represents an executor for a sequence of lexer actions which traversed during\r\n * the matching operation of a lexer rule (token).\r\n *\r\n * The executor tracks position information for position-dependent lexer actions\r\n * efficiently, ensuring that actions appearing only at the end of the rule do\r\n * not cause bloating of the {@link DFA} created for the lexer.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerActionExecutor {\r\n\t@NotNull\r\n\tprivate _lexerActions: LexerAction[];\r\n\r\n\t/**\r\n\t * Caches the result of {@link #hashCode} since the hash code is an element\r\n\t * of the performance-critical {@link LexerATNConfig#hashCode} operation.\r\n\t */\r\n\tprivate cachedHashCode: number;\r\n\r\n\t/**\r\n\t * Constructs an executor for a sequence of {@link LexerAction} actions.\r\n\t * @param lexerActions The lexer actions to execute.\r\n\t */\r\n\tconstructor(@NotNull lexerActions: LexerAction[]) {\r\n\t\tthis._lexerActions = lexerActions;\r\n\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\tfor (let lexerAction of lexerActions) {\r\n\t\t\thash = MurmurHash.update(hash, lexerAction);\r\n\t\t}\r\n\r\n\t\tthis.cachedHashCode = MurmurHash.finish(hash, lexerActions.length);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a {@link LexerActionExecutor} which executes the actions for\r\n\t * the input `lexerActionExecutor` followed by a specified\r\n\t * `lexerAction`.\r\n\t *\r\n\t * @param lexerActionExecutor The executor for actions already traversed by\r\n\t * the lexer while matching a token within a particular\r\n\t * {@link ATNConfig}. If this is `undefined`, the method behaves as though\r\n\t * it were an empty executor.\r\n\t * @param lexerAction The lexer action to execute after the actions\r\n\t * specified in `lexerActionExecutor`.\r\n\t *\r\n\t * @returns A {@link LexerActionExecutor} for executing the combine actions\r\n\t * of `lexerActionExecutor` and `lexerAction`.\r\n\t */\r\n\t@NotNull\r\n\tpublic static append(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull lexerAction: LexerAction): LexerActionExecutor {\r\n\t\tif (!lexerActionExecutor) {\r\n\t\t\treturn new LexerActionExecutor([lexerAction]);\r\n\t\t}\r\n\r\n\t\tlet lexerActions = lexerActionExecutor._lexerActions.slice(0);\r\n\t\tlexerActions.push(lexerAction);\r\n\t\treturn new LexerActionExecutor(lexerActions);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a {@link LexerActionExecutor} which encodes the current offset\r\n\t * for position-dependent lexer actions.\r\n\t *\r\n\t * Normally, when the executor encounters lexer actions where\r\n\t * {@link LexerAction#isPositionDependent} returns `true`, it calls\r\n\t * {@link IntStream#seek} on the input {@link CharStream} to set the input\r\n\t * position to the *end* of the current token. This behavior provides\r\n\t * for efficient DFA representation of lexer actions which appear at the end\r\n\t * of a lexer rule, even when the lexer rule matches a variable number of\r\n\t * characters.\r\n\t *\r\n\t * Prior to traversing a match transition in the ATN, the current offset\r\n\t * from the token start index is assigned to all position-dependent lexer\r\n\t * actions which have not already been assigned a fixed offset. By storing\r\n\t * the offsets relative to the token start index, the DFA representation of\r\n\t * lexer actions which appear in the middle of tokens remains efficient due\r\n\t * to sharing among tokens of the same length, regardless of their absolute\r\n\t * position in the input stream.\r\n\t *\r\n\t * If the current executor already has offsets assigned to all\r\n\t * position-dependent lexer actions, the method returns `this`.\r\n\t *\r\n\t * @param offset The current offset to assign to all position-dependent\r\n\t * lexer actions which do not already have offsets assigned.\r\n\t *\r\n\t * @returns A {@link LexerActionExecutor} which stores input stream offsets\r\n\t * for all position-dependent lexer actions.\r\n\t */\r\n\tpublic fixOffsetBeforeMatch(offset: number): LexerActionExecutor {\r\n\t\tlet updatedLexerActions: LexerAction[] | undefined;\r\n\t\tfor (let i = 0; i < this._lexerActions.length; i++) {\r\n\t\t\tif (this._lexerActions[i].isPositionDependent && !(this._lexerActions[i] instanceof LexerIndexedCustomAction)) {\r\n\t\t\t\tif (!updatedLexerActions) {\r\n\t\t\t\t\tupdatedLexerActions = this._lexerActions.slice(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdatedLexerActions[i] = new LexerIndexedCustomAction(offset, this._lexerActions[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!updatedLexerActions) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\treturn new LexerActionExecutor(updatedLexerActions);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the lexer actions to be executed by this executor.\r\n\t * @returns The lexer actions to be executed by this executor.\r\n\t */\r\n\t@NotNull\r\n\tget lexerActions(): LexerAction[] {\r\n\t\treturn this._lexerActions;\r\n\t}\r\n\r\n\t/**\r\n\t * Execute the actions encapsulated by this executor within the context of a\r\n\t * particular {@link Lexer}.\r\n\t *\r\n\t * This method calls {@link IntStream#seek} to set the position of the\r\n\t * `input` {@link CharStream} prior to calling\r\n\t * {@link LexerAction#execute} on a position-dependent action. Before the\r\n\t * method returns, the input position will be restored to the same position\r\n\t * it was in when the method was invoked.\r\n\t *\r\n\t * @param lexer The lexer instance.\r\n\t * @param input The input stream which is the source for the current token.\r\n\t * When this method is called, the current {@link IntStream#index} for\r\n\t * `input` should be the start of the following token, i.e. 1\r\n\t * character past the end of the current token.\r\n\t * @param startIndex The token start index. This value may be passed to\r\n\t * {@link IntStream#seek} to set the `input` position to the beginning\r\n\t * of the token.\r\n\t */\r\n\tpublic execute(@NotNull lexer: Lexer, input: CharStream, startIndex: number): void {\r\n\t\tlet requiresSeek: boolean = false;\r\n\t\tlet stopIndex: number = input.index;\r\n\t\ttry {\r\n\t\t\tfor (let lexerAction of this._lexerActions) {\r\n\t\t\t\tif (lexerAction instanceof LexerIndexedCustomAction) {\r\n\t\t\t\t\tlet offset: number = lexerAction.offset;\r\n\t\t\t\t\tinput.seek(startIndex + offset);\r\n\t\t\t\t\tlexerAction = lexerAction.action;\r\n\t\t\t\t\trequiresSeek = (startIndex + offset) !== stopIndex;\r\n\t\t\t\t} else if (lexerAction.isPositionDependent) {\r\n\t\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t\t\trequiresSeek = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlexerAction.execute(lexer);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif (requiresSeek) {\r\n\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.cachedHashCode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerActionExecutor)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.cachedHashCode === obj.cachedHashCode\r\n\t\t\t&& ArrayEqualityComparator.INSTANCE.equals(this._lexerActions, obj._lexerActions);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.0961136-07:00\r\n\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\nexport class LexerNoViableAltException extends RecognitionException {\r\n\t//private static serialVersionUID: number = -730999203913001726L;\r\n\r\n\t/** Matching attempted at what input index? */\r\n\tprivate _startIndex: number;\r\n\r\n\t/** Which configurations did we try at input.index that couldn't match input.LA(1)? */\r\n\tprivate _deadEndConfigs?: ATNConfigSet;\r\n\r\n\tconstructor(\r\n\t\tlexer: Lexer | undefined,\r\n\t\t@NotNull input: CharStream,\r\n\t\tstartIndex: number,\r\n\t\tdeadEndConfigs: ATNConfigSet | undefined) {\r\n\t\tsuper(lexer, input);\r\n\t\tthis._startIndex = startIndex;\r\n\t\tthis._deadEndConfigs = deadEndConfigs;\r\n\t}\r\n\r\n\tget startIndex(): number {\r\n\t\treturn this._startIndex;\r\n\t}\r\n\r\n\tget deadEndConfigs(): ATNConfigSet | undefined {\r\n\t\treturn this._deadEndConfigs;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): CharStream {\r\n\t\treturn super.inputStream as CharStream;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet symbol = \"\";\r\n\t\tif (this._startIndex >= 0 && this._startIndex < this.inputStream.size) {\r\n\t\t\tsymbol = this.inputStream.getText(Interval.of(this._startIndex, this._startIndex));\r\n\t\t\tsymbol = Utils.escapeWhitespace(symbol, false);\r\n\t\t}\r\n\r\n\t\t// return String.format(Locale.getDefault(), \"%s('%s')\", LexerNoViableAltException.class.getSimpleName(), symbol);\r\n\t\treturn `LexerNoViableAltException('${symbol}')`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.9444556-07:00\r\n\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class OrderedATNConfigSet extends ATNConfigSet {\r\n\r\n\tconstructor();\r\n\tconstructor(set: ATNConfigSet, readonly: boolean);\r\n\tconstructor(set?: ATNConfigSet, readonly?: boolean) {\r\n\t\tif (set != null && readonly != null) {\r\n\t\t\tsuper(set, readonly);\r\n\t\t} else {\r\n\t\t\tsuper();\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clone(readonly: boolean): ATNConfigSet {\r\n\t\tlet copy: OrderedATNConfigSet = new OrderedATNConfigSet(this, readonly);\r\n\t\tif (!readonly && this.isReadOnly) {\r\n\t\t\tcopy.addAll(this);\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected getKey(e: ATNConfig): { state: number, alt: number } {\r\n\t\t// This is a specially crafted key to ensure configurations are only merged if they are equal\r\n\t\treturn { state: 0, alt: e.hashCode() };\r\n\t}\r\n\r\n\t@Override\r\n\tprotected canMerge(left: ATNConfig, leftKey: { state: number, alt: number }, right: ATNConfig): boolean {\r\n\t\treturn left.equals(right);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.1083066-07:00\r\n\r\nimport { AcceptStateInfo } from \"../dfa/AcceptStateInfo\";\r\nimport { ActionTransition } from \"./ActionTransition\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { CharStream } from \"../CharStream\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { IntStream } from \"../IntStream\";\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerActionExecutor } from \"./LexerActionExecutor\";\r\nimport { LexerNoViableAltException } from \"../LexerNoViableAltException\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { OrderedATNConfigSet } from \"./OrderedATNConfigSet\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredicateTransition } from \"./PredicateTransition\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { Token } from \"../Token\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\nimport * as assert from \"assert\";\r\n\r\n/** \"dup\" of ParserInterpreter */\r\nexport class LexerATNSimulator extends ATNSimulator {\r\n\tpublic optimize_tail_calls: boolean = true;\r\n\r\n\tprotected recog: Lexer | undefined;\r\n\r\n\t/** The current token's starting index into the character stream.\r\n\t * Shared across DFA to ATN simulation in case the ATN fails and the\r\n\t * DFA did not have a previous accept state. In this case, we use the\r\n\t * ATN-generated exception object.\r\n\t */\r\n\tprotected startIndex: number = -1;\r\n\r\n\t/** line number 1..n within the input */\r\n\tprivate _line: number = 1;\r\n\r\n\t/** The index of the character relative to the beginning of the line 0..n-1 */\r\n\tprivate _charPositionInLine: number = 0;\r\n\r\n\tprotected mode: number = Lexer.DEFAULT_MODE;\r\n\r\n\t/** Used during DFA/ATN exec to record the most recent accept configuration info */\r\n\t@NotNull\r\n\tprotected prevAccept: LexerATNSimulator.SimState = new LexerATNSimulator.SimState();\r\n\r\n\tconstructor(/*@NotNull*/ atn: ATN);\r\n\tconstructor(/*@NotNull*/ atn: ATN, recog: Lexer | undefined);\r\n\tconstructor(@NotNull atn: ATN, recog?: Lexer) {\r\n\t\tsuper(atn);\r\n\t\tthis.recog = recog;\r\n\t}\r\n\r\n\tpublic copyState(@NotNull simulator: LexerATNSimulator): void {\r\n\t\tthis._charPositionInLine = simulator.charPositionInLine;\r\n\t\tthis._line = simulator._line;\r\n\t\tthis.mode = simulator.mode;\r\n\t\tthis.startIndex = simulator.startIndex;\r\n\t}\r\n\r\n\tpublic match(@NotNull input: CharStream, mode: number): number {\r\n\t\tthis.mode = mode;\r\n\t\tlet mark: number = input.mark();\r\n\t\ttry {\r\n\t\t\tthis.startIndex = input.index;\r\n\t\t\tthis.prevAccept.reset();\r\n\t\t\tlet s0: DFAState | undefined = this.atn.modeToDFA[mode].s0;\r\n\t\t\tif (s0 == null) {\r\n\t\t\t\treturn this.matchATN(input);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn this.execATN(input, s0);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tinput.release(mark);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reset(): void {\r\n\t\tthis.prevAccept.reset();\r\n\t\tthis.startIndex = -1;\r\n\t\tthis._line = 1;\r\n\t\tthis._charPositionInLine = 0;\r\n\t\tthis.mode = Lexer.DEFAULT_MODE;\r\n\t}\r\n\r\n\tprotected matchATN(@NotNull input: CharStream): number {\r\n\t\tlet startState: ATNState = this.atn.modeToStartState[this.mode];\r\n\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`matchATN mode ${this.mode} start: ${startState}`);\r\n\t\t}\r\n\r\n\t\tlet old_mode: number = this.mode;\r\n\r\n\t\tlet s0_closure: ATNConfigSet = this.computeStartState(input, startState);\r\n\t\tlet suppressEdge: boolean = s0_closure.hasSemanticContext;\r\n\t\tif (suppressEdge) {\r\n\t\t\ts0_closure.hasSemanticContext = false;\r\n\t\t}\r\n\r\n\t\tlet next: DFAState = this.addDFAState(s0_closure);\r\n\t\tif (!suppressEdge) {\r\n\t\t\tlet dfa = this.atn.modeToDFA[this.mode];\r\n\t\t\tif (!dfa.s0) {\r\n\t\t\t\tdfa.s0 = next;\r\n\t\t\t} else {\r\n\t\t\t\tnext = dfa.s0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet predict: number = this.execATN(input, next);\r\n\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`DFA after matchATN: ${this.atn.modeToDFA[old_mode].toLexerString()}`);\r\n\t\t}\r\n\r\n\t\treturn predict;\r\n\t}\r\n\r\n\tprotected execATN(@NotNull input: CharStream, @NotNull ds0: DFAState): number {\r\n\t\t// console.log(\"enter exec index \"+input.index+\" from \"+ds0.configs);\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`start state closure=${ds0.configs}`);\r\n\t\t}\r\n\r\n\t\tif (ds0.isAcceptState) {\r\n\t\t\t// allow zero-length tokens\r\n\t\t\tthis.captureSimState(this.prevAccept, input, ds0);\r\n\t\t}\r\n\r\n\t\tlet t: number = input.LA(1);\r\n\t\t// @NotNull\r\n\t\tlet s: DFAState = ds0; // s is current/from DFA state\r\n\r\n\t\twhile (true) { // while more work\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(`execATN loop starting closure: ${s.configs}`);\r\n\t\t\t}\r\n\r\n\t\t\t// As we move src->trg, src->trg, we keep track of the previous trg to\r\n\t\t\t// avoid looking up the DFA state again, which is expensive.\r\n\t\t\t// If the previous target was already part of the DFA, we might\r\n\t\t\t// be able to avoid doing a reach operation upon t. If s!=null,\r\n\t\t\t// it means that semantic predicates didn't prevent us from\r\n\t\t\t// creating a DFA state. Once we know s!=null, we check to see if\r\n\t\t\t// the DFA state has an edge already for t. If so, we can just reuse\r\n\t\t\t// it's configuration set; there's no point in re-computing it.\r\n\t\t\t// This is kind of like doing DFA simulation within the ATN\r\n\t\t\t// simulation because DFA simulation is really just a way to avoid\r\n\t\t\t// computing reach/closure sets. Technically, once we know that\r\n\t\t\t// we have a previously added DFA state, we could jump over to\r\n\t\t\t// the DFA simulator. But, that would mean popping back and forth\r\n\t\t\t// a lot and making things more complicated algorithmically.\r\n\t\t\t// This optimization makes a lot of sense for loops within DFA.\r\n\t\t\t// A character will take us back to an existing DFA state\r\n\t\t\t// that already has lots of edges out of it. e.g., .* in comments.\r\n\t\t\tlet target: DFAState | undefined = this.getExistingTargetState(s, t);\r\n\t\t\tif (target == null) {\r\n\t\t\t\ttarget = this.computeTargetState(input, s, t);\r\n\t\t\t}\r\n\r\n\t\t\tif (target === ATNSimulator.ERROR) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// If this is a consumable input element, make sure to consume before\r\n\t\t\t// capturing the accept state so the input index, line, and char\r\n\t\t\t// position accurately reflect the state of the interpreter at the\r\n\t\t\t// end of the token.\r\n\t\t\tif (t !== IntStream.EOF) {\r\n\t\t\t\tthis.consume(input);\r\n\t\t\t}\r\n\r\n\t\t\tif (target.isAcceptState) {\r\n\t\t\t\tthis.captureSimState(this.prevAccept, input, target);\r\n\t\t\t\tif (t === IntStream.EOF) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tt = input.LA(1);\r\n\t\t\ts = target; // flip; current DFA target becomes new src/from state\r\n\t\t}\r\n\r\n\t\treturn this.failOrAccept(this.prevAccept, input, s.configs, t);\r\n\t}\r\n\r\n\t/**\r\n\t * Get an existing target state for an edge in the DFA. If the target state\r\n\t * for the edge has not yet been computed or is otherwise not available,\r\n\t * this method returns `undefined`.\r\n\t *\r\n\t * @param s The current DFA state\r\n\t * @param t The next input symbol\r\n\t * @returns The existing target DFA state for the given input symbol\r\n\t * `t`, or `undefined` if the target state for this edge is not\r\n\t * already cached\r\n\t */\r\n\tprotected getExistingTargetState(@NotNull s: DFAState, t: number): DFAState | undefined {\r\n\t\tlet target: DFAState | undefined = s.getTarget(t);\r\n\t\tif (LexerATNSimulator.debug && target != null) {\r\n\t\t\tconsole.log(\"reuse state \" + s.stateNumber +\r\n\t\t\t\t\" edge to \" + target.stateNumber);\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t}\r\n\r\n\t/**\r\n\t * Compute a target state for an edge in the DFA, and attempt to add the\r\n\t * computed state and corresponding edge to the DFA.\r\n\t *\r\n\t * @param input The input stream\r\n\t * @param s The current DFA state\r\n\t * @param t The next input symbol\r\n\t *\r\n\t * @returns The computed target DFA state for the given input symbol\r\n\t * `t`. If `t` does not lead to a valid DFA state, this method\r\n\t * returns {@link #ERROR}.\r\n\t */\r\n\t@NotNull\r\n\tprotected computeTargetState(@NotNull input: CharStream, @NotNull s: DFAState, t: number): DFAState {\r\n\t\tlet reach: ATNConfigSet = new OrderedATNConfigSet();\r\n\r\n\t\t// if we don't find an existing DFA state\r\n\t\t// Fill reach starting from closure, following t transitions\r\n\t\tthis.getReachableConfigSet(input, s.configs, reach, t);\r\n\r\n\t\tif (reach.isEmpty) { // we got nowhere on t from s\r\n\t\t\tif (!reach.hasSemanticContext) {\r\n\t\t\t\t// we got nowhere on t, don't throw out this knowledge; it'd\r\n\t\t\t\t// cause a failover from DFA later.\r\n\t\t\t\tthis.addDFAEdge(s, t, ATNSimulator.ERROR);\r\n\t\t\t}\r\n\r\n\t\t\t// stop when we can't match any more char\r\n\t\t\treturn ATNSimulator.ERROR;\r\n\t\t}\r\n\r\n\t\t// Add an edge from s to target DFA found/created for reach\r\n\t\treturn this.addDFAEdge(s, t, reach);\r\n\t}\r\n\r\n\tprotected failOrAccept(\r\n\t\tprevAccept: LexerATNSimulator.SimState, input: CharStream,\r\n\t\treach: ATNConfigSet, t: number): number {\r\n\t\tif (prevAccept.dfaState != null) {\r\n\t\t\tlet lexerActionExecutor: LexerActionExecutor | undefined = prevAccept.dfaState.lexerActionExecutor;\r\n\t\t\tthis.accept(input, lexerActionExecutor, this.startIndex,\r\n\t\t\t\tprevAccept.index, prevAccept.line, prevAccept.charPos);\r\n\t\t\treturn prevAccept.dfaState.prediction;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// if no accept and EOF is first char, return EOF\r\n\t\t\tif (t === IntStream.EOF && input.index === this.startIndex) {\r\n\t\t\t\treturn Token.EOF;\r\n\t\t\t}\r\n\r\n\t\t\tthrow new LexerNoViableAltException(this.recog, input, this.startIndex, reach);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Given a starting configuration set, figure out all ATN configurations\r\n\t * we can reach upon input `t`. Parameter `reach` is a return\r\n\t * parameter.\r\n\t */\r\n\tprotected getReachableConfigSet(@NotNull input: CharStream, @NotNull closure: ATNConfigSet, @NotNull reach: ATNConfigSet, t: number): void {\r\n\t\t// this is used to skip processing for configs which have a lower priority\r\n\t\t// than a config that already reached an accept state for the same rule\r\n\t\tlet skipAlt: number = ATN.INVALID_ALT_NUMBER;\r\n\t\tfor (let c of closure) {\r\n\t\t\tlet currentAltReachedAcceptState: boolean = c.alt === skipAlt;\r\n\t\t\tif (currentAltReachedAcceptState && c.hasPassedThroughNonGreedyDecision) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(`testing ${this.getTokenName(t)} at ${c.toString(this.recog, true)}`);\r\n\t\t\t}\r\n\r\n\t\t\tlet n: number = c.state.numberOfOptimizedTransitions;\r\n\t\t\tfor (let ti = 0; ti < n; ti++) { // for each optimized transition\r\n\t\t\t\tlet trans: Transition = c.state.getOptimizedTransition(ti);\r\n\t\t\t\tlet target: ATNState | undefined = this.getReachableTarget(trans, t);\r\n\t\t\t\tif (target != null) {\r\n\t\t\t\t\tlet lexerActionExecutor: LexerActionExecutor | undefined = c.lexerActionExecutor;\r\n\t\t\t\t\tlet config: ATNConfig;\r\n\t\t\t\t\tif (lexerActionExecutor != null) {\r\n\t\t\t\t\t\tlexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.index - this.startIndex);\r\n\t\t\t\t\t\tconfig = c.transform(target, true, lexerActionExecutor);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tassert(c.lexerActionExecutor == null);\r\n\t\t\t\t\t\tconfig = c.transform(target, true);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet treatEofAsEpsilon: boolean = t === IntStream.EOF;\r\n\t\t\t\t\tif (this.closure(input, config, reach, currentAltReachedAcceptState, true, treatEofAsEpsilon)) {\r\n\t\t\t\t\t\t// any remaining configs for this alt have a lower priority than\r\n\t\t\t\t\t\t// the one that just reached an accept state.\r\n\t\t\t\t\t\tskipAlt = c.alt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected accept(\r\n\t\t@NotNull input: CharStream, lexerActionExecutor: LexerActionExecutor | undefined,\r\n\t\tstartIndex: number, index: number, line: number, charPos: number): void {\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`ACTION ${lexerActionExecutor}`);\r\n\t\t}\r\n\r\n\t\t// seek to after last char in token\r\n\t\tinput.seek(index);\r\n\t\tthis._line = line;\r\n\t\tthis._charPositionInLine = charPos;\r\n\r\n\t\tif (lexerActionExecutor != null && this.recog != null) {\r\n\t\t\tlexerActionExecutor.execute(this.recog, input, startIndex);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getReachableTarget(trans: Transition, t: number): ATNState | undefined {\r\n\t\tif (trans.matches(t, Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE)) {\r\n\t\t\treturn trans.target;\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected computeStartState(\r\n\t\t@NotNull input: CharStream,\r\n\t\t@NotNull p: ATNState): ATNConfigSet {\r\n\t\tlet initialContext: PredictionContext = PredictionContext.EMPTY_FULL;\r\n\t\tlet configs: ATNConfigSet = new OrderedATNConfigSet();\r\n\t\tfor (let i = 0; i < p.numberOfTransitions; i++) {\r\n\t\t\tlet target: ATNState = p.transition(i).target;\r\n\t\t\tlet c: ATNConfig = ATNConfig.create(target, i + 1, initialContext);\r\n\t\t\tthis.closure(input, c, configs, false, false, false);\r\n\t\t}\r\n\t\treturn configs;\r\n\t}\r\n\r\n\t/**\r\n\t * Since the alternatives within any lexer decision are ordered by\r\n\t * preference, this method stops pursuing the closure as soon as an accept\r\n\t * state is reached. After the first accept state is reached by depth-first\r\n\t * search from `config`, all other (potentially reachable) states for\r\n\t * this rule would have a lower priority.\r\n\t *\r\n\t * @returns `true` if an accept state is reached, otherwise\r\n\t * `false`.\r\n\t */\r\n\tprotected closure(@NotNull input: CharStream, @NotNull config: ATNConfig, @NotNull configs: ATNConfigSet, currentAltReachedAcceptState: boolean, speculative: boolean, treatEofAsEpsilon: boolean): boolean {\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(\"closure(\" + config.toString(this.recog, true) + \")\");\r\n\t\t}\r\n\r\n\t\tif (config.state instanceof RuleStopState) {\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tif (this.recog != null) {\r\n\t\t\t\t\tconsole.log(`closure at ${this.recog.ruleNames[config.state.ruleIndex]} rule stop ${config}`);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tconsole.log(`closure at rule stop ${config}`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet context: PredictionContext = config.context;\r\n\t\t\tif (context.isEmpty) {\r\n\t\t\t\tconfigs.add(config);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (context.hasEmpty) {\r\n\t\t\t\tconfigs.add(config.transform(config.state, true, PredictionContext.EMPTY_FULL));\r\n\t\t\t\tcurrentAltReachedAcceptState = true;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < context.size; i++) {\r\n\t\t\t\tlet returnStateNumber: number = context.getReturnState(i);\r\n\t\t\t\tif (returnStateNumber === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet newContext: PredictionContext = context.getParent(i); // \"pop\" return state\r\n\t\t\t\tlet returnState: ATNState = this.atn.states[returnStateNumber];\r\n\t\t\t\tlet c: ATNConfig = config.transform(returnState, false, newContext);\r\n\t\t\t\tcurrentAltReachedAcceptState = this.closure(input, c, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentAltReachedAcceptState;\r\n\t\t}\r\n\r\n\t\t// optimization\r\n\t\tif (!config.state.onlyHasEpsilonTransitions) {\r\n\t\t\tif (!currentAltReachedAcceptState || !config.hasPassedThroughNonGreedyDecision) {\r\n\t\t\t\tconfigs.add(config);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet p: ATNState = config.state;\r\n\t\tfor (let i = 0; i < p.numberOfOptimizedTransitions; i++) {\r\n\t\t\tlet t: Transition = p.getOptimizedTransition(i);\r\n\t\t\tlet c: ATNConfig | undefined = this.getEpsilonTarget(input, config, t, configs, speculative, treatEofAsEpsilon);\r\n\t\t\tif (c != null) {\r\n\t\t\t\tcurrentAltReachedAcceptState = this.closure(input, c, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn currentAltReachedAcceptState;\r\n\t}\r\n\r\n\t// side-effect: can alter configs.hasSemanticContext\r\n\tprotected getEpsilonTarget(\r\n\t\t@NotNull input: CharStream,\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull t: Transition,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tspeculative: boolean,\r\n\t\ttreatEofAsEpsilon: boolean): ATNConfig | undefined {\r\n\t\tlet c: ATNConfig | undefined;\r\n\r\n\t\tswitch (t.serializationType) {\r\n\t\tcase TransitionType.RULE:\r\n\t\t\tlet ruleTransition: RuleTransition = t as RuleTransition;\r\n\t\t\tif (this.optimize_tail_calls && ruleTransition.optimizedTailCall && !config.context.hasEmpty) {\r\n\t\t\t\tc = config.transform(t.target, true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlet newContext: PredictionContext = config.context.getChild(ruleTransition.followState.stateNumber);\r\n\t\t\t\tc = config.transform(t.target, true, newContext);\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\tthrow new Error(\"Precedence predicates are not supported in lexers.\");\r\n\r\n\t\tcase TransitionType.PREDICATE:\r\n\t\t\t/* Track traversing semantic predicates. If we traverse,\r\n\t\t\t\twe cannot add a DFA state for this \"reach\" computation\r\n\t\t\t\tbecause the DFA would not test the predicate again in the\r\n\t\t\t\tfuture. Rather than creating collections of semantic predicates\r\n\t\t\t\tlike v3 and testing them on prediction, v4 will test them on the\r\n\t\t\t\tfly all the time using the ATN not the DFA. This is slower but\r\n\t\t\t\tsemantically it's not used that often. One of the key elements to\r\n\t\t\t\tthis predicate mechanism is not adding DFA states that see\r\n\t\t\t\tpredicates immediately afterwards in the ATN. For example,\r\n\r\n\t\t\t\ta : ID {p1}? | ID {p2}? ;\r\n\r\n\t\t\t\tshould create the start state for rule 'a' (to save start state\r\n\t\t\t\tcompetition), but should not create target of ID state. The\r\n\t\t\t\tcollection of ATN states the following ID references includes\r\n\t\t\t\tstates reached by traversing predicates. Since this is when we\r\n\t\t\t\ttest them, we cannot cash the DFA state target of ID.\r\n\t\t\t*/\r\n\t\t\tlet pt: PredicateTransition = t as PredicateTransition;\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"EVAL rule \" + pt.ruleIndex + \":\" + pt.predIndex);\r\n\t\t\t}\r\n\t\t\tconfigs.hasSemanticContext = true;\r\n\t\t\tif (this.evaluatePredicate(input, pt.ruleIndex, pt.predIndex, speculative)) {\r\n\t\t\t\tc = config.transform(t.target, true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tc = undefined;\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ACTION:\r\n\t\t\tif (config.context.hasEmpty) {\r\n\t\t\t\t// execute actions anywhere in the start rule for a token.\r\n\t\t\t\t//\r\n\t\t\t\t// TODO: if the entry rule is invoked recursively, some\r\n\t\t\t\t// actions may be executed during the recursive call. The\r\n\t\t\t\t// problem can appear when hasEmpty is true but\r\n\t\t\t\t// isEmpty is false. In this case, the config needs to be\r\n\t\t\t\t// split into two contexts - one with just the empty path\r\n\t\t\t\t// and another with everything but the empty path.\r\n\t\t\t\t// Unfortunately, the current algorithm does not allow\r\n\t\t\t\t// getEpsilonTarget to return two configurations, so\r\n\t\t\t\t// additional modifications are needed before we can support\r\n\t\t\t\t// the split operation.\r\n\t\t\t\tlet lexerActionExecutor: LexerActionExecutor = LexerActionExecutor.append(config.lexerActionExecutor, this.atn.lexerActions[(t as ActionTransition).actionIndex]);\r\n\t\t\t\tc = config.transform(t.target, true, lexerActionExecutor);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// ignore actions in referenced rules\r\n\t\t\t\tc = config.transform(t.target, true);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\tcase TransitionType.EPSILON:\r\n\t\t\tc = config.transform(t.target, true);\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ATOM:\r\n\t\tcase TransitionType.RANGE:\r\n\t\tcase TransitionType.SET:\r\n\t\t\tif (treatEofAsEpsilon) {\r\n\t\t\t\tif (t.matches(IntStream.EOF, Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE)) {\r\n\t\t\t\t\tc = config.transform(t.target, false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tc = undefined;\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tc = undefined;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * Evaluate a predicate specified in the lexer.\r\n\t *\r\n\t * If `speculative` is `true`, this method was called before\r\n\t * {@link #consume} for the matched character. This method should call\r\n\t * {@link #consume} before evaluating the predicate to ensure position\r\n\t * sensitive values, including {@link Lexer#getText}, {@link Lexer#getLine},\r\n\t * and {@link Lexer#getCharPositionInLine}, properly reflect the current\r\n\t * lexer state. This method should restore `input` and the simulator\r\n\t * to the original state before returning (i.e. undo the actions made by the\r\n\t * call to {@link #consume}.\r\n\t *\r\n\t * @param input The input stream.\r\n\t * @param ruleIndex The rule containing the predicate.\r\n\t * @param predIndex The index of the predicate within the rule.\r\n\t * @param speculative `true` if the current index in `input` is\r\n\t * one character before the predicate's location.\r\n\t *\r\n\t * @returns `true` if the specified predicate evaluates to\r\n\t * `true`.\r\n\t */\r\n\tprotected evaluatePredicate(@NotNull input: CharStream, ruleIndex: number, predIndex: number, speculative: boolean): boolean {\r\n\t\t// assume true if no recognizer was provided\r\n\t\tif (this.recog == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!speculative) {\r\n\t\t\treturn this.recog.sempred(undefined, ruleIndex, predIndex);\r\n\t\t}\r\n\r\n\t\tlet savedCharPositionInLine: number = this._charPositionInLine;\r\n\t\tlet savedLine: number = this._line;\r\n\t\tlet index: number = input.index;\r\n\t\tlet marker: number = input.mark();\r\n\t\ttry {\r\n\t\t\tthis.consume(input);\r\n\t\t\treturn this.recog.sempred(undefined, ruleIndex, predIndex);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tthis._charPositionInLine = savedCharPositionInLine;\r\n\t\t\tthis._line = savedLine;\r\n\t\t\tinput.seek(index);\r\n\t\t\tinput.release(marker);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected captureSimState(\r\n\t\t@NotNull settings: LexerATNSimulator.SimState,\r\n\t\t@NotNull input: CharStream,\r\n\t\t@NotNull dfaState: DFAState): void {\r\n\t\tsettings.index = input.index;\r\n\t\tsettings.line = this._line;\r\n\t\tsettings.charPos = this._charPositionInLine;\r\n\t\tsettings.dfaState = dfaState;\r\n\t}\r\n\r\n\t// @NotNull\r\n\tprotected addDFAEdge(/*@NotNull*/ p: DFAState, t: number, /*@NotNull*/ q: ATNConfigSet): DFAState;\r\n\tprotected addDFAEdge(/*@NotNull*/ p: DFAState, t: number, /*@NotNull*/ q: DFAState): void;\r\n\tprotected addDFAEdge(p: DFAState, t: number, q: ATNConfigSet | DFAState): DFAState | void {\r\n\t\tif (q instanceof ATNConfigSet) {\r\n\t\t\t/* leading to this call, ATNConfigSet.hasSemanticContext is used as a\r\n\t\t\t* marker indicating dynamic predicate evaluation makes this edge\r\n\t\t\t* dependent on the specific input sequence, so the static edge in the\r\n\t\t\t* DFA should be omitted. The target DFAState is still created since\r\n\t\t\t* execATN has the ability to resynchronize with the DFA state cache\r\n\t\t\t* following the predicate evaluation step.\r\n\t\t\t*\r\n\t\t\t* TJP notes: next time through the DFA, we see a pred again and eval.\r\n\t\t\t* If that gets us to a previously created (but dangling) DFA\r\n\t\t\t* state, we can continue in pure DFA mode from there.\r\n\t\t\t*/\r\n\t\t\tlet suppressEdge: boolean = q.hasSemanticContext;\r\n\t\t\tif (suppressEdge) {\r\n\t\t\t\tq.hasSemanticContext = false;\r\n\t\t\t}\r\n\r\n\t\t\t// @NotNull\r\n\t\t\tlet to: DFAState = this.addDFAState(q);\r\n\r\n\t\t\tif (suppressEdge) {\r\n\t\t\t\treturn to;\r\n\t\t\t}\r\n\r\n\t\t\tthis.addDFAEdge(p, t, to);\r\n\t\t\treturn to;\r\n\t\t} else {\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"EDGE \" + p + \" -> \" + q + \" upon \" + String.fromCharCode(t));\r\n\t\t\t}\r\n\r\n\t\t\tif (p != null) {\r\n\t\t\t\tp.setTarget(t, q);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/** Add a new DFA state if there isn't one with this set of\r\n\t * \tconfigurations already. This method also detects the first\r\n\t * \tconfiguration containing an ATN rule stop state. Later, when\r\n\t * \ttraversing the DFA, we will know which rule to accept.\r\n\t */\r\n\t@NotNull\r\n\tprotected addDFAState(@NotNull configs: ATNConfigSet): DFAState {\r\n\t\t/* the lexer evaluates predicates on-the-fly; by this point configs\r\n\t\t * should not contain any configurations with unevaluated predicates.\r\n\t\t */\r\n\t\tassert(!configs.hasSemanticContext);\r\n\r\n\t\tlet proposed: DFAState = new DFAState(configs);\r\n\t\tlet existing: DFAState | undefined = this.atn.modeToDFA[this.mode].states.get(proposed);\r\n\t\tif (existing != null) {\r\n\t\t\treturn existing;\r\n\t\t}\r\n\r\n\t\tconfigs.optimizeConfigs(this);\r\n\t\tlet newState: DFAState = new DFAState(configs.clone(true));\r\n\r\n\t\tlet firstConfigWithRuleStopState: ATNConfig | undefined;\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\tfirstConfigWithRuleStopState = c;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (firstConfigWithRuleStopState != null) {\r\n\t\t\tlet prediction: number = this.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex];\r\n\t\t\tlet lexerActionExecutor: LexerActionExecutor | undefined = firstConfigWithRuleStopState.lexerActionExecutor;\r\n\t\t\tnewState.acceptStateInfo = new AcceptStateInfo(prediction, lexerActionExecutor);\r\n\t\t}\r\n\r\n\t\treturn this.atn.modeToDFA[this.mode].addState(newState);\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getDFA(mode: number): DFA {\r\n\t\treturn this.atn.modeToDFA[mode];\r\n\t}\r\n\r\n\t/** Get the text matched so far for the current token.\r\n\t */\r\n\t@NotNull\r\n\tpublic getText(@NotNull input: CharStream): string {\r\n\t\t// index is first lookahead char, don't include.\r\n\t\treturn input.getText(Interval.of(this.startIndex, input.index - 1));\r\n\t}\r\n\r\n\tget line(): number {\r\n\t\treturn this._line;\r\n\t}\r\n\r\n\tset line(line: number) {\r\n\t\tthis._line = line;\r\n\t}\r\n\r\n\tget charPositionInLine(): number {\r\n\t\treturn this._charPositionInLine;\r\n\t}\r\n\r\n\tset charPositionInLine(charPositionInLine: number) {\r\n\t\tthis._charPositionInLine = charPositionInLine;\r\n\t}\r\n\r\n\tpublic consume(@NotNull input: CharStream): void {\r\n\t\tlet curChar: number = input.LA(1);\r\n\t\tif (curChar === \"\\n\".charCodeAt(0)) {\r\n\t\t\tthis._line++;\r\n\t\t\tthis._charPositionInLine = 0;\r\n\t\t} else {\r\n\t\t\tthis._charPositionInLine++;\r\n\t\t}\r\n\t\tinput.consume();\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getTokenName(t: number): string {\r\n\t\tif (t === -1) {\r\n\t\t\treturn \"EOF\";\r\n\t\t}\r\n\t\t//if ( atn.g!=null ) return atn.g.getTokenDisplayName(t);\r\n\t\treturn \"'\" + String.fromCharCode(t) + \"'\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerATNSimulator {\r\n\texport const debug: boolean = false;\r\n\texport const dfa_debug: boolean = false;\r\n\r\n\t/** When we hit an accept state in either the DFA or the ATN, we\r\n\t * have to notify the character stream to start buffering characters\r\n\t * via {@link IntStream#mark} and record the current state. The current sim state\r\n\t * includes the current index into the input, the current line,\r\n\t * and current character position in that line. Note that the Lexer is\r\n\t * tracking the starting line and characterization of the token. These\r\n\t * variables track the \"state\" of the simulator when it hits an accept state.\r\n\t *\r\n\t * We track these variables separately for the DFA and ATN simulation\r\n\t * because the DFA simulation often has to fail over to the ATN\r\n\t * simulation. If the ATN simulation fails, we need the DFA to fall\r\n\t * back to its previously accepted state, if any. If the ATN succeeds,\r\n\t * then the ATN does the accept and the DFA simulator that invoked it\r\n\t * can simply return the predicted token type.\r\n\t */\r\n\texport class SimState {\r\n\t\tpublic index: number = -1;\r\n\t\tpublic line: number = 0;\r\n\t\tpublic charPos: number = -1;\r\n\t\tpublic dfaState?: DFAState;\r\n\r\n\t\tpublic reset(): void {\r\n\t\t\tthis.index = -1;\r\n\t\t\tthis.line = 0;\r\n\t\t\tthis.charPos = -1;\r\n\t\t\tthis.dfaState = undefined;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.7913318-07:00\r\n\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CommonTokenFactory } from \"./CommonTokenFactory\";\r\nimport { IntegerStack } from \"./misc/IntegerStack\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { LexerATNSimulator } from \"./atn/LexerATNSimulator\";\r\nimport { LexerNoViableAltException } from \"./LexerNoViableAltException\";\r\nimport { Override } from \"./Decorators\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/** A lexer is recognizer that draws input symbols from a character stream.\r\n * lexer grammars result in a subclass of this object. A Lexer object\r\n * uses simplified match() and error recovery mechanisms in the interest\r\n * of speed.\r\n */\r\nexport abstract class Lexer extends Recognizer\r\n\timplements TokenSource {\r\n\tpublic static readonly DEFAULT_MODE: number = 0;\r\n\tpublic static readonly MORE: number = -2;\r\n\tpublic static readonly SKIP: number = -3;\r\n\r\n\tstatic get DEFAULT_TOKEN_CHANNEL(): number {\r\n\t\treturn Token.DEFAULT_CHANNEL;\r\n\t}\r\n\r\n\tstatic get HIDDEN(): number {\r\n\t\treturn Token.HIDDEN_CHANNEL;\r\n\t}\r\n\r\n\tpublic static readonly MIN_CHAR_VALUE: number = 0x0000;\r\n\tpublic static readonly MAX_CHAR_VALUE: number = 0x10FFFF;\r\n\r\n\tpublic _input: CharStream;\r\n\r\n\tprotected _tokenFactorySourcePair: { source: TokenSource, stream: CharStream };\r\n\r\n\t/** How to create token objects */\r\n\tprotected _factory: TokenFactory = CommonTokenFactory.DEFAULT;\r\n\r\n\t/** The goal of all lexer rules/methods is to create a token object.\r\n\t * This is an instance variable as multiple rules may collaborate to\r\n\t * create a single token. nextToken will return this object after\r\n\t * matching lexer rule(s). If you subclass to allow multiple token\r\n\t * emissions, then set this to the last token to be matched or\r\n\t * something non-undefined so that the auto token emit mechanism will not\r\n\t * emit another token.\r\n\t */\r\n\tpublic _token: Token | undefined;\r\n\r\n\t/** What character index in the stream did the current token start at?\r\n\t * Needed, for example, to get the text for current token. Set at\r\n\t * the start of nextToken.\r\n\t */\r\n\tpublic _tokenStartCharIndex: number = -1;\r\n\r\n\t/** The line on which the first character of the token resides */\r\n\tpublic _tokenStartLine: number = 0;\r\n\r\n\t/** The character position of first character within the line */\r\n\tpublic _tokenStartCharPositionInLine: number = 0;\r\n\r\n\t/** Once we see EOF on char stream, next token will be EOF.\r\n\t * If you have DONE : EOF ; then you see DONE EOF.\r\n\t */\r\n\tpublic _hitEOF: boolean = false;\r\n\r\n\t/** The channel number for the current token */\r\n\tpublic _channel: number = 0;\r\n\r\n\t/** The token type for the current token */\r\n\tpublic _type: number = 0;\r\n\r\n\tpublic readonly _modeStack: IntegerStack = new IntegerStack();\r\n\tpublic _mode: number = Lexer.DEFAULT_MODE;\r\n\r\n\t/** You can set the text for the current token to override what is in\r\n\t * the input char buffer. Set `text` or can set this instance var.\r\n\t */\r\n\tpublic _text: string | undefined;\r\n\r\n\tconstructor(input: CharStream) {\r\n\t\tsuper();\r\n\t\tthis._input = input;\r\n\t\tthis._tokenFactorySourcePair = { source: this, stream: input };\r\n\t}\r\n\r\n\tpublic reset(): void;\r\n\tpublic reset(resetInput: boolean): void;\r\n\tpublic reset(resetInput?: boolean): void {\r\n\t\t// wack Lexer state variables\r\n\t\tif (resetInput === undefined || resetInput) {\r\n\t\t\tthis._input.seek(0); // rewind the input\r\n\t\t}\r\n\r\n\t\tthis._token = undefined;\r\n\t\tthis._type = Token.INVALID_TYPE;\r\n\t\tthis._channel = Token.DEFAULT_CHANNEL;\r\n\t\tthis._tokenStartCharIndex = -1;\r\n\t\tthis._tokenStartCharPositionInLine = -1;\r\n\t\tthis._tokenStartLine = -1;\r\n\t\tthis._text = undefined;\r\n\r\n\t\tthis._hitEOF = false;\r\n\t\tthis._mode = Lexer.DEFAULT_MODE;\r\n\t\tthis._modeStack.clear();\r\n\r\n\t\tthis.interpreter.reset();\r\n\t}\r\n\r\n\t/** Return a token from this source; i.e., match a token on the char\r\n\t * stream.\r\n\t */\r\n\t@Override\r\n\tpublic nextToken(): Token {\r\n\t\tif (this._input == null) {\r\n\t\t\tthrow new Error(\"nextToken requires a non-null input stream.\");\r\n\t\t}\r\n\r\n\t\t// Mark start location in char stream so unbuffered streams are\r\n\t\t// guaranteed at least have text of current token\r\n\t\tlet tokenStartMarker: number = this._input.mark();\r\n\t\ttry {\r\n\t\t\touter:\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (this._hitEOF) {\r\n\t\t\t\t\treturn this.emitEOF();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._token = undefined;\r\n\t\t\t\tthis._channel = Token.DEFAULT_CHANNEL;\r\n\t\t\t\tthis._tokenStartCharIndex = this._input.index;\r\n\t\t\t\tthis._tokenStartCharPositionInLine = this.interpreter.charPositionInLine;\r\n\t\t\t\tthis._tokenStartLine = this.interpreter.line;\r\n\t\t\t\tthis._text = undefined;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tthis._type = Token.INVALID_TYPE;\r\n//\t\t\t\tSystem.out.println(\"nextToken line \"+tokenStartLine+\" at \"+((char)input.LA(1))+\r\n//\t\t\t\t\t\t\t\t \" in mode \"+mode+\r\n//\t\t\t\t\t\t\t\t \" at index \"+input.index);\r\n\t\t\t\t\tlet ttype: number;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tttype = this.interpreter.match(this._input, this._mode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (e) {\r\n\t\t\t\t\t\tif (e instanceof LexerNoViableAltException) {\r\n\t\t\t\t\t\t\tthis.notifyListeners(e);\t\t// report error\r\n\t\t\t\t\t\t\tthis.recover(e);\r\n\t\t\t\t\t\t\tttype = Lexer.SKIP;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this._input.LA(1) === IntStream.EOF) {\r\n\t\t\t\t\t\tthis._hitEOF = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this._type === Token.INVALID_TYPE) {\r\n\t\t\t\t\t\tthis._type = ttype;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this._type === Lexer.SKIP) {\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (this._type === Lexer.MORE);\r\n\t\t\t\tif (this._token == null) {\r\n\t\t\t\t\treturn this.emit();\r\n\t\t\t\t}\r\n\t\t\t\treturn this._token;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\t// make sure we release marker after match or\r\n\t\t\t// unbuffered char stream will keep buffering\r\n\t\t\tthis._input.release(tokenStartMarker);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Instruct the lexer to skip creating a token for current lexer rule\r\n\t * and look for another token. nextToken() knows to keep looking when\r\n\t * a lexer rule finishes with token set to SKIP_TOKEN. Recall that\r\n\t * if token==undefined at end of any token rule, it creates one for you\r\n\t * and emits it.\r\n\t */\r\n\tpublic skip(): void {\r\n\t\tthis._type = Lexer.SKIP;\r\n\t}\r\n\r\n\tpublic more(): void {\r\n\t\tthis._type = Lexer.MORE;\r\n\t}\r\n\r\n\tpublic mode(m: number): void {\r\n\t\tthis._mode = m;\r\n\t}\r\n\r\n\tpublic pushMode(m: number): void {\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(\"pushMode \" + m);\r\n\t\t}\r\n\t\tthis._modeStack.push(this._mode);\r\n\t\tthis.mode(m);\r\n\t}\r\n\r\n\tpublic popMode(): number {\r\n\t\tif (this._modeStack.isEmpty) {\r\n\t\t\tthrow new Error(\"EmptyStackException\");\r\n\t\t}\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(\"popMode back to \" + this._modeStack.peek());\r\n\t\t}\r\n\t\tthis.mode(this._modeStack.pop());\r\n\t\treturn this._mode;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenFactory(): TokenFactory {\r\n\t\treturn this._factory;\r\n\t}\r\n\r\n\t// @Override\r\n\tset tokenFactory(factory: TokenFactory) {\r\n\t\tthis._factory = factory;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): CharStream {\r\n\t\treturn this._input;\r\n\t}\r\n\r\n\t/** Set the char stream and reset the lexer */\r\n\tset inputStream(input: CharStream) {\r\n\t\tthis.reset(false);\r\n\t\tthis._input = input;\r\n\t\tthis._tokenFactorySourcePair = { source: this, stream: this._input };\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\treturn this._input.sourceName;\r\n\t}\r\n\r\n\r\n\t/** The standard method called to automatically emit a token at the\r\n\t * outermost lexical rule. The token object should point into the\r\n\t * char buffer start..stop. If there is a text override in 'text',\r\n\t * use that to set the token's text. Override this method to emit\r\n\t * custom Token objects or provide a new factory.\r\n\t */\r\n\tpublic emit(token: Token): Token;\r\n\r\n\t/** By default does not support multiple emits per nextToken invocation\r\n\t * for efficiency reasons. Subclass and override this method, nextToken,\r\n\t * and getToken (to push tokens into a list and pull from that list\r\n\t * rather than a single variable as this implementation does).\r\n\t */\r\n\tpublic emit(): Token;\r\n\r\n\tpublic emit(token?: Token): Token {\r\n\t\tif (!token) {\r\n\t\t\ttoken = this._factory.create(\r\n\t\t\t\tthis._tokenFactorySourcePair, this._type, this._text, this._channel,\r\n\t\t\t\tthis._tokenStartCharIndex, this.charIndex - 1, this._tokenStartLine,\r\n\t\t\t\tthis._tokenStartCharPositionInLine);\r\n\t\t}\r\n\t\tthis._token = token;\r\n\t\treturn token;\r\n\t}\r\n\r\n\tpublic emitEOF(): Token {\r\n\t\tlet cpos: number = this.charPositionInLine;\r\n\t\tlet line: number = this.line;\r\n\t\tlet eof: Token = this._factory.create(\r\n\t\t\tthis._tokenFactorySourcePair, Token.EOF, undefined,\r\n\t\t\tToken.DEFAULT_CHANNEL, this._input.index, this._input.index - 1,\r\n\t\t\tline, cpos);\r\n\t\tthis.emit(eof);\r\n\t\treturn eof;\r\n\t}\r\n\r\n\t@Override\r\n\tget line(): number {\r\n\t\treturn this.interpreter.line;\r\n\t}\r\n\r\n\tset line(line: number) {\r\n\t\tthis.interpreter.line = line;\r\n\t}\r\n\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\treturn this.interpreter.charPositionInLine;\r\n\t}\r\n\r\n\tset charPositionInLine(charPositionInLine: number) {\r\n\t\tthis.interpreter.charPositionInLine = charPositionInLine;\r\n\t}\r\n\r\n\t/** What is the index of the current character of lookahead? */\r\n\tget charIndex(): number {\r\n\t\treturn this._input.index;\r\n\t}\r\n\r\n\t/** Return the text matched so far for the current token or any\r\n\t * text override.\r\n\t */\r\n\tget text(): string {\r\n\t\tif (this._text != null) {\r\n\t\t\treturn this._text;\r\n\t\t}\r\n\t\treturn this.interpreter.getText(this._input);\r\n\t}\r\n\r\n\t/** Set the complete text of this token; it wipes any previous\r\n\t * changes to the text.\r\n\t */\r\n\tset text(text: string) {\r\n\t\tthis._text = text;\r\n\t}\r\n\r\n\t/** Override if emitting multiple tokens. */\r\n\tget token(): Token | undefined { return this._token; }\r\n\r\n\tset token(_token: Token | undefined) {\r\n\t\tthis._token = _token;\r\n\t}\r\n\r\n\tset type(ttype: number) {\r\n\t\tthis._type = ttype;\r\n\t}\r\n\r\n\tget type(): number {\r\n\t\treturn this._type;\r\n\t}\r\n\r\n\tset channel(channel: number) {\r\n\t\tthis._channel = channel;\r\n\t}\r\n\r\n\tget channel(): number {\r\n\t\treturn this._channel;\r\n\t}\r\n\r\n\tpublic abstract readonly channelNames: string[];\r\n\r\n\tpublic abstract readonly modeNames: string[];\r\n\r\n\t/** Return a list of all Token objects in input char stream.\r\n\t * Forces load of all tokens. Does not include EOF token.\r\n\t */\r\n\tpublic getAllTokens(): Token[] {\r\n\t\tlet tokens: Token[] = [];\r\n\t\tlet t: Token = this.nextToken();\r\n\t\twhile (t.type !== Token.EOF) {\r\n\t\t\ttokens.push(t);\r\n\t\t\tt = this.nextToken();\r\n\t\t}\r\n\t\treturn tokens;\r\n\t}\r\n\r\n\tpublic notifyListeners(e: LexerNoViableAltException): void {\r\n\t\tlet text: string = this._input.getText(\r\n\t\t\tInterval.of(this._tokenStartCharIndex, this._input.index));\r\n\t\tlet msg: string = \"token recognition error at: '\" +\r\n\t\t\tthis.getErrorDisplay(text) + \"'\";\r\n\r\n\t\tlet listener: ANTLRErrorListener = this.getErrorListenerDispatch();\r\n\t\tif (listener.syntaxError) {\r\n\t\t\tlistener.syntaxError(this, undefined, this._tokenStartLine, this._tokenStartCharPositionInLine, msg, e);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getErrorDisplay(s: string | number): string {\r\n\t\tif (typeof s === \"number\") {\r\n\t\t\tswitch (s) {\r\n\t\t\tcase Token.EOF:\r\n\t\t\t\treturn \"\";\r\n\t\t\tcase 0x0a:\r\n\t\t\t\treturn \"\\\\n\";\r\n\t\t\tcase 0x09:\r\n\t\t\t\treturn \"\\\\t\";\r\n\t\t\tcase 0x0d:\r\n\t\t\t\treturn \"\\\\r\";\r\n\t\t\t}\r\n\t\t\treturn String.fromCharCode(s);\r\n\t\t}\r\n\t\treturn s.replace(/\\n/g, \"\\\\n\")\r\n\t\t\t.replace(/\\t/g, \"\\\\t\")\r\n\t\t\t.replace(/\\r/g, \"\\\\r\");\r\n\t}\r\n\r\n\tpublic getCharErrorDisplay(c: number): string {\r\n\t\tlet s: string = this.getErrorDisplay(c);\r\n\t\treturn \"'\" + s + \"'\";\r\n\t}\r\n\r\n\t/** Lexers can normally match any char in it's vocabulary after matching\r\n\t * a token, so do the easy thing and just kill a character and hope\r\n\t * it all works out. You can instead use the rule invocation stack\r\n\t * to do sophisticated error recovery if you are in a fragment rule.\r\n\t */\r\n\tpublic recover(re: RecognitionException): void;\r\n\tpublic recover(re: LexerNoViableAltException): void;\r\n\tpublic recover(re: RecognitionException): void {\r\n\t\tif (re instanceof LexerNoViableAltException) {\r\n\t\t\tif (this._input.LA(1) !== IntStream.EOF) {\r\n\t\t\t\t// skip a char and try again\r\n\t\t\t\tthis.interpreter.consume(this._input);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"consuming char \"+(char)input.LA(1)+\" during recovery\");\r\n\t\t\t//re.printStackTrace();\r\n\t\t\t// TODO: Do we lose character or line position information?\r\n\t\t\tthis._input.consume();\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.8683480-07:00\r\n\r\nimport { ArrayEqualityComparator } from \"./ArrayEqualityComparator\";\r\nimport { IntegerList } from \"./IntegerList\";\r\nimport { Interval } from \"./Interval\";\r\nimport { IntSet } from \"./IntSet\";\r\nimport { Lexer } from \"../Lexer\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Token } from \"../Token\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\n\r\n/**\r\n * This class implements the {@link IntSet} backed by a sorted array of\r\n * non-overlapping intervals. It is particularly efficient for representing\r\n * large collections of numbers, where the majority of elements appear as part\r\n * of a sequential range of numbers that are all part of the set. For example,\r\n * the set { 1, 2, 3, 4, 7, 8 } may be represented as { [1, 4], [7, 8] }.\r\n *\r\n * This class is able to represent sets containing any combination of values in\r\n * the range {@link Integer#MIN_VALUE} to {@link Integer#MAX_VALUE}\r\n * (inclusive).\r\n */\r\nexport class IntervalSet implements IntSet {\r\n\tprivate static _COMPLETE_CHAR_SET: IntervalSet;\r\n\tstatic get COMPLETE_CHAR_SET(): IntervalSet {\r\n\t\tif (IntervalSet._COMPLETE_CHAR_SET === undefined) {\r\n\t\t\tIntervalSet._COMPLETE_CHAR_SET = IntervalSet.of(Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE);\r\n\t\t\tIntervalSet._COMPLETE_CHAR_SET.setReadonly(true);\r\n\t\t}\r\n\r\n\t\treturn IntervalSet._COMPLETE_CHAR_SET;\r\n\t}\r\n\r\n\tprivate static _EMPTY_SET: IntervalSet;\r\n\tstatic get EMPTY_SET(): IntervalSet {\r\n\t\tif (IntervalSet._EMPTY_SET == null) {\r\n\t\t\tIntervalSet._EMPTY_SET = new IntervalSet();\r\n\t\t\tIntervalSet._EMPTY_SET.setReadonly(true);\r\n\t\t}\r\n\r\n\t\treturn IntervalSet._EMPTY_SET;\r\n\t}\r\n\r\n\t/** The list of sorted, disjoint intervals. */\r\n\tprivate _intervals: Interval[];\r\n\r\n\tprivate readonly: boolean = false;\r\n\r\n\tconstructor(intervals?: Interval[]) {\r\n\t\tif (intervals != null) {\r\n\t\t\tthis._intervals = intervals.slice(0);\r\n\t\t} else {\r\n\t\t\tthis._intervals = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Create a set with all ints within range [a..b] (inclusive). If b is omitted, the set contains the single element\r\n\t * a.\r\n\t */\r\n\t@NotNull\r\n\tpublic static of(a: number, b: number = a): IntervalSet {\r\n\t\tlet s: IntervalSet = new IntervalSet();\r\n\t\ts.add(a, b);\r\n\t\treturn s;\r\n\t}\r\n\r\n\tpublic clear(): void {\r\n\t\tif (this.readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\tthis._intervals.length = 0;\r\n\t}\r\n\r\n\t/** Add interval; i.e., add all integers from a to b to set.\r\n\t * If b<a, do nothing.\r\n\t * Keep list in sorted order (by left range value).\r\n\t * If overlap, combine ranges. For example,\r\n\t * If this is {1..5, 10..20}, adding 6..7 yields\r\n\t * {1..5, 6..7, 10..20}. Adding 4..8 yields {1..8, 10..20}.\r\n\t */\r\n\tpublic add(a: number, b: number = a): void {\r\n\t\tthis.addRange(Interval.of(a, b));\r\n\t}\r\n\r\n\t// copy on write so we can cache a..a intervals and sets of that\r\n\tprotected addRange(addition: Interval): void {\r\n\t\tif (this.readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"add \"+addition+\" to \"+intervals.toString());\r\n\t\tif (addition.b < addition.a) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// find position in list\r\n\t\t// Use iterators as we modify list in place\r\n\t\tfor (let i: number = 0; i < this._intervals.length; i++) {\r\n\t\t\tlet r: Interval = this._intervals[i];\r\n\t\t\tif (addition.equals(r)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (addition.adjacent(r) || !addition.disjoint(r)) {\r\n\t\t\t\t// next to each other, make a single larger interval\r\n\t\t\t\tlet bigger: Interval = addition.union(r);\r\n\t\t\t\tthis._intervals[i] = bigger;\r\n\t\t\t\t// make sure we didn't just create an interval that\r\n\t\t\t\t// should be merged with next interval in list\r\n\t\t\t\twhile (i < this._intervals.length - 1) {\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tlet next: Interval = this._intervals[i];\r\n\t\t\t\t\tif (!bigger.adjacent(next) && bigger.disjoint(next)) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// if we bump up against or overlap next, merge\r\n\t\t\t\t\t// remove this one\r\n\t\t\t\t\tthis._intervals.splice(i, 1);\r\n\t\t\t\t\ti--;\r\n\t\t\t\t\t// move backwards to what we just set\r\n\t\t\t\t\tthis._intervals[i] = bigger.union(next);\r\n\t\t\t\t\t// set to 3 merged ones\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// first call to next after previous duplicates the result\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (addition.startsBeforeDisjoint(r)) {\r\n\t\t\t\t// insert before r\r\n\t\t\t\tthis._intervals.splice(i, 0, addition);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// if disjoint and after r, a future iteration will handle it\r\n\t\t}\r\n\r\n\t\t// ok, must be after last interval (and disjoint from last interval)\r\n\t\t// just add it\r\n\t\tthis._intervals.push(addition);\r\n\t}\r\n\r\n\t/** combine all sets in the array returned the or'd value */\r\n\tpublic static or(sets: IntervalSet[]): IntervalSet {\r\n\t\tlet r: IntervalSet = new IntervalSet();\r\n\t\tfor (let s of sets) {\r\n\t\t\tr.addAll(s);\r\n\t\t}\r\n\r\n\t\treturn r;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic addAll(set: IntSet): IntervalSet {\r\n\t\tif (set == null) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (set instanceof IntervalSet) {\r\n\t\t\tlet other: IntervalSet = set;\r\n\t\t\t// walk set and add each interval\r\n\t\t\tlet n: number = other._intervals.length;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet I: Interval = other._intervals[i];\r\n\t\t\t\tthis.add(I.a, I.b);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (let value of set.toArray()) {\r\n\t\t\t\tthis.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\tpublic complementRange(minElement: number, maxElement: number): IntervalSet {\r\n\t\treturn this.complement(IntervalSet.of(minElement, maxElement));\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tpublic complement(vocabulary: IntSet): IntervalSet {\r\n\t\tif (vocabulary.isNil) {\r\n\t\t\t// nothing in common with null set\r\n\t\t\treturn IntervalSet.EMPTY_SET;\r\n\t\t}\r\n\r\n\t\tlet vocabularyIS: IntervalSet;\r\n\t\tif (vocabulary instanceof IntervalSet) {\r\n\t\t\tvocabularyIS = vocabulary;\r\n\t\t} else {\r\n\t\t\tvocabularyIS = new IntervalSet();\r\n\t\t\tvocabularyIS.addAll(vocabulary);\r\n\t\t}\r\n\r\n\t\treturn vocabularyIS.subtract(this);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic subtract(a: IntSet): IntervalSet {\r\n\t\tif (a == null || a.isNil) {\r\n\t\t\treturn new IntervalSet(this._intervals);\r\n\t\t}\r\n\r\n\t\tif (a instanceof IntervalSet) {\r\n\t\t\treturn IntervalSet.subtract(this, a);\r\n\t\t}\r\n\r\n\t\tlet other: IntervalSet = new IntervalSet();\r\n\t\tother.addAll(a);\r\n\t\treturn IntervalSet.subtract(this, other);\r\n\t}\r\n\r\n\t/**\r\n\t * Compute the set difference between two interval sets. The specific\r\n\t * operation is `left - right`.\r\n\t */\r\n\t@NotNull\r\n\tpublic static subtract(left: IntervalSet, right: IntervalSet): IntervalSet {\r\n\t\tif (left.isNil) {\r\n\t\t\treturn new IntervalSet();\r\n\t\t}\r\n\r\n\t\tlet result: IntervalSet = new IntervalSet(left._intervals);\r\n\t\tif (right.isNil) {\r\n\t\t\t// right set has no elements; just return the copy of the current set\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\tlet resultI: number = 0;\r\n\t\tlet rightI: number = 0;\r\n\t\twhile (resultI < result._intervals.length && rightI < right._intervals.length) {\r\n\t\t\tlet resultInterval: Interval = result._intervals[resultI];\r\n\t\t\tlet rightInterval: Interval = right._intervals[rightI];\r\n\r\n\t\t\t// operation: (resultInterval - rightInterval) and update indexes\r\n\r\n\t\t\tif (rightInterval.b < resultInterval.a) {\r\n\t\t\t\trightI++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (rightInterval.a > resultInterval.b) {\r\n\t\t\t\tresultI++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet beforeCurrent: Interval | undefined;\r\n\t\t\tlet afterCurrent: Interval | undefined;\r\n\t\t\tif (rightInterval.a > resultInterval.a) {\r\n\t\t\t\tbeforeCurrent = new Interval(resultInterval.a, rightInterval.a - 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (rightInterval.b < resultInterval.b) {\r\n\t\t\t\tafterCurrent = new Interval(rightInterval.b + 1, resultInterval.b);\r\n\t\t\t}\r\n\r\n\t\t\tif (beforeCurrent) {\r\n\t\t\t\tif (afterCurrent) {\r\n\t\t\t\t\t// split the current interval into two\r\n\t\t\t\t\tresult._intervals[resultI] = beforeCurrent;\r\n\t\t\t\t\tresult._intervals.splice(resultI + 1, 0, afterCurrent);\r\n\t\t\t\t\tresultI++;\r\n\t\t\t\t\trightI++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// replace the current interval\r\n\t\t\t\t\tresult._intervals[resultI] = beforeCurrent;\r\n\t\t\t\t\tresultI++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (afterCurrent) {\r\n\t\t\t\t\t// replace the current interval\r\n\t\t\t\t\tresult._intervals[resultI] = afterCurrent;\r\n\t\t\t\t\trightI++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// remove the current interval (thus no need to increment resultI)\r\n\t\t\t\t\tresult._intervals.splice(resultI, 1);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// If rightI reached right.intervals.size, no more intervals to subtract from result.\r\n\t\t// If resultI reached result.intervals.size, we would be subtracting from an empty set.\r\n\t\t// Either way, we are done.\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic or(a: IntSet): IntervalSet {\r\n\t\tlet o: IntervalSet = new IntervalSet();\r\n\t\to.addAll(this);\r\n\t\to.addAll(a);\r\n\t\treturn o;\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tpublic and(other: IntSet): IntervalSet {\r\n\t\tif (other.isNil) { //|| !(other instanceof IntervalSet) ) {\r\n\t\t\t// nothing in common with null set\r\n\t\t\treturn new IntervalSet();\r\n\t\t}\r\n\r\n\t\tlet myIntervals: Interval[] = this._intervals;\r\n\t\tlet theirIntervals: Interval[] = (other as IntervalSet)._intervals;\r\n\t\tlet intersection: IntervalSet | undefined;\r\n\t\tlet mySize: number = myIntervals.length;\r\n\t\tlet theirSize: number = theirIntervals.length;\r\n\t\tlet i: number = 0;\r\n\t\tlet j: number = 0;\r\n\t\t// iterate down both interval lists looking for nondisjoint intervals\r\n\t\twhile (i < mySize && j < theirSize) {\r\n\t\t\tlet mine: Interval = myIntervals[i];\r\n\t\t\tlet theirs: Interval = theirIntervals[j];\r\n\t\t\t//System.out.println(\"mine=\"+mine+\" and theirs=\"+theirs);\r\n\t\t\tif (mine.startsBeforeDisjoint(theirs)) {\r\n\t\t\t\t// move this iterator looking for interval that might overlap\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\telse if (theirs.startsBeforeDisjoint(mine)) {\r\n\t\t\t\t// move other iterator looking for interval that might overlap\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse if (mine.properlyContains(theirs)) {\r\n\t\t\t\t// overlap, add intersection, get next theirs\r\n\t\t\t\tif (!intersection) {\r\n\t\t\t\t\tintersection = new IntervalSet();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tintersection.addRange(mine.intersection(theirs));\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse if (theirs.properlyContains(mine)) {\r\n\t\t\t\t// overlap, add intersection, get next mine\r\n\t\t\t\tif (!intersection) {\r\n\t\t\t\t\tintersection = new IntervalSet();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tintersection.addRange(mine.intersection(theirs));\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\telse if (!mine.disjoint(theirs)) {\r\n\t\t\t\t// overlap, add intersection\r\n\t\t\t\tif (!intersection) {\r\n\t\t\t\t\tintersection = new IntervalSet();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tintersection.addRange(mine.intersection(theirs));\r\n\t\t\t\t// Move the iterator of lower range [a..b], but not\r\n\t\t\t\t// the upper range as it may contain elements that will collide\r\n\t\t\t\t// with the next iterator. So, if mine=[0..115] and\r\n\t\t\t\t// theirs=[115..200], then intersection is 115 and move mine\r\n\t\t\t\t// but not theirs as theirs may collide with the next range\r\n\t\t\t\t// in thisIter.\r\n\t\t\t\t// move both iterators to next ranges\r\n\t\t\t\tif (mine.startsAfterNonDisjoint(theirs)) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (theirs.startsAfterNonDisjoint(mine)) {\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!intersection) {\r\n\t\t\treturn new IntervalSet();\r\n\t\t}\r\n\r\n\t\treturn intersection;\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tpublic contains(el: number): boolean {\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tlet l: number = 0;\r\n\t\tlet r: number = n - 1;\r\n\t\t// Binary search for the element in the (sorted, disjoint) array of intervals.\r\n\t\twhile (l <= r) {\r\n\t\t\tlet m: number = (l + r) >> 1;\r\n\t\t\tlet I: Interval = this._intervals[m];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (b < el) {\r\n\t\t\t\tl = m + 1;\r\n\t\t\t} else if (a > el) {\r\n\t\t\t\tr = m - 1;\r\n\t\t\t} else {\r\n\t\t\t\t// el >= a && el <= b\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tget isNil(): boolean {\r\n\t\treturn this._intervals == null || this._intervals.length === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the maximum value contained in the set if not isNil.\r\n\t *\r\n\t * @return the maximum value contained in the set.\r\n\t * @throws RangeError if set is empty\r\n\t */\r\n\tget maxElement(): number {\r\n\t\tif (this.isNil) {\r\n\t\t\tthrow new RangeError(\"set is empty\");\r\n\t\t}\r\n\r\n\t\tlet last: Interval = this._intervals[this._intervals.length - 1];\r\n\t\treturn last.b;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the minimum value contained in the set if not isNil.\r\n\t *\r\n\t * @return the minimum value contained in the set.\r\n\t * @throws RangeError if set is empty\r\n\t */\r\n\tget minElement(): number {\r\n\t\tif (this.isNil) {\r\n\t\t\tthrow new RangeError(\"set is empty\");\r\n\t\t}\r\n\r\n\t\treturn this._intervals[0].a;\r\n\t}\r\n\r\n\t/** Return a list of Interval objects. */\r\n\tget intervals(): Interval[] {\r\n\t\treturn this._intervals;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\thash = MurmurHash.update(hash, I.a);\r\n\t\t\thash = MurmurHash.update(hash, I.b);\r\n\t\t}\r\n\r\n\t\thash = MurmurHash.finish(hash, this._intervals.length * 2);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/** Are two IntervalSets equal? Because all intervals are sorted\r\n\t * and disjoint, equals is a simple linear walk over both lists\r\n\t * to make sure they are the same. Interval.equals() is used\r\n\t * by the List.equals() method to check the ranges.\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o == null || !(o instanceof IntervalSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn ArrayEqualityComparator.INSTANCE.equals(this._intervals, o._intervals);\r\n\t}\r\n\r\n\tpublic toString(elemAreChar: boolean = false): string {\r\n\t\tlet buf: string = \"\";\r\n\t\tif (this._intervals == null || this._intervals.length === 0) {\r\n\t\t\treturn \"{}\";\r\n\t\t}\r\n\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"{\";\r\n\t\t}\r\n\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tbuf += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (a === b) {\r\n\t\t\t\tif (a === Token.EOF) {\r\n\t\t\t\t\tbuf += \"\";\r\n\t\t\t\t} else if (elemAreChar) {\r\n\t\t\t\t\tbuf += \"'\" + String.fromCodePoint(a) + \"'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += a;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (elemAreChar) {\r\n\t\t\t\t\tbuf += \"'\" + String.fromCodePoint(a) + \"'..'\" + String.fromCodePoint(b) + \"'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += a + \"..\" + b;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"}\";\r\n\t\t}\r\n\r\n\t\treturn buf;\r\n\t}\r\n\r\n\tpublic toStringVocabulary( @NotNull vocabulary: Vocabulary): string {\r\n\t\tif (this._intervals == null || this._intervals.length === 0) {\r\n\t\t\treturn \"{}\";\r\n\t\t}\r\n\r\n\t\tlet buf: string = \"\";\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"{\";\r\n\t\t}\r\n\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tbuf += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (a === b) {\r\n\t\t\t\tbuf += this.elementName(vocabulary, a);\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = a; i <= b; i++) {\r\n\t\t\t\t\tif (i > a) {\r\n\t\t\t\t\t\tbuf += \", \";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbuf += this.elementName(vocabulary, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"}\";\r\n\t\t}\r\n\r\n\t\treturn buf;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected elementName( @NotNull vocabulary: Vocabulary, a: number): string {\r\n\t\tif (a === Token.EOF) {\r\n\t\t\treturn \"\";\r\n\t\t} else if (a === Token.EPSILON) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn vocabulary.getDisplayName(a);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\tlet n: number = 0;\r\n\t\tlet numIntervals: number = this._intervals.length;\r\n\t\tif (numIntervals === 1) {\r\n\t\t\tlet firstInterval: Interval = this._intervals[0];\r\n\t\t\treturn firstInterval.b - firstInterval.a + 1;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < numIntervals; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tn += (I.b - I.a + 1);\r\n\t\t}\r\n\r\n\t\treturn n;\r\n\t}\r\n\r\n\tpublic toIntegerList(): IntegerList {\r\n\t\tlet values: IntegerList = new IntegerList(this.size);\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tfor (let v = a; v <= b; v++) {\r\n\t\t\t\tvalues.add(v);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n\tpublic toSet(): Set {\r\n\t\tlet s: Set = new Set();\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tfor (let v = a; v <= b; v++) {\r\n\t\t\t\ts.add(v);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\t}\r\n\r\n\tpublic toArray(): number[] {\r\n\t\tlet values: number[] = new Array();\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tfor (let v = a; v <= b; v++) {\r\n\t\t\t\tvalues.push(v);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic remove(el: number): void {\r\n\t\tif (this.readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (el < a) {\r\n\t\t\t\tbreak; // list is sorted and el is before this interval; not here\r\n\t\t\t}\r\n\t\t\t// if whole interval x..x, rm\r\n\t\t\tif (el === a && el === b) {\r\n\t\t\t\tthis._intervals.splice(i, 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t// if on left edge x..b, adjust left\r\n\t\t\tif (el === a) {\r\n\t\t\t\tthis._intervals[i] = Interval.of(I.a + 1, I.b);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t// if on right edge a..x, adjust right\r\n\t\t\tif (el === b) {\r\n\t\t\t\tthis._intervals[i] = Interval.of(I.a, I.b - 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t// if in middle a..x..b, split interval\r\n\t\t\tif (el > a && el < b) { // found in this interval\r\n\t\t\t\tlet oldb: number = I.b;\r\n\t\t\t\tthis._intervals[i] = Interval.of(I.a, el - 1); // [a..x-1]\r\n\t\t\t\tthis.add(el + 1, oldb); // add [x+1..b]\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tget isReadonly(): boolean {\r\n\t\treturn this.readonly;\r\n\t}\r\n\r\n\tpublic setReadonly(readonly: boolean): void {\r\n\t\tif (this.readonly && !readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\tthis.readonly = readonly;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.8187912-07:00\r\n\r\nimport { NotNull } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ATNDeserializationOptions {\r\n\tprivate static _defaultOptions?: ATNDeserializationOptions;\r\n\r\n\tprivate readOnly: boolean = false;\r\n\tprivate verifyATN: boolean;\r\n\tprivate generateRuleBypassTransitions: boolean;\r\n\tprivate optimize: boolean;\r\n\r\n\tconstructor(options?: ATNDeserializationOptions) {\r\n\t\tif (options) {\r\n\t\t\tthis.verifyATN = options.verifyATN;\r\n\t\t\tthis.generateRuleBypassTransitions = options.generateRuleBypassTransitions;\r\n\t\t\tthis.optimize = options.optimize;\r\n\t\t} else {\r\n\t\t\tthis.verifyATN = true;\r\n\t\t\tthis.generateRuleBypassTransitions = false;\r\n\t\t\tthis.optimize = true;\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tstatic get defaultOptions(): ATNDeserializationOptions {\r\n\t\tif (ATNDeserializationOptions._defaultOptions == null) {\r\n\t\t\tATNDeserializationOptions._defaultOptions = new ATNDeserializationOptions();\r\n\t\t\tATNDeserializationOptions._defaultOptions.makeReadOnly();\r\n\t\t}\r\n\r\n\t\treturn ATNDeserializationOptions._defaultOptions;\r\n\t}\r\n\r\n\tget isReadOnly(): boolean {\r\n\t\treturn this.readOnly;\r\n\t}\r\n\r\n\tpublic makeReadOnly(): void {\r\n\t\tthis.readOnly = true;\r\n\t}\r\n\r\n\tget isVerifyATN(): boolean {\r\n\t\treturn this.verifyATN;\r\n\t}\r\n\r\n\tset isVerifyATN(verifyATN: boolean) {\r\n\t\tthis.throwIfReadOnly();\r\n\t\tthis.verifyATN = verifyATN;\r\n\t}\r\n\r\n\tget isGenerateRuleBypassTransitions(): boolean {\r\n\t\treturn this.generateRuleBypassTransitions;\r\n\t}\r\n\r\n\tset isGenerateRuleBypassTransitions(generateRuleBypassTransitions: boolean) {\r\n\t\tthis.throwIfReadOnly();\r\n\t\tthis.generateRuleBypassTransitions = generateRuleBypassTransitions;\r\n\t}\r\n\r\n\tget isOptimize(): boolean {\r\n\t\treturn this.optimize;\r\n\t}\r\n\r\n\tset isOptimize(optimize: boolean) {\r\n\t\tthis.throwIfReadOnly();\r\n\t\tthis.optimize = optimize;\r\n\t}\r\n\r\n\tprotected throwIfReadOnly(): void {\r\n\t\tif (this.isReadOnly) {\r\n\t\t\tthrow new Error(\"The object is read only.\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:24.7363448-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class ActionTransition extends Transition {\r\n\tpublic ruleIndex: number;\r\n\tpublic actionIndex: number;\r\n\tpublic isCtxDependent: boolean; // e.g., $i ref in action\r\n\r\n\tconstructor(@NotNull target: ATNState, ruleIndex: number, actionIndex: number = -1, isCtxDependent: boolean = false) {\r\n\t\tsuper(target);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t\tthis.actionIndex = actionIndex;\r\n\t\tthis.isCtxDependent = isCtxDependent;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.ACTION;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true; // we are to be ignored by analysis 'cept for predicates\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"action_\" + this.ruleIndex + \":\" + this.actionIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.6769122-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** TODO: make all transitions sets? no, should remove set edges */\r\nexport class AtomTransition extends Transition {\r\n\t/** The token type or character value; or, signifies special label. */\r\n\tpublic _label: number;\r\n\r\n\tconstructor(@NotNull target: ATNState, label: number) {\r\n\t\tsuper(target);\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.ATOM;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tget label(): IntervalSet {\r\n\t\treturn IntervalSet.of(this._label);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn this._label === symbol;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn String(this.label);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.9930394-07:00\r\n\r\nimport { BlockEndState } from \"./BlockEndState\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The start of a regular `(...)` block. */\r\nexport abstract class BlockStartState extends DecisionState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic endState!: BlockEndState;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.7669801-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class BasicBlockStartState extends BlockStartState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.BLOCK_START;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.9125304-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** Terminal node of a simple `(a|b|c)` block. */\r\nexport class BlockEndState extends ATNState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic startState!: BlockStartState;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.BLOCK_END;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.6283213-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class EpsilonTransition extends Transition {\r\n\r\n\tprivate _outermostPrecedenceReturn: number;\r\n\r\n\tconstructor(@NotNull target: ATNState, outermostPrecedenceReturn: number = -1) {\r\n\t\tsuper(target);\r\n\t\tthis._outermostPrecedenceReturn = outermostPrecedenceReturn;\r\n\t}\r\n\r\n\t/**\r\n\t * @returns the rule index of a precedence rule for which this transition is\r\n\t * returning from, where the precedence value is 0; otherwise, -1.\r\n\t *\r\n\t * @see ATNConfig.isPrecedenceFilterSuppressed\r\n\t * @see ParserATNSimulator#applyPrecedenceFilter(ATNConfigSet, ParserRuleContext, PredictionContextCache)\r\n\t * @since 4.4.1\r\n\t */\r\n\tget outermostPrecedenceReturn(): number {\r\n\t\treturn this._outermostPrecedenceReturn;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.EPSILON;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \"epsilon\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.5634388-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `channel` lexer action by calling\r\n * {@link Lexer#setChannel} with the assigned channel.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerChannelAction implements LexerAction {\r\n\tprivate readonly _channel: number;\r\n\r\n\t/**\r\n\t * Constructs a new `channel` action with the specified channel value.\r\n\t * @param channel The channel value to pass to {@link Lexer#setChannel}.\r\n\t */\r\n\tconstructor(channel: number) {\r\n\t\tthis._channel = channel;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the channel to use for the {@link Token} created by the lexer.\r\n\t *\r\n\t * @returns The channel to use for the {@link Token} created by the lexer.\r\n\t */\r\n\tget channel(): number {\r\n\t\treturn this._channel;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#CHANNEL}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.CHANNEL;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#setChannel} with the\r\n\t * value provided by {@link #getChannel}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.channel = this._channel;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._channel);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerChannelAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._channel === obj._channel;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `channel(${this._channel})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.6567992-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Executes a custom lexer action by calling {@link Recognizer#action} with the\r\n * rule and action indexes assigned to the custom action. The implementation of\r\n * a custom action is added to the generated code for the lexer in an override\r\n * of {@link Recognizer#action} when the grammar is compiled.\r\n *\r\n * This class may represent embedded actions created with the `{...}`\r\n * syntax in ANTLR 4, as well as actions created for lexer commands where the\r\n * command argument could not be evaluated when the grammar was compiled.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerCustomAction implements LexerAction {\r\n\tprivate readonly _ruleIndex: number;\r\n\tprivate readonly _actionIndex: number;\r\n\r\n\t/**\r\n\t * Constructs a custom lexer action with the specified rule and action\r\n\t * indexes.\r\n\t *\r\n\t * @param ruleIndex The rule index to use for calls to\r\n\t * {@link Recognizer#action}.\r\n\t * @param actionIndex The action index to use for calls to\r\n\t * {@link Recognizer#action}.\r\n\t */\r\n\tconstructor(ruleIndex: number, actionIndex: number) {\r\n\t\tthis._ruleIndex = ruleIndex;\r\n\t\tthis._actionIndex = actionIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the rule index to use for calls to {@link Recognizer#action}.\r\n\t *\r\n\t * @returns The rule index for the custom action.\r\n\t */\r\n\tget ruleIndex(): number {\r\n\t\treturn this._ruleIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the action index to use for calls to {@link Recognizer#action}.\r\n\t *\r\n\t * @returns The action index for the custom action.\r\n\t */\r\n\tget actionIndex(): number {\r\n\t\treturn this._actionIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * @returns This method returns {@link LexerActionType#CUSTOM}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.CUSTOM;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether the lexer action is position-dependent. Position-dependent\r\n\t * actions may have different semantics depending on the {@link CharStream}\r\n\t * index at the time the action is executed.\r\n\t *\r\n\t * Custom actions are position-dependent since they may represent a\r\n\t * user-defined embedded action which makes calls to methods like\r\n\t * {@link Lexer#getText}.\r\n\t *\r\n\t * @returns This method returns `true`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * Custom actions are implemented by calling {@link Lexer#action} with the\r\n\t * appropriate rule and action indexes.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.action(undefined, this._ruleIndex, this._actionIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._ruleIndex);\r\n\t\thash = MurmurHash.update(hash, this._actionIndex);\r\n\t\treturn MurmurHash.finish(hash, 3);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerCustomAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._ruleIndex === obj._ruleIndex\r\n\t\t\t&& this._actionIndex === obj._actionIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.8653427-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `mode` lexer action by calling {@link Lexer#mode} with\r\n * the assigned mode.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerModeAction implements LexerAction {\r\n\tprivate readonly _mode: number;\r\n\r\n\t/**\r\n\t * Constructs a new `mode` action with the specified mode value.\r\n\t * @param mode The mode value to pass to {@link Lexer#mode}.\r\n\t */\r\n\tconstructor(mode: number) {\r\n\t\tthis._mode = mode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the lexer mode this action should transition the lexer to.\r\n\t *\r\n\t * @returns The lexer mode for this `mode` command.\r\n\t */\r\n\tget mode(): number {\r\n\t\treturn this._mode;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#MODE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.MODE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#mode} with the\r\n\t * value provided by {@link #getMode}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.mode(this._mode);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._mode);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerModeAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._mode === obj._mode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `mode(${this._mode})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.9613221-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `more` lexer action by calling {@link Lexer#more}.\r\n *\r\n * The `more` command does not have any parameters, so this action is\r\n * implemented as a singleton instance exposed by {@link #INSTANCE}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerMoreAction implements LexerAction {\r\n\t/**\r\n\t * Constructs the singleton instance of the lexer `more` command.\r\n\t */\r\n\tconstructor() {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#MORE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.MORE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#more}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.more();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\treturn MurmurHash.finish(hash, 1);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\treturn obj === this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"more\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerMoreAction {\r\n\t/**\r\n\t * Provides a singleton instance of this parameterless lexer action.\r\n\t */\r\n\texport const INSTANCE: LexerMoreAction = new LexerMoreAction();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.0449220-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `popMode` lexer action by calling {@link Lexer#popMode}.\r\n *\r\n * The `popMode` command does not have any parameters, so this action is\r\n * implemented as a singleton instance exposed by {@link #INSTANCE}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerPopModeAction implements LexerAction {\r\n\t/**\r\n\t * Constructs the singleton instance of the lexer `popMode` command.\r\n\t */\r\n\tconstructor() {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#POP_MODE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.POP_MODE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#popMode}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.popMode();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\treturn MurmurHash.finish(hash, 1);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\treturn obj === this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"popMode\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerPopModeAction {\r\n\t/**\r\n\t * Provides a singleton instance of this parameterless lexer action.\r\n\t */\r\n\texport const INSTANCE: LexerPopModeAction = new LexerPopModeAction();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.1378801-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `pushMode` lexer action by calling\r\n * {@link Lexer#pushMode} with the assigned mode.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerPushModeAction implements LexerAction {\r\n\tprivate readonly _mode: number;\r\n\r\n\t/**\r\n\t * Constructs a new `pushMode` action with the specified mode value.\r\n\t * @param mode The mode value to pass to {@link Lexer#pushMode}.\r\n\t */\r\n\tconstructor(mode: number) {\r\n\t\tthis._mode = mode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the lexer mode this action should transition the lexer to.\r\n\t *\r\n\t * @returns The lexer mode for this `pushMode` command.\r\n\t */\r\n\tget mode(): number {\r\n\t\treturn this._mode;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#PUSH_MODE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.PUSH_MODE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#pushMode} with the\r\n\t * value provided by {@link #getMode}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.pushMode(this._mode);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._mode);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerPushModeAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._mode === obj._mode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `pushMode(${this._mode})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.2324460-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `skip` lexer action by calling {@link Lexer#skip}.\r\n *\r\n * The `skip` command does not have any parameters, so this action is\r\n * implemented as a singleton instance exposed by {@link #INSTANCE}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerSkipAction implements LexerAction {\r\n\t/**\r\n\t * Constructs the singleton instance of the lexer `skip` command.\r\n\t */\r\n\tconstructor() {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#SKIP}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.SKIP;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#skip}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.skip();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\treturn MurmurHash.finish(hash, 1);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\treturn obj === this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"skip\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerSkipAction {\r\n\t/**\r\n\t * Provides a singleton instance of this parameterless lexer action.\r\n\t */\r\n\texport const INSTANCE: LexerSkipAction = new LexerSkipAction();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.3204839-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `type` lexer action by setting `Lexer.type`\r\n * with the assigned type.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerTypeAction implements LexerAction {\r\n\tprivate readonly _type: number;\r\n\r\n\t/**\r\n\t * Constructs a new `type` action with the specified token type value.\r\n\t * @param type The type to assign to the token using `Lexer.type`.\r\n\t */\r\n\tconstructor(type: number) {\r\n\t\tthis._type = type;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the type to assign to a token created by the lexer.\r\n\t * @returns The type to assign to a token created by the lexer.\r\n\t */\r\n\tget type(): number {\r\n\t\treturn this._type;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#TYPE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.TYPE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by setting `Lexer.type` with the\r\n\t * value provided by `type`.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.type = this._type;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._type);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerTypeAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._type === obj._type;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `type(${this._type})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.7737978-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** Mark the end of a * or + loop. */\r\nexport class LoopEndState extends ATNState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic loopBackState!: ATNState;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.LOOP_END;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.0710131-07:00\r\n\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { Override } from \"../Decorators\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\n/**\r\n * This class stores information about a configuration conflict.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ConflictInfo {\r\n\tprivate _conflictedAlts: BitSet;\r\n\r\n\tprivate exact: boolean;\r\n\r\n\tconstructor(conflictedAlts: BitSet, exact: boolean) {\r\n\t\tthis._conflictedAlts = conflictedAlts;\r\n\t\tthis.exact = exact;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the set of conflicting alternatives for the configuration set.\r\n\t */\r\n\tget conflictedAlts(): BitSet {\r\n\t\treturn this._conflictedAlts;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether or not the configuration conflict is an exact conflict.\r\n\t * An exact conflict occurs when the prediction algorithm determines that\r\n\t * the represented alternatives for a particular configuration set cannot be\r\n\t * further reduced by consuming additional input. After reaching an exact\r\n\t * conflict during an SLL prediction, only switch to full-context prediction\r\n\t * could reduce the set of viable alternatives. In LL prediction, an exact\r\n\t * conflict indicates a true ambiguity in the input.\r\n\t *\r\n\t * For the {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} prediction mode,\r\n\t * accept states are conflicting but not exact are treated as non-accept\r\n\t * states.\r\n\t */\r\n\tget isExact(): boolean {\r\n\t\treturn this.exact;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof ConflictInfo)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.isExact === obj.isExact\r\n\t\t\t&& Utils.equals(this.conflictedAlts, obj.conflictedAlts);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.conflictedAlts.hashCode();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.1433686-07:00\r\n\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleNode } from \"./RuleNode\";\r\nimport { Token } from \"../Token\";\r\n\r\nexport class TerminalNode implements ParseTree {\r\n\tpublic _symbol: Token;\r\n\tpublic _parent: RuleNode | undefined;\r\n\r\n\tconstructor(symbol: Token) {\r\n\t\tthis._symbol = symbol;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getChild(i: number): never {\r\n\t\tthrow new RangeError(\"Terminal Node has no children.\");\r\n\t}\r\n\r\n\tget symbol(): Token {\r\n\t\treturn this._symbol;\r\n\t}\r\n\r\n\t@Override\r\n\tget parent(): RuleNode | undefined {\r\n\t\treturn this._parent;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic setParent(parent: RuleContext): void {\r\n\t\tthis._parent = parent;\r\n\t}\r\n\r\n\t@Override\r\n\tget payload(): Token {\r\n\t\treturn this._symbol;\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceInterval(): Interval {\r\n\t\tlet tokenIndex: number = this._symbol.tokenIndex;\r\n\t\treturn new Interval(tokenIndex, tokenIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tget childCount(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic accept(visitor: ParseTreeVisitor): T {\r\n\t\treturn visitor.visitTerminal(this);\r\n\t}\r\n\r\n\t@Override\r\n\tget text(): string {\r\n\t\treturn this._symbol.text || \"\";\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toStringTree(parser?: Parser): string {\r\n\t\treturn this.toString();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (this._symbol.type === Token.EOF) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\treturn this._symbol.text || \"\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:47.4646355-07:00\r\n\r\nimport { Override } from \"../Decorators\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { TerminalNode } from \"./TerminalNode\";\r\nimport { Token } from \"../Token\";\r\n\r\n/** Represents a token that was consumed during resynchronization\r\n * rather than during a valid match operation. For example,\r\n * we will create this kind of a node during single token insertion\r\n * and deletion as well as during \"consume until error recovery set\"\r\n * upon no viable alternative exceptions.\r\n */\r\nexport class ErrorNode extends TerminalNode {\r\n\tconstructor(token: Token) {\r\n\t\tsuper(token);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic accept(visitor: ParseTreeVisitor): T {\r\n\t\treturn visitor.visitErrorNode(this);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:47.9232756-07:00\r\n\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { Parser } from \"../Parser\";\r\nimport { Interval } from \"../misc/Interval\";\r\n\r\nexport abstract class RuleNode implements ParseTree {\r\n\tpublic abstract readonly ruleContext: RuleContext;\r\n\r\n\t//@Override\r\n\tpublic abstract readonly parent: RuleNode | undefined;\r\n\r\n\tpublic abstract setParent(parent: RuleContext): void;\r\n\r\n\tpublic abstract getChild(i: number): ParseTree;\r\n\r\n\tpublic abstract accept(visitor: ParseTreeVisitor): T;\r\n\r\n\tpublic abstract readonly text: string;\r\n\r\n\tpublic abstract toStringTree(parser?: Parser | undefined): string;\r\n\r\n\tpublic abstract readonly sourceInterval: Interval;\r\n\r\n\tpublic abstract readonly payload: any;\r\n\r\n\tpublic abstract readonly childCount: number;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.3187865-07:00\r\n\r\nimport { Arrays } from \"../misc/Arrays\";\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { CommonToken } from \"../CommonToken\";\r\nimport { ErrorNode } from \"./ErrorNode\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleNode } from \"./RuleNode\";\r\nimport { TerminalNode } from \"./TerminalNode\";\r\nimport { Token } from \"../Token\";\r\nimport { Tree } from \"./Tree\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\n/** A set of utility routines useful for all kinds of ANTLR trees. */\r\nexport class Trees {\r\n\t/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the\r\n\t * node payloads to get the text for the nodes. Detect\r\n\t * parse trees and extract data appropriately.\r\n\t */\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree): string;\r\n\r\n\t/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the\r\n\t * node payloads to get the text for the nodes. Detect\r\n\t * parse trees and extract data appropriately.\r\n\t */\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree, recog: Parser | undefined): string;\r\n\r\n\t/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the\r\n\t * node payloads to get the text for the nodes.\r\n\t */\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree, /*@Nullable*/ ruleNames: string[] | undefined): string;\r\n\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree, arg2?: Parser | string[]): string;\r\n\tpublic static toStringTree(@NotNull t: Tree, arg2?: Parser | string[]): string {\r\n\t\tlet ruleNames: string[] | undefined;\r\n\t\tif (arg2 instanceof Parser) {\r\n\t\t\truleNames = arg2.ruleNames;\r\n\t\t} else {\r\n\t\t\truleNames = arg2;\r\n\t\t}\r\n\r\n\t\tlet s: string = Utils.escapeWhitespace(this.getNodeText(t, ruleNames), false);\r\n\t\tif (t.childCount === 0) {\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tlet buf = \"\";\r\n\t\tbuf += (\"(\");\r\n\t\ts = Utils.escapeWhitespace(this.getNodeText(t, ruleNames), false);\r\n\t\tbuf += (s);\r\n\t\tbuf += (\" \");\r\n\t\tfor (let i = 0; i < t.childCount; i++) {\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tbuf += (\" \");\r\n\t\t\t}\r\n\t\t\tbuf += (this.toStringTree(t.getChild(i), ruleNames));\r\n\t\t}\r\n\t\tbuf += (\")\");\r\n\t\treturn buf;\r\n\t}\r\n\r\n\tpublic static getNodeText(/*@NotNull*/ t: Tree, recog: Parser | undefined): string;\r\n\tpublic static getNodeText(/*@NotNull*/ t: Tree, ruleNames: string[] | undefined): string;\r\n\tpublic static getNodeText(t: Tree, arg2: Parser | string[] | undefined): string {\r\n\t\tlet ruleNames: string[] | undefined;\r\n\t\tif (arg2 instanceof Parser) {\r\n\t\t\truleNames = arg2.ruleNames;\r\n\t\t} else if (arg2) {\r\n\t\t\truleNames = arg2;\r\n\t\t} else {\r\n\t\t\t// no recog or rule names\r\n\t\t\tlet payload = t.payload;\r\n\t\t\tif (typeof payload.text === \"string\") {\r\n\t\t\t\treturn payload.text;\r\n\t\t\t}\r\n\t\t\treturn t.payload.toString();\r\n\t\t}\r\n\r\n\t\tif (t instanceof RuleNode) {\r\n\t\t\tlet ruleContext: RuleContext = t.ruleContext;\r\n\t\t\tlet ruleIndex: number = ruleContext.ruleIndex;\r\n\t\t\tlet ruleName: string = ruleNames[ruleIndex];\r\n\t\t\tlet altNumber: number = ruleContext.altNumber;\r\n\t\t\tif (altNumber !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\treturn ruleName + \":\" + altNumber;\r\n\t\t\t}\r\n\t\t\treturn ruleName;\r\n\t\t}\r\n\t\telse if (t instanceof ErrorNode) {\r\n\t\t\treturn t.toString();\r\n\t\t}\r\n\t\telse if (t instanceof TerminalNode) {\r\n\t\t\tlet symbol = t.symbol;\r\n\t\t\treturn symbol.text || \"\";\r\n\t\t}\r\n\t\tthrow new TypeError(\"Unexpected node type\");\r\n\t}\r\n\r\n\t/** Return ordered list of all children of this node */\r\n\tpublic static getChildren(t: ParseTree): ParseTree[];\r\n\tpublic static getChildren(t: Tree): Tree[];\r\n\tpublic static getChildren(t: Tree): Tree[] {\r\n\t\tlet kids: Tree[] = [];\r\n\t\tfor (let i = 0; i < t.childCount; i++) {\r\n\t\t\tkids.push(t.getChild(i));\r\n\t\t}\r\n\t\treturn kids;\r\n\t}\r\n\r\n\t/** Return a list of all ancestors of this node. The first node of\r\n\t * list is the root and the last is the parent of this node.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static getAncestors(t: ParseTree): ParseTree[];\r\n\tpublic static getAncestors(t: Tree): Tree[];\r\n\t@NotNull\r\n\tpublic static getAncestors(@NotNull t: Tree): Tree[] {\r\n\t\tlet ancestors: Tree[] = [];\r\n\t\tlet p = t.parent;\r\n\t\twhile (p) {\r\n\t\t\tancestors.unshift(p); // insert at start\r\n\t\t\tp = p.parent;\r\n\t\t}\r\n\t\treturn ancestors;\r\n\t}\r\n\r\n\t/** Return true if t is u's parent or a node on path to root from u.\r\n\t * Use === not equals().\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static isAncestorOf(t: Tree, u: Tree): boolean {\r\n\t\tif (!t || !u || !t.parent) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tlet p = u.parent;\r\n\t\twhile (p) {\r\n\t\t\tif (t === p) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tp = p.parent;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tpublic static findAllTokenNodes(t: ParseTree, ttype: number): ParseTree[] {\r\n\t\treturn Trees.findAllNodes(t, ttype, true);\r\n\t}\r\n\r\n\tpublic static findAllRuleNodes(t: ParseTree, ruleIndex: number): ParseTree[] {\r\n\t\treturn Trees.findAllNodes(t, ruleIndex, false);\r\n\t}\r\n\r\n\tpublic static findAllNodes(t: ParseTree, index: number, findTokens: boolean): ParseTree[] {\r\n\t\tlet nodes: ParseTree[] = [];\r\n\t\tTrees._findAllNodes(t, index, findTokens, nodes);\r\n\t\treturn nodes;\r\n\t}\r\n\r\n\tpublic static _findAllNodes(t: ParseTree, index: number, findTokens: boolean, nodes: ParseTree[]): void {\r\n\t\t// check this node (the root) first\r\n\t\tif (findTokens && t instanceof TerminalNode) {\r\n\t\t\tif (t.symbol.type === index) {\r\n\t\t\t\tnodes.push(t);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (!findTokens && t instanceof ParserRuleContext) {\r\n\t\t\tif (t.ruleIndex === index) {\r\n\t\t\t\tnodes.push(t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// check children\r\n\t\tfor (let i = 0; i < t.childCount; i++) {\r\n\t\t\tTrees._findAllNodes(t.getChild(i), index, findTokens, nodes);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Get all descendents; includes t itself.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static getDescendants(t: ParseTree): ParseTree[] {\r\n\t\tlet nodes: ParseTree[] = [];\r\n\r\n\t\tfunction recurse(e: ParseTree): void {\r\n\t\t\tnodes.push(e);\r\n\t\t\tconst n = e.childCount;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\trecurse(e.getChild(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trecurse(t);\r\n\t\treturn nodes;\r\n\t}\r\n\r\n\t/** Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex\r\n\t * inclusively using postorder traversal. Recursive depth-first-search.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tpublic static getRootOfSubtreeEnclosingRegion(\r\n\t\t@NotNull t: ParseTree,\r\n\t\tstartTokenIndex: number, // inclusive\r\n\t\tstopTokenIndex: number, // inclusive\r\n\t): ParserRuleContext | undefined {\r\n\t\tlet n: number = t.childCount;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet child: ParseTree = t.getChild(i);\r\n\t\t\tlet r = Trees.getRootOfSubtreeEnclosingRegion(child, startTokenIndex, stopTokenIndex);\r\n\t\t\tif (r) {\r\n\t\t\t\treturn r;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (t instanceof ParserRuleContext) {\r\n\t\t\tlet stopToken = t.stop;\r\n\t\t\tif (startTokenIndex >= t.start.tokenIndex && // is range fully contained in t?\r\n\t\t\t\t(stopToken == null || stopTokenIndex <= stopToken.tokenIndex)) {\r\n\t\t\t\t// note: r.stop==null likely implies that we bailed out of parser and there's nothing to the right\r\n\t\t\t\treturn t;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/** Replace any subtree siblings of root that are completely to left\r\n\t * or right of lookahead range with a CommonToken(Token.INVALID_TYPE,\"...\")\r\n\t * node. The source interval for t is not altered to suit smaller range!\r\n\t *\r\n\t * WARNING: destructive to t.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static stripChildrenOutOfRange(\r\n\t\tt: ParserRuleContext,\r\n\t\troot: ParserRuleContext,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number): void {\r\n\t\tif (!t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet count = t.childCount;\r\n\t\tfor (let i = 0; i < count; i++) {\r\n\t\t\tlet child = t.getChild(i);\r\n\t\t\tlet range: Interval = child.sourceInterval;\r\n\t\t\tif (child instanceof ParserRuleContext && (range.b < startIndex || range.a > stopIndex)) {\r\n\t\t\t\tif (Trees.isAncestorOf(child, root)) { // replace only if subtree doesn't have displayed root\r\n\t\t\t\t\tlet abbrev: CommonToken = new CommonToken(Token.INVALID_TYPE, \"...\");\r\n\t\t\t\t\tt.children![i] = new TerminalNode(abbrev); // HACK access to private\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/** Return first node satisfying the pred\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static findNodeSuchThat(t: ParseTree, pred: (tree: ParseTree) => boolean): ParseTree | undefined;\r\n\tpublic static findNodeSuchThat(t: Tree, pred: (tree: Tree) => boolean): Tree | undefined;\r\n\tpublic static findNodeSuchThat(t: Tree, pred: (tree: ParseTree) => boolean): Tree | undefined {\r\n\t\t// No type check needed as long as users only use one of the available overloads\r\n\t\tif (pred(t as ParseTree)) {\r\n\t\t\treturn t;\r\n\t\t}\r\n\r\n\t\tlet n: number = t.childCount;\r\n\t\tfor (let i = 0 ; i < n ; i++){\r\n\t\t\tlet u = Trees.findNodeSuchThat(t.getChild(i), pred as (tree: Tree) => boolean);\r\n\t\t\tif (u !== undefined) {\r\n\t\t\t\treturn u;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.3490837-07:00\r\n\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { Parser } from \"./Parser\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RuleNode } from \"./tree/RuleNode\";\r\nimport { ParseTree } from \"./tree/ParseTree\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Trees } from \"./tree/Trees\";\r\nimport { ParseTreeVisitor } from \"./tree/ParseTreeVisitor\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/** A rule context is a record of a single rule invocation.\r\n *\r\n * We form a stack of these context objects using the parent\r\n * pointer. A parent pointer of `undefined` indicates that the current\r\n * context is the bottom of the stack. The ParserRuleContext subclass\r\n * as a children list so that we can turn this data structure into a\r\n * tree.\r\n *\r\n * The root node always has a `undefined` pointer and invokingState of -1.\r\n *\r\n * Upon entry to parsing, the first invoked rule function creates a\r\n * context object (a subclass specialized for that rule such as\r\n * SContext) and makes it the root of a parse tree, recorded by field\r\n * Parser._ctx.\r\n *\r\n * public final SContext s() throws RecognitionException {\r\n * SContext _localctx = new SContext(_ctx, state); <-- create new node\r\n * enterRule(_localctx, 0, RULE_s); <-- push it\r\n * ...\r\n * exitRule(); <-- pop back to _localctx\r\n * return _localctx;\r\n * }\r\n *\r\n * A subsequent rule invocation of r from the start rule s pushes a\r\n * new context object for r whose parent points at s and use invoking\r\n * state is the state with r emanating as edge label.\r\n *\r\n * The invokingState fields from a context object to the root\r\n * together form a stack of rule indication states where the root\r\n * (bottom of the stack) has a -1 sentinel value. If we invoke start\r\n * symbol s then call r1, which calls r2, the would look like\r\n * this:\r\n *\r\n * SContext[-1] <- root node (bottom of the stack)\r\n * R1Context[p] <- p in rule s called r1\r\n * R2Context[q] <- q in rule r1 called r2\r\n *\r\n * So the top of the stack, _ctx, represents a call to the current\r\n * rule and it holds the return address from another rule that invoke\r\n * to this rule. To invoke a rule, we must always have a current context.\r\n *\r\n * The parent contexts are useful for computing lookahead sets and\r\n * getting error information.\r\n *\r\n * These objects are used during parsing and prediction.\r\n * For the special case of parsers, we use the subclass\r\n * ParserRuleContext.\r\n *\r\n * @see ParserRuleContext\r\n */\r\nexport class RuleContext extends RuleNode {\r\n\tpublic _parent: RuleContext | undefined;\r\n\tpublic invokingState: number;\r\n\r\n\tconstructor();\r\n\tconstructor(parent: RuleContext | undefined, invokingState: number);\r\n\tconstructor(parent?: RuleContext, invokingState?: number) {\r\n\t\tsuper();\r\n\t\tthis._parent = parent;\r\n\t\tthis.invokingState = invokingState != null ? invokingState : -1;\r\n\t}\r\n\r\n\tpublic static getChildContext(parent: RuleContext, invokingState: number): RuleContext {\r\n\t\treturn new RuleContext(parent, invokingState);\r\n\t}\r\n\r\n\tpublic depth(): number {\r\n\t\tlet n = 0;\r\n\t\tlet p: RuleContext | undefined = this;\r\n\t\twhile (p) {\r\n\t\t\tp = p._parent;\r\n\t\t\tn++;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\t/** A context is empty if there is no invoking state; meaning nobody called\r\n\t * current context.\r\n\t */\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.invokingState === -1;\r\n\t}\r\n\r\n\t// satisfy the ParseTree / SyntaxTree interface\r\n\r\n\t@Override\r\n\tget sourceInterval(): Interval {\r\n\t\treturn Interval.INVALID;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleContext(): RuleContext { return this; }\r\n\r\n\t@Override\r\n\tget parent(): RuleContext | undefined { return this._parent; }\r\n\r\n\t/** @since 4.7. {@see ParseTree#setParent} comment */\r\n\t@Override\r\n\tpublic setParent(parent: RuleContext): void {\r\n\t\tthis._parent = parent;\r\n\t}\r\n\r\n\t@Override\r\n\tget payload(): RuleContext { return this; }\r\n\r\n\t/** Return the combined text of all child nodes. This method only considers\r\n\t * tokens which have been added to the parse tree.\r\n\t *\r\n\t * Since tokens on hidden channels (e.g. whitespace or comments) are not\r\n\t * added to the parse trees, they will not appear in the output of this\r\n\t * method.\r\n\t */\r\n\t@Override\r\n\tget text(): string {\r\n\t\tif (this.childCount === 0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet builder = \"\";\r\n\t\tfor (let i = 0; i < this.childCount; i++) {\r\n\t\t\tbuilder += this.getChild(i).text;\r\n\t\t}\r\n\r\n\t\treturn builder.toString();\r\n\t}\r\n\r\n\tget ruleIndex(): number { return -1; }\r\n\r\n\t/** For rule associated with this parse tree internal node, return\r\n\t * the outer alternative number used to match the input. Default\r\n\t * implementation does not compute nor store this alt num. Create\r\n\t * a subclass of ParserRuleContext with backing field and set\r\n\t * option contextSuperClass.\r\n\t * to set it.\r\n\t *\r\n\t * @since 4.5.3\r\n\t */\r\n\tget altNumber(): number { return ATN.INVALID_ALT_NUMBER; }\r\n\r\n\t/** Set the outer alternative number for this context node. Default\r\n\t * implementation does nothing to avoid backing field overhead for\r\n\t * trees that don't need it. Create\r\n\t * a subclass of ParserRuleContext with backing field and set\r\n\t * option contextSuperClass.\r\n\t *\r\n\t * @since 4.5.3\r\n\t */\r\n\tset altNumber(altNumber: number) {\r\n\t\t// intentionally ignored by the base implementation\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getChild(i: number): ParseTree {\r\n\t\tthrow new RangeError(\"i must be greater than or equal to 0 and less than childCount\");\r\n\t}\r\n\r\n\t@Override\r\n\tget childCount(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic accept(visitor: ParseTreeVisitor): T {\r\n\t\treturn visitor.visitChildren(this);\r\n\t}\r\n\r\n\t/** Print out a whole tree, not just a node, in LISP format\r\n\t * (root child1 .. childN). Print just a node if this is a leaf.\r\n\t * We have to know the recognizer so we can get rule names.\r\n\t */\r\n\tpublic toStringTree(recog: Parser): string;\r\n\r\n\t/** Print out a whole tree, not just a node, in LISP format\r\n\t * (root child1 .. childN). Print just a node if this is a leaf.\r\n\t */\r\n\tpublic toStringTree(ruleNames: string[] | undefined): string;\r\n\r\n\tpublic toStringTree(): string;\r\n\r\n\t@Override\r\n\tpublic toStringTree(recog?: Parser | string[]): string {\r\n\t\treturn Trees.toStringTree(this, recog);\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(recog: Recognizer | undefined): string;\r\n\tpublic toString(ruleNames: string[] | undefined): string;\r\n\r\n\t// // recog undefined unless ParserRuleContext, in which case we use subclass toString(...)\r\n\tpublic toString(recog: Recognizer | undefined, stop: RuleContext | undefined): string;\r\n\r\n\tpublic toString(ruleNames: string[] | undefined, stop: RuleContext | undefined): string;\r\n\r\n\tpublic toString(\r\n\t\targ1?: Recognizer | string[],\r\n\t\tstop?: RuleContext)\r\n\t\t: string {\r\n\t\tconst ruleNames = (arg1 instanceof Recognizer) ? arg1.ruleNames : arg1;\r\n\t\tstop = stop || ParserRuleContext.emptyContext();\r\n\r\n\t\tlet buf = \"\";\r\n\t\tlet p: RuleContext | undefined = this;\r\n\t\tbuf += (\"[\");\r\n\t\twhile (p && p !== stop) {\r\n\t\t\tif (!ruleNames) {\r\n\t\t\t\tif (!p.isEmpty) {\r\n\t\t\t\t\tbuf += (p.invokingState);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlet ruleIndex: number = p.ruleIndex;\r\n\t\t\t\tlet ruleName: string = (ruleIndex >= 0 && ruleIndex < ruleNames.length)\r\n\t\t\t\t\t? ruleNames[ruleIndex] : ruleIndex.toString();\r\n\t\t\t\tbuf += (ruleName);\r\n\t\t\t}\r\n\r\n\t\t\tif (p._parent && (ruleNames || !p._parent.isEmpty)) {\r\n\t\t\t\tbuf += (\" \");\r\n\t\t\t}\r\n\r\n\t\t\tp = p._parent;\r\n\t\t}\r\n\r\n\t\tbuf += (\"]\");\r\n\t\treturn buf.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:56.6285494-07:00\r\nimport { ErrorNode } from \"./tree/ErrorNode\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParseTree } from \"./tree/ParseTree\";\r\nimport { ParseTreeListener } from \"./tree/ParseTreeListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { TerminalNode } from \"./tree/TerminalNode\";\r\nimport { Token } from \"./Token\";\r\n\r\n/** A rule invocation record for parsing.\r\n *\r\n * Contains all of the information about the current rule not stored in the\r\n * RuleContext. It handles parse tree children list, Any ATN state\r\n * tracing, and the default values available for rule invocations:\r\n * start, stop, rule index, current alt number.\r\n *\r\n * Subclasses made for each rule and grammar track the parameters,\r\n * return values, locals, and labels specific to that rule. These\r\n * are the objects that are returned from rules.\r\n *\r\n * Note text is not an actual field of a rule return value; it is computed\r\n * from start and stop using the input stream's toString() method. I\r\n * could add a ctor to this so that we can pass in and store the input\r\n * stream, but I'm not sure we want to do that. It would seem to be undefined\r\n * to get the .text property anyway if the rule matches tokens from multiple\r\n * input streams.\r\n *\r\n * I do not use getters for fields of objects that are used simply to\r\n * group values such as this aggregate. The getters/setters are there to\r\n * satisfy the superclass interface.\r\n */\r\nexport class ParserRuleContext extends RuleContext {\r\n\tprivate static readonly EMPTY: ParserRuleContext = new ParserRuleContext();\r\n\r\n\t/** If we are debugging or building a parse tree for a visitor,\r\n\t * we need to track all of the tokens and rule invocations associated\r\n\t * with this rule's context. This is empty for parsing w/o tree constr.\r\n\t * operation because we don't the need to track the details about\r\n\t * how we parse this rule.\r\n\t */\r\n\tpublic children?: ParseTree[];\r\n\r\n\t/** For debugging/tracing purposes, we want to track all of the nodes in\r\n\t * the ATN traversed by the parser for a particular rule.\r\n\t * This list indicates the sequence of ATN nodes used to match\r\n\t * the elements of the children list. This list does not include\r\n\t * ATN nodes and other rules used to match rule invocations. It\r\n\t * traces the rule invocation node itself but nothing inside that\r\n\t * other rule's ATN submachine.\r\n\t *\r\n\t * There is NOT a one-to-one correspondence between the children and\r\n\t * states list. There are typically many nodes in the ATN traversed\r\n\t * for each element in the children list. For example, for a rule\r\n\t * invocation there is the invoking state and the following state.\r\n\t *\r\n\t * The parser state property updates field s and adds it to this list\r\n\t * if we are debugging/tracing.\r\n\t *\r\n\t * This does not trace states visited during prediction.\r\n\t */\r\n//\tpublic Array states;\r\n\r\n\tpublic _start!: Token;\r\n\tpublic _stop: Token | undefined;\r\n\r\n\t/**\r\n\t * The exception that forced this rule to return. If the rule successfully\r\n\t * completed, this is `undefined`.\r\n\t */\r\n\tpublic exception?: RecognitionException;\r\n\r\n\tconstructor();\r\n\tconstructor(parent: ParserRuleContext | undefined, invokingStateNumber: number);\r\n\tconstructor(parent?: ParserRuleContext, invokingStateNumber?: number) {\r\n\t\tif (invokingStateNumber == null) {\r\n\t\t\tsuper();\r\n\t\t} else {\r\n\t\t\tsuper(parent, invokingStateNumber);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static emptyContext(): ParserRuleContext {\r\n\t\treturn ParserRuleContext.EMPTY;\r\n\t}\r\n\r\n\t/**\r\n\t * COPY a ctx (I'm deliberately not using copy constructor) to avoid\r\n\t * confusion with creating node with parent. Does not copy children\r\n\t * (except error leaves).\r\n\t *\r\n\t * This is used in the generated parser code to flip a generic XContext\r\n\t * node for rule X to a YContext for alt label Y. In that sense, it is not\r\n\t * really a generic copy function.\r\n\t *\r\n\t * If we do an error sync() at start of a rule, we might add error nodes\r\n\t * to the generic XContext so this function must copy those nodes to the\r\n\t * YContext as well else they are lost!\r\n\t */\r\n\tpublic copyFrom(ctx: ParserRuleContext): void {\r\n\t\tthis._parent = ctx._parent;\r\n\t\tthis.invokingState = ctx.invokingState;\r\n\r\n\t\tthis._start = ctx._start;\r\n\t\tthis._stop = ctx._stop;\r\n\r\n\t\t// copy any error nodes to alt label node\r\n\t\tif (ctx.children) {\r\n\t\t\tthis.children = [];\r\n\t\t\t// reset parent pointer for any error nodes\r\n\t\t\tfor (let child of ctx.children) {\r\n\t\t\t\tif (child instanceof ErrorNode) {\r\n\t\t\t\t\tthis.addChild(child);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Double dispatch methods for listeners\r\n\r\n\tpublic enterRule(listener: ParseTreeListener): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\tpublic exitRule(listener: ParseTreeListener): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/** Add a parse tree node to this as a child. Works for\r\n\t * internal and leaf nodes. Does not set parent link;\r\n\t * other add methods must do that. Other addChild methods\r\n\t * call this.\r\n\t *\r\n\t * We cannot set the parent pointer of the incoming node\r\n\t * because the existing interfaces do not have a setParent()\r\n\t * method and I don't want to break backward compatibility for this.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic addAnyChild(t: T): T {\r\n\t\tif (!this.children) {\r\n\t\t\tthis.children = [t];\r\n\t\t} else {\r\n\t\t\tthis.children.push(t);\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/** Add a token leaf node child and force its parent to be this node. */\r\n\tpublic addChild(t: TerminalNode): void;\r\n\tpublic addChild(ruleInvocation: RuleContext): void;\r\n\t/**\r\n\t * Add a child to this node based upon matchedToken. It\r\n\t * creates a TerminalNodeImpl rather than using\r\n\t * {@link Parser#createTerminalNode(ParserRuleContext, Token)}. I'm leaving this\r\n\t * in for compatibility but the parser doesn't use this anymore.\r\n\t *\r\n\t * @deprecated Use another overload instead.\r\n\t */\r\n\tpublic addChild(matchedToken: Token): TerminalNode;\r\n\tpublic addChild(t: TerminalNode | RuleContext | Token): TerminalNode | void {\r\n\t\tlet result: TerminalNode | void;\r\n\t\tif (t instanceof TerminalNode) {\r\n\t\t\tt.setParent(this);\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\treturn;\r\n\t\t} else if (t instanceof RuleContext) {\r\n\t\t\t// Does not set parent link\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t// Deprecated code path\r\n\t\t\tt = new TerminalNode(t);\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\tt.setParent(this);\r\n\t\t\treturn t;\r\n\t\t}\r\n\t}\r\n\r\n\t/** Add an error node child and force its parent to be this node.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic addErrorNode(errorNode: ErrorNode): ErrorNode;\r\n\r\n\t/**\r\n\t * Add a child to this node based upon badToken. It\r\n\t * creates a ErrorNode rather than using\r\n\t * {@link Parser#createErrorNode(ParserRuleContext, Token)}. I'm leaving this\r\n\t * in for compatibility but the parser doesn't use this anymore.\r\n\t *\r\n\t * @deprecated Use another overload instead.\r\n\t */\r\n\tpublic addErrorNode(badToken: Token): ErrorNode;\r\n\tpublic addErrorNode(node: ErrorNode | Token): ErrorNode {\r\n\t\tif (node instanceof ErrorNode) {\r\n\t\t\tconst errorNode: ErrorNode = node;\r\n\t\t\terrorNode.setParent(this);\r\n\t\t\treturn this.addAnyChild(errorNode);\r\n\t\t} else {\r\n\t\t\t// deprecated path\r\n\t\t\tconst badToken: Token = node;\r\n\t\t\tlet t = new ErrorNode(badToken);\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\tt.setParent(this);\r\n\t\t\treturn t;\r\n\t\t}\r\n\t}\r\n\r\n//\tpublic void trace(int s) {\r\n//\t\tif ( states==null ) states = new ArrayList();\r\n//\t\tstates.add(s);\r\n//\t}\r\n\r\n\t/** Used by enterOuterAlt to toss out a RuleContext previously added as\r\n\t * we entered a rule. If we have # label, we will need to remove\r\n\t * generic ruleContext object.\r\n\t */\r\n\tpublic removeLastChild(): void {\r\n\t\tif (this.children) {\r\n\t\t\tthis.children.pop();\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\t/** Override to make type more specific */\r\n\tget parent(): ParserRuleContext | undefined {\r\n\t\tlet parent = super.parent;\r\n\t\tif (parent === undefined || parent instanceof ParserRuleContext) {\r\n\t\t\treturn parent;\r\n\t\t}\r\n\r\n\t\tthrow new TypeError(\"Invalid parent type for ParserRuleContext\");\r\n\t}\r\n\r\n\tpublic getChild(i: number): ParseTree;\r\n\tpublic getChild(i: number, ctxType: { new (...args: any[]): T; }): T;\r\n\t// Note: in TypeScript, order or arguments reversed\r\n\tpublic getChild(i: number, ctxType?: { new (...args: any[]): T; }): ParseTree {\r\n\t\tif (!this.children || i < 0 || i >= this.children.length) {\r\n\t\t\tthrow new RangeError(\"index parameter must be between >= 0 and <= number of children.\");\r\n\t\t}\r\n\r\n\t\tif (ctxType == null) {\r\n\t\t\treturn this.children[i];\r\n\t\t}\r\n\r\n\t\tlet result = this.tryGetChild(i, ctxType);\r\n\t\tif (result === undefined) {\r\n\t\t\tthrow new Error(\"The specified node does not exist\");\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic tryGetChild(i: number, ctxType: { new (...args: any[]): T; }): T | undefined {\r\n\t\tif (!this.children || i < 0 || i >= this.children.length) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet j: number = -1; // what node with ctxType have we found?\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof ctxType) {\r\n\t\t\t\tj++;\r\n\t\t\t\tif (j === i) {\r\n\t\t\t\t\treturn o;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic getToken(ttype: number, i: number): TerminalNode {\r\n\t\tlet result = this.tryGetToken(ttype, i);\r\n\t\tif (result === undefined) {\r\n\t\t\tthrow new Error(\"The specified token does not exist\");\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic tryGetToken(ttype: number, i: number): TerminalNode | undefined {\r\n\t\tif (!this.children || i < 0 || i >= this.children.length) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet j: number = -1; // what token with ttype have we found?\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof TerminalNode) {\r\n\t\t\t\tlet symbol: Token = o.symbol;\r\n\t\t\t\tif (symbol.type === ttype) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\tif (j === i) {\r\n\t\t\t\t\t\treturn o;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic getTokens(ttype: number): TerminalNode[] {\r\n\t\tlet tokens: TerminalNode[] = [];\r\n\r\n\t\tif (!this.children) {\r\n\t\t\treturn tokens;\r\n\t\t}\r\n\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof TerminalNode) {\r\n\t\t\t\tlet symbol = o.symbol;\r\n\t\t\t\tif (symbol.type === ttype) {\r\n\t\t\t\t\ttokens.push(o);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tokens;\r\n\t}\r\n\r\n\tget ruleContext(): this {\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// NOTE: argument order change from Java version\r\n\tpublic getRuleContext(i: number, ctxType: { new (...args: any[]): T; }): T {\r\n\t\treturn this.getChild(i, ctxType);\r\n\t}\r\n\r\n\tpublic tryGetRuleContext(i: number, ctxType: { new (...args: any[]): T; }): T | undefined {\r\n\t\treturn this.tryGetChild(i, ctxType);\r\n\t}\r\n\r\n\tpublic getRuleContexts(ctxType: { new (...args: any[]): T; }): T[] {\r\n\t\tlet contexts: T[] = [];\r\n\t\tif (!this.children) {\r\n\t\t\treturn contexts;\r\n\t\t}\r\n\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof ctxType) {\r\n\t\t\t\tcontexts.push(o);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn contexts;\r\n\t}\r\n\r\n\t@Override\r\n\tget childCount() {\r\n\t\treturn this.children ? this.children.length : 0;\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceInterval(): Interval {\r\n\t\tif (!this._start) {\r\n\t\t\treturn Interval.INVALID;\r\n\t\t}\r\n\t\tif (!this._stop || this._stop.tokenIndex < this._start.tokenIndex) {\r\n\t\t\treturn Interval.of(this._start.tokenIndex, this._start.tokenIndex - 1); // empty\r\n\t\t}\r\n\t\treturn Interval.of(this._start.tokenIndex, this._stop.tokenIndex);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the initial token in this context.\r\n\t * Note that the range from start to stop is inclusive, so for rules that do not consume anything\r\n\t * (for example, zero length or error productions) this token may exceed stop.\r\n\t */\r\n\tget start(): Token { return this._start; }\r\n\t/**\r\n\t * Get the final token in this context.\r\n\t * Note that the range from start to stop is inclusive, so for rules that do not consume anything\r\n\t * (for example, zero length or error productions) this token may precede start.\r\n\t */\r\n\tget stop(): Token | undefined { return this._stop; }\r\n\r\n\t/** Used for rule context info debugging during parse-time, not so much for ATN debugging */\r\n\tpublic toInfoString(recognizer: Parser): string {\r\n\t\tlet rules: string[] =\r\n\t\t\trecognizer.getRuleInvocationStack(this).reverse();\r\n\t\treturn \"ParserRuleContext\" + rules + \"{\" +\r\n\t\t\t\"start=\" + this._start +\r\n\t\t\t\", stop=\" + this._stop +\r\n\t\t\t\"}\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.2673893-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { EqualityComparator } from \"../misc/EqualityComparator\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\n\r\n/**\r\n * This enumeration defines the prediction modes available in ANTLR 4 along with\r\n * utility methods for analyzing configuration sets for conflicts and/or\r\n * ambiguities.\r\n */\r\nexport enum PredictionMode {\r\n\t/**\r\n\t * The SLL(*) prediction mode. This prediction mode ignores the current\r\n\t * parser context when making predictions. This is the fastest prediction\r\n\t * mode, and provides correct results for many grammars. This prediction\r\n\t * mode is more powerful than the prediction mode provided by ANTLR 3, but\r\n\t * may result in syntax errors for grammar and input combinations which are\r\n\t * not SLL.\r\n\t *\r\n\t * When using this prediction mode, the parser will either return a correct\r\n\t * parse tree (i.e. the same parse tree that would be returned with the\r\n\t * {@link #LL} prediction mode), or it will report a syntax error. If a\r\n\t * syntax error is encountered when using the {@link #SLL} prediction mode,\r\n\t * it may be due to either an actual syntax error in the input or indicate\r\n\t * that the particular combination of grammar and input requires the more\r\n\t * powerful {@link #LL} prediction abilities to complete successfully.\r\n\t *\r\n\t * This prediction mode does not provide any guarantees for prediction\r\n\t * behavior for syntactically-incorrect inputs.\r\n\t */\r\n\tSLL,\r\n\t/**\r\n\t * The LL(*) prediction mode. This prediction mode allows the current parser\r\n\t * context to be used for resolving SLL conflicts that occur during\r\n\t * prediction. This is the fastest prediction mode that guarantees correct\r\n\t * parse results for all combinations of grammars with syntactically correct\r\n\t * inputs.\r\n\t *\r\n\t * When using this prediction mode, the parser will make correct decisions\r\n\t * for all syntactically-correct grammar and input combinations. However, in\r\n\t * cases where the grammar is truly ambiguous this prediction mode might not\r\n\t * report a precise answer for *exactly which* alternatives are\r\n\t * ambiguous.\r\n\t *\r\n\t * This prediction mode does not provide any guarantees for prediction\r\n\t * behavior for syntactically-incorrect inputs.\r\n\t */\r\n\tLL,\r\n\t/**\r\n\t * The LL(*) prediction mode with exact ambiguity detection. In addition to\r\n\t * the correctness guarantees provided by the {@link #LL} prediction mode,\r\n\t * this prediction mode instructs the prediction algorithm to determine the\r\n\t * complete and exact set of ambiguous alternatives for every ambiguous\r\n\t * decision encountered while parsing.\r\n\t *\r\n\t * This prediction mode may be used for diagnosing ambiguities during\r\n\t * grammar development. Due to the performance overhead of calculating sets\r\n\t * of ambiguous alternatives, this prediction mode should be avoided when\r\n\t * the exact results are not necessary.\r\n\t *\r\n\t * This prediction mode does not provide any guarantees for prediction\r\n\t * behavior for syntactically-incorrect inputs.\r\n\t */\r\n\tLL_EXACT_AMBIG_DETECTION,\r\n}\r\n\r\nexport namespace PredictionMode {\r\n\t/** A Map that uses just the state and the stack context as the key. */\r\n\t// NOTE: Base type used to be FlexibleHashMap\r\n\tclass AltAndContextMap extends Array2DHashMap {\r\n\t\tconstructor() {\r\n\t\t\tsuper(AltAndContextConfigEqualityComparator.INSTANCE);\r\n\t\t}\r\n\t}\r\n\r\n\tclass AltAndContextConfigEqualityComparator implements EqualityComparator {\r\n\t\tpublic static readonly INSTANCE: AltAndContextConfigEqualityComparator = new AltAndContextConfigEqualityComparator();\r\n\r\n\t\tprivate AltAndContextConfigEqualityComparator() {\r\n\t\t\t// intentionally empty\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * The hash code is only a function of the {@link ATNState#stateNumber}\r\n\t\t * and {@link ATNConfig#context}.\r\n\t\t */\r\n\t\t@Override\r\n\t\tpublic hashCode(o: ATNConfig): number {\r\n\t\t\tlet hashCode: number = MurmurHash.initialize(7);\r\n\t\t\thashCode = MurmurHash.update(hashCode, o.state.stateNumber);\r\n\t\t\thashCode = MurmurHash.update(hashCode, o.context);\r\n\t\t\thashCode = MurmurHash.finish(hashCode, 2);\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(a: ATNConfig, b: ATNConfig): boolean {\r\n\t\t\tif (a === b) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif (a == null || b == null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn a.state.stateNumber === b.state.stateNumber\r\n\t\t\t\t&& a.context.equals(b.context);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if any configuration in `configs` is in a\r\n\t * {@link RuleStopState}. Configurations meeting this condition have reached\r\n\t * the end of the decision rule (local context) or end of start rule (full\r\n\t * context).\r\n\t *\r\n\t * @param configs the configuration set to test\r\n\t * @returns `true` if any configuration in `configs` is in a\r\n\t * {@link RuleStopState}, otherwise `false`\r\n\t */\r\n\texport function hasConfigInRuleStopState(configs: ATNConfigSet): boolean {\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if all configurations in `configs` are in a\r\n\t * {@link RuleStopState}. Configurations meeting this condition have reached\r\n\t * the end of the decision rule (local context) or end of start rule (full\r\n\t * context).\r\n\t *\r\n\t * @param configs the configuration set to test\r\n\t * @returns `true` if all configurations in `configs` are in a\r\n\t * {@link RuleStopState}, otherwise `false`\r\n\t */\r\n\texport function allConfigsInRuleStopStates(/*@NotNull*/ configs: ATNConfigSet): boolean {\r\n\t\tfor (let config of configs) {\r\n\t\t\tif (!(config.state instanceof RuleStopState)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.3871984-07:00\r\n\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class SimulatorState {\r\n\tpublic outerContext: ParserRuleContext;\r\n\r\n\tpublic s0: DFAState;\r\n\r\n\tpublic useContext: boolean;\r\n\tpublic remainingOuterContext: ParserRuleContext | undefined;\r\n\r\n\tconstructor(outerContext: ParserRuleContext, @NotNull s0: DFAState, useContext: boolean, remainingOuterContext: ParserRuleContext | undefined) {\r\n\t\tthis.outerContext = outerContext != null ? outerContext : ParserRuleContext.emptyContext();\r\n\t\tthis.s0 = s0;\r\n\t\tthis.useContext = useContext;\r\n\t\tthis.remainingOuterContext = remainingOuterContext;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:31.1989835-07:00\r\n\r\nimport { AcceptStateInfo } from \"../dfa/AcceptStateInfo\";\r\nimport { ActionTransition } from \"./ActionTransition\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { Arrays } from \"../misc/Arrays\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { AtomTransition } from \"./AtomTransition\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { ConflictInfo } from \"./ConflictInfo\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { EpsilonTransition } from \"./EpsilonTransition\";\r\nimport { IntegerList } from \"../misc/IntegerList\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { IntStream } from \"../IntStream\";\r\nimport { NotNull, Nullable, Override } from \"../Decorators\";\r\nimport { NotSetTransition } from \"./NotSetTransition\";\r\nimport { NoViableAltException } from \"../NoViableAltException\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\nimport { PrecedencePredicateTransition } from \"./PrecedencePredicateTransition\";\r\nimport { PredicateTransition } from \"./PredicateTransition\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { PredictionMode } from \"./PredictionMode\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { StarLoopEntryState } from \"./StarLoopEntryState\";\r\nimport { Token } from \"../Token\";\r\nimport { TokenStream } from \"../TokenStream\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\nconst MAX_SHORT_VALUE = 0xFFFF;\r\nconst MIN_INTEGER_VALUE = -((1 << 31) >>> 0);\r\n\r\n/**\r\n * The embodiment of the adaptive LL(*), ALL(*), parsing strategy.\r\n *\r\n * The basic complexity of the adaptive strategy makes it harder to understand.\r\n * We begin with ATN simulation to build paths in a DFA. Subsequent prediction\r\n * requests go through the DFA first. If they reach a state without an edge for\r\n * the current symbol, the algorithm fails over to the ATN simulation to\r\n * complete the DFA path for the current input (until it finds a conflict state\r\n * or uniquely predicting state).\r\n *\r\n * All of that is done without using the outer context because we want to create\r\n * a DFA that is not dependent upon the rule invocation stack when we do a\r\n * prediction. One DFA works in all contexts. We avoid using context not\r\n * necessarily because it's slower, although it can be, but because of the DFA\r\n * caching problem. The closure routine only considers the rule invocation stack\r\n * created during prediction beginning in the decision rule. For example, if\r\n * prediction occurs without invoking another rule's ATN, there are no context\r\n * stacks in the configurations. When lack of context leads to a conflict, we\r\n * don't know if it's an ambiguity or a weakness in the strong LL(*) parsing\r\n * strategy (versus full LL(*)).\r\n *\r\n * When SLL yields a configuration set with conflict, we rewind the input and\r\n * retry the ATN simulation, this time using full outer context without adding\r\n * to the DFA. Configuration context stacks will be the full invocation stacks\r\n * from the start rule. If we get a conflict using full context, then we can\r\n * definitively say we have a true ambiguity for that input sequence. If we\r\n * don't get a conflict, it implies that the decision is sensitive to the outer\r\n * context. (It is not context-sensitive in the sense of context-sensitive\r\n * grammars.)\r\n *\r\n * The next time we reach this DFA state with an SLL conflict, through DFA\r\n * simulation, we will again retry the ATN simulation using full context mode.\r\n * This is slow because we can't save the results and have to \"interpret\" the\r\n * ATN each time we get that input.\r\n *\r\n * **CACHING FULL CONTEXT PREDICTIONS**\r\n *\r\n * We could cache results from full context to predicted alternative easily and\r\n * that saves a lot of time but doesn't work in presence of predicates. The set\r\n * of visible predicates from the ATN start state changes depending on the\r\n * context, because closure can fall off the end of a rule. I tried to cache\r\n * tuples (stack context, semantic context, predicted alt) but it was slower\r\n * than interpreting and much more complicated. Also required a huge amount of\r\n * memory. The goal is not to create the world's fastest parser anyway. I'd like\r\n * to keep this algorithm simple. By launching multiple threads, we can improve\r\n * the speed of parsing across a large number of files.\r\n *\r\n * There is no strict ordering between the amount of input used by SLL vs LL,\r\n * which makes it really hard to build a cache for full context. Let's say that\r\n * we have input A B C that leads to an SLL conflict with full context X. That\r\n * implies that using X we might only use A B but we could also use A B C D to\r\n * resolve conflict. Input A B C D could predict alternative 1 in one position\r\n * in the input and A B C E could predict alternative 2 in another position in\r\n * input. The conflicting SLL configurations could still be non-unique in the\r\n * full context prediction, which would lead us to requiring more input than the\r\n * original A B C.\tTo make a\tprediction cache work, we have to track\tthe exact\r\n * input\tused during the previous prediction. That amounts to a cache that maps\r\n * X to a specific DFA for that context.\r\n *\r\n * Something should be done for left-recursive expression predictions. They are\r\n * likely LL(1) + pred eval. Easier to do the whole SLL unless error and retry\r\n * with full LL thing Sam does.\r\n *\r\n * **AVOIDING FULL CONTEXT PREDICTION**\r\n *\r\n * We avoid doing full context retry when the outer context is empty, we did not\r\n * dip into the outer context by falling off the end of the decision state rule,\r\n * or when we force SLL mode.\r\n *\r\n * As an example of the not dip into outer context case, consider as super\r\n * constructor calls versus function calls. One grammar might look like\r\n * this:\r\n *\r\n * ```antlr\r\n * ctorBody\r\n * : '{' superCall? stat* '}'\r\n * ;\r\n * ```\r\n *\r\n * Or, you might see something like\r\n *\r\n * ```antlr\r\n * stat\r\n * : superCall ';'\r\n * | expression ';'\r\n * | ...\r\n * ;\r\n * ```\r\n *\r\n * In both cases I believe that no closure operations will dip into the outer\r\n * context. In the first case ctorBody in the worst case will stop at the '}'.\r\n * In the 2nd case it should stop at the ';'. Both cases should stay within the\r\n * entry rule and not dip into the outer context.\r\n *\r\n * **PREDICATES**\r\n *\r\n * Predicates are always evaluated if present in either SLL or LL both. SLL and\r\n * LL simulation deals with predicates differently. SLL collects predicates as\r\n * it performs closure operations like ANTLR v3 did. It delays predicate\r\n * evaluation until it reaches and accept state. This allows us to cache the SLL\r\n * ATN simulation whereas, if we had evaluated predicates on-the-fly during\r\n * closure, the DFA state configuration sets would be different and we couldn't\r\n * build up a suitable DFA.\r\n *\r\n * When building a DFA accept state during ATN simulation, we evaluate any\r\n * predicates and return the sole semantically valid alternative. If there is\r\n * more than 1 alternative, we report an ambiguity. If there are 0 alternatives,\r\n * we throw an exception. Alternatives without predicates act like they have\r\n * true predicates. The simple way to think about it is to strip away all\r\n * alternatives with false predicates and choose the minimum alternative that\r\n * remains.\r\n *\r\n * When we start in the DFA and reach an accept state that's predicated, we test\r\n * those and return the minimum semantically viable alternative. If no\r\n * alternatives are viable, we throw an exception.\r\n *\r\n * During full LL ATN simulation, closure always evaluates predicates and\r\n * on-the-fly. This is crucial to reducing the configuration set size during\r\n * closure. It hits a landmine when parsing with the Java grammar, for example,\r\n * without this on-the-fly evaluation.\r\n *\r\n * **SHARING DFA**\r\n *\r\n * All instances of the same parser share the same decision DFAs through a\r\n * static field. Each instance gets its own ATN simulator but they share the\r\n * same {@link ATN#decisionToDFA} field. They also share a\r\n * {@link PredictionContextCache} object that makes sure that all\r\n * {@link PredictionContext} objects are shared among the DFA states. This makes\r\n * a big size difference.\r\n *\r\n * **THREAD SAFETY**\r\n *\r\n * The {@link ParserATNSimulator} locks on the {@link ATN#decisionToDFA} field when\r\n * it adds a new DFA object to that array. {@link #addDFAEdge}\r\n * locks on the DFA for the current decision when setting the\r\n * {@link DFAState#edges} field. {@link #addDFAState} locks on\r\n * the DFA for the current decision when looking up a DFA state to see if it\r\n * already exists. We must make sure that all requests to add DFA states that\r\n * are equivalent result in the same shared DFA object. This is because lots of\r\n * threads will be trying to update the DFA at once. The\r\n * {@link #addDFAState} method also locks inside the DFA lock\r\n * but this time on the shared context cache when it rebuilds the\r\n * configurations' {@link PredictionContext} objects using cached\r\n * subgraphs/nodes. No other locking occurs, even during DFA simulation. This is\r\n * safe as long as we can guarantee that all threads referencing\r\n * `s.edge[t]` get the same physical target {@link DFAState}, or\r\n * `undefined`. Once into the DFA, the DFA simulation does not reference the\r\n * {@link DFA#states} map. It follows the {@link DFAState#edges} field to new\r\n * targets. The DFA simulator will either find {@link DFAState#edges} to be\r\n * `undefined`, to be non-`undefined` and `dfa.edges[t]` undefined, or\r\n * `dfa.edges[t]` to be non-undefined. The\r\n * {@link #addDFAEdge} method could be racing to set the field\r\n * but in either case the DFA simulator works; if `undefined`, and requests ATN\r\n * simulation. It could also race trying to get `dfa.edges[t]`, but either\r\n * way it will work because it's not doing a test and set operation.\r\n *\r\n * **Starting with SLL then failing to combined SLL/LL (Two-Stage\r\n * Parsing)**\r\n *\r\n * Sam pointed out that if SLL does not give a syntax error, then there is no\r\n * point in doing full LL, which is slower. We only have to try LL if we get a\r\n * syntax error. For maximum speed, Sam starts the parser set to pure SLL\r\n * mode with the {@link BailErrorStrategy}:\r\n *\r\n * ```\r\n * parser.interpreter.{@link #setPredictionMode setPredictionMode}`(`{@link PredictionMode#SLL}`)`;\r\n * parser.{@link Parser#setErrorHandler setErrorHandler}(new {@link BailErrorStrategy}());\r\n * ```\r\n *\r\n * If it does not get a syntax error, then we're done. If it does get a syntax\r\n * error, we need to retry with the combined SLL/LL strategy.\r\n *\r\n * The reason this works is as follows. If there are no SLL conflicts, then the\r\n * grammar is SLL (at least for that input set). If there is an SLL conflict,\r\n * the full LL analysis must yield a set of viable alternatives which is a\r\n * subset of the alternatives reported by SLL. If the LL set is a singleton,\r\n * then the grammar is LL but not SLL. If the LL set is the same size as the SLL\r\n * set, the decision is SLL. If the LL set has size > 1, then that decision\r\n * is truly ambiguous on the current input. If the LL set is smaller, then the\r\n * SLL conflict resolution might choose an alternative that the full LL would\r\n * rule out as a possibility based upon better context information. If that's\r\n * the case, then the SLL parse will definitely get an error because the full LL\r\n * analysis says it's not viable. If SLL conflict resolution chooses an\r\n * alternative within the LL set, them both SLL and LL would choose the same\r\n * alternative because they both choose the minimum of multiple conflicting\r\n * alternatives.\r\n *\r\n * Let's say we have a set of SLL conflicting alternatives `{1, 2, 3}` and\r\n * a smaller LL set called *s*. If *s* is `{2, 3}`, then SLL\r\n * parsing will get an error because SLL will pursue alternative 1. If\r\n * *s* is `{1, 2}` or `{1, 3}` then both SLL and LL will\r\n * choose the same alternative because alternative one is the minimum of either\r\n * set. If *s* is `{2}` or `{3}` then SLL will get a syntax\r\n * error. If *s* is `{1}` then SLL will succeed.\r\n *\r\n * Of course, if the input is invalid, then we will get an error for sure in\r\n * both SLL and LL parsing. Erroneous input will therefore require 2 passes over\r\n * the input.\r\n */\r\nexport class ParserATNSimulator extends ATNSimulator {\r\n\tpublic static debug: boolean = false;\r\n\tpublic static dfa_debug: boolean = false;\r\n\tpublic static retry_debug: boolean = false;\r\n\r\n\t@NotNull\r\n\tprivate predictionMode: PredictionMode = PredictionMode.LL;\r\n\tpublic force_global_context: boolean = false;\r\n\tpublic always_try_local_context: boolean = true;\r\n\r\n\t/**\r\n\t * Determines whether the DFA is used for full-context predictions. When\r\n\t * `true`, the DFA stores transition information for both full-context\r\n\t * and SLL parsing; otherwise, the DFA only stores SLL transition\r\n\t * information.\r\n\t *\r\n\t * For some grammars, enabling the full-context DFA can result in a\r\n\t * substantial performance improvement. However, this improvement typically\r\n\t * comes at the expense of memory used for storing the cached DFA states,\r\n\t * configuration sets, and prediction contexts.\r\n\t *\r\n\t * The default value is `false`.\r\n\t */\r\n\tpublic enable_global_context_dfa: boolean = false;\r\n\tpublic optimize_unique_closure: boolean = true;\r\n\tpublic optimize_ll1: boolean = true;\r\n\tpublic optimize_tail_calls: boolean = true;\r\n\tpublic tail_call_preserves_sll: boolean = true;\r\n\tpublic treat_sllk1_conflict_as_ambiguity: boolean = false;\r\n\r\n\tprotected _parser: Parser;\r\n\r\n\t/**\r\n\t * When `true`, ambiguous alternatives are reported when they are\r\n\t * encountered within {@link #execATN}. When `false`, these messages\r\n\t * are suppressed. The default is `false`.\r\n\t *\r\n\t * When messages about ambiguous alternatives are not required, setting this\r\n\t * to `false` enables additional internal optimizations which may lose\r\n\t * this information.\r\n\t */\r\n\tpublic reportAmbiguities: boolean = false;\r\n\r\n\t/** By default we do full context-sensitive LL(*) parsing not\r\n\t * Strong LL(*) parsing. If we fail with Strong LL(*) we\r\n\t * try full LL(*). That means we rewind and use context information\r\n\t * when closure operations fall off the end of the rule that\r\n\t * holds the decision were evaluating.\r\n\t */\r\n\tprotected userWantsCtxSensitive: boolean = true;\r\n\r\n\tprivate dfa?: DFA;\r\n\r\n\tconstructor(@NotNull atn: ATN, parser: Parser) {\r\n\t\tsuper(atn);\r\n\t\tthis._parser = parser;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getPredictionMode(): PredictionMode {\r\n\t\treturn this.predictionMode;\r\n\t}\r\n\r\n\tpublic setPredictionMode(@NotNull predictionMode: PredictionMode): void {\r\n\t\tthis.predictionMode = predictionMode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reset(): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined): number;\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext: boolean): number;\r\n\tpublic adaptivePredict(\r\n\t\t@NotNull input: TokenStream,\r\n\t\tdecision: number,\r\n\t\touterContext: ParserRuleContext | undefined,\r\n\t\tuseContext?: boolean): number {\r\n\t\tif (useContext === undefined) {\r\n\t\t\tuseContext = false;\r\n\t\t}\r\n\r\n\t\tlet dfa: DFA = this.atn.decisionToDFA[decision];\r\n\t\tassert(dfa != null);\r\n\t\tif (this.optimize_ll1 && !dfa.isPrecedenceDfa && !dfa.isEmpty) {\r\n\t\t\tlet ll_1: number = input.LA(1);\r\n\t\t\tif (ll_1 >= 0 && ll_1 <= 0xFFFF) {\r\n\t\t\t\tlet key: number = ((decision << 16) >>> 0) + ll_1;\r\n\t\t\t\tlet alt: number | undefined = this.atn.LL1Table.get(key);\r\n\t\t\t\tif (alt != null) {\r\n\t\t\t\t\treturn alt;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dfa = dfa;\r\n\r\n\t\tif (this.force_global_context) {\r\n\t\t\tuseContext = true;\r\n\t\t}\r\n\t\telse if (!this.always_try_local_context) {\r\n\t\t\tuseContext = useContext || dfa.isContextSensitive;\r\n\t\t}\r\n\r\n\t\tthis.userWantsCtxSensitive = useContext || (this.predictionMode !== PredictionMode.SLL && outerContext != null && !this.atn.decisionToState[decision].sll);\r\n\t\tif (outerContext == null) {\r\n\t\t\touterContext = ParserRuleContext.emptyContext();\r\n\t\t}\r\n\r\n\t\tlet state: SimulatorState | undefined;\r\n\t\tif (!dfa.isEmpty) {\r\n\t\t\tstate = this.getStartState(dfa, input, outerContext, useContext);\r\n\t\t}\r\n\r\n\t\tif (state == null) {\r\n\t\t\tif (outerContext == null) {\r\n\t\t\t\touterContext = ParserRuleContext.emptyContext();\r\n\t\t\t}\r\n\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"ATN decision \" + dfa.decision +\r\n\t\t\t\t\t\" exec LA(1)==\" + this.getLookaheadName(input) +\r\n\t\t\t\t\t\", outerContext=\" + outerContext.toString(this._parser));\r\n\t\t\t}\r\n\r\n\t\t\tstate = this.computeStartState(dfa, outerContext, useContext);\r\n\t\t}\r\n\r\n\t\tlet m: number = input.mark();\r\n\t\tlet index: number = input.index;\r\n\t\ttry {\r\n\t\t\tlet alt: number = this.execDFA(dfa, input, index, state);\r\n\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"DFA after predictATN: \" + dfa.toString(this._parser.vocabulary, this._parser.ruleNames));\r\n\t\t\t}\r\n\t\t\treturn alt;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tthis.dfa = undefined;\r\n\t\t\tinput.seek(index);\r\n\t\t\tinput.release(m);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getStartState(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull input: TokenStream,\r\n\t\t@NotNull outerContext: ParserRuleContext,\r\n\t\tuseContext: boolean): SimulatorState | undefined {\r\n\r\n\t\tif (!useContext) {\r\n\t\t\tif (dfa.isPrecedenceDfa) {\r\n\t\t\t\t// the start state for a precedence DFA depends on the current\r\n\t\t\t\t// parser precedence, and is provided by a DFA method.\r\n\t\t\t\tlet state: DFAState | undefined = dfa.getPrecedenceStartState(this._parser.precedence, false);\r\n\t\t\t\tif (state == null) {\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn new SimulatorState(outerContext, state, false, outerContext);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (dfa.s0 == null) {\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn new SimulatorState(outerContext, dfa.s0, false, outerContext);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!this.enable_global_context_dfa) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet remainingContext: ParserRuleContext | undefined = outerContext;\r\n\t\tassert(outerContext != null);\r\n\t\tlet s0: DFAState | undefined;\r\n\t\tif (dfa.isPrecedenceDfa) {\r\n\t\t\ts0 = dfa.getPrecedenceStartState(this._parser.precedence, true);\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts0 = dfa.s0full;\r\n\t\t}\r\n\r\n\t\twhile (remainingContext != null && s0 != null && s0.isContextSensitive) {\r\n\t\t\tremainingContext = this.skipTailCalls(remainingContext);\r\n\t\t\ts0 = s0.getContextTarget(this.getReturnState(remainingContext));\r\n\t\t\tif (remainingContext.isEmpty) {\r\n\t\t\t\tassert(s0 == null || !s0.isContextSensitive);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tremainingContext = remainingContext.parent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s0 == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn new SimulatorState(outerContext, s0, useContext, remainingContext);\r\n\t}\r\n\r\n\tprotected execDFA(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull input: TokenStream, startIndex: number,\r\n\t\t@NotNull state: SimulatorState): number {\r\n\t\tlet outerContext: ParserRuleContext = state.outerContext;\r\n\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\tconsole.log(\"DFA decision \" + dfa.decision +\r\n\t\t\t\t\" exec LA(1)==\" + this.getLookaheadName(input) +\r\n\t\t\t\t\", outerContext=\" + outerContext.toString(this._parser));\r\n\t\t}\r\n\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\tconsole.log(dfa.toString(this._parser.vocabulary, this._parser.ruleNames));\r\n\t\t}\r\n\t\tlet s: DFAState = state.s0;\r\n\r\n\t\tlet t: number = input.LA(1);\r\n\t\tlet remainingOuterContext: ParserRuleContext | undefined = state.remainingOuterContext;\r\n\r\n\t\twhile (true) {\r\n\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\tconsole.log(\"DFA state \" + s.stateNumber + \" LA(1)==\" + this.getLookaheadName(input));\r\n\t\t\t}\r\n\t\t\tif (state.useContext) {\r\n\t\t\t\twhile (s.isContextSymbol(t)) {\r\n\t\t\t\t\tlet next: DFAState | undefined;\r\n\t\t\t\t\tif (remainingOuterContext != null) {\r\n\t\t\t\t\t\tremainingOuterContext = this.skipTailCalls(remainingOuterContext);\r\n\t\t\t\t\t\tnext = s.getContextTarget(this.getReturnState(remainingOuterContext));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (next == null) {\r\n\t\t\t\t\t\t// fail over to ATN\r\n\t\t\t\t\t\tlet initialState: SimulatorState = new SimulatorState(state.outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\t\t\treturn this.execATN(dfa, input, startIndex, initialState);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tassert(remainingOuterContext != null);\r\n\t\t\t\t\tremainingOuterContext = remainingOuterContext.parent;\r\n\t\t\t\t\ts = next;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.isAcceptState(s, state.useContext)) {\r\n\t\t\t\tif (s.predicates != null) {\r\n\t\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\t\tconsole.log(\"accept \" + s);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\t\tconsole.log(\"accept; predict \" + s.prediction + \" in state \" + s.stateNumber);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// keep going unless we're at EOF or state only has one alt number\r\n\t\t\t\t// mentioned in configs; check if something else could match\r\n\t\t\t\t// TODO: don't we always stop? only lexer would keep going\r\n\t\t\t\t// TODO: v3 dfa don't do this.\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// t is not updated if one of these states is reached\r\n\t\t\tassert(!this.isAcceptState(s, state.useContext));\r\n\r\n\t\t\t// if no edge, pop over to ATN interpreter, update DFA and return\r\n\t\t\tlet target: DFAState | undefined = this.getExistingTargetState(s, t);\r\n\t\t\tif (target == null) {\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug && t >= 0) {\r\n\t\t\t\t\tconsole.log(\"no edge for \" + this._parser.vocabulary.getDisplayName(t));\r\n\t\t\t\t}\r\n\t\t\t\tlet alt: number;\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tlet interval: Interval = Interval.of(startIndex, this._parser.inputStream.index);\r\n\t\t\t\t\tconsole.log(\"ATN exec upon \" +\r\n\t\t\t\t\t\tthis._parser.inputStream.getText(interval) +\r\n\t\t\t\t\t\t\" at DFA state \" + s.stateNumber);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet initialState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\talt = this.execATN(dfa, input, startIndex, initialState);\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tconsole.log(\"back from DFA update, alt=\" + alt + \", dfa=\\n\" + dfa.toString(this._parser.vocabulary, this._parser.ruleNames));\r\n\t\t\t\t\t//dump(dfa);\r\n\t\t\t\t}\r\n\t\t\t\t// action already executed\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tconsole.log(\"DFA decision \" + dfa.decision +\r\n\t\t\t\t\t\t\" predicts \" + alt);\r\n\t\t\t\t}\r\n\t\t\t\treturn alt; // we've updated DFA, exec'd action, and have our deepest answer\r\n\t\t\t}\r\n\t\t\telse if (target === ATNSimulator.ERROR) {\r\n\t\t\t\tlet errorState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\treturn this.handleNoViableAlt(input, startIndex, errorState);\r\n\t\t\t}\r\n\t\t\ts = target;\r\n\t\t\tif (!this.isAcceptState(s, state.useContext) && t !== IntStream.EOF) {\r\n\t\t\t\tinput.consume();\r\n\t\t\t\tt = input.LA(1);\r\n\t\t\t}\r\n\t\t}\r\n//\t\tif ( acceptState==null ) {\r\n//\t\t\tif ( debug ) System.out.println(\"!!! no viable alt in dfa\");\r\n//\t\t\treturn -1;\r\n//\t\t}\r\n\r\n\t\tif (!state.useContext && s.configs.conflictInfo != null) {\r\n\t\t\tif (dfa.atnStartState instanceof DecisionState) {\r\n\t\t\t\tif (!this.userWantsCtxSensitive ||\r\n\t\t\t\t\t(!s.configs.dipsIntoOuterContext && s.configs.isExactConflict) ||\r\n\t\t\t\t\t(this.treat_sllk1_conflict_as_ambiguity && input.index === startIndex)) {\r\n\t\t\t\t\t// we don't report the ambiguity again\r\n\t\t\t\t\t//if ( !this.acceptState.configset.hasSemanticContext ) {\r\n\t\t\t\t\t// \tthis.reportAmbiguity(dfa, acceptState, startIndex, input.index, acceptState.configset.conflictingAlts, acceptState.configset);\r\n\t\t\t\t\t//}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tassert(!state.useContext);\r\n\r\n\t\t\t\t\t// Before attempting full context prediction, check to see if there are\r\n\t\t\t\t\t// disambiguating or validating predicates to evaluate which allow an\r\n\t\t\t\t\t// immediate decision\r\n\t\t\t\t\tlet conflictingAlts: BitSet | undefined;\r\n\t\t\t\t\tlet predicates: DFAState.PredPrediction[] | undefined = s.predicates;\r\n\t\t\t\t\tif (predicates != null) {\r\n\t\t\t\t\t\tlet conflictIndex: number = input.index;\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconflictingAlts = this.evalSemanticContext(predicates, outerContext, true);\r\n\t\t\t\t\t\tif (conflictingAlts.cardinality() === 1) {\r\n\t\t\t\t\t\t\treturn conflictingAlts.nextSetBit(0);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\t// restore the index so reporting the fallback to full\r\n\t\t\t\t\t\t\t// context occurs with the index at the correct spot\r\n\t\t\t\t\t\t\tinput.seek(conflictIndex);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (this.reportAmbiguities) {\r\n\t\t\t\t\t\tlet conflictState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\t\t\tthis.reportAttemptingFullContext(dfa, conflictingAlts, conflictState, startIndex, input.index);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\treturn this.adaptivePredict(input, dfa.decision, outerContext, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Before jumping to prediction, check to see if there are\r\n\t\t// disambiguating or validating predicates to evaluate\r\n\t\tlet predicates: DFAState.PredPrediction[] | undefined = s.predicates;\r\n\t\tif (predicates != null) {\r\n\t\t\tlet stopIndex: number = input.index;\r\n\t\t\tif (startIndex !== stopIndex) {\r\n\t\t\t\tinput.seek(startIndex);\r\n\t\t\t}\r\n\r\n\t\t\tlet alts: BitSet = this.evalSemanticContext(predicates, outerContext, this.reportAmbiguities && this.predictionMode === PredictionMode.LL_EXACT_AMBIG_DETECTION);\r\n\t\t\tswitch (alts.cardinality()) {\r\n\t\t\tcase 0:\r\n\t\t\t\tthrow this.noViableAlt(input, outerContext, s.configs, startIndex);\r\n\r\n\t\t\tcase 1:\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t// report ambiguity after predicate evaluation to make sure the correct\r\n\t\t\t\t// set of ambig alts is reported.\r\n\t\t\t\tif (startIndex !== stopIndex) {\r\n\t\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.reportAmbiguity(dfa, s, startIndex, stopIndex, s.configs.isExactConflict, alts, s.configs);\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\tconsole.log(\"DFA decision \" + dfa.decision +\r\n\t\t\t\t\" predicts \" + s.prediction);\r\n\t\t}\r\n\t\treturn s.prediction;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines if a particular DFA state should be treated as an accept state\r\n\t * for the current prediction mode. In addition to the `useContext`\r\n\t * parameter, the {@link #getPredictionMode()} method provides the\r\n\t * prediction mode controlling the prediction algorithm as a whole.\r\n\t *\r\n\t * The default implementation simply returns the value of\r\n\t * `DFAState.isAcceptState` except for conflict states when\r\n\t * `useContext` is `true` and {@link #getPredictionMode()} is\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}. In that case, only\r\n\t * conflict states where {@link ATNConfigSet#isExactConflict} is\r\n\t * `true` are considered accept states.\r\n\t *\r\n\t * @param state The DFA state to check.\r\n\t * @param useContext `true` if the prediction algorithm is currently\r\n\t * considering the full parser context; otherwise, `false` if the\r\n\t * algorithm is currently performing a local context prediction.\r\n\t *\r\n\t * @returns `true` if the specified `state` is an accept state;\r\n\t * otherwise, `false`.\r\n\t */\r\n\tprotected isAcceptState(state: DFAState, useContext: boolean): boolean {\r\n\t\tif (!state.isAcceptState) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (state.configs.conflictingAlts == null) {\r\n\t\t\t// unambiguous\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// More picky when we need exact conflicts\r\n\t\tif (useContext && this.predictionMode === PredictionMode.LL_EXACT_AMBIG_DETECTION) {\r\n\t\t\treturn state.configs.isExactConflict;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/** Performs ATN simulation to compute a predicted alternative based\r\n\t * upon the remaining input, but also updates the DFA cache to avoid\r\n\t * having to traverse the ATN again for the same input sequence.\r\n\t *\r\n\t * There are some key conditions we're looking for after computing a new\r\n\t * set of ATN configs (proposed DFA state):\r\n\t *\r\n\t * * if the set is empty, there is no viable alternative for current symbol\r\n\t * * does the state uniquely predict an alternative?\r\n\t * * does the state have a conflict that would prevent us from\r\n\t * putting it on the work list?\r\n\t * * if in non-greedy decision is there a config at a rule stop state?\r\n\t *\r\n\t * We also have some key operations to do:\r\n\t *\r\n\t * * add an edge from previous DFA state to potentially new DFA state, D,\r\n\t * upon current symbol but only if adding to work list, which means in all\r\n\t * cases except no viable alternative (and possibly non-greedy decisions?)\r\n\t * * collecting predicates and adding semantic context to DFA accept states\r\n\t * * adding rule context to context-sensitive DFA accept states\r\n\t * * consuming an input symbol\r\n\t * * reporting a conflict\r\n\t * * reporting an ambiguity\r\n\t * * reporting a context sensitivity\r\n\t * * reporting insufficient predicates\r\n\t *\r\n\t * We should isolate those operations, which are side-effecting, to the\r\n\t * main work loop. We can isolate lots of code into other functions, but\r\n\t * they should be side effect free. They can return package that\r\n\t * indicates whether we should report something, whether we need to add a\r\n\t * DFA edge, whether we need to augment accept state with semantic\r\n\t * context or rule invocation context. Actually, it seems like we always\r\n\t * add predicates if they exist, so that can simply be done in the main\r\n\t * loop for any accept state creation or modification request.\r\n\t *\r\n\t * cover these cases:\r\n\t * dead end\r\n\t * single alt\r\n\t * single alt + preds\r\n\t * conflict\r\n\t * conflict + preds\r\n\t *\r\n\t * TODO: greedy + those\r\n\t */\r\n\tprotected execATN(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull input: TokenStream, startIndex: number,\r\n\t\t@NotNull initialState: SimulatorState): number {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"execATN decision \" + dfa.decision + \" exec LA(1)==\" + this.getLookaheadName(input));\r\n\t\t}\r\n\r\n\t\tlet outerContext: ParserRuleContext = initialState.outerContext;\r\n\t\tlet useContext: boolean = initialState.useContext;\r\n\r\n\t\tlet t: number = input.LA(1);\r\n\r\n\t\tlet previous: SimulatorState = initialState;\r\n\r\n\t\tlet contextCache: PredictionContextCache = new PredictionContextCache();\r\n\t\twhile (true) { // while more work\r\n\t\t\tlet nextState: SimulatorState | undefined = this.computeReachSet(dfa, previous, t, contextCache);\r\n\t\t\tif (nextState == null) {\r\n\t\t\t\tthis.setDFAEdge(previous.s0, input.LA(1), ATNSimulator.ERROR);\r\n\t\t\t\treturn this.handleNoViableAlt(input, startIndex, previous);\r\n\t\t\t}\r\n\r\n\t\t\tlet D: DFAState = nextState.s0;\r\n\r\n\t\t\t// predicted alt => accept state\r\n\t\t\tassert(D.isAcceptState || D.prediction === ATN.INVALID_ALT_NUMBER);\r\n\t\t\t// conflicted => accept state\r\n\t\t\tassert(D.isAcceptState || D.configs.conflictInfo == null);\r\n\r\n\t\t\tif (this.isAcceptState(D, useContext)) {\r\n\t\t\t\tlet conflictingAlts: BitSet | undefined = D.configs.conflictingAlts;\r\n\t\t\t\tlet predictedAlt: number = conflictingAlts == null ? D.prediction : ATN.INVALID_ALT_NUMBER;\r\n\t\t\t\tif (predictedAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\t\tif (this.optimize_ll1\r\n\t\t\t\t\t\t&& input.index === startIndex\r\n\t\t\t\t\t\t&& !dfa.isPrecedenceDfa\r\n\t\t\t\t\t\t&& nextState.outerContext === nextState.remainingOuterContext\r\n\t\t\t\t\t\t&& dfa.decision >= 0\r\n\t\t\t\t\t\t&& !D.configs.hasSemanticContext) {\r\n\t\t\t\t\t\tif (t >= 0 && t <= MAX_SHORT_VALUE) {\r\n\t\t\t\t\t\t\tlet key: number = ((dfa.decision << 16) >>> 0) + t;\r\n\t\t\t\t\t\t\tthis.atn.LL1Table.set(key, predictedAlt);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (useContext && this.always_try_local_context) {\r\n\t\t\t\t\t\tthis.reportContextSensitivity(dfa, predictedAlt, nextState, startIndex, input.index);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpredictedAlt = D.prediction;\r\n//\t\t\t\tint k = input.index - startIndex + 1; // how much input we used\r\n//\t\t\t\tSystem.out.println(\"used k=\"+k);\r\n\t\t\t\tlet attemptFullContext: boolean = conflictingAlts != null && this.userWantsCtxSensitive;\r\n\t\t\t\tif (attemptFullContext) {\r\n\t\t\t\t\t// Only exact conflicts are known to be ambiguous when local\r\n\t\t\t\t\t// prediction does not step out of the decision rule.\r\n\t\t\t\t\tattemptFullContext = !useContext\r\n\t\t\t\t\t\t&& (D.configs.dipsIntoOuterContext || !D.configs.isExactConflict)\r\n\t\t\t\t\t\t&& (!this.treat_sllk1_conflict_as_ambiguity || input.index !== startIndex);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (D.configs.hasSemanticContext) {\r\n\t\t\t\t\tlet predPredictions: DFAState.PredPrediction[] | undefined = D.predicates;\r\n\t\t\t\t\tif (predPredictions != null) {\r\n\t\t\t\t\t\tlet conflictIndex: number = input.index;\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// use complete evaluation here if we'll want to retry with full context if still ambiguous\r\n\t\t\t\t\t\tconflictingAlts = this.evalSemanticContext(predPredictions, outerContext, attemptFullContext || this.reportAmbiguities);\r\n\t\t\t\t\t\tswitch (conflictingAlts.cardinality()) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\tthrow this.noViableAlt(input, outerContext, D.configs, startIndex);\r\n\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn conflictingAlts.nextSetBit(0);\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\t// restore the index so reporting the fallback to full\r\n\t\t\t\t\t\t\t// context occurs with the index at the correct spot\r\n\t\t\t\t\t\t\tinput.seek(conflictIndex);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!attemptFullContext) {\r\n\t\t\t\t\tif (conflictingAlts != null) {\r\n\t\t\t\t\t\tif (this.reportAmbiguities && conflictingAlts.cardinality() > 1) {\r\n\t\t\t\t\t\t\tthis.reportAmbiguity(dfa, D, startIndex, input.index, D.configs.isExactConflict, conflictingAlts, D.configs);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpredictedAlt = conflictingAlts.nextSetBit(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn predictedAlt;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tassert(!useContext);\r\n\t\t\t\t\tassert(this.isAcceptState(D, false));\r\n\r\n\t\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\t\tconsole.log(\"RETRY with outerContext=\" + outerContext);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet fullContextState: SimulatorState = this.computeStartState(dfa, outerContext, true);\r\n\t\t\t\t\tif (this.reportAmbiguities) {\r\n\t\t\t\t\t\tthis.reportAttemptingFullContext(dfa, conflictingAlts, nextState, startIndex, input.index);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\treturn this.execATN(dfa, input, startIndex, fullContextState);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tprevious = nextState;\r\n\r\n\t\t\tif (t !== IntStream.EOF) {\r\n\t\t\t\tinput.consume();\r\n\t\t\t\tt = input.LA(1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This method is used to improve the localization of error messages by\r\n\t * choosing an alternative rather than throwing a\r\n\t * {@link NoViableAltException} in particular prediction scenarios where the\r\n\t * {@link #ERROR} state was reached during ATN simulation.\r\n\t *\r\n\t * The default implementation of this method uses the following\r\n\t * algorithm to identify an ATN configuration which successfully parsed the\r\n\t * decision entry rule. Choosing such an alternative ensures that the\r\n\t * {@link ParserRuleContext} returned by the calling rule will be complete\r\n\t * and valid, and the syntax error will be reported later at a more\r\n\t * localized location.\r\n\t *\r\n\t * * If no configuration in `configs` reached the end of the\r\n\t * decision rule, return {@link ATN#INVALID_ALT_NUMBER}.\r\n\t * * If all configurations in `configs` which reached the end of the\r\n\t * decision rule predict the same alternative, return that alternative.\r\n\t * * If the configurations in `configs` which reached the end of the\r\n\t * decision rule predict multiple alternatives (call this *S*),\r\n\t * choose an alternative in the following order.\r\n\t *\r\n\t * 1. Filter the configurations in `configs` to only those\r\n\t * configurations which remain viable after evaluating semantic predicates.\r\n\t * If the set of these filtered configurations which also reached the end of\r\n\t * the decision rule is not empty, return the minimum alternative\r\n\t * represented in this set.\r\n\t * 1. Otherwise, choose the minimum alternative in *S*.\r\n\t *\r\n\t * In some scenarios, the algorithm described above could predict an\r\n\t * alternative which will result in a {@link FailedPredicateException} in\r\n\t * parser. Specifically, this could occur if the *only* configuration\r\n\t * capable of successfully parsing to the end of the decision rule is\r\n\t * blocked by a semantic predicate. By choosing this alternative within\r\n\t * {@link #adaptivePredict} instead of throwing a\r\n\t * {@link NoViableAltException}, the resulting\r\n\t * {@link FailedPredicateException} in the parser will identify the specific\r\n\t * predicate which is preventing the parser from successfully parsing the\r\n\t * decision rule, which helps developers identify and correct logic errors\r\n\t * in semantic predicates.\r\n\t *\r\n\t * @param input The input {@link TokenStream}\r\n\t * @param startIndex The start index for the current prediction, which is\r\n\t * the input index where any semantic context in `configs` should be\r\n\t * evaluated\r\n\t * @param previous The ATN simulation state immediately before the\r\n\t * {@link #ERROR} state was reached\r\n\t *\r\n\t * @returns The value to return from {@link #adaptivePredict}, or\r\n\t * {@link ATN#INVALID_ALT_NUMBER} if a suitable alternative was not\r\n\t * identified and {@link #adaptivePredict} should report an error instead.\r\n\t */\r\n\tprotected handleNoViableAlt(@NotNull input: TokenStream, startIndex: number, @NotNull previous: SimulatorState): number {\r\n\t\tif (previous.s0 != null) {\r\n\t\t\tlet alts: BitSet = new BitSet();\r\n\t\t\tlet maxAlt: number = 0;\r\n\t\t\tfor (let config of previous.s0.configs) {\r\n\t\t\t\tif (config.reachesIntoOuterContext || config.state instanceof RuleStopState) {\r\n\t\t\t\t\talts.set(config.alt);\r\n\t\t\t\t\tmaxAlt = Math.max(maxAlt, config.alt);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tswitch (alts.cardinality()) {\r\n\t\t\tcase 0:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 1:\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif (!previous.s0.configs.hasSemanticContext) {\r\n\t\t\t\t\t// configs doesn't contain any predicates, so the predicate\r\n\t\t\t\t\t// filtering code below would be pointless\r\n\t\t\t\t\treturn alts.nextSetBit(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Try to find a configuration set that not only dipped into the outer\r\n\t\t\t\t * context, but also isn't eliminated by a predicate.\r\n\t\t\t\t */\r\n\t\t\t\tlet filteredConfigs: ATNConfigSet = new ATNConfigSet();\r\n\t\t\t\tfor (let config of previous.s0.configs) {\r\n\t\t\t\t\tif (config.reachesIntoOuterContext || config.state instanceof RuleStopState) {\r\n\t\t\t\t\t\tfilteredConfigs.add(config);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* The following code blocks are adapted from predicateDFAState with\r\n\t\t\t\t * the following key changes.\r\n\t\t\t\t *\r\n\t\t\t\t * 1. The code operates on an ATNConfigSet rather than a DFAState.\r\n\t\t\t\t * 2. Predicates are collected for all alternatives represented in\r\n\t\t\t\t * filteredConfigs, rather than restricting the evaluation to\r\n\t\t\t\t * conflicting and/or unique configurations.\r\n\t\t\t\t */\r\n\t\t\t\tlet altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(alts, filteredConfigs, maxAlt);\r\n\t\t\t\tif (altToPred != null) {\r\n\t\t\t\t\tlet predicates: DFAState.PredPrediction[] | undefined = this.getPredicatePredictions(alts, altToPred);\r\n\t\t\t\t\tif (predicates != null) {\r\n\t\t\t\t\t\tlet stopIndex: number = input.index;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\t\t\tlet filteredAlts: BitSet = this.evalSemanticContext(predicates, previous.outerContext, false);\r\n\t\t\t\t\t\t\tif (!filteredAlts.isEmpty) {\r\n\t\t\t\t\t\t\t\treturn filteredAlts.nextSetBit(0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfinally {\r\n\t\t\t\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthrow this.noViableAlt(input, previous.outerContext, previous.s0.configs, startIndex);\r\n\t}\r\n\r\n\tprotected computeReachSet(dfa: DFA, previous: SimulatorState, t: number, contextCache: PredictionContextCache): SimulatorState | undefined {\r\n\t\tlet useContext: boolean = previous.useContext;\r\n\t\tlet remainingGlobalContext: ParserRuleContext | undefined = previous.remainingOuterContext;\r\n\r\n\t\tlet s: DFAState = previous.s0;\r\n\t\tif (useContext) {\r\n\t\t\twhile (s.isContextSymbol(t)) {\r\n\t\t\t\tlet next: DFAState | undefined;\r\n\t\t\t\tif (remainingGlobalContext != null) {\r\n\t\t\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\t\t\tnext = s.getContextTarget(this.getReturnState(remainingGlobalContext));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (next == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tassert(remainingGlobalContext != null);\r\n\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\ts = next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tassert(!this.isAcceptState(s, useContext));\r\n\t\tif (this.isAcceptState(s, useContext)) {\r\n\t\t\treturn new SimulatorState(previous.outerContext, s, useContext, remainingGlobalContext);\r\n\t\t}\r\n\r\n\t\tlet s0: DFAState = s;\r\n\r\n\t\tlet target: DFAState | undefined = this.getExistingTargetState(s0, t);\r\n\t\tif (target == null) {\r\n\t\t\tlet result: [DFAState, ParserRuleContext | undefined] = this.computeTargetState(dfa, s0, remainingGlobalContext, t, useContext, contextCache);\r\n\t\t\ttarget = result[0];\r\n\t\t\tremainingGlobalContext = result[1];\r\n\t\t}\r\n\r\n\t\tif (target === ATNSimulator.ERROR) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tassert(!useContext || !target.configs.dipsIntoOuterContext);\r\n\t\treturn new SimulatorState(previous.outerContext, target, useContext, remainingGlobalContext);\r\n\t}\r\n\r\n\t/**\r\n\t * Get an existing target state for an edge in the DFA. If the target state\r\n\t * for the edge has not yet been computed or is otherwise not available,\r\n\t * this method returns `undefined`.\r\n\t *\r\n\t * @param s The current DFA state\r\n\t * @param t The next input symbol\r\n\t * @returns The existing target DFA state for the given input symbol\r\n\t * `t`, or `undefined` if the target state for this edge is not\r\n\t * already cached\r\n\t */\r\n\tprotected getExistingTargetState(@NotNull s: DFAState, t: number): DFAState | undefined {\r\n\t\treturn s.getTarget(t);\r\n\t}\r\n\r\n\t/**\r\n\t * Compute a target state for an edge in the DFA, and attempt to add the\r\n\t * computed state and corresponding edge to the DFA.\r\n\t *\r\n\t * @param dfa\r\n\t * @param s The current DFA state\r\n\t * @param remainingGlobalContext\r\n\t * @param t The next input symbol\r\n\t * @param useContext\r\n\t * @param contextCache\r\n\t *\r\n\t * @returns The computed target DFA state for the given input symbol\r\n\t * `t`. If `t` does not lead to a valid DFA state, this method\r\n\t * returns {@link #ERROR}.\r\n\t */\r\n\t@NotNull\r\n\tprotected computeTargetState(@NotNull dfa: DFA, @NotNull s: DFAState, remainingGlobalContext: ParserRuleContext | undefined, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] {\r\n\t\tlet closureConfigs: ATNConfig[] = s.configs.toArray();\r\n\t\tlet contextElements: IntegerList | undefined;\r\n\t\tlet reach: ATNConfigSet = new ATNConfigSet();\r\n\t\tlet stepIntoGlobal: boolean;\r\n\t\tdo {\r\n\t\t\tlet hasMoreContext: boolean = !useContext || remainingGlobalContext != null;\r\n\t\t\tif (!hasMoreContext) {\r\n\t\t\t\treach.isOutermostConfigSet = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet reachIntermediate: ATNConfigSet = new ATNConfigSet();\r\n\r\n\t\t\t/* Configurations already in a rule stop state indicate reaching the end\r\n\t\t\t * of the decision rule (local context) or end of the start rule (full\r\n\t\t\t * context). Once reached, these configurations are never updated by a\r\n\t\t\t * closure operation, so they are handled separately for the performance\r\n\t\t\t * advantage of having a smaller intermediate set when calling closure.\r\n\t\t\t *\r\n\t\t\t * For full-context reach operations, separate handling is required to\r\n\t\t\t * ensure that the alternative matching the longest overall sequence is\r\n\t\t\t * chosen when multiple such configurations can match the input.\r\n\t\t\t */\r\n\t\t\tlet skippedStopStates: ATNConfig[] | undefined;\r\n\r\n\t\t\tfor (let c of closureConfigs) {\r\n\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\tconsole.log(\"testing \" + this.getTokenName(t) + \" at \" + c.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\t\tassert(c.context.isEmpty);\r\n\t\t\t\t\tif (useContext && !c.reachesIntoOuterContext || t === IntStream.EOF) {\r\n\t\t\t\t\t\tif (skippedStopStates == null) {\r\n\t\t\t\t\t\t\tskippedStopStates = [];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tskippedStopStates.push(c);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet n: number = c.state.numberOfOptimizedTransitions;\r\n\t\t\t\tfor (let ti = 0; ti < n; ti++) { // for each optimized transition\r\n\t\t\t\t\tlet trans: Transition = c.state.getOptimizedTransition(ti);\r\n\t\t\t\t\tlet target: ATNState | undefined = this.getReachableTarget(c, trans, t);\r\n\t\t\t\t\tif (target != null) {\r\n\t\t\t\t\t\treachIntermediate.add(c.transform(target, false), contextCache);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* This block optimizes the reach operation for intermediate sets which\r\n\t\t\t * trivially indicate a termination state for the overall\r\n\t\t\t * adaptivePredict operation.\r\n\t\t\t *\r\n\t\t\t * The conditions assume that intermediate\r\n\t\t\t * contains all configurations relevant to the reach set, but this\r\n\t\t\t * condition is not true when one or more configurations have been\r\n\t\t\t * withheld in skippedStopStates, or when the current symbol is EOF.\r\n\t\t\t */\r\n\t\t\tif (this.optimize_unique_closure && skippedStopStates == null && t !== Token.EOF && reachIntermediate.uniqueAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\treachIntermediate.isOutermostConfigSet = reach.isOutermostConfigSet;\r\n\t\t\t\treach = reachIntermediate;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t/* If the reach set could not be trivially determined, perform a closure\r\n\t\t\t * operation on the intermediate set to compute its initial value.\r\n\t\t\t */\r\n\t\t\tlet collectPredicates: boolean = false;\r\n\t\t\tlet treatEofAsEpsilon: boolean = t === Token.EOF;\r\n\t\t\tthis.closure(reachIntermediate, reach, collectPredicates, hasMoreContext, contextCache, treatEofAsEpsilon);\r\n\t\t\tstepIntoGlobal = reach.dipsIntoOuterContext;\r\n\r\n\t\t\tif (t === IntStream.EOF) {\r\n\t\t\t\t/* After consuming EOF no additional input is possible, so we are\r\n\t\t\t\t * only interested in configurations which reached the end of the\r\n\t\t\t\t * decision rule (local context) or end of the start rule (full\r\n\t\t\t\t * context). Update reach to contain only these configurations. This\r\n\t\t\t\t * handles both explicit EOF transitions in the grammar and implicit\r\n\t\t\t\t * EOF transitions following the end of the decision or start rule.\r\n\t\t\t\t *\r\n\t\t\t\t * This is handled before the configurations in skippedStopStates,\r\n\t\t\t\t * because any configurations potentially added from that list are\r\n\t\t\t\t * already guaranteed to meet this condition whether or not it's\r\n\t\t\t\t * required.\r\n\t\t\t\t */\r\n\t\t\t\treach = this.removeAllConfigsNotInRuleStopState(reach, contextCache);\r\n\t\t\t}\r\n\r\n\t\t\t/* If skippedStopStates is not undefined, then it contains at least one\r\n\t\t\t * configuration. For full-context reach operations, these\r\n\t\t\t * configurations reached the end of the start rule, in which case we\r\n\t\t\t * only add them back to reach if no configuration during the current\r\n\t\t\t * closure operation reached such a state. This ensures adaptivePredict\r\n\t\t\t * chooses an alternative matching the longest overall sequence when\r\n\t\t\t * multiple alternatives are viable.\r\n\t\t\t */\r\n\t\t\tif (skippedStopStates != null && (!useContext || !PredictionMode.hasConfigInRuleStopState(reach))) {\r\n\t\t\t\tassert(skippedStopStates.length > 0);\r\n\t\t\t\tfor (let c of skippedStopStates) {\r\n\t\t\t\t\treach.add(c, contextCache);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (useContext && stepIntoGlobal) {\r\n\t\t\t\treach.clear();\r\n\r\n\t\t\t\t// We know remainingGlobalContext is not undefined at this point (why?)\r\n\t\t\t\tremainingGlobalContext = remainingGlobalContext as ParserRuleContext;\r\n\r\n\t\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\t\tlet nextContextElement: number = this.getReturnState(remainingGlobalContext);\r\n\t\t\t\tif (contextElements == null) {\r\n\t\t\t\t\tcontextElements = new IntegerList();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontextElements.add(nextContextElement);\r\n\t\t\t\tif (nextContextElement !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tfor (let i = 0; i < closureConfigs.length; i++) {\r\n\t\t\t\t\t\tclosureConfigs[i] = closureConfigs[i].appendContext(nextContextElement, contextCache);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (useContext && stepIntoGlobal);\r\n\r\n\t\tif (reach.isEmpty) {\r\n\t\t\tthis.setDFAEdge(s, t, ATNSimulator.ERROR);\r\n\t\t\treturn [ATNSimulator.ERROR, remainingGlobalContext];\r\n\t\t}\r\n\r\n\t\tlet result: DFAState = this.addDFAEdge(dfa, s, t, contextElements, reach, contextCache);\r\n\t\treturn [result, remainingGlobalContext];\r\n\t}\r\n\r\n\t/**\r\n\t * Return a configuration set containing only the configurations from\r\n\t * `configs` which are in a {@link RuleStopState}. If all\r\n\t * configurations in `configs` are already in a rule stop state, this\r\n\t * method simply returns `configs`.\r\n\t *\r\n\t * @param configs the configuration set to update\r\n\t * @param contextCache the {@link PredictionContext} cache\r\n\t *\r\n\t * @returns `configs` if all configurations in `configs` are in a\r\n\t * rule stop state, otherwise return a new configuration set containing only\r\n\t * the configurations from `configs` which are in a rule stop state\r\n\t */\r\n\t@NotNull\r\n\tprotected removeAllConfigsNotInRuleStopState(@NotNull configs: ATNConfigSet, contextCache: PredictionContextCache): ATNConfigSet {\r\n\t\tif (PredictionMode.allConfigsInRuleStopStates(configs)) {\r\n\t\t\treturn configs;\r\n\t\t}\r\n\r\n\t\tlet result: ATNConfigSet = new ATNConfigSet();\r\n\t\tfor (let config of configs) {\r\n\t\t\tif (!(config.state instanceof RuleStopState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tresult.add(config, contextCache);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected computeStartState(\r\n\t\tdfa: DFA,\r\n\t\tglobalContext: ParserRuleContext,\r\n\t\tuseContext: boolean): SimulatorState {\r\n\t\tlet s0: DFAState | undefined =\r\n\t\t\tdfa.isPrecedenceDfa ? dfa.getPrecedenceStartState(this._parser.precedence, useContext) :\r\n\t\t\t\tuseContext ? dfa.s0full :\r\n\t\t\t\t\tdfa.s0;\r\n\r\n\t\tif (s0 != null) {\r\n\t\t\tif (!useContext) {\r\n\t\t\t\treturn new SimulatorState(globalContext, s0, useContext, globalContext);\r\n\t\t\t}\r\n\r\n\t\t\ts0.setContextSensitive(this.atn);\r\n\t\t}\r\n\r\n\t\tlet decision: number = dfa.decision;\r\n\t\t// @NotNull\r\n\t\tlet p: ATNState = dfa.atnStartState;\r\n\r\n\t\tlet previousContext: number = 0;\r\n\t\tlet remainingGlobalContext: ParserRuleContext | undefined = globalContext;\r\n\t\tlet initialContext: PredictionContext = useContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL; // always at least the implicit call to start rule\r\n\t\tlet contextCache: PredictionContextCache = new PredictionContextCache();\r\n\t\tif (useContext) {\r\n\t\t\tif (!this.enable_global_context_dfa) {\r\n\t\t\t\twhile (remainingGlobalContext != null) {\r\n\t\t\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\t\t\tpreviousContext = PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpreviousContext = this.getReturnState(remainingGlobalContext);\r\n\t\t\t\t\t\tinitialContext = initialContext.appendSingleContext(previousContext, contextCache);\r\n\t\t\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\twhile (s0 != null && s0.isContextSensitive && remainingGlobalContext != null) {\r\n\t\t\t\tlet next: DFAState | undefined;\r\n\t\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\t\tnext = s0.getContextTarget(PredictionContext.EMPTY_FULL_STATE_KEY);\r\n\t\t\t\t\tpreviousContext = PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpreviousContext = this.getReturnState(remainingGlobalContext);\r\n\t\t\t\t\tnext = s0.getContextTarget(previousContext);\r\n\t\t\t\t\tinitialContext = initialContext.appendSingleContext(previousContext, contextCache);\r\n\t\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (next == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ts0 = next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s0 != null && !s0.isContextSensitive) {\r\n\t\t\treturn new SimulatorState(globalContext, s0, useContext, remainingGlobalContext);\r\n\t\t}\r\n\r\n\t\tlet configs: ATNConfigSet = new ATNConfigSet();\r\n\t\twhile (true) {\r\n\t\t\tlet reachIntermediate: ATNConfigSet = new ATNConfigSet();\r\n\t\t\tlet n: number = p.numberOfTransitions;\r\n\t\t\tfor (let ti = 0; ti < n; ti++) {\r\n\t\t\t\t// for each transition\r\n\t\t\t\tlet target: ATNState = p.transition(ti).target;\r\n\t\t\t\treachIntermediate.add(ATNConfig.create(target, ti + 1, initialContext));\r\n\t\t\t}\r\n\r\n\t\t\tlet hasMoreContext: boolean = remainingGlobalContext != null;\r\n\t\t\tif (!hasMoreContext) {\r\n\t\t\t\tconfigs.isOutermostConfigSet = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet collectPredicates: boolean = true;\r\n\t\t\tthis.closure(reachIntermediate, configs, collectPredicates, hasMoreContext, contextCache, false);\r\n\t\t\tlet stepIntoGlobal: boolean = configs.dipsIntoOuterContext;\r\n\r\n\t\t\tlet next: DFAState;\r\n\t\t\tif (useContext && !this.enable_global_context_dfa) {\r\n\t\t\t\ts0 = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse if (s0 == null) {\r\n\t\t\t\tif (!dfa.isPrecedenceDfa) {\r\n\t\t\t\t\tnext = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\t\tif (useContext) {\r\n\t\t\t\t\t\tif (!dfa.s0full) {\r\n\t\t\t\t\t\t\tdfa.s0full = next;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnext = dfa.s0full;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (!dfa.s0) {\r\n\t\t\t\t\t\t\tdfa.s0 = next;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnext = dfa.s0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t/* If this is a precedence DFA, we use applyPrecedenceFilter\r\n\t\t\t\t\t * to convert the computed start state to a precedence start\r\n\t\t\t\t\t * state. We then use DFA.setPrecedenceStartState to set the\r\n\t\t\t\t\t * appropriate start state for the precedence level rather\r\n\t\t\t\t\t * than simply setting DFA.s0.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tconfigs = this.applyPrecedenceFilter(configs, globalContext, contextCache);\r\n\t\t\t\t\tnext = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\t\tdfa.setPrecedenceStartState(this._parser.precedence, useContext, next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (dfa.isPrecedenceDfa) {\r\n\t\t\t\t\tconfigs = this.applyPrecedenceFilter(configs, globalContext, contextCache);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\ts0.setContextTarget(previousContext, next);\r\n\t\t\t}\r\n\r\n\t\t\ts0 = next;\r\n\r\n\t\t\tif (!useContext || !stepIntoGlobal) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// TODO: make sure it distinguishes empty stack states\r\n\t\t\tnext.setContextSensitive(this.atn);\r\n\r\n\t\t\t// We know remainingGlobalContext is not undefined at this point (why?)\r\n\t\t\tremainingGlobalContext = remainingGlobalContext as ParserRuleContext;\r\n\r\n\t\t\tconfigs.clear();\r\n\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\tlet nextContextElement: number = this.getReturnState(remainingGlobalContext);\r\n\r\n\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t} else {\r\n\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t}\r\n\r\n\t\t\tif (nextContextElement !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\tinitialContext = initialContext.appendSingleContext(nextContextElement, contextCache);\r\n\t\t\t}\r\n\r\n\t\t\tpreviousContext = nextContextElement;\r\n\t\t}\r\n\r\n\t\treturn new SimulatorState(globalContext, s0, useContext, remainingGlobalContext);\r\n\t}\r\n\r\n\t/**\r\n\t * This method transforms the start state computed by\r\n\t * {@link #computeStartState} to the special start state used by a\r\n\t * precedence DFA for a particular precedence value. The transformation\r\n\t * process applies the following changes to the start state's configuration\r\n\t * set.\r\n\t *\r\n\t * 1. Evaluate the precedence predicates for each configuration using\r\n\t * {@link SemanticContext#evalPrecedence}.\r\n\t * 1. When {@link ATNConfig#isPrecedenceFilterSuppressed} is `false`,\r\n\t * remove all configurations which predict an alternative greater than 1,\r\n\t * for which another configuration that predicts alternative 1 is in the\r\n\t * same ATN state with the same prediction context. This transformation is\r\n\t * valid for the following reasons:\r\n\t *\r\n\t * * The closure block cannot contain any epsilon transitions which bypass\r\n\t * the body of the closure, so all states reachable via alternative 1 are\r\n\t * part of the precedence alternatives of the transformed left-recursive\r\n\t * rule.\r\n\t * * The \"primary\" portion of a left recursive rule cannot contain an\r\n\t * epsilon transition, so the only way an alternative other than 1 can exist\r\n\t * in a state that is also reachable via alternative 1 is by nesting calls\r\n\t * to the left-recursive rule, with the outer calls not being at the\r\n\t * preferred precedence level. The\r\n\t * {@link ATNConfig#isPrecedenceFilterSuppressed} property marks ATN\r\n\t * configurations which do not meet this condition, and therefore are not\r\n\t * eligible for elimination during the filtering process.\r\n\t *\r\n\t * The prediction context must be considered by this filter to address\r\n\t * situations like the following.\r\n\t *\r\n\t * ```antlr\r\n\t * grammar TA;\r\n\t * prog: statement* EOF;\r\n\t * statement: letterA | statement letterA 'b' ;\r\n\t * letterA: 'a';\r\n\t * ```\r\n\t *\r\n\t * If the above grammar, the ATN state immediately before the token\r\n\t * reference `'a'` in `letterA` is reachable from the left edge\r\n\t * of both the primary and closure blocks of the left-recursive rule\r\n\t * `statement`. The prediction context associated with each of these\r\n\t * configurations distinguishes between them, and prevents the alternative\r\n\t * which stepped out to `prog` (and then back in to `statement`\r\n\t * from being eliminated by the filter.\r\n\t *\r\n\t * @param configs The configuration set computed by\r\n\t * {@link #computeStartState} as the start state for the DFA.\r\n\t * @returns The transformed configuration set representing the start state\r\n\t * for a precedence DFA at a particular precedence level (determined by\r\n\t * calling {@link Parser#getPrecedence}).\r\n\t */\r\n\t@NotNull\r\n\tprotected applyPrecedenceFilter(@NotNull configs: ATNConfigSet, globalContext: ParserRuleContext, contextCache: PredictionContextCache): ATNConfigSet {\r\n\t\tlet statesFromAlt1: Map = new Map();\r\n\t\tlet configSet: ATNConfigSet = new ATNConfigSet();\r\n\t\tfor (let config of configs) {\r\n\t\t\t// handle alt 1 first\r\n\t\t\tif (config.alt !== 1) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet updatedContext: SemanticContext | undefined = config.semanticContext.evalPrecedence(this._parser, globalContext);\r\n\t\t\tif (updatedContext == null) {\r\n\t\t\t\t// the configuration was eliminated\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tstatesFromAlt1.set(config.state.stateNumber, config.context);\r\n\t\t\tif (updatedContext !== config.semanticContext) {\r\n\t\t\t\tconfigSet.add(config.transform(config.state, false, updatedContext), contextCache);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconfigSet.add(config, contextCache);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let config of configs) {\r\n\t\t\tif (config.alt === 1) {\r\n\t\t\t\t// already handled\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (!config.isPrecedenceFilterSuppressed) {\r\n\t\t\t\t/* In the future, this elimination step could be updated to also\r\n\t\t\t\t * filter the prediction context for alternatives predicting alt>1\r\n\t\t\t\t * (basically a graph subtraction algorithm).\r\n\t\t\t\t */\r\n\t\t\t\tlet context: PredictionContext | undefined = statesFromAlt1.get(config.state.stateNumber);\r\n\t\t\t\tif (context != null && context.equals(config.context)) {\r\n\t\t\t\t\t// eliminated\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconfigSet.add(config, contextCache);\r\n\t\t}\r\n\r\n\t\treturn configSet;\r\n\t}\r\n\r\n\tprotected getReachableTarget(@NotNull source: ATNConfig, @NotNull trans: Transition, ttype: number): ATNState | undefined {\r\n\t\tif (trans.matches(ttype, 0, this.atn.maxTokenType)) {\r\n\t\t\treturn trans.target;\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/** collect and set D's semantic context */\r\n\tprotected predicateDFAState(\r\n\t\tD: DFAState,\r\n\t\tconfigs: ATNConfigSet,\r\n\t\tnalts: number): DFAState.PredPrediction[] | undefined {\r\n\t\tlet conflictingAlts: BitSet | undefined = this.getConflictingAltsFromConfigSet(configs);\r\n\t\tif (!conflictingAlts) {\r\n\t\t\tthrow new Error(\"This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.\");\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"predicateDFAState \" + D);\r\n\t\t}\r\n\t\tlet altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(conflictingAlts, configs, nalts);\r\n\t\t// altToPred[uniqueAlt] is now our validating predicate (if any)\r\n\t\tlet predPredictions: DFAState.PredPrediction[] | undefined;\r\n\t\tif (altToPred != null) {\r\n\t\t\t// we have a validating predicate; test it\r\n\t\t\t// Update DFA so reach becomes accept state with predicate\r\n\t\t\tpredPredictions = this.getPredicatePredictions(conflictingAlts, altToPred);\r\n\t\t\tD.predicates = predPredictions;\r\n\t\t}\r\n\t\treturn predPredictions;\r\n\t}\r\n\r\n\tprotected getPredsForAmbigAlts(\r\n\t\t@NotNull ambigAlts: BitSet,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tnalts: number): SemanticContext[] | undefined {\r\n\t\t// REACH=[1|1|[]|0:0, 1|2|[]|0:1]\r\n\r\n\t\t/* altToPred starts as an array of all undefined contexts. The entry at index i\r\n\t\t * corresponds to alternative i. altToPred[i] may have one of three values:\r\n\t\t * 1. undefined: no ATNConfig c is found such that c.alt===i\r\n\t\t * 2. SemanticContext.NONE: At least one ATNConfig c exists such that\r\n\t\t * c.alt===i and c.semanticContext===SemanticContext.NONE. In other words,\r\n\t\t * alt i has at least one unpredicated config.\r\n\t\t * 3. Non-NONE Semantic Context: There exists at least one, and for all\r\n\t\t * ATNConfig c such that c.alt===i, c.semanticContext!==SemanticContext.NONE.\r\n\t\t *\r\n\t\t * From this, it is clear that NONE||anything==NONE.\r\n\t\t */\r\n\t\tlet altToPred: Array | undefined = new Array(nalts + 1);\r\n\t\tlet n: number = altToPred.length;\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (ambigAlts.get(c.alt)) {\r\n\t\t\t\taltToPred[c.alt] = SemanticContext.or(altToPred[c.alt], c.semanticContext);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet nPredAlts: number = 0;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tif (altToPred[i] == null) {\r\n\t\t\t\taltToPred[i] = SemanticContext.NONE;\r\n\t\t\t}\r\n\t\t\telse if (altToPred[i] !== SemanticContext.NONE) {\r\n\t\t\t\tnPredAlts++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// At this point we know `altToPred` doesn't contain any undefined entries\r\n\t\tlet result: SemanticContext[] | undefined = altToPred as SemanticContext[];\r\n\r\n\t\t// nonambig alts are undefined in result\r\n\t\tif (nPredAlts === 0) {\r\n\t\t\tresult = undefined;\r\n\t\t}\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"getPredsForAmbigAlts result \" + (result ? Arrays.toString(result) : \"undefined\"));\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tprotected getPredicatePredictions(ambigAlts: BitSet | undefined, altToPred: SemanticContext[]): DFAState.PredPrediction[] | undefined {\r\n\t\tlet pairs: DFAState.PredPrediction[] = [];\r\n\t\tlet containsPredicate: boolean = false;\r\n\t\tfor (let i = 1; i < altToPred.length; i++) {\r\n\t\t\tlet pred: SemanticContext = altToPred[i];\r\n\r\n\t\t\t// unpredicated is indicated by SemanticContext.NONE\r\n\t\t\tassert(pred != null);\r\n\r\n\t\t\t// find first unpredicated but ambig alternative, if any.\r\n\t\t\t// Only ambiguous alternatives will have SemanticContext.NONE.\r\n\t\t\t// Any unambig alts or ambig naked alts after first ambig naked are ignored\r\n\t\t\t// (undefined, i) means alt i is the default prediction\r\n\t\t\t// if no (undefined, i), then no default prediction.\r\n\t\t\tif (ambigAlts != null && ambigAlts.get(i) && pred === SemanticContext.NONE) {\r\n\t\t\t\tpairs.push(new DFAState.PredPrediction(pred, i));\r\n\t\t\t}\r\n\t\t\telse if (pred !== SemanticContext.NONE) {\r\n\t\t\t\tcontainsPredicate = true;\r\n\t\t\t\tpairs.push(new DFAState.PredPrediction(pred, i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!containsPredicate) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n//\t\tSystem.out.println(Arrays.toString(altToPred)+\"->\"+pairs);\r\n\t\treturn pairs;\r\n\t}\r\n\r\n\t/** Look through a list of predicate/alt pairs, returning alts for the\r\n\t * pairs that win. An `undefined` predicate indicates an alt containing an\r\n\t * unpredicated config which behaves as \"always true.\"\r\n\t */\r\n\tprotected evalSemanticContext(\r\n\t\t@NotNull predPredictions: DFAState.PredPrediction[],\r\n\t\touterContext: ParserRuleContext,\r\n\t\tcomplete: boolean): BitSet {\r\n\t\tlet predictions: BitSet = new BitSet();\r\n\t\tfor (let pair of predPredictions) {\r\n\t\t\tif (pair.pred === SemanticContext.NONE) {\r\n\t\t\t\tpredictions.set(pair.alt);\r\n\t\t\t\tif (!complete) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet evaluatedResult: boolean = this.evalSemanticContextImpl(pair.pred, outerContext, pair.alt);\r\n\t\t\tif (ParserATNSimulator.debug || ParserATNSimulator.dfa_debug) {\r\n\t\t\t\tconsole.log(\"eval pred \" + pair + \"=\" + evaluatedResult);\r\n\t\t\t}\r\n\r\n\t\t\tif (evaluatedResult) {\r\n\t\t\t\tif (ParserATNSimulator.debug || ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tconsole.log(\"PREDICT \" + pair.alt);\r\n\t\t\t\t}\r\n\t\t\t\tpredictions.set(pair.alt);\r\n\t\t\t\tif (!complete) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn predictions;\r\n\t}\r\n\r\n\t/**\r\n\t * Evaluate a semantic context within a specific parser context.\r\n\t *\r\n\t * This method might not be called for every semantic context evaluated\r\n\t * during the prediction process. In particular, we currently do not\r\n\t * evaluate the following but it may change in the future:\r\n\t *\r\n\t * * Precedence predicates (represented by\r\n\t * {@link SemanticContext.PrecedencePredicate}) are not currently evaluated\r\n\t * through this method.\r\n\t * * Operator predicates (represented by {@link SemanticContext.AND} and\r\n\t * {@link SemanticContext.OR}) are evaluated as a single semantic\r\n\t * context, rather than evaluating the operands individually.\r\n\t * Implementations which require evaluation results from individual\r\n\t * predicates should override this method to explicitly handle evaluation of\r\n\t * the operands within operator predicates.\r\n\t *\r\n\t * @param pred The semantic context to evaluate\r\n\t * @param parserCallStack The parser context in which to evaluate the\r\n\t * semantic context\r\n\t * @param alt The alternative which is guarded by `pred`\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\tprotected evalSemanticContextImpl(@NotNull pred: SemanticContext, parserCallStack: ParserRuleContext, alt: number): boolean {\r\n\t\treturn pred.eval(this._parser, parserCallStack);\r\n\t}\r\n\r\n\t/* TODO: If we are doing predicates, there is no point in pursuing\r\n\t\t closure operations if we reach a DFA state that uniquely predicts\r\n\t\t alternative. We will not be caching that DFA state and it is a\r\n\t\t waste to pursue the closure. Might have to advance when we do\r\n\t\t ambig detection thought :(\r\n\t\t */\r\n\r\n\tprotected closure(\r\n\t\tsourceConfigs: ATNConfigSet,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tcollectPredicates: boolean,\r\n\t\thasMoreContext: boolean,\r\n\t\t@Nullable contextCache: PredictionContextCache,\r\n\t\ttreatEofAsEpsilon: boolean): void {\r\n\t\tif (contextCache == null) {\r\n\t\t\tcontextCache = PredictionContextCache.UNCACHED;\r\n\t\t}\r\n\r\n\t\tlet currentConfigs: ATNConfigSet = sourceConfigs;\r\n\t\tlet closureBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\twhile (currentConfigs.size > 0) {\r\n\t\t\tlet intermediate: ATNConfigSet = new ATNConfigSet();\r\n\t\t\tfor (let config of currentConfigs) {\r\n\t\t\t\tthis.closureImpl(config, configs, intermediate, closureBusy, collectPredicates, hasMoreContext, contextCache, 0, treatEofAsEpsilon);\r\n\t\t\t}\r\n\r\n\t\t\tcurrentConfigs = intermediate;\r\n\t\t}\r\n\t}\r\n\r\n\tprotected closureImpl(\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\t@Nullable intermediate: ATNConfigSet,\r\n\t\t@NotNull closureBusy: Array2DHashSet,\r\n\t\tcollectPredicates: boolean,\r\n\t\thasMoreContexts: boolean,\r\n\t\t@NotNull contextCache: PredictionContextCache,\r\n\t\tdepth: number,\r\n\t\ttreatEofAsEpsilon: boolean): void {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"closure(\" + config.toString(this._parser, true) + \")\");\r\n\t\t}\r\n\r\n\t\tif (config.state instanceof RuleStopState) {\r\n\t\t\t// We hit rule end. If we have context info, use it\r\n\t\t\tif (!config.context.isEmpty) {\r\n\t\t\t\tlet hasEmpty: boolean = config.context.hasEmpty;\r\n\t\t\t\tlet nonEmptySize: number = config.context.size - (hasEmpty ? 1 : 0);\r\n\t\t\t\tfor (let i = 0; i < nonEmptySize; i++) {\r\n\t\t\t\t\tlet newContext: PredictionContext = config.context.getParent(i); // \"pop\" return state\r\n\t\t\t\t\tlet returnState: ATNState = this.atn.states[config.context.getReturnState(i)];\r\n\t\t\t\t\tlet c: ATNConfig = ATNConfig.create(returnState, config.alt, newContext, config.semanticContext);\r\n\t\t\t\t\t// While we have context to pop back from, we may have\r\n\t\t\t\t\t// gotten that context AFTER having fallen off a rule.\r\n\t\t\t\t\t// Make sure we track that we are now out of context.\r\n\t\t\t\t\tc.outerContextDepth = config.outerContextDepth;\r\n\t\t\t\t\tc.isPrecedenceFilterSuppressed = config.isPrecedenceFilterSuppressed;\r\n\t\t\t\t\tassert(depth > MIN_INTEGER_VALUE);\r\n\t\t\t\t\tthis.closureImpl(c, configs, intermediate, closureBusy, collectPredicates, hasMoreContexts, contextCache, depth - 1, treatEofAsEpsilon);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!hasEmpty || !hasMoreContexts) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig = config.transform(config.state, false, PredictionContext.EMPTY_LOCAL);\r\n\t\t\t}\r\n\t\t\telse if (!hasMoreContexts) {\r\n\t\t\t\tconfigs.add(config, contextCache);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// else if we have no context info, just chase follow links (if greedy)\r\n\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\tconsole.log(\"FALLING off rule \" +\r\n\t\t\t\t\t\tthis.getRuleName(config.state.ruleIndex));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (config.context === PredictionContext.EMPTY_FULL) {\r\n\t\t\t\t\t// no need to keep full context overhead when we step out\r\n\t\t\t\t\tconfig = config.transform(config.state, false, PredictionContext.EMPTY_LOCAL);\r\n\t\t\t\t}\r\n\t\t\t\telse if (!config.reachesIntoOuterContext && PredictionContext.isEmptyLocal(config.context)) {\r\n\t\t\t\t\t// add stop state when leaving decision rule for the first time\r\n\t\t\t\t\tconfigs.add(config, contextCache);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet p: ATNState = config.state;\r\n\t\t// optimization\r\n\t\tif (!p.onlyHasEpsilonTransitions) {\r\n\t\t\tconfigs.add(config, contextCache);\r\n\t\t\t// make sure to not return here, because EOF transitions can act as\r\n\t\t\t// both epsilon transitions and non-epsilon transitions.\r\n\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"added config \" + configs);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < p.numberOfOptimizedTransitions; i++) {\r\n\t\t\t// This block implements first-edge elimination of ambiguous LR\r\n\t\t\t// alternatives as part of dynamic disambiguation during prediction.\r\n\t\t\t// See antlr/antlr4#1398.\r\n\t\t\tif (i === 0\r\n\t\t\t\t&& p.stateType === ATNStateType.STAR_LOOP_ENTRY\r\n\t\t\t\t&& (p as StarLoopEntryState).precedenceRuleDecision\r\n\t\t\t\t&& !config.context.hasEmpty) {\r\n\r\n\t\t\t\tlet precedenceDecision = p as StarLoopEntryState;\r\n\r\n\t\t\t\t// When suppress is true, it means the outgoing edge i==0 is\r\n\t\t\t\t// ambiguous with the outgoing edge i==1, and thus the closure\r\n\t\t\t\t// operation can dynamically disambiguate by suppressing this\r\n\t\t\t\t// edge during the closure operation.\r\n\t\t\t\tlet suppress: boolean = true;\r\n\t\t\t\tfor (let j: number = 0; j < config.context.size; j++) {\r\n\t\t\t\t\tif (!precedenceDecision.precedenceLoopbackStates.get(config.context.getReturnState(j))) {\r\n\t\t\t\t\t\tsuppress = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (suppress) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet t: Transition = p.getOptimizedTransition(i);\r\n\t\t\tlet continueCollecting: boolean =\r\n\t\t\t\t!(t instanceof ActionTransition) && collectPredicates;\r\n\t\t\tlet c: ATNConfig | undefined = this.getEpsilonTarget(config, t, continueCollecting, depth === 0, contextCache, treatEofAsEpsilon);\r\n\t\t\tif (c != null) {\r\n\t\t\t\tif (t instanceof RuleTransition) {\r\n\t\t\t\t\tif (intermediate != null && !collectPredicates) {\r\n\t\t\t\t\t\tintermediate.add(c, contextCache);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet newDepth: number = depth;\r\n\t\t\t\tif (config.state instanceof RuleStopState) {\r\n\t\t\t\t\t// target fell off end of rule; mark resulting c as having dipped into outer context\r\n\t\t\t\t\t// We can't get here if incoming config was rule stop and we had context\r\n\t\t\t\t\t// track how far we dip into outer context. Might\r\n\t\t\t\t\t// come in handy and we avoid evaluating context dependent\r\n\t\t\t\t\t// preds if this is > 0.\r\n\r\n\t\t\t\t\tif (this.dfa != null && this.dfa.isPrecedenceDfa) {\r\n\t\t\t\t\t\tlet outermostPrecedenceReturn: number = (t as EpsilonTransition).outermostPrecedenceReturn;\r\n\t\t\t\t\t\tif (outermostPrecedenceReturn === this.dfa.atnStartState.ruleIndex) {\r\n\t\t\t\t\t\t\tc.isPrecedenceFilterSuppressed = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tc.outerContextDepth = c.outerContextDepth + 1;\r\n\r\n\t\t\t\t\tif (!closureBusy.add(c)) {\r\n\t\t\t\t\t\t// avoid infinite recursion for right-recursive rules\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tassert(newDepth > MIN_INTEGER_VALUE);\r\n\t\t\t\t\tnewDepth--;\r\n\t\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\t\tconsole.log(\"dips into outer ctx: \" + c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (t instanceof RuleTransition) {\r\n\t\t\t\t\tif (this.optimize_tail_calls && t.optimizedTailCall && (!this.tail_call_preserves_sll || !PredictionContext.isEmptyLocal(config.context))) {\r\n\t\t\t\t\t\tassert(c.context === config.context);\r\n\t\t\t\t\t\tif (newDepth === 0) {\r\n\t\t\t\t\t\t\t// the pop/push of a tail call would keep the depth\r\n\t\t\t\t\t\t\t// constant, except we latch if it goes negative\r\n\t\t\t\t\t\t\tnewDepth--;\r\n\t\t\t\t\t\t\tif (!this.tail_call_preserves_sll && PredictionContext.isEmptyLocal(config.context)) {\r\n\t\t\t\t\t\t\t\t// make sure the SLL config \"dips into the outer context\" or prediction may not fall back to LL on conflict\r\n\t\t\t\t\t\t\t\tc.outerContextDepth = c.outerContextDepth + 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// latch when newDepth goes negative - once we step out of the entry context we can't return\r\n\t\t\t\t\t\tif (newDepth >= 0) {\r\n\t\t\t\t\t\t\tnewDepth++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (!t.isEpsilon && !closureBusy.add(c)) {\r\n\t\t\t\t\t\t// avoid infinite recursion for EOF* and EOF+\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.closureImpl(c, configs, intermediate, closureBusy, continueCollecting, hasMoreContexts, contextCache, newDepth, treatEofAsEpsilon);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getRuleName(index: number): string {\r\n\t\tif (this._parser != null && index >= 0) {\r\n\t\t\treturn this._parser.ruleNames[index];\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tprotected getEpsilonTarget(@NotNull config: ATNConfig, @NotNull t: Transition, collectPredicates: boolean, inContext: boolean, contextCache: PredictionContextCache, treatEofAsEpsilon: boolean): ATNConfig | undefined {\r\n\t\tswitch (t.serializationType) {\r\n\t\tcase TransitionType.RULE:\r\n\t\t\treturn this.ruleTransition(config, t as RuleTransition, contextCache);\r\n\r\n\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\treturn this.precedenceTransition(config, t as PrecedencePredicateTransition, collectPredicates, inContext);\r\n\r\n\t\tcase TransitionType.PREDICATE:\r\n\t\t\treturn this.predTransition(config, t as PredicateTransition, collectPredicates, inContext);\r\n\r\n\t\tcase TransitionType.ACTION:\r\n\t\t\treturn this.actionTransition(config, t as ActionTransition);\r\n\r\n\t\tcase TransitionType.EPSILON:\r\n\t\t\treturn config.transform(t.target, false);\r\n\r\n\t\tcase TransitionType.ATOM:\r\n\t\tcase TransitionType.RANGE:\r\n\t\tcase TransitionType.SET:\r\n\t\t\t// EOF transitions act like epsilon transitions after the first EOF\r\n\t\t\t// transition is traversed\r\n\t\t\tif (treatEofAsEpsilon) {\r\n\t\t\t\tif (t.matches(Token.EOF, 0, 1)) {\r\n\t\t\t\t\treturn config.transform(t.target, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn undefined;\r\n\r\n\t\tdefault:\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected actionTransition(@NotNull config: ATNConfig, @NotNull t: ActionTransition): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ACTION edge \" + t.ruleIndex + \":\" + t.actionIndex);\r\n\t\t}\r\n\t\treturn config.transform(t.target, false);\r\n\t}\r\n\r\n\t@Nullable\r\n\tprotected precedenceTransition(\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull pt: PrecedencePredicateTransition,\r\n\t\tcollectPredicates: boolean,\r\n\t\tinContext: boolean): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"PRED (collectPredicates=\" + collectPredicates + \") \" +\r\n\t\t\t\tpt.precedence + \">=_p\" +\r\n\t\t\t\t\", ctx dependent=true\");\r\n\t\t\tif (this._parser != null) {\r\n\t\t\t\tconsole.log(\"context surrounding pred is \" +\r\n\t\t\t\t\tthis._parser.getRuleInvocationStack());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet c: ATNConfig;\r\n\t\tif (collectPredicates && inContext) {\r\n\t\t\tlet newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate);\r\n\t\t\tc = config.transform(pt.target, false, newSemCtx);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tc = config.transform(pt.target, false);\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"config from pred transition=\" + c);\r\n\t\t}\r\n\t\treturn c;\r\n\t}\r\n\r\n\t@Nullable\r\n\tprotected predTransition(\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull pt: PredicateTransition,\r\n\t\tcollectPredicates: boolean,\r\n\t\tinContext: boolean): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"PRED (collectPredicates=\" + collectPredicates + \") \" +\r\n\t\t\t\tpt.ruleIndex + \":\" + pt.predIndex +\r\n\t\t\t\t\", ctx dependent=\" + pt.isCtxDependent);\r\n\t\t\tif (this._parser != null) {\r\n\t\t\t\tconsole.log(\"context surrounding pred is \" +\r\n\t\t\t\t\tthis._parser.getRuleInvocationStack());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet c: ATNConfig;\r\n\t\tif (collectPredicates &&\r\n\t\t\t(!pt.isCtxDependent || (pt.isCtxDependent && inContext))) {\r\n\t\t\tlet newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate);\r\n\t\t\tc = config.transform(pt.target, false, newSemCtx);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tc = config.transform(pt.target, false);\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"config from pred transition=\" + c);\r\n\t\t}\r\n\t\treturn c;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected ruleTransition(@NotNull config: ATNConfig, @NotNull t: RuleTransition, @Nullable contextCache: PredictionContextCache): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"CALL rule \" + this.getRuleName(t.target.ruleIndex) +\r\n\t\t\t\t\", ctx=\" + config.context);\r\n\t\t}\r\n\r\n\t\tlet returnState: ATNState = t.followState;\r\n\t\tlet newContext: PredictionContext;\r\n\r\n\t\tif (this.optimize_tail_calls && t.optimizedTailCall && (!this.tail_call_preserves_sll || !PredictionContext.isEmptyLocal(config.context))) {\r\n\t\t\tnewContext = config.context;\r\n\t\t}\r\n\t\telse if (contextCache != null) {\r\n\t\t\tnewContext = contextCache.getChild(config.context, returnState.stateNumber);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnewContext = config.context.getChild(returnState.stateNumber);\r\n\t\t}\r\n\r\n\t\treturn config.transform(t.target, false, newContext);\r\n\t}\r\n\r\n\tprivate static STATE_ALT_SORT_COMPARATOR: (o1: ATNConfig, o2: ATNConfig) => number =\r\n\t\t(o1: ATNConfig, o2: ATNConfig): number => {\r\n\t\t\tlet diff: number = o1.state.nonStopStateNumber - o2.state.nonStopStateNumber;\r\n\t\t\tif (diff !== 0) {\r\n\t\t\t\treturn diff;\r\n\t\t\t}\r\n\r\n\t\t\tdiff = o1.alt - o2.alt;\r\n\t\t\tif (diff !== 0) {\r\n\t\t\t\treturn diff;\r\n\t\t\t}\r\n\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\tprivate isConflicted(@NotNull configset: ATNConfigSet, contextCache: PredictionContextCache): ConflictInfo | undefined {\r\n\t\tif (configset.uniqueAlt !== ATN.INVALID_ALT_NUMBER || configset.size <= 1) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet configs: ATNConfig[] = configset.toArray();\r\n\t\tconfigs.sort(ParserATNSimulator.STATE_ALT_SORT_COMPARATOR);\r\n\r\n\t\tlet exact: boolean = !configset.dipsIntoOuterContext;\r\n\t\tlet alts: BitSet = new BitSet();\r\n\t\tlet minAlt: number = configs[0].alt;\r\n\t\talts.set(minAlt);\r\n\r\n\t\t/* Quick checks come first (single pass, no context joining):\r\n\t\t * 1. Make sure first config in the sorted list predicts the minimum\r\n\t\t * represented alternative.\r\n\t\t * 2. Make sure every represented state has at least one configuration\r\n\t\t * which predicts the minimum represented alternative.\r\n\t\t * 3. (exact only) make sure every represented state has at least one\r\n\t\t * configuration which predicts each represented alternative.\r\n\t\t */\r\n\r\n\t\t// quick check 1 & 2 => if we assume #1 holds and check #2 against the\r\n\t\t// minAlt from the first state, #2 will fail if the assumption was\r\n\t\t// incorrect\r\n\t\tlet currentState: number = configs[0].state.nonStopStateNumber;\r\n\t\tfor (let config of configs) {\r\n\t\t\tlet stateNumber: number = config.state.nonStopStateNumber;\r\n\t\t\tif (stateNumber !== currentState) {\r\n\t\t\t\tif (config.alt !== minAlt) {\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentState = stateNumber;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet representedAlts: BitSet;\r\n\t\tif (exact) {\r\n\t\t\tcurrentState = configs[0].state.nonStopStateNumber;\r\n\r\n\t\t\t// get the represented alternatives of the first state\r\n\t\t\trepresentedAlts = new BitSet();\r\n\t\t\tlet maxAlt: number = minAlt;\r\n\t\t\tfor (let config of configs) {\r\n\t\t\t\tif (config.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet alt: number = config.alt;\r\n\t\t\t\trepresentedAlts.set(alt);\r\n\t\t\t\tmaxAlt = alt;\r\n\t\t\t}\r\n\r\n\t\t\t// quick check #3:\r\n\t\t\tcurrentState = configs[0].state.nonStopStateNumber;\r\n\t\t\tlet currentAlt: number = minAlt;\r\n\t\t\tfor (let config of configs) {\r\n\t\t\t\tlet stateNumber: number = config.state.nonStopStateNumber;\r\n\t\t\t\tlet alt: number = config.alt;\r\n\t\t\t\tif (stateNumber !== currentState) {\r\n\t\t\t\t\tif (currentAlt !== maxAlt) {\r\n\t\t\t\t\t\texact = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcurrentState = stateNumber;\r\n\t\t\t\t\tcurrentAlt = minAlt;\r\n\t\t\t\t}\r\n\t\t\t\telse if (alt !== currentAlt) {\r\n\t\t\t\t\tif (alt !== representedAlts.nextSetBit(currentAlt + 1)) {\r\n\t\t\t\t\t\texact = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcurrentAlt = alt;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcurrentState = configs[0].state.nonStopStateNumber;\r\n\t\tlet firstIndexCurrentState: number = 0;\r\n\t\tlet lastIndexCurrentStateMinAlt: number = 0;\r\n\t\tlet joinedCheckContext: PredictionContext = configs[0].context;\r\n\t\tfor (let i = 1; i < configs.length; i++) {\r\n\t\t\tlet config: ATNConfig = configs[i];\r\n\t\t\tif (config.alt !== minAlt) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (config.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tlastIndexCurrentStateMinAlt = i;\r\n\t\t\tjoinedCheckContext = contextCache.join(joinedCheckContext, configs[i].context);\r\n\t\t}\r\n\r\n\t\tfor (let i = lastIndexCurrentStateMinAlt + 1; i < configs.length; i++) {\r\n\t\t\tlet config: ATNConfig = configs[i];\r\n\t\t\tlet state: ATNState = config.state;\r\n\t\t\talts.set(config.alt);\r\n\t\t\tif (state.nonStopStateNumber !== currentState) {\r\n\t\t\t\tcurrentState = state.nonStopStateNumber;\r\n\t\t\t\tfirstIndexCurrentState = i;\r\n\t\t\t\tlastIndexCurrentStateMinAlt = i;\r\n\t\t\t\tjoinedCheckContext = config.context;\r\n\t\t\t\tfor (let j = firstIndexCurrentState + 1; j < configs.length; j++) {\r\n\t\t\t\t\tlet config2: ATNConfig = configs[j];\r\n\t\t\t\t\tif (config2.alt !== minAlt) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (config2.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlastIndexCurrentStateMinAlt = j;\r\n\t\t\t\t\tjoinedCheckContext = contextCache.join(joinedCheckContext, config2.context);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ti = lastIndexCurrentStateMinAlt;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet joinedCheckContext2: PredictionContext = config.context;\r\n\t\t\tlet currentAlt: number = config.alt;\r\n\t\t\tlet lastIndexCurrentStateCurrentAlt: number = i;\r\n\t\t\tfor (let j = lastIndexCurrentStateCurrentAlt + 1; j < configs.length; j++) {\r\n\t\t\t\tlet config2: ATNConfig = configs[j];\r\n\t\t\t\tif (config2.alt !== currentAlt) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (config2.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlastIndexCurrentStateCurrentAlt = j;\r\n\t\t\t\tjoinedCheckContext2 = contextCache.join(joinedCheckContext2, config2.context);\r\n\t\t\t}\r\n\r\n\t\t\ti = lastIndexCurrentStateCurrentAlt;\r\n\r\n\t\t\tlet check: PredictionContext = contextCache.join(joinedCheckContext, joinedCheckContext2);\r\n\t\t\tif (!joinedCheckContext.equals(check)) {\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\r\n\t\t\t// update exact if necessary\r\n\t\t\texact = exact && joinedCheckContext.equals(joinedCheckContext2);\r\n\t\t}\r\n\r\n\t\treturn new ConflictInfo(alts, exact);\r\n\t}\r\n\r\n\tprotected getConflictingAltsFromConfigSet(configs: ATNConfigSet): BitSet | undefined {\r\n\t\tlet conflictingAlts: BitSet | undefined = configs.conflictingAlts;\r\n\t\tif (conflictingAlts == null && configs.uniqueAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\tconflictingAlts = new BitSet();\r\n\t\t\tconflictingAlts.set(configs.uniqueAlt);\r\n\t\t}\r\n\r\n\t\treturn conflictingAlts;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getTokenName(t: number): string {\r\n\t\tif (t === Token.EOF) {\r\n\t\t\treturn \"EOF\";\r\n\t\t}\r\n\r\n\t\tlet vocabulary: Vocabulary = this._parser != null ? this._parser.vocabulary : VocabularyImpl.EMPTY_VOCABULARY;\r\n\t\tlet displayName: string = vocabulary.getDisplayName(t);\r\n\t\tif (displayName === String(t)) {\r\n\t\t\treturn displayName;\r\n\t\t}\r\n\r\n\t\treturn displayName + \"<\" + t + \">\";\r\n\t}\r\n\r\n\tpublic getLookaheadName(input: TokenStream): string {\r\n\t\treturn this.getTokenName(input.LA(1));\r\n\t}\r\n\r\n\tpublic dumpDeadEndConfigs(@NotNull nvae: NoViableAltException): void {\r\n\t\tconsole.log(\"dead end configs: \");\r\n\t\tlet deadEndConfigs = nvae.deadEndConfigs;\r\n\t\tif (!deadEndConfigs) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (let c of deadEndConfigs) {\r\n\t\t\tlet trans: string = \"no edges\";\r\n\t\t\tif (c.state.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\tlet t: Transition = c.state.getOptimizedTransition(0);\r\n\t\t\t\tif (t instanceof AtomTransition) {\r\n\t\t\t\t\ttrans = \"Atom \" + this.getTokenName(t._label);\r\n\t\t\t\t}\r\n\t\t\t\telse if (t instanceof SetTransition) {\r\n\t\t\t\t\tlet not: boolean = t instanceof NotSetTransition;\r\n\t\t\t\t\ttrans = (not ? \"~\" : \"\") + \"Set \" + t.set.toString();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconsole.log(c.toString(this._parser, true) + \":\" + trans);\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected noViableAlt(\r\n\t\t@NotNull input: TokenStream,\r\n\t\t@NotNull outerContext: ParserRuleContext,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tstartIndex: number): NoViableAltException {\r\n\t\treturn new NoViableAltException(this._parser, input,\r\n\t\t\tinput.get(startIndex),\r\n\t\t\tinput.LT(1),\r\n\t\t\tconfigs, outerContext);\r\n\t}\r\n\r\n\tprotected getUniqueAlt(@NotNull configs: Iterable): number {\r\n\t\tlet alt: number = ATN.INVALID_ALT_NUMBER;\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (alt === ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\talt = c.alt; // found first alt\r\n\t\t\t}\r\n\t\t\telse if (c.alt !== alt) {\r\n\t\t\t\treturn ATN.INVALID_ALT_NUMBER;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn alt;\r\n\t}\r\n\r\n\tprotected configWithAltAtStopState(@NotNull configs: Iterable, alt: number): boolean {\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (c.alt === alt) {\r\n\t\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected addDFAEdge(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull fromState: DFAState,\r\n\t\tt: number,\r\n\t\tcontextTransitions: IntegerList | undefined,\r\n\t\t@NotNull toConfigs: ATNConfigSet,\r\n\t\tcontextCache: PredictionContextCache): DFAState {\r\n\t\tassert(contextTransitions == null || contextTransitions.isEmpty || dfa.isContextSensitive);\r\n\r\n\t\tlet from: DFAState = fromState;\r\n\t\tlet to: DFAState = this.addDFAState(dfa, toConfigs, contextCache);\r\n\r\n\t\tif (contextTransitions != null) {\r\n\t\t\tfor (let context of contextTransitions.toArray()) {\r\n\t\t\t\tif (context === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tif (from.configs.isOutermostConfigSet) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom.setContextSensitive(this.atn);\r\n\t\t\t\tfrom.setContextSymbol(t);\r\n\t\t\t\tlet next: DFAState | undefined = from.getContextTarget(context);\r\n\t\t\t\tif (next != null) {\r\n\t\t\t\t\tfrom = next;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext = this.addDFAContextState(dfa, from.configs, context, contextCache);\r\n\t\t\t\tassert(context !== PredictionContext.EMPTY_FULL_STATE_KEY || next.configs.isOutermostConfigSet);\r\n\t\t\t\tfrom.setContextTarget(context, next);\r\n\t\t\t\tfrom = next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"EDGE \" + from + \" -> \" + to + \" upon \" + this.getTokenName(t));\r\n\t\t}\r\n\t\tthis.setDFAEdge(from, t, to);\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"DFA=\\n\" + dfa.toString(this._parser != null ? this._parser.vocabulary : VocabularyImpl.EMPTY_VOCABULARY, this._parser != null ? this._parser.ruleNames : undefined));\r\n\t\t}\r\n\t\treturn to;\r\n\t}\r\n\r\n\tprotected setDFAEdge(@Nullable p: DFAState, t: number, @Nullable q: DFAState): void {\r\n\t\tif (p != null) {\r\n\t\t\tp.setTarget(t, q);\r\n\t\t}\r\n\t}\r\n\r\n\t/** See comment on LexerInterpreter.addDFAState. */\r\n\t@NotNull\r\n\tprotected addDFAContextState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet, returnContext: number, contextCache: PredictionContextCache): DFAState {\r\n\t\tif (returnContext !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\tlet contextConfigs: ATNConfigSet = new ATNConfigSet();\r\n\t\t\tfor (let config of configs) {\r\n\t\t\t\tcontextConfigs.add(config.appendContext(returnContext, contextCache));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.addDFAState(dfa, contextConfigs, contextCache);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tassert(!configs.isOutermostConfigSet, \"Shouldn't be adding a duplicate edge.\");\r\n\t\t\tconfigs = configs.clone(true);\r\n\t\t\tconfigs.isOutermostConfigSet = true;\r\n\t\t\treturn this.addDFAState(dfa, configs, contextCache);\r\n\t\t}\r\n\t}\r\n\r\n\t/** See comment on LexerInterpreter.addDFAState. */\r\n\t@NotNull\r\n\tprotected addDFAState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet, contextCache: PredictionContextCache): DFAState {\r\n\t\tlet enableDfa: boolean = this.enable_global_context_dfa || !configs.isOutermostConfigSet;\r\n\t\tif (enableDfa) {\r\n\t\t\tif (!configs.isReadOnly) {\r\n\t\t\t\tconfigs.optimizeConfigs(this);\r\n\t\t\t}\r\n\r\n\t\t\tlet proposed: DFAState = this.createDFAState(dfa, configs);\r\n\t\t\tlet existing: DFAState | undefined = dfa.states.get(proposed);\r\n\t\t\tif (existing != null) {\r\n\t\t\t\treturn existing;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!configs.isReadOnly) {\r\n\t\t\tif (configs.conflictInfo == null) {\r\n\t\t\t\tconfigs.conflictInfo = this.isConflicted(configs, contextCache);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet newState: DFAState = this.createDFAState(dfa, configs.clone(true));\r\n\t\t// getDecisionState won't return undefined when we request a known valid decision\r\n\t\tlet decisionState: DecisionState = this.atn.getDecisionState(dfa.decision) as DecisionState;\r\n\t\tlet predictedAlt: number = this.getUniqueAlt(configs);\r\n\t\tif (predictedAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\tnewState.acceptStateInfo = new AcceptStateInfo(predictedAlt);\r\n\t\t} else if (configs.conflictingAlts != null) {\r\n\t\t\tlet conflictingAlts = configs.conflictingAlts;\r\n\t\t\tif (conflictingAlts) {\r\n\t\t\t\tnewState.acceptStateInfo = new AcceptStateInfo(conflictingAlts.nextSetBit(0));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (newState.isAcceptState && configs.hasSemanticContext) {\r\n\t\t\tthis.predicateDFAState(newState, configs, decisionState.numberOfTransitions);\r\n\t\t}\r\n\r\n\t\tif (!enableDfa) {\r\n\t\t\treturn newState;\r\n\t\t}\r\n\r\n\t\tlet added: DFAState = dfa.addState(newState);\r\n\t\tif (ParserATNSimulator.debug && added === newState) {\r\n\t\t\tconsole.log(\"adding new DFA state: \" + newState);\r\n\t\t}\r\n\t\treturn added;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected createDFAState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet): DFAState {\r\n\t\treturn new DFAState(configs);\r\n\t}\r\n\r\n\tprotected reportAttemptingFullContext(@NotNull dfa: DFA, conflictingAlts: BitSet | undefined, @NotNull conflictState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) {\r\n\t\t\tlet interval: Interval = Interval.of(startIndex, stopIndex);\r\n\t\t\tconsole.log(\"reportAttemptingFullContext decision=\" + dfa.decision + \":\" + conflictState.s0.configs +\r\n\t\t\t\t\", input=\" + this._parser.inputStream.getText(interval));\r\n\t\t}\r\n\t\tif (this._parser != null) {\r\n\t\t\tlet listener = this._parser.getErrorListenerDispatch();\r\n\t\t\tif (listener.reportAttemptingFullContext) {\r\n\t\t\t\tlistener.reportAttemptingFullContext(this._parser, dfa, startIndex, stopIndex, conflictingAlts, conflictState);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected reportContextSensitivity(@NotNull dfa: DFA, prediction: number, @NotNull acceptState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) {\r\n\t\t\tlet interval: Interval = Interval.of(startIndex, stopIndex);\r\n\t\t\tconsole.log(\"reportContextSensitivity decision=\" + dfa.decision + \":\" + acceptState.s0.configs +\r\n\t\t\t\t\", input=\" + this._parser.inputStream.getText(interval));\r\n\t\t}\r\n\t\tif (this._parser != null) {\r\n\t\t\tlet listener = this._parser.getErrorListenerDispatch();\r\n\t\t\tif (listener.reportContextSensitivity) {\r\n\t\t\t\tlistener.reportContextSensitivity(this._parser, dfa, startIndex, stopIndex, prediction, acceptState);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/** If context sensitive parsing, we know it's ambiguity not conflict */\r\n\tprotected reportAmbiguity(\r\n\t\t@NotNull dfa: DFA,\r\n\t\tD: DFAState, // the DFA state from execATN(): void that had SLL conflicts\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\t@NotNull ambigAlts: BitSet,\r\n\t\t@NotNull configs: ATNConfigSet) // configs that LL not SLL considered conflicting\r\n\t{\r\n\t\tif (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) {\r\n\t\t\tlet interval: Interval = Interval.of(startIndex, stopIndex);\r\n\t\t\tconsole.log(\"reportAmbiguity \" +\r\n\t\t\t\tambigAlts + \":\" + configs +\r\n\t\t\t\t\", input=\" + this._parser.inputStream.getText(interval));\r\n\t\t}\r\n\t\tif (this._parser != null) {\r\n\t\t\tlet listener = this._parser.getErrorListenerDispatch();\r\n\t\t\tif (listener.reportAmbiguity) {\r\n\t\t\t\tlistener.reportAmbiguity(this._parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getReturnState(context: RuleContext): number {\r\n\t\tif (context.isEmpty) {\r\n\t\t\treturn PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t}\r\n\r\n\t\tlet state: ATNState = this.atn.states[context.invokingState];\r\n\t\tlet transition: RuleTransition = state.transition(0) as RuleTransition;\r\n\t\treturn transition.followState.stateNumber;\r\n\t}\r\n\r\n\tprotected skipTailCalls(context: ParserRuleContext): ParserRuleContext {\r\n\t\tif (!this.optimize_tail_calls) {\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\twhile (!context.isEmpty) {\r\n\t\t\tlet state: ATNState = this.atn.states[context.invokingState];\r\n\t\t\tassert(state.numberOfTransitions === 1 && state.transition(0).serializationType === TransitionType.RULE);\r\n\t\t\tlet transition: RuleTransition = state.transition(0) as RuleTransition;\r\n\t\t\tif (!transition.tailCall) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// This method requires that the root ancestor of the ParserRuleContext be empty. If we make it to this\r\n\t\t\t// line, we know the current node is not empty, which means it does have a parent.\r\n\t\t\tcontext = context.parent as ParserRuleContext;\r\n\t\t}\r\n\r\n\t\treturn context;\r\n\t}\r\n\r\n\t/**\r\n\t * @since 4.3\r\n\t */\r\n\tget parser(): Parser {\r\n\t\treturn this._parser;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:34.9572142-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\nimport { PlusLoopbackState } from \"./PlusLoopbackState\";\r\n\r\n/** Start of `(A|B|...)+` loop. Technically a decision state, but\r\n * we don't use for code generation; somebody might need it, so I'm defining\r\n * it for completeness. In reality, the {@link PlusLoopbackState} node is the\r\n * real decision-making note for `A+`.\r\n */\r\nexport class PlusBlockStartState extends BlockStartState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic loopBackState!: PlusLoopbackState;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.PLUS_BLOCK_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.0257730-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** Decision state for `A+` and `(A|B)+`. It has two transitions:\r\n * one to the loop back to start of the block and one to exit.\r\n */\r\nexport class PlusLoopbackState extends DecisionState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.PLUS_LOOP_BACK;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.0994191-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./AbstractPredicateTransition\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class PrecedencePredicateTransition extends AbstractPredicateTransition {\r\n\tpublic precedence: number;\r\n\r\n\tconstructor( @NotNull target: ATNState, precedence: number) {\r\n\t\tsuper(target);\r\n\t\tthis.precedence = precedence;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.PRECEDENCE;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget predicate(): SemanticContext.PrecedencePredicate {\r\n\t\treturn new SemanticContext.PrecedencePredicate(this.precedence);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this.precedence + \" >= _p\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.5959980-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class RangeTransition extends Transition {\r\n\tpublic from: number;\r\n\tpublic to: number;\r\n\r\n\tconstructor(@NotNull target: ATNState, from: number, to: number) {\r\n\t\tsuper(target);\r\n\t\tthis.from = from;\r\n\t\tthis.to = to;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.RANGE;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tget label(): IntervalSet {\r\n\t\treturn IntervalSet.of(this.from, this.to);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn symbol >= this.from && symbol <= this.to;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \"'\" + String.fromCodePoint(this.from) + \"'..'\" + String.fromCodePoint(this.to) + \"'\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.6806851-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\n\r\nexport class RuleStartState extends ATNState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic stopState!: RuleStopState;\r\n\tpublic isPrecedenceRule: boolean = false;\r\n\tpublic leftFactored: boolean = false;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.RULE_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.5657409-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The block that begins a closure loop. */\r\nexport class StarBlockStartState extends BlockStartState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.STAR_BLOCK_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.6368726-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\nimport { StarLoopEntryState } from \"./StarLoopEntryState\";\r\n\r\nexport class StarLoopbackState extends ATNState {\r\n\tget loopEntryState(): StarLoopEntryState {\r\n\t\treturn this.transition(0).target as StarLoopEntryState;\r\n\t}\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.STAR_LOOP_BACK;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.7814046-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The Tokens rule start state linking to each lexer rule start state */\r\nexport class TokensStartState extends DecisionState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.TOKEN_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { Equatable } from \"./Stubs\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\n\r\nexport class UUID implements Equatable {\r\n\tprivate readonly data: Uint32Array;\r\n\r\n\tconstructor(mostSigBits: number, moreSigBits: number, lessSigBits: number, leastSigBits: number) {\r\n\t\tthis.data = new Uint32Array(4);\r\n\t\tthis.data[0] = mostSigBits;\r\n\t\tthis.data[1] = moreSigBits;\r\n\t\tthis.data[2] = lessSigBits;\r\n\t\tthis.data[3] = leastSigBits;\r\n\t}\r\n\r\n\tpublic static fromString(data: string): UUID {\r\n\t\tif (!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(data)) {\r\n\t\t\tthrow new Error(\"Incorrectly formatted UUID\");\r\n\t\t}\r\n\r\n\t\tlet segments = data.split(\"-\");\r\n\t\tlet mostSigBits = parseInt(segments[0], 16);\r\n\t\tlet moreSigBits = ((parseInt(segments[1], 16) << 16) >>> 0) + parseInt(segments[2], 16);\r\n\t\tlet lessSigBits = ((parseInt(segments[3], 16) << 16) >>> 0) + parseInt(segments[4].substr(0, 4), 16);\r\n\t\tlet leastSigBits = parseInt(segments[4].substr(-8), 16);\r\n\t\treturn new UUID(mostSigBits, moreSigBits, lessSigBits, leastSigBits);\r\n\t}\r\n\r\n\tpublic hashCode(): number {\r\n\t\treturn MurmurHash.hashCode([this.data[0], this.data[1], this.data[2], this.data[3]]);\r\n\t}\r\n\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof UUID)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.data[0] === obj.data[0]\r\n\t\t\t&& this.data[1] === obj.data[1]\r\n\t\t\t&& this.data[2] === obj.data[2]\r\n\t\t\t&& this.data[3] === obj.data[3];\r\n\t}\r\n\r\n\tpublic toString(): string {\r\n\t\treturn (\"00000000\" + this.data[0].toString(16)).substr(-8)\r\n\t\t\t+ \"-\" + (\"0000\" + (this.data[1] >>> 16).toString(16)).substr(-4)\r\n\t\t\t+ \"-\" + (\"0000\" + this.data[1].toString(16)).substr(-4)\r\n\t\t\t+ \"-\" + (\"0000\" + (this.data[2] >>> 16).toString(16)).substr(-4)\r\n\t\t\t+ \"-\" + (\"0000\" + this.data[2].toString(16)).substr(-4)\r\n\t\t\t+ (\"00000000\" + this.data[3].toString(16)).substr(-8);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.9683447-07:00\r\n\r\nimport { ActionTransition } from \"./ActionTransition\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNDeserializationOptions } from \"./ATNDeserializationOptions\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { ATNType } from \"./ATNType\";\r\nimport { AtomTransition } from \"./AtomTransition\";\r\nimport { BasicBlockStartState } from \"./BasicBlockStartState\";\r\nimport { BasicState } from \"./BasicState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { BlockEndState } from \"./BlockEndState\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { EpsilonTransition } from \"./EpsilonTransition\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { InvalidState } from \"./InvalidState\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { LexerChannelAction } from \"./LexerChannelAction\";\r\nimport { LexerCustomAction } from \"./LexerCustomAction\";\r\nimport { LexerModeAction } from \"./LexerModeAction\";\r\nimport { LexerMoreAction } from \"./LexerMoreAction\";\r\nimport { LexerPopModeAction } from \"./LexerPopModeAction\";\r\nimport { LexerPushModeAction } from \"./LexerPushModeAction\";\r\nimport { LexerSkipAction } from \"./LexerSkipAction\";\r\nimport { LexerTypeAction } from \"./LexerTypeAction\";\r\nimport { LoopEndState } from \"./LoopEndState\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { NotSetTransition } from \"./NotSetTransition\";\r\nimport { ParserATNSimulator } from \"./ParserATNSimulator\";\r\nimport { PlusBlockStartState } from \"./PlusBlockStartState\";\r\nimport { PlusLoopbackState } from \"./PlusLoopbackState\";\r\nimport { PrecedencePredicateTransition } from \"./PrecedencePredicateTransition\";\r\nimport { PredicateTransition } from \"./PredicateTransition\";\r\nimport { RangeTransition } from \"./RangeTransition\";\r\nimport { RuleStartState } from \"./RuleStartState\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { StarBlockStartState } from \"./StarBlockStartState\";\r\nimport { StarLoopbackState } from \"./StarLoopbackState\";\r\nimport { StarLoopEntryState } from \"./StarLoopEntryState\";\r\nimport { Token } from \"../Token\";\r\nimport { TokensStartState } from \"./TokensStartState\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\nimport { UUID } from \"../misc/UUID\";\r\nimport { WildcardTransition } from \"./WildcardTransition\";\r\n\r\ninterface UnicodeDeserializer {\r\n\t// Wrapper for readInt() or readInt32()\r\n\treadUnicode(data: Uint16Array, p: number): number;\r\n\r\n\t// Work around Java not allowing mutation of captured variables\r\n\t// by returning amount by which to increment p after each read\r\n\treadonly size: number;\r\n}\r\n\r\nconst enum UnicodeDeserializingMode {\r\n\tUNICODE_BMP,\r\n\tUNICODE_SMP,\r\n}\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ATNDeserializer {\r\n\tstatic get SERIALIZED_VERSION(): number {\r\n\t\t/* This value should never change. Updates following this version are\r\n\t\t * reflected as change in the unique ID SERIALIZED_UUID.\r\n\t\t */\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t/* WARNING: DO NOT MERGE THESE LINES. If UUIDs differ during a merge,\r\n\t * resolve the conflict by generating a new ID!\r\n\t */\r\n\r\n\t/**\r\n\t * This is the earliest supported serialized UUID.\r\n\t */\r\n\tprivate static readonly BASE_SERIALIZED_UUID: UUID = UUID.fromString(\"E4178468-DF95-44D0-AD87-F22A5D5FB6D3\");\r\n\t/**\r\n\t * This UUID indicates an extension of {@link #ADDED_PRECEDENCE_TRANSITIONS}\r\n\t * for the addition of lexer actions encoded as a sequence of\r\n\t * {@link LexerAction} instances.\r\n\t */\r\n\tprivate static readonly ADDED_LEXER_ACTIONS: UUID = UUID.fromString(\"AB35191A-1603-487E-B75A-479B831EAF6D\");\r\n\t/**\r\n\t * This UUID indicates the serialized ATN contains two sets of\r\n\t * IntervalSets, where the second set's values are encoded as\r\n\t * 32-bit integers to support the full Unicode SMP range up to U+10FFFF.\r\n\t */\r\n\tprivate static readonly ADDED_UNICODE_SMP: UUID = UUID.fromString(\"C23FEA89-0605-4f51-AFB8-058BCAB8C91B\");\r\n\t/**\r\n\t * This list contains all of the currently supported UUIDs, ordered by when\r\n\t * the feature first appeared in this branch.\r\n\t */\r\n\tprivate static readonly SUPPORTED_UUIDS: UUID[] = [\r\n\t\tATNDeserializer.BASE_SERIALIZED_UUID,\r\n\t\tATNDeserializer.ADDED_LEXER_ACTIONS,\r\n\t\tATNDeserializer.ADDED_UNICODE_SMP,\r\n\t];\r\n\r\n\t/**\r\n\t * This is the current serialized UUID.\r\n\t */\r\n\tprivate static readonly SERIALIZED_UUID: UUID = ATNDeserializer.ADDED_UNICODE_SMP;\r\n\r\n\t@NotNull\r\n\tprivate readonly deserializationOptions: ATNDeserializationOptions;\r\n\r\n\tconstructor(deserializationOptions?: ATNDeserializationOptions) {\r\n\t\tif (deserializationOptions === undefined) {\r\n\t\t\tdeserializationOptions = ATNDeserializationOptions.defaultOptions;\r\n\t\t}\r\n\r\n\t\tthis.deserializationOptions = deserializationOptions;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines if a particular serialized representation of an ATN supports\r\n\t * a particular feature, identified by the {@link UUID} used for serializing\r\n\t * the ATN at the time the feature was first introduced.\r\n\t *\r\n\t * @param feature The {@link UUID} marking the first time the feature was\r\n\t * supported in the serialized ATN.\r\n\t * @param actualUuid The {@link UUID} of the actual serialized ATN which is\r\n\t * currently being deserialized.\r\n\t * @returns `true` if the `actualUuid` value represents a\r\n\t * serialized ATN at or after the feature identified by `feature` was\r\n\t * introduced; otherwise, `false`.\r\n\t */\r\n\tprotected static isFeatureSupported(feature: UUID, actualUuid: UUID): boolean {\r\n\t\tlet featureIndex: number = ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(feature));\r\n\t\tif (featureIndex < 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(actualUuid)) >= featureIndex;\r\n\t}\r\n\r\n\tprivate static getUnicodeDeserializer(mode: UnicodeDeserializingMode): UnicodeDeserializer {\r\n\t\tif (mode === UnicodeDeserializingMode.UNICODE_BMP) {\r\n\t\t\treturn {\r\n\t\t\t\treadUnicode: (data: Uint16Array, p: number): number => {\r\n\t\t\t\t\treturn ATNDeserializer.toInt(data[p]);\r\n\t\t\t\t},\r\n\t\t\t\tsize: 1,\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\treturn {\r\n\t\t\t\treadUnicode: (data: Uint16Array, p: number): number => {\r\n\t\t\t\t\treturn ATNDeserializer.toInt32(data, p);\r\n\t\t\t\t},\r\n\t\t\t\tsize: 2,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tpublic deserialize(@NotNull data: Uint16Array): ATN {\r\n\t\tdata = data.slice(0);\r\n\r\n\t\t// Each Uint16 value in data is shifted by +2 at the entry to this method. This is an encoding optimization\r\n\t\t// targeting the serialized values 0 and -1 (serialized to 0xFFFF), each of which are very common in the\r\n\t\t// serialized form of the ATN. In the modified UTF-8 that Java uses for compiled string literals, these two\r\n\t\t// character values have multi-byte forms. By shifting each value by +2, they become characters 2 and 1 prior to\r\n\t\t// writing the string, each of which have single-byte representations. Since the shift occurs in the tool during\r\n\t\t// ATN serialization, each target is responsible for adjusting the values during deserialization.\r\n\t\t//\r\n\t\t// As a special case, note that the first element of data is not adjusted because it contains the major version\r\n\t\t// number of the serialized ATN, which was fixed at 3 at the time the value shifting was implemented.\r\n\t\tfor (let i = 1; i < data.length; i++) {\r\n\t\t\tdata[i] = (data[i] - 2) & 0xFFFF;\r\n\t\t}\r\n\r\n\t\tlet p: number = 0;\r\n\t\tlet version: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tif (version !== ATNDeserializer.SERIALIZED_VERSION) {\r\n\t\t\tlet reason = `Could not deserialize ATN with version ${version} (expected ${ATNDeserializer.SERIALIZED_VERSION}).`;\r\n\t\t\tthrow new Error(reason);\r\n\t\t}\r\n\r\n\t\tlet uuid: UUID = ATNDeserializer.toUUID(data, p);\r\n\t\tp += 8;\r\n\t\tif (ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(uuid)) < 0) {\r\n\t\t\tlet reason = `Could not deserialize ATN with UUID ${uuid} (expected ${ATNDeserializer.SERIALIZED_UUID} or a legacy UUID).`;\r\n\t\t\tthrow new Error(reason);\r\n\t\t}\r\n\r\n\t\tlet supportsLexerActions: boolean = ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_LEXER_ACTIONS, uuid);\r\n\r\n\t\tlet grammarType: ATNType = ATNDeserializer.toInt(data[p++]);\r\n\t\tlet maxTokenType: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tlet atn: ATN = new ATN(grammarType, maxTokenType);\r\n\r\n\t\t//\r\n\t\t// STATES\r\n\t\t//\r\n\t\tlet loopBackStateNumbers: Array<[LoopEndState, number]> = [];\r\n\t\tlet endStateNumbers: Array<[BlockStartState, number]> = [];\r\n\t\tlet nstates: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nstates; i++) {\r\n\t\t\tlet stype: ATNStateType = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t// ignore bad type of states\r\n\t\t\tif (stype === ATNStateType.INVALID_TYPE) {\r\n\t\t\t\tatn.addState(new InvalidState());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet ruleIndex: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tif (ruleIndex === 0xFFFF) {\r\n\t\t\t\truleIndex = -1;\r\n\t\t\t}\r\n\r\n\t\t\tlet s: ATNState = this.stateFactory(stype, ruleIndex);\r\n\t\t\tif (stype === ATNStateType.LOOP_END) { // special case\r\n\t\t\t\tlet loopBackStateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\tloopBackStateNumbers.push([s as LoopEndState, loopBackStateNumber]);\r\n\t\t\t}\r\n\t\t\telse if (s instanceof BlockStartState) {\r\n\t\t\t\tlet endStateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\tendStateNumbers.push([s, endStateNumber]);\r\n\t\t\t}\r\n\t\t\tatn.addState(s);\r\n\t\t}\r\n\r\n\t\t// delay the assignment of loop back and end states until we know all the state instances have been initialized\r\n\t\tfor (let pair of loopBackStateNumbers) {\r\n\t\t\tpair[0].loopBackState = atn.states[pair[1]];\r\n\t\t}\r\n\r\n\t\tfor (let pair of endStateNumbers) {\r\n\t\t\tpair[0].endState = atn.states[pair[1]] as BlockEndState;\r\n\t\t}\r\n\r\n\t\tlet numNonGreedyStates: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < numNonGreedyStates; i++) {\r\n\t\t\tlet stateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t(atn.states[stateNumber] as DecisionState).nonGreedy = true;\r\n\t\t}\r\n\r\n\t\tlet numSllDecisions: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < numSllDecisions; i++) {\r\n\t\t\tlet stateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t(atn.states[stateNumber] as DecisionState).sll = true;\r\n\t\t}\r\n\r\n\t\tlet numPrecedenceStates: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < numPrecedenceStates; i++) {\r\n\t\t\tlet stateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t(atn.states[stateNumber] as RuleStartState).isPrecedenceRule = true;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// RULES\r\n\t\t//\r\n\t\tlet nrules: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tif (atn.grammarType === ATNType.LEXER) {\r\n\t\t\tatn.ruleToTokenType = new Int32Array(nrules);\r\n\t\t}\r\n\r\n\t\tatn.ruleToStartState = new Array(nrules);\r\n\t\tfor (let i = 0; i < nrules; i++) {\r\n\t\t\tlet s: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tlet startState: RuleStartState = atn.states[s] as RuleStartState;\r\n\t\t\tstartState.leftFactored = ATNDeserializer.toInt(data[p++]) !== 0;\r\n\t\t\tatn.ruleToStartState[i] = startState;\r\n\t\t\tif (atn.grammarType === ATNType.LEXER) {\r\n\t\t\t\tlet tokenType: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\tif (tokenType === 0xFFFF) {\r\n\t\t\t\t\ttokenType = Token.EOF;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tatn.ruleToTokenType[i] = tokenType;\r\n\r\n\t\t\t\tif (!ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_LEXER_ACTIONS, uuid)) {\r\n\t\t\t\t\t// this piece of unused metadata was serialized prior to the\r\n\t\t\t\t\t// addition of LexerAction\r\n\t\t\t\t\tlet actionIndexIgnored: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tif (actionIndexIgnored === 0xFFFF) {\r\n\t\t\t\t\t\tactionIndexIgnored = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tatn.ruleToStopState = new Array(nrules);\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (!(state instanceof RuleStopState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tatn.ruleToStopState[state.ruleIndex] = state;\r\n\t\t\tatn.ruleToStartState[state.ruleIndex].stopState = state;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// MODES\r\n\t\t//\r\n\t\tlet nmodes: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nmodes; i++) {\r\n\t\t\tlet s: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tatn.modeToStartState.push(atn.states[s] as TokensStartState);\r\n\t\t}\r\n\r\n\t\tatn.modeToDFA = new Array(nmodes);\r\n\t\tfor (let i = 0; i < nmodes; i++) {\r\n\t\t\tatn.modeToDFA[i] = new DFA(atn.modeToStartState[i]);\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// SETS\r\n\t\t//\r\n\t\tlet sets: IntervalSet[] = [];\r\n\r\n\t\t// First, read all sets with 16-bit Unicode code points <= U+FFFF.\r\n\t\tp = this.deserializeSets(data, p, sets, ATNDeserializer.getUnicodeDeserializer(UnicodeDeserializingMode.UNICODE_BMP));\r\n\r\n\t\t// Next, if the ATN was serialized with the Unicode SMP feature,\r\n\t\t// deserialize sets with 32-bit arguments <= U+10FFFF.\r\n\t\tif (ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_UNICODE_SMP, uuid)) {\r\n\t\t\tp = this.deserializeSets(data, p, sets, ATNDeserializer.getUnicodeDeserializer(UnicodeDeserializingMode.UNICODE_SMP));\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// EDGES\r\n\t\t//\r\n\t\tlet nedges: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nedges; i++) {\r\n\t\t\tlet src: number = ATNDeserializer.toInt(data[p]);\r\n\t\t\tlet trg: number = ATNDeserializer.toInt(data[p + 1]);\r\n\t\t\tlet ttype: number = ATNDeserializer.toInt(data[p + 2]);\r\n\t\t\tlet arg1: number = ATNDeserializer.toInt(data[p + 3]);\r\n\t\t\tlet arg2: number = ATNDeserializer.toInt(data[p + 4]);\r\n\t\t\tlet arg3: number = ATNDeserializer.toInt(data[p + 5]);\r\n\t\t\tlet trans: Transition = this.edgeFactory(atn, ttype, src, trg, arg1, arg2, arg3, sets);\r\n\t\t\t// console.log(`EDGE ${trans.constructor.name} ${src}->${trg} ${Transition.serializationNames[ttype]} ${arg1},${arg2},${arg3}`);\r\n\t\t\tlet srcState: ATNState = atn.states[src];\r\n\t\t\tsrcState.addTransition(trans);\r\n\t\t\tp += 6;\r\n\t\t}\r\n\r\n\t\t// edges for rule stop states can be derived, so they aren't serialized\r\n\t\tinterface T { stopState: number; returnState: number; outermostPrecedenceReturn: number; }\r\n\t\tlet returnTransitionsSet = new Array2DHashSet({\r\n\t\t\thashCode: (o: T) => o.stopState ^ o.returnState ^ o.outermostPrecedenceReturn,\r\n\r\n\t\t\tequals: (a: T, b: T): boolean => {\r\n\t\t\t\treturn a.stopState === b.stopState\r\n\t\t\t\t\t&& a.returnState === b.returnState\r\n\t\t\t\t\t&& a.outermostPrecedenceReturn === b.outermostPrecedenceReturn;\r\n\t\t\t},\r\n\t\t});\r\n\t\tlet returnTransitions: T[] = [];\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tlet returningToLeftFactored: boolean = state.ruleIndex >= 0 && atn.ruleToStartState[state.ruleIndex].leftFactored;\r\n\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\tlet t: Transition = state.transition(i);\r\n\t\t\t\tif (!(t instanceof RuleTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet ruleTransition: RuleTransition = t;\r\n\t\t\t\tlet returningFromLeftFactored: boolean = atn.ruleToStartState[ruleTransition.target.ruleIndex].leftFactored;\r\n\t\t\t\tif (!returningFromLeftFactored && returningToLeftFactored) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet outermostPrecedenceReturn: number = -1;\r\n\t\t\t\tif (atn.ruleToStartState[ruleTransition.target.ruleIndex].isPrecedenceRule) {\r\n\t\t\t\t\tif (ruleTransition.precedence === 0) {\r\n\t\t\t\t\t\toutermostPrecedenceReturn = ruleTransition.target.ruleIndex;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet current = { stopState: ruleTransition.target.ruleIndex, returnState: ruleTransition.followState.stateNumber, outermostPrecedenceReturn };\r\n\t\t\t\tif (returnTransitionsSet.add(current)) {\r\n\t\t\t\t\treturnTransitions.push(current);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add all elements from returnTransitions to the ATN\r\n\t\tfor (let returnTransition of returnTransitions) {\r\n\t\t\tlet transition = new EpsilonTransition(atn.states[returnTransition.returnState], returnTransition.outermostPrecedenceReturn);\r\n\t\t\tatn.ruleToStopState[returnTransition.stopState].addTransition(transition);\r\n\t\t}\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (state instanceof BlockStartState) {\r\n\t\t\t\t// we need to know the end state to set its start state\r\n\t\t\t\tif (state.endState === undefined) {\r\n\t\t\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// block end states can only be associated to a single block start state\r\n\t\t\t\tif (state.endState.startState !== undefined) {\r\n\t\t\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstate.endState.startState = state;\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof PlusLoopbackState) {\r\n\t\t\t\tlet loopbackState: PlusLoopbackState = state;\r\n\t\t\t\tfor (let i = 0; i < loopbackState.numberOfTransitions; i++) {\r\n\t\t\t\t\tlet target: ATNState = loopbackState.transition(i).target;\r\n\t\t\t\t\tif (target instanceof PlusBlockStartState) {\r\n\t\t\t\t\t\ttarget.loopBackState = loopbackState;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (state instanceof StarLoopbackState) {\r\n\t\t\t\tlet loopbackState: StarLoopbackState = state;\r\n\t\t\t\tfor (let i = 0; i < loopbackState.numberOfTransitions; i++) {\r\n\t\t\t\t\tlet target: ATNState = loopbackState.transition(i).target;\r\n\t\t\t\t\tif (target instanceof StarLoopEntryState) {\r\n\t\t\t\t\t\ttarget.loopBackState = loopbackState;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// DECISIONS\r\n\t\t//\r\n\t\tlet ndecisions: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 1; i <= ndecisions; i++) {\r\n\t\t\tlet s: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tlet decState: DecisionState = atn.states[s] as DecisionState;\r\n\t\t\tatn.decisionToState.push(decState);\r\n\t\t\tdecState.decision = i - 1;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// LEXER ACTIONS\r\n\t\t//\r\n\t\tif (atn.grammarType === ATNType.LEXER) {\r\n\t\t\tif (supportsLexerActions) {\r\n\t\t\t\tatn.lexerActions = new Array(ATNDeserializer.toInt(data[p++]));\r\n\t\t\t\tfor (let i = 0; i < atn.lexerActions.length; i++) {\r\n\t\t\t\t\tlet actionType: LexerActionType = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tlet data1: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tif (data1 === 0xFFFF) {\r\n\t\t\t\t\t\tdata1 = -1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet data2: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tif (data2 === 0xFFFF) {\r\n\t\t\t\t\t\tdata2 = -1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet lexerAction: LexerAction = this.lexerActionFactory(actionType, data1, data2);\r\n\r\n\t\t\t\t\tatn.lexerActions[i] = lexerAction;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// for compatibility with older serialized ATNs, convert the old\r\n\t\t\t\t// serialized action index for action transitions to the new\r\n\t\t\t\t// form, which is the index of a LexerCustomAction\r\n\t\t\t\tlet legacyLexerActions: LexerAction[] = [];\r\n\t\t\t\tfor (let state of atn.states) {\r\n\t\t\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\t\t\tlet transition: Transition = state.transition(i);\r\n\t\t\t\t\t\tif (!(transition instanceof ActionTransition)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlet ruleIndex: number = transition.ruleIndex;\r\n\t\t\t\t\t\tlet actionIndex: number = transition.actionIndex;\r\n\t\t\t\t\t\tlet lexerAction: LexerCustomAction = new LexerCustomAction(ruleIndex, actionIndex);\r\n\t\t\t\t\t\tstate.setTransition(i, new ActionTransition(transition.target, ruleIndex, legacyLexerActions.length, false));\r\n\t\t\t\t\t\tlegacyLexerActions.push(lexerAction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tatn.lexerActions = legacyLexerActions;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markPrecedenceDecisions(atn);\r\n\r\n\t\tatn.decisionToDFA = new Array(ndecisions);\r\n\t\tfor (let i = 0; i < ndecisions; i++) {\r\n\t\t\tatn.decisionToDFA[i] = new DFA(atn.decisionToState[i], i);\r\n\t\t}\r\n\r\n\t\tif (this.deserializationOptions.isVerifyATN) {\r\n\t\t\tthis.verifyATN(atn);\r\n\t\t}\r\n\r\n\t\tif (this.deserializationOptions.isGenerateRuleBypassTransitions && atn.grammarType === ATNType.PARSER) {\r\n\t\t\tatn.ruleToTokenType = new Int32Array(atn.ruleToStartState.length);\r\n\t\t\tfor (let i = 0; i < atn.ruleToStartState.length; i++) {\r\n\t\t\t\tatn.ruleToTokenType[i] = atn.maxTokenType + i + 1;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < atn.ruleToStartState.length; i++) {\r\n\t\t\t\tlet bypassStart: BasicBlockStartState = new BasicBlockStartState();\r\n\t\t\t\tbypassStart.ruleIndex = i;\r\n\t\t\t\tatn.addState(bypassStart);\r\n\r\n\t\t\t\tlet bypassStop: BlockEndState = new BlockEndState();\r\n\t\t\t\tbypassStop.ruleIndex = i;\r\n\t\t\t\tatn.addState(bypassStop);\r\n\r\n\t\t\t\tbypassStart.endState = bypassStop;\r\n\t\t\t\tatn.defineDecisionState(bypassStart);\r\n\r\n\t\t\t\tbypassStop.startState = bypassStart;\r\n\r\n\t\t\t\tlet endState: ATNState | undefined;\r\n\t\t\t\tlet excludeTransition: Transition | undefined;\r\n\t\t\t\tif (atn.ruleToStartState[i].isPrecedenceRule) {\r\n\t\t\t\t\t// wrap from the beginning of the rule to the StarLoopEntryState\r\n\t\t\t\t\tendState = undefined;\r\n\t\t\t\t\tfor (let state of atn.states) {\r\n\t\t\t\t\t\tif (state.ruleIndex !== i) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (!(state instanceof StarLoopEntryState)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlet maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target;\r\n\t\t\t\t\t\tif (!(maybeLoopEndState instanceof LoopEndState)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.transition(0).target instanceof RuleStopState) {\r\n\t\t\t\t\t\t\tendState = state;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!endState) {\r\n\t\t\t\t\t\tthrow new Error(\"Couldn't identify final state of the precedence rule prefix section.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\texcludeTransition = (endState as StarLoopEntryState).loopBackState.transition(0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tendState = atn.ruleToStopState[i];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// all non-excluded transitions that currently target end state need to target blockEnd instead\r\n\t\t\t\tfor (let state of atn.states) {\r\n\t\t\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\t\t\tlet transition = state.transition(i);\r\n\t\t\t\t\t\tif (transition === excludeTransition) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (transition.target === endState) {\r\n\t\t\t\t\t\t\ttransition.target = bypassStop;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// all transitions leaving the rule start state need to leave blockStart instead\r\n\t\t\t\twhile (atn.ruleToStartState[i].numberOfTransitions > 0) {\r\n\t\t\t\t\tlet transition: Transition = atn.ruleToStartState[i].removeTransition(atn.ruleToStartState[i].numberOfTransitions - 1);\r\n\t\t\t\t\tbypassStart.addTransition(transition);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// link the new states\r\n\t\t\t\tatn.ruleToStartState[i].addTransition(new EpsilonTransition(bypassStart));\r\n\t\t\t\tbypassStop.addTransition(new EpsilonTransition(endState));\r\n\r\n\t\t\t\tlet matchState: ATNState = new BasicState();\r\n\t\t\t\tatn.addState(matchState);\r\n\t\t\t\tmatchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i]));\r\n\t\t\t\tbypassStart.addTransition(new EpsilonTransition(matchState));\r\n\t\t\t}\r\n\r\n\t\t\tif (this.deserializationOptions.isVerifyATN) {\r\n\t\t\t\t// reverify after modification\r\n\t\t\t\tthis.verifyATN(atn);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.deserializationOptions.isOptimize) {\r\n\t\t\twhile (true) {\r\n\t\t\t\tlet optimizationCount: number = 0;\r\n\t\t\t\toptimizationCount += ATNDeserializer.inlineSetRules(atn);\r\n\t\t\t\toptimizationCount += ATNDeserializer.combineChainedEpsilons(atn);\r\n\t\t\t\tlet preserveOrder: boolean = atn.grammarType === ATNType.LEXER;\r\n\t\t\t\toptimizationCount += ATNDeserializer.optimizeSets(atn, preserveOrder);\r\n\t\t\t\tif (optimizationCount === 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.deserializationOptions.isVerifyATN) {\r\n\t\t\t\t// reverify after modification\r\n\t\t\t\tthis.verifyATN(atn);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tATNDeserializer.identifyTailCalls(atn);\r\n\r\n\t\treturn atn;\r\n\t}\r\n\r\n\tprivate deserializeSets(data: Uint16Array, p: number, sets: IntervalSet[], unicodeDeserializer: UnicodeDeserializer): number {\r\n\t\tlet nsets: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nsets; i++) {\r\n\t\t\tlet nintervals: number = ATNDeserializer.toInt(data[p]);\r\n\t\t\tp++;\r\n\t\t\tlet set: IntervalSet = new IntervalSet();\r\n\t\t\tsets.push(set);\r\n\r\n\t\t\tlet containsEof: boolean = ATNDeserializer.toInt(data[p++]) !== 0;\r\n\t\t\tif (containsEof) {\r\n\t\t\t\tset.add(-1);\r\n\t\t\t}\r\n\r\n\t\t\tfor (let j: number = 0; j < nintervals; j++) {\r\n\t\t\t\tlet a: number = unicodeDeserializer.readUnicode(data, p);\r\n\t\t\t\tp += unicodeDeserializer.size;\r\n\t\t\t\tlet b: number = unicodeDeserializer.readUnicode(data, p);\r\n\t\t\t\tp += unicodeDeserializer.size;\r\n\t\t\t\tset.add(a, b);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn p;\r\n\t}\r\n\r\n\t/**\r\n\t * Analyze the {@link StarLoopEntryState} states in the specified ATN to set\r\n\t * the {@link StarLoopEntryState#precedenceRuleDecision} field to the\r\n\t * correct value.\r\n\t *\r\n\t * @param atn The ATN.\r\n\t */\r\n\tprotected markPrecedenceDecisions(@NotNull atn: ATN): void {\r\n\t\t// Map rule index -> precedence decision for that rule\r\n\t\tlet rulePrecedenceDecisions = new Map();\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (!(state instanceof StarLoopEntryState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t/* We analyze the ATN to determine if this ATN decision state is the\r\n\t\t\t * decision for the closure block that determines whether a\r\n\t\t\t * precedence rule should continue or complete.\r\n\t\t\t */\r\n\t\t\tif (atn.ruleToStartState[state.ruleIndex].isPrecedenceRule) {\r\n\t\t\t\tlet maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target;\r\n\t\t\t\tif (maybeLoopEndState instanceof LoopEndState) {\r\n\t\t\t\t\tif (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.transition(0).target instanceof RuleStopState) {\r\n\t\t\t\t\t\trulePrecedenceDecisions.set(state.ruleIndex, state);\r\n\t\t\t\t\t\tstate.precedenceRuleDecision = true;\r\n\t\t\t\t\t\tstate.precedenceLoopbackStates = new BitSet(atn.states.length);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// After marking precedence decisions, we go back through and fill in\r\n\t\t// StarLoopEntryState.precedenceLoopbackStates.\r\n\t\tfor (let precedenceDecision of rulePrecedenceDecisions) {\r\n\t\t\tfor (let transition of atn.ruleToStopState[precedenceDecision[0]].getTransitions()) {\r\n\t\t\t\tif (transition.serializationType !== TransitionType.EPSILON) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet epsilonTransition = transition as EpsilonTransition;\r\n\t\t\t\tif (epsilonTransition.outermostPrecedenceReturn !== -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprecedenceDecision[1].precedenceLoopbackStates.set(transition.target.stateNumber);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected verifyATN(atn: ATN): void {\r\n\t\t// verify assumptions\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tthis.checkCondition(state !== undefined, \"ATN states should not be undefined.\");\r\n\t\t\tif (state.stateType === ATNStateType.INVALID_TYPE) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tthis.checkCondition(state.onlyHasEpsilonTransitions || state.numberOfTransitions <= 1);\r\n\r\n\t\t\tif (state instanceof PlusBlockStartState) {\r\n\t\t\t\tthis.checkCondition(state.loopBackState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof StarLoopEntryState) {\r\n\t\t\t\tlet starLoopEntryState: StarLoopEntryState = state;\r\n\t\t\t\tthis.checkCondition(starLoopEntryState.loopBackState !== undefined);\r\n\t\t\t\tthis.checkCondition(starLoopEntryState.numberOfTransitions === 2);\r\n\r\n\t\t\t\tif (starLoopEntryState.transition(0).target instanceof StarBlockStartState) {\r\n\t\t\t\t\tthis.checkCondition(starLoopEntryState.transition(1).target instanceof LoopEndState);\r\n\t\t\t\t\tthis.checkCondition(!starLoopEntryState.nonGreedy);\r\n\t\t\t\t}\r\n\t\t\t\telse if (starLoopEntryState.transition(0).target instanceof LoopEndState) {\r\n\t\t\t\t\tthis.checkCondition(starLoopEntryState.transition(1).target instanceof StarBlockStartState);\r\n\t\t\t\t\tthis.checkCondition(starLoopEntryState.nonGreedy);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof StarLoopbackState) {\r\n\t\t\t\tthis.checkCondition(state.numberOfTransitions === 1);\r\n\t\t\t\tthis.checkCondition(state.transition(0).target instanceof StarLoopEntryState);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof LoopEndState) {\r\n\t\t\t\tthis.checkCondition(state.loopBackState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof RuleStartState) {\r\n\t\t\t\tthis.checkCondition(state.stopState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof BlockStartState) {\r\n\t\t\t\tthis.checkCondition(state.endState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof BlockEndState) {\r\n\t\t\t\tthis.checkCondition(state.startState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof DecisionState) {\r\n\t\t\t\tlet decisionState: DecisionState = state;\r\n\t\t\t\tthis.checkCondition(decisionState.numberOfTransitions <= 1 || decisionState.decision >= 0);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.checkCondition(state.numberOfTransitions <= 1 || state instanceof RuleStopState);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected checkCondition(condition: boolean, message?: string): void {\r\n\t\tif (!condition) {\r\n\t\t\tthrow new Error(\"IllegalStateException: \" + message);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static inlineSetRules(atn: ATN): number {\r\n\t\tlet inlinedCalls: number = 0;\r\n\r\n\t\tlet ruleToInlineTransition = new Array(atn.ruleToStartState.length);\r\n\t\tfor (let i = 0; i < atn.ruleToStartState.length; i++) {\r\n\t\t\tlet startState: RuleStartState = atn.ruleToStartState[i];\r\n\t\t\tlet middleState: ATNState = startState;\r\n\t\t\twhile (middleState.onlyHasEpsilonTransitions\r\n\t\t\t\t&& middleState.numberOfOptimizedTransitions === 1\r\n\t\t\t\t&& middleState.getOptimizedTransition(0).serializationType === TransitionType.EPSILON) {\r\n\t\t\t\tmiddleState = middleState.getOptimizedTransition(0).target;\r\n\t\t\t}\r\n\r\n\t\t\tif (middleState.numberOfOptimizedTransitions !== 1) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet matchTransition: Transition = middleState.getOptimizedTransition(0);\r\n\t\t\tlet matchTarget: ATNState = matchTransition.target;\r\n\t\t\tif (matchTransition.isEpsilon\r\n\t\t\t\t|| !matchTarget.onlyHasEpsilonTransitions\r\n\t\t\t\t|| matchTarget.numberOfOptimizedTransitions !== 1\r\n\t\t\t\t|| !(matchTarget.getOptimizedTransition(0).target instanceof RuleStopState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tswitch (matchTransition.serializationType) {\r\n\t\t\tcase TransitionType.ATOM:\r\n\t\t\tcase TransitionType.RANGE:\r\n\t\t\tcase TransitionType.SET:\r\n\t\t\t\truleToInlineTransition[i] = matchTransition;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase TransitionType.NOT_SET:\r\n\t\t\tcase TransitionType.WILDCARD:\r\n\t\t\t\t// not implemented yet\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (state.ruleIndex < 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet optimizedTransitions: Transition[] | undefined;\r\n\t\t\tfor (let i = 0; i < state.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet transition: Transition = state.getOptimizedTransition(i);\r\n\t\t\t\tif (!(transition instanceof RuleTransition)) {\r\n\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet ruleTransition: RuleTransition = transition;\r\n\t\t\t\tlet effective: Transition | undefined = ruleToInlineTransition[ruleTransition.target.ruleIndex];\r\n\t\t\t\tif (effective === undefined) {\r\n\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (optimizedTransitions === undefined) {\r\n\t\t\t\t\toptimizedTransitions = [];\r\n\t\t\t\t\tfor (let j = 0; j < i; j++) {\r\n\t\t\t\t\t\toptimizedTransitions.push(state.getOptimizedTransition(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinlinedCalls++;\r\n\t\t\t\tlet target: ATNState = ruleTransition.followState;\r\n\t\t\t\tlet intermediateState: ATNState = new BasicState();\r\n\t\t\t\tintermediateState.setRuleIndex(target.ruleIndex);\r\n\t\t\t\tatn.addState(intermediateState);\r\n\t\t\t\toptimizedTransitions.push(new EpsilonTransition(intermediateState));\r\n\r\n\t\t\t\tswitch (effective.serializationType) {\r\n\t\t\t\tcase TransitionType.ATOM:\r\n\t\t\t\t\tintermediateState.addTransition(new AtomTransition(target, (effective as AtomTransition)._label));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase TransitionType.RANGE:\r\n\t\t\t\t\tintermediateState.addTransition(new RangeTransition(target, (effective as RangeTransition).from, (effective as RangeTransition).to));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase TransitionType.SET:\r\n\t\t\t\t\tintermediateState.addTransition(new SetTransition(target, (effective as SetTransition).label));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Error(\"UnsupportedOperationException\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\tif (state.isOptimized) {\r\n\t\t\t\t\twhile (state.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\t\t\tstate.removeOptimizedTransition(state.numberOfOptimizedTransitions - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let transition of optimizedTransitions) {\r\n\t\t\t\t\tstate.addOptimizedTransition(transition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ATN runtime optimizer removed \" + inlinedCalls + \" rule invocations by inlining sets.\");\r\n\t\t}\r\n\r\n\t\treturn inlinedCalls;\r\n\t}\r\n\r\n\tprivate static combineChainedEpsilons(atn: ATN): number {\r\n\t\tlet removedEdges: number = 0;\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (!state.onlyHasEpsilonTransitions || state instanceof RuleStopState) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet optimizedTransitions: Transition[] | undefined;\r\n\t\t\tnextTransition:\r\n\t\t\tfor (let i = 0; i < state.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet transition: Transition = state.getOptimizedTransition(i);\r\n\t\t\t\tlet intermediate: ATNState = transition.target;\r\n\t\t\t\tif (transition.serializationType !== TransitionType.EPSILON\r\n\t\t\t\t\t|| (transition as EpsilonTransition).outermostPrecedenceReturn !== -1\r\n\t\t\t\t\t|| intermediate.stateType !== ATNStateType.BASIC\r\n\t\t\t\t\t|| !intermediate.onlyHasEpsilonTransitions) {\r\n\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue nextTransition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let j = 0; j < intermediate.numberOfOptimizedTransitions; j++) {\r\n\t\t\t\t\tif (intermediate.getOptimizedTransition(j).serializationType !== TransitionType.EPSILON\r\n\t\t\t\t\t\t|| (intermediate.getOptimizedTransition(j) as EpsilonTransition).outermostPrecedenceReturn !== -1) {\r\n\t\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcontinue nextTransition;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tremovedEdges++;\r\n\t\t\t\tif (optimizedTransitions === undefined) {\r\n\t\t\t\t\toptimizedTransitions = [];\r\n\t\t\t\t\tfor (let j = 0; j < i; j++) {\r\n\t\t\t\t\t\toptimizedTransitions.push(state.getOptimizedTransition(j));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let j = 0; j < intermediate.numberOfOptimizedTransitions; j++) {\r\n\t\t\t\t\tlet target: ATNState = intermediate.getOptimizedTransition(j).target;\r\n\t\t\t\t\toptimizedTransitions.push(new EpsilonTransition(target));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\tif (state.isOptimized) {\r\n\t\t\t\t\twhile (state.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\t\t\tstate.removeOptimizedTransition(state.numberOfOptimizedTransitions - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let transition of optimizedTransitions) {\r\n\t\t\t\t\tstate.addOptimizedTransition(transition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ATN runtime optimizer removed \" + removedEdges + \" transitions by combining chained epsilon transitions.\");\r\n\t\t}\r\n\r\n\t\treturn removedEdges;\r\n\t}\r\n\r\n\tprivate static optimizeSets(atn: ATN, preserveOrder: boolean): number {\r\n\t\tif (preserveOrder) {\r\n\t\t\t// this optimization currently doesn't preserve edge order.\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tlet removedPaths: number = 0;\r\n\t\tlet decisions: DecisionState[] = atn.decisionToState;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tlet setTransitions: IntervalSet = new IntervalSet();\r\n\t\t\tfor (let i = 0; i < decision.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet epsTransition: Transition = decision.getOptimizedTransition(i);\r\n\t\t\t\tif (!(epsTransition instanceof EpsilonTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (epsTransition.target.numberOfOptimizedTransitions !== 1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet transition: Transition = epsTransition.target.getOptimizedTransition(0);\r\n\t\t\t\tif (!(transition.target instanceof BlockEndState)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (transition instanceof NotSetTransition) {\r\n\t\t\t\t\t// TODO: not yet implemented\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (transition instanceof AtomTransition\r\n\t\t\t\t\t|| transition instanceof RangeTransition\r\n\t\t\t\t\t|| transition instanceof SetTransition) {\r\n\t\t\t\t\tsetTransitions.add(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (setTransitions.size <= 1) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet optimizedTransitions: Transition[] = [];\r\n\t\t\tfor (let i = 0; i < decision.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tif (!setTransitions.contains(i)) {\r\n\t\t\t\t\toptimizedTransitions.push(decision.getOptimizedTransition(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet blockEndState: ATNState = decision.getOptimizedTransition(setTransitions.minElement).target.getOptimizedTransition(0).target;\r\n\t\t\tlet matchSet: IntervalSet = new IntervalSet();\r\n\t\t\tfor (let interval of setTransitions.intervals) {\r\n\t\t\t\tfor (let j = interval.a; j <= interval.b; j++) {\r\n\t\t\t\t\tlet matchTransition: Transition = decision.getOptimizedTransition(j).target.getOptimizedTransition(0);\r\n\t\t\t\t\tif (matchTransition instanceof NotSetTransition) {\r\n\t\t\t\t\t\tthrow new Error(\"Not yet implemented.\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmatchSet.addAll(matchTransition.label as IntervalSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet newTransition: Transition;\r\n\t\t\tif (matchSet.intervals.length === 1) {\r\n\t\t\t\tif (matchSet.size === 1) {\r\n\t\t\t\t\tnewTransition = new AtomTransition(blockEndState, matchSet.minElement);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlet matchInterval: Interval = matchSet.intervals[0];\r\n\t\t\t\t\tnewTransition = new RangeTransition(blockEndState, matchInterval.a, matchInterval.b);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnewTransition = new SetTransition(blockEndState, matchSet);\r\n\t\t\t}\r\n\r\n\t\t\tlet setOptimizedState: ATNState = new BasicState();\r\n\t\t\tsetOptimizedState.setRuleIndex(decision.ruleIndex);\r\n\t\t\tatn.addState(setOptimizedState);\r\n\r\n\t\t\tsetOptimizedState.addTransition(newTransition);\r\n\t\t\toptimizedTransitions.push(new EpsilonTransition(setOptimizedState));\r\n\r\n\t\t\tremovedPaths += decision.numberOfOptimizedTransitions - optimizedTransitions.length;\r\n\r\n\t\t\tif (decision.isOptimized) {\r\n\t\t\t\twhile (decision.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\t\tdecision.removeOptimizedTransition(decision.numberOfOptimizedTransitions - 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (let transition of optimizedTransitions) {\r\n\t\t\t\tdecision.addOptimizedTransition(transition);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ATN runtime optimizer removed \" + removedPaths + \" paths by collapsing sets.\");\r\n\t\t}\r\n\r\n\t\treturn removedPaths;\r\n\t}\r\n\r\n\tprivate static identifyTailCalls(atn: ATN): void {\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\tlet transition = state.transition(i);\r\n\t\t\t\tif (!(transition instanceof RuleTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttransition.tailCall = this.testTailCall(atn, transition, false);\r\n\t\t\t\ttransition.optimizedTailCall = this.testTailCall(atn, transition, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!state.isOptimized) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < state.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet transition = state.getOptimizedTransition(i);\r\n\t\t\t\tif (!(transition instanceof RuleTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttransition.tailCall = this.testTailCall(atn, transition, false);\r\n\t\t\t\ttransition.optimizedTailCall = this.testTailCall(atn, transition, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static testTailCall(atn: ATN, transition: RuleTransition, optimizedPath: boolean): boolean {\r\n\t\tif (!optimizedPath && transition.tailCall) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (optimizedPath && transition.optimizedTailCall) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tlet reachable: BitSet = new BitSet(atn.states.length);\r\n\t\tlet worklist: ATNState[] = [];\r\n\t\tworklist.push(transition.followState);\r\n\t\twhile (true) {\r\n\t\t\tlet state = worklist.pop();\r\n\t\t\tif (!state) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (reachable.get(state.stateNumber)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof RuleStopState) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (!state.onlyHasEpsilonTransitions) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tlet transitionCount = optimizedPath ? state.numberOfOptimizedTransitions : state.numberOfTransitions;\r\n\t\t\tfor (let i = 0; i < transitionCount; i++) {\r\n\t\t\t\tlet t = optimizedPath ? state.getOptimizedTransition(i) : state.transition(i);\r\n\t\t\t\tif (t.serializationType !== TransitionType.EPSILON) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tworklist.push(t.target);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\tprotected static toInt(c: number): number {\r\n\t\treturn c;\r\n\t}\r\n\r\n\tprotected static toInt32(data: Uint16Array, offset: number): number {\r\n\t\treturn (data[offset] | (data[offset + 1] << 16)) >>> 0;\r\n\t}\r\n\r\n\tprotected static toUUID(data: Uint16Array, offset: number): UUID {\r\n\t\tlet leastSigBits: number = ATNDeserializer.toInt32(data, offset);\r\n\t\tlet lessSigBits: number = ATNDeserializer.toInt32(data, offset + 2);\r\n\t\tlet moreSigBits: number = ATNDeserializer.toInt32(data, offset + 4);\r\n\t\tlet mostSigBits: number = ATNDeserializer.toInt32(data, offset + 6);\r\n\t\treturn new UUID(mostSigBits, moreSigBits, lessSigBits, leastSigBits);\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected edgeFactory(\r\n\t\t@NotNull atn: ATN,\r\n\t\ttype: TransitionType, src: number, trg: number,\r\n\t\targ1: number, arg2: number, arg3: number,\r\n\t\tsets: IntervalSet[]): Transition {\r\n\t\tlet target: ATNState = atn.states[trg];\r\n\t\tswitch (type) {\r\n\t\t\tcase TransitionType.EPSILON: return new EpsilonTransition(target);\r\n\t\t\tcase TransitionType.RANGE:\r\n\t\t\t\tif (arg3 !== 0) {\r\n\t\t\t\t\treturn new RangeTransition(target, Token.EOF, arg2);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn new RangeTransition(target, arg1, arg2);\r\n\t\t\t\t}\r\n\t\t\tcase TransitionType.RULE:\r\n\t\t\t\tlet rt: RuleTransition = new RuleTransition(atn.states[arg1] as RuleStartState, arg2, arg3, target);\r\n\t\t\t\treturn rt;\r\n\t\t\tcase TransitionType.PREDICATE:\r\n\t\t\t\tlet pt: PredicateTransition = new PredicateTransition(target, arg1, arg2, arg3 !== 0);\r\n\t\t\t\treturn pt;\r\n\t\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\t\treturn new PrecedencePredicateTransition(target, arg1);\r\n\t\t\tcase TransitionType.ATOM:\r\n\t\t\t\tif (arg3 !== 0) {\r\n\t\t\t\t\treturn new AtomTransition(target, Token.EOF);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn new AtomTransition(target, arg1);\r\n\t\t\t\t}\r\n\t\t\tcase TransitionType.ACTION:\r\n\t\t\t\tlet a: ActionTransition = new ActionTransition(target, arg1, arg2, arg3 !== 0);\r\n\t\t\t\treturn a;\r\n\t\t\tcase TransitionType.SET: return new SetTransition(target, sets[arg1]);\r\n\t\t\tcase TransitionType.NOT_SET: return new NotSetTransition(target, sets[arg1]);\r\n\t\t\tcase TransitionType.WILDCARD: return new WildcardTransition(target);\r\n\t\t}\r\n\r\n\t\tthrow new Error(\"The specified transition type is not valid.\");\r\n\t}\r\n\r\n\tprotected stateFactory(type: ATNStateType, ruleIndex: number): ATNState {\r\n\t\tlet s: ATNState;\r\n\t\tswitch (type) {\r\n\t\t\tcase ATNStateType.INVALID_TYPE: return new InvalidState();\r\n\t\t\tcase ATNStateType.BASIC: s = new BasicState(); break;\r\n\t\t\tcase ATNStateType.RULE_START: s = new RuleStartState(); break;\r\n\t\t\tcase ATNStateType.BLOCK_START: s = new BasicBlockStartState(); break;\r\n\t\t\tcase ATNStateType.PLUS_BLOCK_START: s = new PlusBlockStartState(); break;\r\n\t\t\tcase ATNStateType.STAR_BLOCK_START: s = new StarBlockStartState(); break;\r\n\t\t\tcase ATNStateType.TOKEN_START: s = new TokensStartState(); break;\r\n\t\t\tcase ATNStateType.RULE_STOP: s = new RuleStopState(); break;\r\n\t\t\tcase ATNStateType.BLOCK_END: s = new BlockEndState(); break;\r\n\t\t\tcase ATNStateType.STAR_LOOP_BACK: s = new StarLoopbackState(); break;\r\n\t\t\tcase ATNStateType.STAR_LOOP_ENTRY: s = new StarLoopEntryState(); break;\r\n\t\t\tcase ATNStateType.PLUS_LOOP_BACK: s = new PlusLoopbackState(); break;\r\n\t\t\tcase ATNStateType.LOOP_END: s = new LoopEndState(); break;\r\n\t\t\tdefault:\r\n\t\t\t\tlet message: string = `The specified state type ${type} is not valid.`;\r\n\t\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\ts.ruleIndex = ruleIndex;\r\n\t\treturn s;\r\n\t}\r\n\r\n\tprotected lexerActionFactory(type: LexerActionType, data1: number, data2: number): LexerAction {\r\n\t\tswitch (type) {\r\n\t\tcase LexerActionType.CHANNEL:\r\n\t\t\treturn new LexerChannelAction(data1);\r\n\r\n\t\tcase LexerActionType.CUSTOM:\r\n\t\t\treturn new LexerCustomAction(data1, data2);\r\n\r\n\t\tcase LexerActionType.MODE:\r\n\t\t\treturn new LexerModeAction(data1);\r\n\r\n\t\tcase LexerActionType.MORE:\r\n\t\t\treturn LexerMoreAction.INSTANCE;\r\n\r\n\t\tcase LexerActionType.POP_MODE:\r\n\t\t\treturn LexerPopModeAction.INSTANCE;\r\n\r\n\t\tcase LexerActionType.PUSH_MODE:\r\n\t\t\treturn new LexerPushModeAction(data1);\r\n\r\n\t\tcase LexerActionType.SKIP:\r\n\t\t\treturn LexerSkipAction.INSTANCE;\r\n\r\n\t\tcase LexerActionType.TYPE:\r\n\t\t\treturn new LexerTypeAction(data1);\r\n\r\n\t\tdefault:\r\n\t\t\tlet message: string = `The specified lexer action type ${type} is not valid.`;\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:31.0349605-07:00\r\n\r\nimport { DecisionInfo } from \"./DecisionInfo\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ProfilingATNSimulator } from \"./ProfilingATNSimulator\";\r\n\r\n/**\r\n * This class provides access to specific and aggregate statistics gathered\r\n * during profiling of a parser.\r\n *\r\n * @since 4.3\r\n */\r\nexport class ParseInfo {\r\n\tprotected atnSimulator: ProfilingATNSimulator;\r\n\r\n\tconstructor(@NotNull atnSimulator: ProfilingATNSimulator) {\r\n\t\tthis.atnSimulator = atnSimulator;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets an array of {@link DecisionInfo} instances containing the profiling\r\n\t * information gathered for each decision in the ATN.\r\n\t *\r\n\t * @returns An array of {@link DecisionInfo} instances, indexed by decision\r\n\t * number.\r\n\t */\r\n\t@NotNull\r\n\tpublic getDecisionInfo(): DecisionInfo[] {\r\n\t\treturn this.atnSimulator.getDecisionInfo();\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the decision numbers for decisions that required one or more\r\n\t * full-context predictions during parsing. These are decisions for which\r\n\t * {@link DecisionInfo#LL_Fallback} is non-zero.\r\n\t *\r\n\t * @returns A list of decision numbers which required one or more\r\n\t * full-context predictions during parsing.\r\n\t */\r\n\t@NotNull\r\n\tpublic getLLDecisions(): number[] {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet LL: number[] = [];\r\n\t\tfor (let i = 0; i < decisions.length; i++) {\r\n\t\t\tlet fallBack: number = decisions[i].LL_Fallback;\r\n\t\t\tif (fallBack > 0) {\r\n\t\t\t\tLL.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn LL;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total time spent during prediction across all decisions made\r\n\t * during parsing. This value is the sum of\r\n\t * {@link DecisionInfo#timeInPrediction} for all decisions.\r\n\t */\r\n\tpublic getTotalTimeInPrediction(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet t: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tt += decision.timeInPrediction;\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of SLL lookahead operations across all decisions\r\n\t * made during parsing. This value is the sum of\r\n\t * {@link DecisionInfo#SLL_TotalLook} for all decisions.\r\n\t */\r\n\tpublic getTotalSLLLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.SLL_TotalLook;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of LL lookahead operations across all decisions\r\n\t * made during parsing. This value is the sum of\r\n\t * {@link DecisionInfo#LL_TotalLook} for all decisions.\r\n\t */\r\n\tpublic getTotalLLLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.LL_TotalLook;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of ATN lookahead operations for SLL prediction\r\n\t * across all decisions made during parsing.\r\n\t */\r\n\tpublic getTotalSLLATNLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.SLL_ATNTransitions;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of ATN lookahead operations for LL prediction\r\n\t * across all decisions made during parsing.\r\n\t */\r\n\tpublic getTotalLLATNLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.LL_ATNTransitions;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of ATN lookahead operations for SLL and LL\r\n\t * prediction across all decisions made during parsing.\r\n\t *\r\n\t * This value is the sum of {@link #getTotalSLLATNLookaheadOps} and\r\n\t * {@link #getTotalLLATNLookaheadOps}.\r\n\t */\r\n\tpublic getTotalATNLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.SLL_ATNTransitions;\r\n\t\t\tk += decision.LL_ATNTransitions;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of DFA states stored in the DFA cache for all\r\n\t * decisions in the ATN.\r\n\t */\r\n\tpublic getDFASize(): number;\r\n\r\n\t/**\r\n\t * Gets the total number of DFA states stored in the DFA cache for a\r\n\t * particular decision.\r\n\t */\r\n\tpublic getDFASize(decision: number): number;\r\n\r\n\tpublic getDFASize(decision?: number): number {\r\n\t\tif (decision) {\r\n\t\t\tlet decisionToDFA: DFA = this.atnSimulator.atn.decisionToDFA[decision];\r\n\t\t\treturn decisionToDFA.states.size;\r\n\t\t} else {\r\n\t\t\tlet n: number = 0;\r\n\t\t\tlet decisionToDFA: DFA[] = this.atnSimulator.atn.decisionToDFA;\r\n\t\t\tfor (let i = 0; i < decisionToDFA.length; i++) {\r\n\t\t\t\tn += this.getDFASize(i);\r\n\t\t\t}\r\n\r\n\t\t\treturn n;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:56.9812284-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { Parser } from \"./Parser\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { ProxyErrorListener } from \"./ProxyErrorListener\";\r\nimport { ParserErrorListener } from \"./ParserErrorListener\";\r\nimport { SimulatorState } from \"./atn/SimulatorState\";\r\nimport { Token } from \"./Token\";\r\nimport { Override } from \"./Decorators\";\r\n\r\n/**\r\n * @author Sam Harwell\r\n */\r\nexport class ProxyParserErrorListener extends ProxyErrorListener\r\n\timplements ParserErrorListener {\r\n\r\n\tconstructor(delegates: ParserErrorListener[]) {\r\n\t\tsuper(delegates);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAmbiguity(\r\n\t\trecognizer: Parser,\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\tambigAlts: BitSet | undefined,\r\n\t\tconfigs: ATNConfigSet): void {\r\n\t\tthis.getDelegates()\r\n\t\t\t.forEach((listener) => {\r\n\t\t\t\tif (listener.reportAmbiguity) {\r\n\t\t\t\t\tlistener.reportAmbiguity(\r\n\t\t\t\t\t\trecognizer,\r\n\t\t\t\t\t\tdfa,\r\n\t\t\t\t\t\tstartIndex,\r\n\t\t\t\t\t\tstopIndex,\r\n\t\t\t\t\t\texact,\r\n\t\t\t\t\t\tambigAlts,\r\n\t\t\t\t\t\tconfigs);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAttemptingFullContext(\r\n\t\trecognizer: Parser,\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tconflictingAlts: BitSet | undefined,\r\n\t\tconflictState: SimulatorState): void {\r\n\t\tthis.getDelegates()\r\n\t\t\t.forEach((listener) => {\r\n\t\t\t\tif (listener.reportAttemptingFullContext) {\r\n\t\t\t\t\tlistener.reportAttemptingFullContext(\r\n\t\t\t\t\t\trecognizer,\r\n\t\t\t\t\t\tdfa,\r\n\t\t\t\t\t\tstartIndex,\r\n\t\t\t\t\t\tstopIndex,\r\n\t\t\t\t\t\tconflictingAlts,\r\n\t\t\t\t\t\tconflictState);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportContextSensitivity(\r\n\t\trecognizer: Parser,\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tprediction: number,\r\n\t\tacceptState: SimulatorState): void {\r\n\t\tthis.getDelegates()\r\n\t\t\t.forEach((listener) => {\r\n\t\t\t\tif (listener.reportContextSensitivity) {\r\n\t\t\t\t\tlistener.reportContextSensitivity(\r\n\t\t\t\t\t\trecognizer,\r\n\t\t\t\t\t\tdfa,\r\n\t\t\t\t\t\tstartIndex,\r\n\t\t\t\t\t\tstopIndex,\r\n\t\t\t\t\t\tprediction,\r\n\t\t\t\t\t\tacceptState);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport function isHighSurrogate(ch: number): boolean {\r\n\treturn ch >= 0xD800 && ch <= 0xDBFF;\r\n}\r\n\r\nexport function isLowSurrogate(ch: number): boolean {\r\n\treturn ch >= 0xDC00 && ch <= 0xDFFF;\r\n}\r\n\r\nexport function isSupplementaryCodePoint(ch: number): boolean {\r\n\treturn ch >= 0x10000;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport * as assert from \"assert\";\r\nimport * as Character from \"./misc/Character\";\r\n\r\n/**\r\n * Wrapper for `Uint8Array` / `Uint16Array` / `Int32Array`.\r\n */\r\nexport class CodePointBuffer {\r\n\tprivate readonly buffer: Uint8Array | Uint16Array | Int32Array;\r\n\tprivate _position: number;\r\n\tprivate _size: number;\r\n\r\n\tconstructor(buffer: Uint8Array | Uint16Array | Int32Array, size: number) {\r\n\t\tthis.buffer = buffer;\r\n\t\tthis._position = 0;\r\n\t\tthis._size = size;\r\n\t}\r\n\r\n\tpublic static withArray(buffer: Uint8Array | Uint16Array | Int32Array): CodePointBuffer {\r\n\t\treturn new CodePointBuffer(buffer, buffer.length);\r\n\t}\r\n\r\n\tpublic get position(): number {\r\n\t\treturn this._position;\r\n\t}\r\n\r\n\tpublic set position(newPosition: number) {\r\n\t\tif (newPosition < 0 || newPosition > this._size) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tthis._position = newPosition;\r\n\t}\r\n\r\n\tpublic get remaining(): number {\r\n\t\treturn this._size - this.position;\r\n\t}\r\n\r\n\tpublic get(offset: number): number {\r\n\t\treturn this.buffer[offset];\r\n\t}\r\n\r\n\tpublic array(): Uint8Array | Uint16Array | Int32Array {\r\n\t\treturn this.buffer.slice(0, this._size);\r\n\t}\r\n\r\n\tpublic static builder(initialBufferSize: number): CodePointBuffer.Builder {\r\n\t\treturn new CodePointBuffer.Builder(initialBufferSize);\r\n\t}\r\n}\r\n\r\nexport namespace CodePointBuffer {\r\n\tconst enum Type {\r\n\t\tBYTE,\r\n\t\tCHAR,\r\n\t\tINT,\r\n\t}\r\n\r\n\texport class Builder {\r\n\t\tprivate type: Type;\r\n\t\tprivate buffer: Uint8Array | Uint16Array | Int32Array;\r\n\t\tprivate prevHighSurrogate: number;\r\n\t\tprivate position: number;\r\n\r\n\t\tconstructor(initialBufferSize: number) {\r\n\t\t\tthis.type = Type.BYTE;\r\n\t\t\tthis.buffer = new Uint8Array(initialBufferSize);\r\n\t\t\tthis.prevHighSurrogate = -1;\r\n\t\t\tthis.position = 0;\r\n\t\t}\r\n\r\n\t\tpublic build(): CodePointBuffer {\r\n\t\t\treturn new CodePointBuffer(this.buffer, this.position);\r\n\t\t}\r\n\r\n\t\tprivate static roundUpToNextPowerOfTwo(i: number): number {\r\n\t\t\tlet nextPowerOfTwo: number = 32 - Math.clz32(i - 1);\r\n\t\t\treturn Math.pow(2, nextPowerOfTwo);\r\n\t\t}\r\n\r\n\t\tpublic ensureRemaining(remainingNeeded: number): void {\r\n\t\t\tswitch (this.type) {\r\n\t\t\t\tcase Type.BYTE:\r\n\t\t\t\t\tif (this.buffer.length - this.position < remainingNeeded) {\r\n\t\t\t\t\t\tlet newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded);\r\n\t\t\t\t\t\tlet newBuffer: Uint8Array = new Uint8Array(newCapacity);\r\n\t\t\t\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\t\t\t\t\t\tthis.buffer = newBuffer;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.CHAR:\r\n\t\t\t\t\tif (this.buffer.length - this.position < remainingNeeded) {\r\n\t\t\t\t\t\tlet newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded);\r\n\t\t\t\t\t\tlet newBuffer: Uint16Array = new Uint16Array(newCapacity);\r\n\t\t\t\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\t\t\t\t\t\tthis.buffer = newBuffer;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.INT:\r\n\t\t\t\t\tif (this.buffer.length - this.position < remainingNeeded) {\r\n\t\t\t\t\t\tlet newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded);\r\n\t\t\t\t\t\tlet newBuffer: Int32Array = new Int32Array(newCapacity);\r\n\t\t\t\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\t\t\t\t\t\tthis.buffer = newBuffer;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic append(utf16In: Uint16Array): void {\r\n\t\t\tthis.ensureRemaining(utf16In.length);\r\n\t\t\tthis.appendArray(utf16In);\r\n\t\t}\r\n\r\n\t\tprivate appendArray(utf16In: Uint16Array): void {\r\n\t\t\tswitch (this.type) {\r\n\t\t\t\tcase Type.BYTE:\r\n\t\t\t\t\tthis.appendArrayByte(utf16In);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.CHAR:\r\n\t\t\t\t\tthis.appendArrayChar(utf16In);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.INT:\r\n\t\t\t\t\tthis.appendArrayInt(utf16In);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprivate appendArrayByte(utf16In: Uint16Array): void {\r\n\t\t\tassert(this.prevHighSurrogate === -1);\r\n\r\n\t\t\tlet input: Uint16Array = utf16In;\r\n\t\t\tlet inOffset: number = 0;\r\n\t\t\tlet inLimit: number = utf16In.length;\r\n\r\n\t\t\tlet outByte = this.buffer;\r\n\t\t\tlet outOffset: number = this.position;\r\n\r\n\t\t\twhile (inOffset < inLimit) {\r\n\t\t\t\tlet c: number = input[inOffset];\r\n\t\t\t\tif (c <= 0xFF) {\r\n\t\t\t\t\toutByte[outOffset] = c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tutf16In = utf16In.subarray(inOffset, inLimit);\r\n\t\t\t\t\tthis.position = outOffset;\r\n\t\t\t\t\tif (!Character.isHighSurrogate(c)) {\r\n\t\t\t\t\t\tthis.byteToCharBuffer(utf16In.length);\r\n\t\t\t\t\t\tthis.appendArrayChar(utf16In);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.byteToIntBuffer(utf16In.length);\r\n\t\t\t\t\t\tthis.appendArrayInt(utf16In);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinOffset++;\r\n\t\t\t\toutOffset++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.position = outOffset;\r\n\t\t}\r\n\r\n\t\tprivate appendArrayChar(utf16In: Uint16Array): void {\r\n\t\t\tassert(this.prevHighSurrogate === -1);\r\n\r\n\t\t\tlet input: Uint16Array = utf16In;\r\n\t\t\tlet inOffset: number = 0;\r\n\t\t\tlet inLimit: number = utf16In.length;\r\n\r\n\t\t\tlet outChar = this.buffer;\r\n\t\t\tlet outOffset: number = this.position;\r\n\r\n\t\t\twhile (inOffset < inLimit) {\r\n\t\t\t\tlet c: number = input[inOffset];\r\n\t\t\t\tif (!Character.isHighSurrogate(c)) {\r\n\t\t\t\t\toutChar[outOffset] = c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tutf16In = utf16In.subarray(inOffset, inLimit);\r\n\t\t\t\t\tthis.position = outOffset;\r\n\t\t\t\t\tthis.charToIntBuffer(utf16In.length);\r\n\t\t\t\t\tthis.appendArrayInt(utf16In);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinOffset++;\r\n\t\t\t\toutOffset++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.position = outOffset;\r\n\t\t}\r\n\r\n\t\tprivate appendArrayInt(utf16In: Uint16Array): void {\r\n\t\t\tlet input: Uint16Array = utf16In;\r\n\t\t\tlet inOffset: number = 0;\r\n\t\t\tlet inLimit: number = utf16In.length;\r\n\r\n\t\t\tlet outInt = this.buffer;\r\n\t\t\tlet outOffset = this.position;\r\n\r\n\t\t\twhile (inOffset < inLimit) {\r\n\t\t\t\tlet c: number = input[inOffset];\r\n\t\t\t\tinOffset++;\r\n\t\t\t\tif (this.prevHighSurrogate !== -1) {\r\n\t\t\t\t\tif (Character.isLowSurrogate(c)) {\r\n\t\t\t\t\t\toutInt[outOffset] = String.fromCharCode(this.prevHighSurrogate, c).codePointAt(0)!;\r\n\t\t\t\t\t\toutOffset++;\r\n\t\t\t\t\t\tthis.prevHighSurrogate = -1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Dangling high surrogate\r\n\t\t\t\t\t\toutInt[outOffset] = this.prevHighSurrogate;\r\n\t\t\t\t\t\toutOffset++;\r\n\t\t\t\t\t\tif (Character.isHighSurrogate(c)) {\r\n\t\t\t\t\t\t\tthis.prevHighSurrogate = c;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\toutInt[outOffset] = c;\r\n\t\t\t\t\t\t\toutOffset++;\r\n\t\t\t\t\t\t\tthis.prevHighSurrogate = -1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (Character.isHighSurrogate(c)) {\r\n\t\t\t\t\tthis.prevHighSurrogate = c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutInt[outOffset] = c;\r\n\t\t\t\t\toutOffset++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.prevHighSurrogate !== -1) {\r\n\t\t\t\t// Dangling high surrogate\r\n\t\t\t\toutInt[outOffset] = this.prevHighSurrogate;\r\n\t\t\t\toutOffset++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.position = outOffset;\r\n\t\t}\r\n\r\n\t\tprivate byteToCharBuffer(toAppend: number): void {\r\n\t\t\t// CharBuffers hold twice as much per unit as ByteBuffers, so start with half the capacity.\r\n\t\t\tlet newBuffer: Uint16Array = new Uint16Array(Math.max(this.position + toAppend, this.buffer.length >> 1));\r\n\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\r\n\t\t\tthis.type = Type.CHAR;\r\n\t\t\tthis.buffer = newBuffer;\r\n\t\t}\r\n\r\n\t\tprivate byteToIntBuffer(toAppend: number): void {\r\n\t\t\t// IntBuffers hold four times as much per unit as ByteBuffers, so start with one quarter the capacity.\r\n\t\t\tlet newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 2));\r\n\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\r\n\t\t\tthis.type = Type.INT;\r\n\t\t\tthis.buffer = newBuffer;\r\n\t\t}\r\n\r\n\t\tprivate charToIntBuffer(toAppend: number): void {\r\n\t\t\t// IntBuffers hold two times as much per unit as ByteBuffers, so start with one half the capacity.\r\n\t\t\tlet newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 1));\r\n\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\r\n\t\t\tthis.type = Type.INT;\r\n\t\t\tthis.buffer = newBuffer;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport * as assert from \"assert\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CodePointBuffer } from \"./CodePointBuffer\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\n\r\n/**\r\n * Alternative to {@link ANTLRInputStream} which treats the input\r\n * as a series of Unicode code points, instead of a series of UTF-16\r\n * code units.\r\n *\r\n * Use this if you need to parse input which potentially contains\r\n * Unicode values > U+FFFF.\r\n */\r\nexport class CodePointCharStream implements CharStream {\r\n\tprivate readonly _array: Uint8Array | Uint16Array | Int32Array;\r\n\tprivate readonly _size: number;\r\n\tprivate readonly _name: string;\r\n\r\n\tprivate _position: number;\r\n\r\n\t// Use the factory method {@link #fromBuffer(CodePointBuffer)} to\r\n\t// construct instances of this type.\r\n\tprotected constructor(array: Uint8Array | Uint16Array | Int32Array, position: number, remaining: number, name: string) {\r\n\t\t// TODO\r\n\t\tassert(position === 0);\r\n\t\tthis._array = array;\r\n\t\tthis._size = remaining;\r\n\t\tthis._name = name;\r\n\t\tthis._position = 0;\r\n\t}\r\n\r\n\tpublic get internalStorage(): Uint8Array | Uint16Array | Int32Array {\r\n\t\treturn this._array;\r\n\t}\r\n\r\n\t/**\r\n\t * Constructs a {@link CodePointCharStream} which provides access\r\n\t * to the Unicode code points stored in {@code codePointBuffer}.\r\n\t */\r\n\tpublic static fromBuffer(codePointBuffer: CodePointBuffer): CodePointCharStream;\r\n\r\n\t/**\r\n\t * Constructs a named {@link CodePointCharStream} which provides access\r\n\t * to the Unicode code points stored in {@code codePointBuffer}.\r\n\t */\r\n\tpublic static fromBuffer(codePointBuffer: CodePointBuffer, name: string): CodePointCharStream;\r\n\tpublic static fromBuffer(codePointBuffer: CodePointBuffer, name?: string): CodePointCharStream {\r\n\t\tif (name === undefined || name.length === 0) {\r\n\t\t\tname = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t\t}\r\n\r\n\t\t// Java lacks generics on primitive types.\r\n\t\t//\r\n\t\t// To avoid lots of calls to virtual methods in the\r\n\t\t// very hot codepath of LA() below, we construct one\r\n\t\t// of three concrete subclasses.\r\n\t\t//\r\n\t\t// The concrete subclasses directly access the code\r\n\t\t// points stored in the underlying array (byte[],\r\n\t\t// char[], or int[]), so we can avoid lots of virtual\r\n\t\t// method calls to ByteBuffer.get(offset).\r\n\t\treturn new CodePointCharStream(\r\n\t\t\tcodePointBuffer.array(),\r\n\t\t\tcodePointBuffer.position,\r\n\t\t\tcodePointBuffer.remaining,\r\n\t\t\tname);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic consume(): void {\r\n\t\tif (this._size - this._position === 0) {\r\n\t\t\tassert(this.LA(1) === IntStream.EOF);\r\n\t\t\tthrow new RangeError(\"cannot consume EOF\");\r\n\t\t}\r\n\r\n\t\tthis._position++;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get index(): number {\r\n\t\treturn this._position;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get size(): number {\r\n\t\treturn this._size;\r\n\t}\r\n\r\n\t/** mark/release do nothing; we have entire buffer */\r\n\t@Override\r\n\tpublic mark(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic release(marker: number): void {\r\n\t\t// No default implementation since this stream buffers the entire input\r\n\t}\r\n\r\n\t@Override\r\n\tpublic seek(index: number): void {\r\n\t\tthis._position = index;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get sourceName(): string {\r\n\t\treturn this._name;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this.getText(Interval.of(0, this.size - 1));\r\n\t}\r\n\r\n\t@Override\r\n\tpublic LA(i: number): number {\r\n\t\tlet offset: number;\r\n\t\tswitch (Math.sign(i)) {\r\n\t\t\tcase -1:\r\n\t\t\t\toffset = this.index + i;\r\n\t\t\t\tif (offset < 0) {\r\n\t\t\t\t\treturn IntStream.EOF;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this._array[offset];\r\n\r\n\t\t\tcase 0:\r\n\t\t\t\t// Undefined\r\n\t\t\t\treturn 0;\r\n\r\n\t\t\tcase 1:\r\n\t\t\t\toffset = this.index + i - 1;\r\n\t\t\t\tif (offset >= this.size) {\r\n\t\t\t\t\treturn IntStream.EOF;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this._array[offset];\r\n\t\t}\r\n\r\n\t\tthrow new RangeError(\"Not reached\");\r\n\t}\r\n\r\n\t/** Return the UTF-16 encoded string for the given interval */\r\n\t@Override\r\n\tpublic getText(interval: Interval): string {\r\n\t\tconst startIdx: number = Math.min(interval.a, this.size);\r\n\t\tconst len: number = Math.min(interval.b - interval.a + 1, this.size - startIdx);\r\n\r\n\t\tif (this._array instanceof Int32Array) {\r\n\t\t\treturn String.fromCodePoint(...Array.from(this._array.subarray(startIdx, startIdx + len)));\r\n\t\t} else {\r\n\t\t\treturn String.fromCharCode(...Array.from(this._array.subarray(startIdx, startIdx + len)));\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { CodePointBuffer } from \"./CodePointBuffer\";\r\nimport { CodePointCharStream } from \"./CodePointCharStream\";\r\nimport { IntStream } from \"./IntStream\";\r\n\r\n// const DEFAULT_BUFFER_SIZE: number = 4096;\r\n\r\n/** This class represents the primary interface for creating {@link CharStream}s\r\n * from a variety of sources as of 4.7. The motivation was to support\r\n * Unicode code points > U+FFFF. {@link ANTLRInputStream} and\r\n * {@link ANTLRFileStream} are now deprecated in favor of the streams created\r\n * by this interface.\r\n *\r\n * DEPRECATED: {@code new ANTLRFileStream(\"myinputfile\")}\r\n * NEW: {@code CharStreams.fromFileName(\"myinputfile\")}\r\n *\r\n * WARNING: If you use both the deprecated and the new streams, you will see\r\n * a nontrivial performance degradation. This speed hit is because the\r\n * {@link Lexer}'s internal code goes from a monomorphic to megamorphic\r\n * dynamic dispatch to get characters from the input stream. Java's\r\n * on-the-fly compiler (JIT) is unable to perform the same optimizations\r\n * so stick with either the old or the new streams, if performance is\r\n * a primary concern. See the extreme debugging and spelunking\r\n * needed to identify this issue in our timing rig:\r\n *\r\n * https://github.com/antlr/antlr4/pull/1781\r\n *\r\n * The ANTLR character streams still buffer all the input when you create\r\n * the stream, as they have done for ~20 years. If you need unbuffered\r\n * access, please note that it becomes challenging to create\r\n * parse trees. The parse tree has to point to tokens which will either\r\n * point into a stale location in an unbuffered stream or you have to copy\r\n * the characters out of the buffer into the token. That defeats the purpose\r\n * of unbuffered input. Per the ANTLR book, unbuffered streams are primarily\r\n * useful for processing infinite streams *during the parse.*\r\n *\r\n * The new streams also use 8-bit buffers when possible so this new\r\n * interface supports character streams that use half as much memory\r\n * as the old {@link ANTLRFileStream}, which assumed 16-bit characters.\r\n *\r\n * A big shout out to Ben Hamilton (github bhamiltoncx) for his superhuman\r\n * efforts across all targets to get true Unicode 3.1 support for U+10FFFF.\r\n *\r\n * @since 4.7\r\n */\r\nexport namespace CharStreams {\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a path to a UTF-8\r\n\t// * encoded file on disk.\r\n\t// *\r\n\t// * Reads the entire contents of the file into the result before returning.\r\n\t// */\r\n\t// export function fromFile(file: File): CharStream;\r\n\t// export function fromFile(file: File, charset: Charset): CharStream;\r\n\t// export function fromFile(file: File, charset?: Charset): CharStream {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \tlet size: number = file.length();\r\n\t// \treturn fromStream(new FileInputStream(file), charset, file.toString(), size);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a string containing a\r\n\t// * path to a UTF-8 file on disk.\r\n\t// *\r\n\t// * Reads the entire contents of the file into the result before returning.\r\n\t// */\r\n\t// export function fromFileName(fileName: string): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a string containing a\r\n\t// * path to a file on disk and the charset of the bytes\r\n\t// * contained in the file.\r\n\t// *\r\n\t// * Reads the entire contents of the file into the result before returning.\r\n\t// */\r\n\t// export function fromFileName(fileName: string, charset: Charset): CharStream;\r\n\t// export function fromFileName(fileName: string, charset?: Charset): CharStream {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \treturn fromFile(new File(fileName), charset);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link InputStream}\r\n\t// * containing UTF-8 bytes.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code InputStream} into\r\n\t// * the result before returning, then closes the {@code InputStream}.\r\n\t// */\r\n\t// export function fromStream(is: InputStream): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link InputStream} and the\r\n\t// * charset of the bytes contained in the stream.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code InputStream} into\r\n\t// * the result before returning, then closes the {@code InputStream}.\r\n\t// */\r\n\t// export function fromStream(is: InputStream, charset: Charset): CharStream;\r\n\r\n\t// export function fromStream(is: InputStream, charset: Charset, sourceName: string, inputSize: number): CharStream;\r\n\t// export function fromStream(is: InputStream, charset?: Charset, sourceName?: string, inputSize?: number): CharStream {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \tif (sourceName === undefined) {\r\n\t// \t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t// \t}\r\n\r\n\t// \tif (inputSize === undefined) {\r\n\t// \t\tinputSize = -1;\r\n\t// \t}\r\n\r\n\t// \treturn fromChannel(\r\n\t// \t\tChannels.newChannel(is),\r\n\t// \t\tcharset,\r\n\t// \t\tDEFAULT_BUFFER_SIZE,\r\n\t// \t\tCodingErrorAction.REPLACE,\r\n\t// \t\tsourceName,\r\n\t// \t\tinputSize);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link ReadableByteChannel}\r\n\t// * containing UTF-8 bytes.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code channel} into\r\n\t// * the result before returning, then closes the {@code channel}.\r\n\t// */\r\n\t// export function fromChannel(channel: ReadableByteChannel): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link ReadableByteChannel} and the\r\n\t// * charset of the bytes contained in the channel.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code channel} into\r\n\t// * the result before returning, then closes the {@code channel}.\r\n\t// */\r\n\t// export function fromChannel(channel: ReadableByteChannel, charset: Charset): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link ReadableByteChannel}\r\n\t// * containing UTF-8 bytes.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code channel} into\r\n\t// * the result before returning, then closes the {@code channel}.\r\n\t// */\r\n\t// export function fromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset: Charset,\r\n\t// \tbufferSize: number,\r\n\t// \tdecodingErrorAction: CodingErrorAction,\r\n\t// \tsourceName: string): CodePointCharStream;\r\n\r\n\t// export function fromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset: Charset,\r\n\t// \tbufferSize: number,\r\n\t// \tdecodingErrorAction: CodingErrorAction,\r\n\t// \tsourceName: string,\r\n\t// \tinputSize: number): CodePointCharStream;\r\n\t// export function fromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset?: Charset,\r\n\t// \tbufferSize?: number,\r\n\t// \tdecodingErrorAction?: CodingErrorAction,\r\n\t// \tsourceName?: string,\r\n\t// \tinputSize?: number): CodePointCharStream\r\n\t// {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \tif (bufferSize === undefined) {\r\n\t// \t\tbufferSize = DEFAULT_BUFFER_SIZE;\r\n\t// \t}\r\n\r\n\t// \tif (decodingErrorAction === undefined) {\r\n\t// \t\tdecodingErrorAction = CodingErrorAction.REPLACE;\r\n\t// \t}\r\n\r\n\t// \tif (sourceName === undefined || sourceName.length === 0) {\r\n\t// \t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t// \t}\r\n\r\n\t// \tif (inputSize === undefined) {\r\n\t// \t\tinputSize = -1;\r\n\t// \t}\r\n\r\n\t// \tlet codePointBuffer: CodePointBuffer = bufferFromChannel(channel, charset, bufferSize, decodingErrorAction, inputSize);\r\n\t// \treturn CodePointCharStream.fromBuffer(codePointBuffer, sourceName);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a {@link Reader}. Closes\r\n\t// * the reader before returning.\r\n\t// */\r\n\t// export function fromReader(r: Reader): CodePointCharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a {@link Reader} and its\r\n\t// * source name. Closes the reader before returning.\r\n\t// */\r\n\t// export function fromReader(r: Reader, sourceName: string): CodePointCharStream;\r\n\t// export function fromReader(r: Reader, sourceName?: string): CodePointCharStream {\r\n\t// \tif (sourceName === undefined) {\r\n\t// \t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t// \t}\r\n\r\n\t// \ttry {\r\n\t// \t\tlet codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(DEFAULT_BUFFER_SIZE);\r\n\t// \t\tlet charBuffer: CharBuffer = CharBuffer.allocate(DEFAULT_BUFFER_SIZE);\r\n\t// \t\twhile ((r.read(charBuffer)) !== -1) {\r\n\t// \t\t\tcharBuffer.flip();\r\n\t// \t\t\tcodePointBufferBuilder.append(charBuffer);\r\n\t// \t\t\tcharBuffer.compact();\r\n\t// \t\t}\r\n\r\n\t// \t\treturn CodePointCharStream.fromBuffer(codePointBufferBuilder.build(), sourceName);\r\n\t// \t} finally {\r\n\t// \t\tr.close();\r\n\t// \t}\r\n\t// }\r\n\r\n\t/**\r\n\t * Creates a {@link CharStream} given a {@link String}.\r\n\t */\r\n\texport function fromString(s: string): CodePointCharStream;\r\n\r\n\t/**\r\n\t * Creates a {@link CharStream} given a {@link String} and the {@code sourceName}\r\n\t * from which it came.\r\n\t */\r\n\texport function fromString(s: string, sourceName: string): CodePointCharStream;\r\n\texport function fromString(s: string, sourceName?: string): CodePointCharStream {\r\n\t\tif (sourceName === undefined || sourceName.length === 0) {\r\n\t\t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t\t}\r\n\r\n\t\t// Initial guess assumes no code points > U+FFFF: one code\r\n\t\t// point for each code unit in the string\r\n\t\tlet codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(s.length);\r\n\r\n\t\t// TODO: CharBuffer.wrap(String) rightfully returns a read-only buffer\r\n\t\t// which doesn't expose its array, so we make a copy.\r\n\t\tlet cb: Uint16Array = new Uint16Array(s.length);\r\n\t\tfor (let i = 0; i < s.length; i++) {\r\n\t\t\tcb[i] = s.charCodeAt(i);\r\n\t\t}\r\n\r\n\t\tcodePointBufferBuilder.append(cb);\r\n\t\treturn CodePointCharStream.fromBuffer(codePointBufferBuilder.build(), sourceName);\r\n\t}\r\n\r\n\t// export function bufferFromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset: Charset,\r\n\t// \tbufferSize: number,\r\n\t// \tdecodingErrorAction: CodingErrorAction,\r\n\t// \tinputSize: number): CodePointBuffer {\r\n\t// \ttry {\r\n\t// \t\tlet utf8BytesIn: Uint8Array = new Uint8Array(bufferSize);\r\n\t// \t\tlet utf16CodeUnitsOut: Uint16Array = new Uint16Array(bufferSize);\r\n\t// \t\tif (inputSize === -1) {\r\n\t// \t\t\tinputSize = bufferSize;\r\n\t// \t\t} else if (inputSize > Integer.MAX_VALUE) {\r\n\t// \t\t\t// ByteBuffer et al don't support long sizes\r\n\t// \t\t\tthrow new RangeError(`inputSize ${inputSize} larger than max ${Integer.MAX_VALUE}`);\r\n\t// \t\t}\r\n\r\n\t// \t\tlet codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(inputSize);\r\n\t// \t\tlet decoder: CharsetDecoder = charset\r\n\t// \t\t\t\t.newDecoder()\r\n\t// \t\t\t\t.onMalformedInput(decodingErrorAction)\r\n\t// \t\t\t\t.onUnmappableCharacter(decodingErrorAction);\r\n\r\n\t// \t\tlet endOfInput: boolean = false;\r\n\t// \t\twhile (!endOfInput) {\r\n\t// \t\t\tlet bytesRead: number = channel.read(utf8BytesIn);\r\n\t// \t\t\tendOfInput = (bytesRead === -1);\r\n\t// \t\t\tutf8BytesIn.flip();\r\n\t// \t\t\tlet result: CoderResult = decoder.decode(\r\n\t// \t\t\t\tutf8BytesIn,\r\n\t// \t\t\t\tutf16CodeUnitsOut,\r\n\t// \t\t\t\tendOfInput);\r\n\t// \t\t\tif (result.isError() && decodingErrorAction === CodingErrorAction.REPORT) {\r\n\t// \t\t\t\tresult.throwException();\r\n\t// \t\t\t}\r\n\r\n\t// \t\t\tutf16CodeUnitsOut.flip();\r\n\t// \t\t\tcodePointBufferBuilder.append(utf16CodeUnitsOut);\r\n\t// \t\t\tutf8BytesIn.compact();\r\n\t// \t\t\tutf16CodeUnitsOut.compact();\r\n\t// \t\t}\r\n\t// \t\t// Handle any bytes at the end of the file which need to\r\n\t// \t\t// be represented as errors or substitution characters.\r\n\t// \t\tlet flushResult: CoderResult = decoder.flush(utf16CodeUnitsOut);\r\n\t// \t\tif (flushResult.isError() && decodingErrorAction === CodingErrorAction.REPORT) {\r\n\t// \t\t\tflushResult.throwException();\r\n\t// \t\t}\r\n\r\n\t// \t\tutf16CodeUnitsOut.flip();\r\n\t// \t\tcodePointBufferBuilder.append(utf16CodeUnitsOut);\r\n\r\n\t// \t\treturn codePointBufferBuilder.build();\r\n\t// \t}\r\n\t// \tfinally {\r\n\t// \t\tchannel.close();\r\n\t// \t}\r\n\t// }\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:49.6074365-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport { CommonToken } from \"./CommonToken\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { WritableToken } from \"./WritableToken\";\r\n\r\n/**\r\n * This implementation of {@link TokenStream} loads tokens from a\r\n * {@link TokenSource} on-demand, and places the tokens in a buffer to provide\r\n * access to any previous token by index.\r\n *\r\n * This token stream ignores the value of {@link Token#getChannel}. If your\r\n * parser requires the token stream filter tokens to only those on a particular\r\n * channel, such as {@link Token#DEFAULT_CHANNEL} or\r\n * {@link Token#HIDDEN_CHANNEL}, use a filtering token stream such a\r\n * {@link CommonTokenStream}.\r\n */\r\nexport class BufferedTokenStream implements TokenStream {\r\n\t/**\r\n\t * The {@link TokenSource} from which tokens for this stream are fetched.\r\n\t */\r\n\t@NotNull\r\n\tprivate _tokenSource: TokenSource;\r\n\r\n\t/**\r\n\t * A collection of all tokens fetched from the token source. The list is\r\n\t * considered a complete view of the input once {@link #fetchedEOF} is set\r\n\t * to `true`.\r\n\t */\r\n\tprotected tokens: Token[] = [];\r\n\r\n\t/**\r\n\t * The index into {@link #tokens} of the current token (next token to\r\n\t * {@link #consume}). {@link #tokens}`[`{@link #p}`]` should be\r\n\t * {@link #LT LT(1)}.\r\n\t *\r\n\t * This field is set to -1 when the stream is first constructed or when\r\n\t * {@link #setTokenSource} is called, indicating that the first token has\r\n\t * not yet been fetched from the token source. For additional information,\r\n\t * see the documentation of {@link IntStream} for a description of\r\n\t * Initializing Methods.\r\n\t */\r\n\tprotected p: number = -1;\r\n\r\n\t/**\r\n\t * Indicates whether the {@link Token#EOF} token has been fetched from\r\n\t * {@link #tokenSource} and added to {@link #tokens}. This field improves\r\n\t * performance for the following cases:\r\n\t *\r\n\t * * {@link #consume}: The lookahead check in {@link #consume} to prevent\r\n\t * consuming the EOF symbol is optimized by checking the values of\r\n\t * {@link #fetchedEOF} and {@link #p} instead of calling {@link #LA}.\r\n\t * * {@link #fetch}: The check to prevent adding multiple EOF symbols into\r\n\t * {@link #tokens} is trivial with this field.\r\n\t */\r\n\tprotected fetchedEOF: boolean = false;\r\n\r\n\tconstructor(@NotNull tokenSource: TokenSource) {\r\n\t\tif (tokenSource == null) {\r\n\t\t\tthrow new Error(\"tokenSource cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._tokenSource = tokenSource;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenSource(): TokenSource {\r\n\t\treturn this._tokenSource;\r\n\t}\r\n\r\n\t/** Reset this token stream by setting its token source. */\r\n\tset tokenSource(tokenSource: TokenSource) {\r\n\t\tthis._tokenSource = tokenSource;\r\n\t\tthis.tokens.length = 0;\r\n\t\tthis.p = -1;\r\n\t\tthis.fetchedEOF = false;\r\n\t}\r\n\r\n\t@Override\r\n\tget index(): number {\r\n\t\treturn this.p;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic mark(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic release(marker: number): void {\r\n\t\t// no resources to release\r\n\t}\r\n\r\n\t@Override\r\n\tpublic seek(index: number): void {\r\n\t\tthis.lazyInit();\r\n\t\tthis.p = this.adjustSeekIndex(index);\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.tokens.length;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic consume(): void {\r\n\t\tlet skipEofCheck: boolean;\r\n\t\tif (this.p >= 0) {\r\n\t\t\tif (this.fetchedEOF) {\r\n\t\t\t\t// the last token in tokens is EOF. skip check if p indexes any\r\n\t\t\t\t// fetched token except the last.\r\n\t\t\t\tskipEofCheck = this.p < this.tokens.length - 1;\r\n\t\t\t} else {\r\n\t\t\t\t// no EOF token in tokens. skip check if p indexes a fetched token.\r\n\t\t\t\tskipEofCheck = this.p < this.tokens.length;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// not yet initialized\r\n\t\t\tskipEofCheck = false;\r\n\t\t}\r\n\r\n\t\tif (!skipEofCheck && this.LA(1) === Token.EOF) {\r\n\t\t\tthrow new Error(\"cannot consume EOF\");\r\n\t\t}\r\n\r\n\t\tif (this.sync(this.p + 1)) {\r\n\t\t\tthis.p = this.adjustSeekIndex(this.p + 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Make sure index `i` in tokens has a token.\r\n\t *\r\n\t * @returns `true` if a token is located at index `i`, otherwise\r\n\t * `false`.\r\n\t * @see #get(int i)\r\n\t */\r\n\tprotected sync(i: number): boolean {\r\n\t\tassert(i >= 0);\r\n\t\tlet n: number = i - this.tokens.length + 1; // how many more elements we need?\r\n\t\t//System.out.println(\"sync(\"+i+\") needs \"+n);\r\n\t\tif (n > 0) {\r\n\t\t\tlet fetched: number = this.fetch(n);\r\n\t\t\treturn fetched >= n;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/** Add `n` elements to buffer.\r\n\t *\r\n\t * @returns The actual number of elements added to the buffer.\r\n\t */\r\n\tprotected fetch(n: number): number {\r\n\t\tif (this.fetchedEOF) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet t: Token = this.tokenSource.nextToken();\r\n\t\t\tif (this.isWritableToken(t)) {\r\n\t\t\t\tt.tokenIndex = this.tokens.length;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tokens.push(t);\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tthis.fetchedEOF = true;\r\n\t\t\t\treturn i + 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn n;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get(i: number): Token {\r\n\t\tif (i < 0 || i >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(\"token index \" + i + \" out of range 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t/** Get all tokens from start..stop inclusively. */\r\n\tpublic getRange(start: number, stop: number): Token[] {\r\n\t\tif (start < 0 || stop < 0) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tthis.lazyInit();\r\n\t\tlet subset: Token[] = new Array();\r\n\t\tif (stop >= this.tokens.length) {\r\n\t\t\tstop = this.tokens.length - 1;\r\n\t\t}\r\n\r\n\t\tfor (let i = start; i <= stop; i++) {\r\n\t\t\tlet t: Token = this.tokens[i];\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tsubset.push(t);\r\n\t\t}\r\n\r\n\t\treturn subset;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic LA(i: number): number {\r\n\t\tlet token = this.LT(i);\r\n\t\tif (!token) {\r\n\t\t\treturn Token.INVALID_TYPE;\r\n\t\t}\r\n\r\n\t\treturn token.type;\r\n\t}\r\n\r\n\tprotected tryLB(k: number): Token | undefined {\r\n\t\tif ((this.p - k) < 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this.tokens[this.p - k];\r\n\t}\r\n\r\n\t@NotNull\r\n\t@Override\r\n\tpublic LT(k: number): Token {\r\n\t\tlet result = this.tryLT(k);\r\n\t\tif (result === undefined) {\r\n\t\t\tthrow new RangeError(\"requested lookback index out of range\");\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic tryLT(k: number): Token | undefined {\r\n\t\tthis.lazyInit();\r\n\t\tif (k === 0) {\r\n\t\t\tthrow new RangeError(\"0 is not a valid lookahead index\");\r\n\t\t}\r\n\r\n\t\tif (k < 0) {\r\n\t\t\treturn this.tryLB(-k);\r\n\t\t}\r\n\r\n\t\tlet i: number = this.p + k - 1;\r\n\t\tthis.sync(i);\r\n\t\tif (i >= this.tokens.length) {\r\n\t\t\t// return EOF token\r\n\t\t\t// EOF must be last token\r\n\t\t\treturn this.tokens[this.tokens.length - 1];\r\n\t\t}\r\n\r\n\t\t//\t\tif ( i>range ) range = i;\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t/**\r\n\t * Allowed derived classes to modify the behavior of operations which change\r\n\t * the current stream position by adjusting the target token index of a seek\r\n\t * operation. The default implementation simply returns `i`. If an\r\n\t * exception is thrown in this method, the current stream index should not be\r\n\t * changed.\r\n\t *\r\n\t * For example, {@link CommonTokenStream} overrides this method to ensure that\r\n\t * the seek target is always an on-channel token.\r\n\t *\r\n\t * @param i The target token index.\r\n\t * @returns The adjusted target token index.\r\n\t */\r\n\tprotected adjustSeekIndex(i: number): number {\r\n\t\treturn i;\r\n\t}\r\n\r\n\tprotected lazyInit(): void {\r\n\t\tif (this.p === -1) {\r\n\t\t\tthis.setup();\r\n\t\t}\r\n\t}\r\n\r\n\tprotected setup(): void {\r\n\t\tthis.sync(0);\r\n\t\tthis.p = this.adjustSeekIndex(0);\r\n\t}\r\n\r\n\tpublic getTokens(): Token[];\r\n\r\n\tpublic getTokens(start: number, stop: number): Token[];\r\n\r\n\tpublic getTokens(start: number, stop: number, types: Set): Token[];\r\n\r\n\tpublic getTokens(start: number, stop: number, ttype: number): Token[];\r\n\r\n\t/** Given a start and stop index, return a `List` of all tokens in\r\n\t * the token type `BitSet`. Return an empty array if no tokens were found. This\r\n\t * method looks at both on and off channel tokens.\r\n\t */\r\n\tpublic getTokens(start?: number, stop?: number, types?: Set | number): Token[] {\r\n\t\tthis.lazyInit();\r\n\r\n\t\tif (start === undefined) {\r\n\t\t\tassert(stop === undefined && types === undefined);\r\n\t\t\treturn this.tokens;\r\n\t\t} else if (stop === undefined) {\r\n\t\t\tstop = this.tokens.length - 1;\r\n\t\t}\r\n\r\n\t\tif (start < 0 || stop >= this.tokens.length || stop < 0 || start >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(\"start \" + start + \" or stop \" + stop + \" not in 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\tif (start > stop) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tif (types === undefined) {\r\n\t\t\treturn this.tokens.slice(start, stop + 1);\r\n\t\t} else if (typeof types === \"number\") {\r\n\t\t\ttypes = new Set().add(types);\r\n\t\t}\r\n\r\n\t\tlet typesSet = types;\r\n\r\n\t\t// list = tokens[start:stop]:{T t, t.type in types}\r\n\t\tlet filteredTokens: Token[] = this.tokens.slice(start, stop + 1);\r\n\t\tfilteredTokens = filteredTokens.filter((value) => typesSet.has(value.type));\r\n\r\n\t\treturn filteredTokens;\r\n\t}\r\n\r\n\t/**\r\n\t * Given a starting index, return the index of the next token on channel.\r\n\t * Return `i` if `tokens[i]` is on channel. Return the index of\r\n\t * the EOF token if there are no tokens on channel between `i` and\r\n\t * EOF.\r\n\t */\r\n\tprotected nextTokenOnChannel(i: number, channel: number): number {\r\n\t\tthis.sync(i);\r\n\t\tif (i >= this.size) {\r\n\t\t\treturn this.size - 1;\r\n\t\t}\r\n\r\n\t\tlet token: Token = this.tokens[i];\r\n\t\twhile (token.channel !== channel) {\r\n\t\t\tif (token.type === Token.EOF) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\r\n\t\t\ti++;\r\n\t\t\tthis.sync(i);\r\n\t\t\ttoken = this.tokens[i];\r\n\t\t}\r\n\r\n\t\treturn i;\r\n\t}\r\n\r\n\t/**\r\n\t * Given a starting index, return the index of the previous token on\r\n\t * channel. Return `i` if `tokens[i]` is on channel. Return -1\r\n\t * if there are no tokens on channel between `i` and 0.\r\n\t *\r\n\t * If `i` specifies an index at or after the EOF token, the EOF token\r\n\t * index is returned. This is due to the fact that the EOF token is treated\r\n\t * as though it were on every channel.\r\n\t */\r\n\tprotected previousTokenOnChannel(i: number, channel: number): number {\r\n\t\tthis.sync(i);\r\n\t\tif (i >= this.size) {\r\n\t\t\t// the EOF token is on every channel\r\n\t\t\treturn this.size - 1;\r\n\t\t}\r\n\r\n\t\twhile (i >= 0) {\r\n\t\t\tlet token: Token = this.tokens[i];\r\n\t\t\tif (token.type === Token.EOF || token.channel === channel) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\r\n\t\t\ti--;\r\n\t\t}\r\n\r\n\t\treturn i;\r\n\t}\r\n\r\n\t/** Collect all tokens on specified channel to the right of\r\n\t * the current token up until we see a token on {@link Lexer#DEFAULT_TOKEN_CHANNEL} or\r\n\t * EOF. If `channel` is `-1`, find any non default channel token.\r\n\t */\r\n\tpublic getHiddenTokensToRight(tokenIndex: number, channel: number = -1): Token[] {\r\n\t\tthis.lazyInit();\r\n\t\tif (tokenIndex < 0 || tokenIndex >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(tokenIndex + \" not in 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\tlet nextOnChannel: number = this.nextTokenOnChannel(tokenIndex + 1, Lexer.DEFAULT_TOKEN_CHANNEL);\r\n\t\tlet to: number;\r\n\t\tlet from: number = tokenIndex + 1;\r\n\t\t// if none onchannel to right, nextOnChannel=-1 so set to = last token\r\n\t\tif (nextOnChannel === -1) {\r\n\t\t\tto = this.size - 1;\r\n\t\t} else {\r\n\t\t\tto = nextOnChannel;\r\n\t\t}\r\n\r\n\t\treturn this.filterForChannel(from, to, channel);\r\n\t}\r\n\r\n\t/** Collect all tokens on specified channel to the left of\r\n\t * the current token up until we see a token on {@link Lexer#DEFAULT_TOKEN_CHANNEL}.\r\n\t * If `channel` is `-1`, find any non default channel token.\r\n\t */\r\n\tpublic getHiddenTokensToLeft(tokenIndex: number, channel: number = -1): Token[] {\r\n\t\tthis.lazyInit();\r\n\t\tif (tokenIndex < 0 || tokenIndex >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(tokenIndex + \" not in 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\tif (tokenIndex === 0) {\r\n\t\t\t// obviously no tokens can appear before the first token\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tlet prevOnChannel: number = this.previousTokenOnChannel(tokenIndex - 1, Lexer.DEFAULT_TOKEN_CHANNEL);\r\n\t\tif (prevOnChannel === tokenIndex - 1) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\t// if none onchannel to left, prevOnChannel=-1 then from=0\r\n\t\tlet from: number = prevOnChannel + 1;\r\n\t\tlet to: number = tokenIndex - 1;\r\n\r\n\t\treturn this.filterForChannel(from, to, channel);\r\n\t}\r\n\r\n\tprotected filterForChannel(from: number, to: number, channel: number): Token[] {\r\n\t\tlet hidden: Token[] = new Array();\r\n\t\tfor (let i = from; i <= to; i++) {\r\n\t\t\tlet t: Token = this.tokens[i];\r\n\t\t\tif (channel === -1) {\r\n\t\t\t\tif (t.channel !== Lexer.DEFAULT_TOKEN_CHANNEL) {\r\n\t\t\t\t\thidden.push(t);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (t.channel === channel) {\r\n\t\t\t\t\thidden.push(t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn hidden;\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\treturn this.tokenSource.sourceName;\r\n\t}\r\n\r\n\t/** Get the text of all tokens in this buffer. */\r\n\tpublic getText(): string;\r\n\tpublic getText(interval: Interval): string;\r\n\tpublic getText(context: RuleContext): string;\r\n\t@NotNull\r\n\t@Override\r\n\tpublic getText(interval?: Interval | RuleContext): string {\r\n\t\tif (interval === undefined) {\r\n\t\t\tinterval = Interval.of(0, this.size - 1);\r\n\t\t} else if (!(interval instanceof Interval)) {\r\n\t\t\t// Note: the more obvious check for 'instanceof RuleContext' results in a circular dependency problem\r\n\t\t\tinterval = interval.sourceInterval;\r\n\t\t}\r\n\r\n\t\tlet start: number = interval.a;\r\n\t\tlet stop: number = interval.b;\r\n\t\tif (start < 0 || stop < 0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tthis.fill();\r\n\t\tif (stop >= this.tokens.length) {\r\n\t\t\tstop = this.tokens.length - 1;\r\n\t\t}\r\n\r\n\t\tlet buf: string = \"\";\r\n\t\tfor (let i = start; i <= stop; i++) {\r\n\t\t\tlet t: Token = this.tokens[i];\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tbuf += t.text;\r\n\t\t}\r\n\r\n\t\treturn buf.toString();\r\n\t}\r\n\r\n\t@NotNull\r\n\t@Override\r\n\tpublic getTextFromRange(start: any, stop: any): string {\r\n\t\tif (this.isToken(start) && this.isToken(stop)) {\r\n\t\t\treturn this.getText(Interval.of(start.tokenIndex, stop.tokenIndex));\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\t/** Get all tokens from lexer until EOF. */\r\n\tpublic fill(): void {\r\n\t\tthis.lazyInit();\r\n\t\tconst blockSize: number = 1000;\r\n\t\twhile (true) {\r\n\t\t\tlet fetched: number = this.fetch(blockSize);\r\n\t\t\tif (fetched < blockSize) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// TODO: Figure out a way to make this more flexible?\r\n\tprivate isWritableToken(t: Token): t is WritableToken {\r\n\t\treturn t instanceof CommonToken;\r\n\t}\r\n\r\n\t// TODO: Figure out a way to make this more flexible?\r\n\tprivate isToken(t: any): t is Token {\r\n\t\treturn t instanceof CommonToken;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.3953157-07:00\r\n\r\nimport { BufferedTokenStream } from \"./BufferedTokenStream\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * This class extends {@link BufferedTokenStream} with functionality to filter\r\n * token streams to tokens on a particular channel (tokens where\r\n * {@link Token#getChannel} returns a particular value).\r\n *\r\n * This token stream provides access to all tokens by index or when calling\r\n * methods like {@link #getText}. The channel filtering is only used for code\r\n * accessing tokens via the lookahead methods {@link #LA}, {@link #LT}, and\r\n * {@link #LB}.\r\n *\r\n * By default, tokens are placed on the default channel\r\n * ({@link Token#DEFAULT_CHANNEL}), but may be reassigned by using the\r\n * `->channel(HIDDEN)` lexer command, or by using an embedded action to\r\n * call {@link Lexer#setChannel}.\r\n *\r\n * Note: lexer rules which use the `->skip` lexer command or call\r\n * {@link Lexer#skip} do not produce tokens at all, so input text matched by\r\n * such a rule will not be available as part of the token stream, regardless of\r\n * channel.\r\n */\r\nexport class CommonTokenStream extends BufferedTokenStream {\r\n\t/**\r\n\t * Specifies the channel to use for filtering tokens.\r\n\t *\r\n\t * The default value is {@link Token#DEFAULT_CHANNEL}, which matches the\r\n\t * default channel assigned to tokens created by the lexer.\r\n\t */\r\n\tprotected channel: number;\r\n\r\n\t/**\r\n\t * Constructs a new {@link CommonTokenStream} using the specified token\r\n\t * source and filtering tokens to the specified channel. Only tokens whose\r\n\t * {@link Token#getChannel} matches `channel` or have the\r\n\t * `Token.type` equal to {@link Token#EOF} will be returned by the\r\n\t * token stream lookahead methods.\r\n\t *\r\n\t * @param tokenSource The token source.\r\n\t * @param channel The channel to use for filtering tokens.\r\n\t */\r\n\tconstructor(@NotNull tokenSource: TokenSource, channel: number = Token.DEFAULT_CHANNEL) {\r\n\t\tsuper(tokenSource);\r\n\t\tthis.channel = channel;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected adjustSeekIndex(i: number): number {\r\n\t\treturn this.nextTokenOnChannel(i, this.channel);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected tryLB(k: number): Token | undefined {\r\n\t\tif ((this.p - k) < 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet i: number = this.p;\r\n\t\tlet n: number = 1;\r\n\t\t// find k good tokens looking backwards\r\n\t\twhile (n <= k && i > 0) {\r\n\t\t\t// skip off-channel tokens\r\n\t\t\ti = this.previousTokenOnChannel(i - 1, this.channel);\r\n\t\t\tn++;\r\n\t\t}\r\n\r\n\t\tif (i < 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t@Override\r\n\tpublic tryLT(k: number): Token | undefined {\r\n\t\t//System.out.println(\"enter LT(\"+k+\")\");\r\n\t\tthis.lazyInit();\r\n\t\tif (k === 0) {\r\n\t\t\tthrow new RangeError(\"0 is not a valid lookahead index\");\r\n\t\t}\r\n\r\n\t\tif (k < 0) {\r\n\t\t\treturn this.tryLB(-k);\r\n\t\t}\r\n\r\n\t\tlet i: number = this.p;\r\n\t\tlet n: number = 1; // we know tokens[p] is a good one\r\n\t\t// find k good tokens\r\n\t\twhile (n < k) {\r\n\t\t\t// skip off-channel tokens, but make sure to not look past EOF\r\n\t\t\tif (this.sync(i + 1)) {\r\n\t\t\t\ti = this.nextTokenOnChannel(i + 1, this.channel);\r\n\t\t\t}\r\n\t\t\tn++;\r\n\t\t}\r\n\r\n\t\t//\t\tif ( i>range ) range = i;\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t/** Count EOF just once. */\r\n\tpublic getNumberOfOnChannelTokens(): number {\r\n\t\tlet n: number = 0;\r\n\t\tthis.fill();\r\n\t\tfor (let t of this.tokens) {\r\n\t\t\tif (t.channel === this.channel) {\r\n\t\t\t\tn++;\r\n\t\t\t}\r\n\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn n;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.1916955-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CommonTokenFactory } from \"./CommonTokenFactory\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * Provides an implementation of {@link TokenSource} as a wrapper around a list\r\n * of {@link Token} objects.\r\n *\r\n * If the final token in the list is an {@link Token#EOF} token, it will be used\r\n * as the EOF token for every call to {@link #nextToken} after the end of the\r\n * list is reached. Otherwise, an EOF token will be created.\r\n */\r\nexport class ListTokenSource implements TokenSource {\r\n\t/**\r\n\t * The wrapped collection of {@link Token} objects to return.\r\n\t */\r\n\tprotected tokens: Token[];\r\n\r\n\t/**\r\n\t * The name of the input source. If this value is `undefined`, a call to\r\n\t * {@link #getSourceName} should return the source name used to create the\r\n\t * the next token in {@link #tokens} (or the previous token if the end of\r\n\t * the input has been reached).\r\n\t */\r\n\tprivate _sourceName?: string;\r\n\r\n\t/**\r\n\t * The index into {@link #tokens} of token to return by the next call to\r\n\t * {@link #nextToken}. The end of the input is indicated by this value\r\n\t * being greater than or equal to the number of items in {@link #tokens}.\r\n\t */\r\n\tprotected i: number = 0;\r\n\r\n\t/**\r\n\t * This field caches the EOF token for the token source.\r\n\t */\r\n\tprotected eofToken?: Token;\r\n\r\n\t/**\r\n\t * This is the backing field for {@link #getTokenFactory} and\r\n\t * {@link setTokenFactory}.\r\n\t */\r\n\tprivate _factory: TokenFactory = CommonTokenFactory.DEFAULT;\r\n\r\n\t/**\r\n\t * Constructs a new {@link ListTokenSource} instance from the specified\r\n\t * collection of {@link Token} objects and source name.\r\n\t *\r\n\t * @param tokens The collection of {@link Token} objects to provide as a\r\n\t * {@link TokenSource}.\r\n\t * @param sourceName The name of the {@link TokenSource}. If this value is\r\n\t * `undefined`, {@link #getSourceName} will attempt to infer the name from\r\n\t * the next {@link Token} (or the previous token if the end of the input has\r\n\t * been reached).\r\n\t *\r\n\t * @exception NullPointerException if `tokens` is `undefined`\r\n\t */\r\n\tconstructor(@NotNull tokens: Token[], sourceName?: string) {\r\n\t\tif (tokens == null) {\r\n\t\t\tthrow new Error(\"tokens cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis.tokens = tokens;\r\n\t\tthis._sourceName = sourceName;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\tif (this.i < this.tokens.length) {\r\n\t\t\treturn this.tokens[this.i].charPositionInLine;\r\n\t\t} else if (this.eofToken != null) {\r\n\t\t\treturn this.eofToken.charPositionInLine;\r\n\t\t} else if (this.tokens.length > 0) {\r\n\t\t\t// have to calculate the result from the line/column of the previous\r\n\t\t\t// token, along with the text of the token.\r\n\t\t\tlet lastToken: Token = this.tokens[this.tokens.length - 1];\r\n\t\t\tlet tokenText: string | undefined = lastToken.text;\r\n\t\t\tif (tokenText != null) {\r\n\t\t\t\tlet lastNewLine: number = tokenText.lastIndexOf(\"\\n\");\r\n\t\t\t\tif (lastNewLine >= 0) {\r\n\t\t\t\t\treturn tokenText.length - lastNewLine - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn lastToken.charPositionInLine + lastToken.stopIndex - lastToken.startIndex + 1;\r\n\t\t}\r\n\r\n\t\t// only reach this if tokens is empty, meaning EOF occurs at the first\r\n\t\t// position in the input\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tpublic nextToken(): Token {\r\n\t\tif (this.i >= this.tokens.length) {\r\n\t\t\tif (this.eofToken == null) {\r\n\t\t\t\tlet start: number = -1;\r\n\t\t\t\tif (this.tokens.length > 0) {\r\n\t\t\t\t\tlet previousStop: number = this.tokens[this.tokens.length - 1].stopIndex;\r\n\t\t\t\t\tif (previousStop !== -1) {\r\n\t\t\t\t\t\tstart = previousStop + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet stop: number = Math.max(-1, start - 1);\r\n\t\t\t\tthis.eofToken = this._factory.create({ source: this, stream: this.inputStream }, Token.EOF, \"EOF\", Token.DEFAULT_CHANNEL, start, stop, this.line, this.charPositionInLine);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.eofToken;\r\n\t\t}\r\n\r\n\t\tlet t: Token = this.tokens[this.i];\r\n\t\tif (this.i === this.tokens.length - 1 && t.type === Token.EOF) {\r\n\t\t\tthis.eofToken = t;\r\n\t\t}\r\n\r\n\t\tthis.i++;\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget line(): number {\r\n\t\tif (this.i < this.tokens.length) {\r\n\t\t\treturn this.tokens[this.i].line;\r\n\t\t} else if (this.eofToken != null) {\r\n\t\t\treturn this.eofToken.line;\r\n\t\t} else if (this.tokens.length > 0) {\r\n\t\t\t// have to calculate the result from the line/column of the previous\r\n\t\t\t// token, along with the text of the token.\r\n\t\t\tlet lastToken: Token = this.tokens[this.tokens.length - 1];\r\n\t\t\tlet line: number = lastToken.line;\r\n\r\n\t\t\tlet tokenText: string | undefined = lastToken.text;\r\n\t\t\tif (tokenText != null) {\r\n\t\t\t\tfor (let i = 0; i < tokenText.length; i++) {\r\n\t\t\t\t\tif (tokenText.charAt(i) === \"\\n\") {\r\n\t\t\t\t\t\tline++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// if no text is available, assume the token did not contain any newline characters.\r\n\t\t\treturn line;\r\n\t\t}\r\n\r\n\t\t// only reach this if tokens is empty, meaning EOF occurs at the first\r\n\t\t// position in the input\r\n\t\treturn 1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget inputStream(): CharStream | undefined {\r\n\t\tif (this.i < this.tokens.length) {\r\n\t\t\treturn this.tokens[this.i].inputStream;\r\n\t\t} else if (this.eofToken != null) {\r\n\t\t\treturn this.eofToken.inputStream;\r\n\t\t} else if (this.tokens.length > 0) {\r\n\t\t\treturn this.tokens[this.tokens.length - 1].inputStream;\r\n\t\t}\r\n\r\n\t\t// no input stream information is available\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\tif (this._sourceName) {\r\n\t\t\treturn this._sourceName;\r\n\t\t}\r\n\r\n\t\tlet inputStream: CharStream | undefined = this.inputStream;\r\n\t\tif (inputStream != null) {\r\n\t\t\treturn inputStream.sourceName;\r\n\t\t}\r\n\r\n\t\treturn \"List\";\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t// @Override\r\n\tset tokenFactory(@NotNull factory: TokenFactory) {\r\n\t\tthis._factory = factory;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\t@NotNull\r\n\tget tokenFactory(): TokenFactory {\r\n\t\treturn this._factory;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:42.1346951-07:00\r\n\r\nexport class MultiMap extends Map {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic map(key: K, value: V): void {\r\n\t\tlet elementsForKey = super.get(key);\r\n\t\tif (!elementsForKey) {\r\n\t\t\telementsForKey = [] as V[];\r\n\t\t\tsuper.set(key, elementsForKey);\r\n\t\t}\r\n\t\telementsForKey.push(value);\r\n\t}\r\n\r\n\tpublic getPairs(): Array<[K, V]> {\r\n\t\tlet pairs: Array<[K, V]> = [];\r\n\t\tthis.forEach((values: V[], key: K) => {\r\n\t\t\tvalues.forEach((v) => {\r\n\t\t\t\tpairs.push([key, v]);\r\n\t\t\t});\r\n\t\t});\r\n\t\treturn pairs;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:42.5447085-07:00\r\n\r\n/**\r\n * This exception is thrown to cancel a parsing operation. This exception does\r\n * not extend {@link RecognitionException}, allowing it to bypass the standard\r\n * error recovery mechanisms. {@link BailErrorStrategy} throws this exception in\r\n * response to a parse error.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ParseCancellationException extends Error {\r\n\t// private static serialVersionUID: number = -3529552099366979683L;\r\n\tpublic readonly stack?: string;\r\n\r\n\tconstructor(public cause: Error) {\r\n\t\tsuper(cause.message);\r\n\t\tthis.stack = cause.stack;\r\n\t}\r\n\r\n\tpublic getCause(): Error {\r\n\t\treturn this.cause;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.5898546-07:00\r\n\r\nimport { Override } from \"./Decorators\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/**\r\n * This class extends {@link ParserRuleContext} by allowing the value of\r\n * {@link #getRuleIndex} to be explicitly set for the context.\r\n *\r\n * {@link ParserRuleContext} does not include field storage for the rule index\r\n * since the context classes created by the code generator override the\r\n * {@link #getRuleIndex} method to return the correct value for that context.\r\n * Since the parser interpreter does not use the context classes generated for a\r\n * parser, this class (with slightly more memory overhead per node) is used to\r\n * provide equivalent functionality.\r\n */\r\nexport class InterpreterRuleContext extends ParserRuleContext {\r\n\t/**\r\n\t * This is the backing field for {@link #getRuleIndex}.\r\n\t */\r\n\tprivate _ruleIndex: number;\r\n\r\n\tconstructor(ruleIndex: number);\r\n\r\n\t/**\r\n\t * Constructs a new {@link InterpreterRuleContext} with the specified\r\n\t * parent, invoking state, and rule index.\r\n\t *\r\n\t * @param ruleIndex The rule index for the current context.\r\n\t * @param parent The parent context.\r\n\t * @param invokingStateNumber The invoking state number.\r\n\t */\r\n\tconstructor(ruleIndex: number, parent: ParserRuleContext | undefined, invokingStateNumber: number);\r\n\r\n\tconstructor(ruleIndex: number, parent?: ParserRuleContext, invokingStateNumber?: number) {\r\n\t\tif (invokingStateNumber !== undefined) {\r\n\t\t\tsuper(parent, invokingStateNumber);\r\n\t\t} else {\r\n\t\t\tsuper();\r\n\t\t}\r\n\r\n\t\tthis._ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleIndex(): number {\r\n\t\treturn this._ruleIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:53.1043451-07:00\r\n\r\nimport { ActionTransition } from \"./atn/ActionTransition\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { ATNStateType } from \"./atn/ATNStateType\";\r\nimport { AtomTransition } from \"./atn/AtomTransition\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DecisionState } from \"./atn/DecisionState\";\r\nimport { FailedPredicateException } from \"./FailedPredicateException\";\r\nimport { InputMismatchException } from \"./InputMismatchException\";\r\nimport { InterpreterRuleContext } from \"./InterpreterRuleContext\";\r\nimport { LoopEndState } from \"./atn/LoopEndState\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserATNSimulator } from \"./atn/ParserATNSimulator\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { PrecedencePredicateTransition } from \"./atn/PrecedencePredicateTransition\";\r\nimport { PredicateTransition } from \"./atn/PredicateTransition\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleStartState } from \"./atn/RuleStartState\";\r\nimport { RuleTransition } from \"./atn/RuleTransition\";\r\nimport { StarLoopEntryState } from \"./atn/StarLoopEntryState\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { Transition } from \"./atn/Transition\";\r\nimport { TransitionType } from \"./atn/TransitionType\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\n\r\n/** A parser simulator that mimics what ANTLR's generated\r\n * parser code does. A ParserATNSimulator is used to make\r\n * predictions via adaptivePredict but this class moves a pointer through the\r\n * ATN to simulate parsing. ParserATNSimulator just\r\n * makes us efficient rather than having to backtrack, for example.\r\n *\r\n * This properly creates parse trees even for left recursive rules.\r\n *\r\n * We rely on the left recursive rule invocation and special predicate\r\n * transitions to make left recursive rules work.\r\n *\r\n * See TestParserInterpreter for examples.\r\n */\r\nexport class ParserInterpreter extends Parser {\r\n\tprotected _grammarFileName: string;\r\n\tprotected _atn: ATN;\r\n\t/** This identifies StarLoopEntryState's that begin the (...)*\r\n\t * precedence loops of left recursive rules.\r\n\t */\r\n\tprotected pushRecursionContextStates: BitSet;\r\n\r\n\tprotected _ruleNames: string[];\r\n\t@NotNull\r\n\tprivate _vocabulary: Vocabulary;\r\n\r\n\t/** This stack corresponds to the _parentctx, _parentState pair of locals\r\n\t * that would exist on call stack frames with a recursive descent parser;\r\n\t * in the generated function for a left-recursive rule you'd see:\r\n\t *\r\n\t * private EContext e(int _p) {\r\n\t * ParserRuleContext _parentctx = _ctx; // Pair.a\r\n\t * int _parentState = state; // Pair.b\r\n\t * ...\r\n\t * }\r\n\t *\r\n\t * Those values are used to create new recursive rule invocation contexts\r\n\t * associated with left operand of an alt like \"expr '*' expr\".\r\n\t */\r\n\tprotected readonly _parentContextStack: Array<[ParserRuleContext, number]> = [];\r\n\r\n\t/** We need a map from (decision,inputIndex)->forced alt for computing ambiguous\r\n\t * parse trees. For now, we allow exactly one override.\r\n\t */\r\n\tprotected overrideDecision: number = -1;\r\n\tprotected overrideDecisionInputIndex: number = -1;\r\n\tprotected overrideDecisionAlt: number = -1;\r\n\tprotected overrideDecisionReached: boolean = false; // latch and only override once; error might trigger infinite loop\r\n\r\n\t/** What is the current context when we override a decisions? This tells\r\n\t * us what the root of the parse tree is when using override\r\n\t * for an ambiguity/lookahead check.\r\n\t */\r\n\tprotected _overrideDecisionRoot?: InterpreterRuleContext = undefined;\r\n\r\n\tprotected _rootContext!: InterpreterRuleContext;\r\n\r\n\t/** A copy constructor that creates a new parser interpreter by reusing\r\n\t * the fields of a previous interpreter.\r\n\t *\r\n\t * @param old The interpreter to copy\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tconstructor(/*@NotNull*/ old: ParserInterpreter);\r\n\tconstructor(\r\n\t\tgrammarFileName: string, /*@NotNull*/ vocabulary: Vocabulary,\r\n\t\truleNames: string[], atn: ATN, input: TokenStream);\r\n\tconstructor(\r\n\t\tgrammarFileName: ParserInterpreter | string, @NotNull vocabulary?: Vocabulary,\r\n\t\truleNames?: string[], atn?: ATN, input?: TokenStream) {\r\n\t\tsuper(grammarFileName instanceof ParserInterpreter ? grammarFileName.inputStream : input!);\r\n\t\tif (grammarFileName instanceof ParserInterpreter) {\r\n\t\t\tlet old: ParserInterpreter = grammarFileName;\r\n\t\t\tthis._grammarFileName = old._grammarFileName;\r\n\t\t\tthis._atn = old._atn;\r\n\t\t\tthis.pushRecursionContextStates = old.pushRecursionContextStates;\r\n\t\t\tthis._ruleNames = old._ruleNames;\r\n\t\t\tthis._vocabulary = old._vocabulary;\r\n\t\t\tthis.interpreter = new ParserATNSimulator(this._atn, this);\r\n\t\t} else {\r\n\t\t\t// The second constructor requires non-null arguments\r\n\t\t\tvocabulary = vocabulary!;\r\n\t\t\truleNames = ruleNames!;\r\n\t\t\tatn = atn!;\r\n\r\n\t\t\tthis._grammarFileName = grammarFileName;\r\n\t\t\tthis._atn = atn;\r\n\t\t\tthis._ruleNames = ruleNames.slice(0);\r\n\t\t\tthis._vocabulary = vocabulary;\r\n\r\n\t\t\t// identify the ATN states where pushNewRecursionContext() must be called\r\n\t\t\tthis.pushRecursionContextStates = new BitSet(atn.states.length);\r\n\t\t\tfor (let state of atn.states) {\r\n\t\t\t\tif (!(state instanceof StarLoopEntryState)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (state.precedenceRuleDecision) {\r\n\t\t\t\t\tthis.pushRecursionContextStates.set(state.stateNumber);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// get atn simulator that knows how to do predictions\r\n\t\t\tthis.interpreter = new ParserATNSimulator(atn, this);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reset(resetInput?: boolean): void {\r\n\t\tif (resetInput === undefined) {\r\n\t\t\tsuper.reset();\r\n\t\t} else {\r\n\t\t\tsuper.reset(resetInput);\r\n\t\t}\r\n\r\n\t\tthis.overrideDecisionReached = false;\r\n\t\tthis._overrideDecisionRoot = undefined;\r\n\t}\r\n\r\n\t@Override\r\n\tget atn(): ATN {\r\n\t\treturn this._atn;\r\n\t}\r\n\r\n\t@Override\r\n\tget vocabulary(): Vocabulary {\r\n\t\treturn this._vocabulary;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleNames(): string[] {\r\n\t\treturn this._ruleNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget grammarFileName(): string {\r\n\t\treturn this._grammarFileName;\r\n\t}\r\n\r\n\t/** Begin parsing at startRuleIndex */\r\n\tpublic parse(startRuleIndex: number): ParserRuleContext {\r\n\t\tlet startRuleStartState: RuleStartState = this._atn.ruleToStartState[startRuleIndex];\r\n\r\n\t\tthis._rootContext = this.createInterpreterRuleContext(undefined, ATNState.INVALID_STATE_NUMBER, startRuleIndex);\r\n\t\tif (startRuleStartState.isPrecedenceRule) {\r\n\t\t\tthis.enterRecursionRule(this._rootContext, startRuleStartState.stateNumber, startRuleIndex, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.enterRule(this._rootContext, startRuleStartState.stateNumber, startRuleIndex);\r\n\t\t}\r\n\r\n\t\twhile (true) {\r\n\t\t\tlet p: ATNState = this.atnState;\r\n\t\t\tswitch (p.stateType) {\r\n\t\t\tcase ATNStateType.RULE_STOP:\r\n\t\t\t\t// pop; return from rule\r\n\t\t\t\tif (this._ctx.isEmpty) {\r\n\t\t\t\t\tif (startRuleStartState.isPrecedenceRule) {\r\n\t\t\t\t\t\tlet result: ParserRuleContext = this._ctx;\r\n\t\t\t\t\t\tlet parentContext: [ParserRuleContext, number] = this._parentContextStack.pop() !;\r\n\t\t\t\t\t\tthis.unrollRecursionContexts(parentContext[0]);\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.exitRule();\r\n\t\t\t\t\t\treturn this._rootContext;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.visitRuleStopState(p);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.visitState(p);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (e) {\r\n\t\t\t\t\tif (e instanceof RecognitionException) {\r\n\t\t\t\t\t\tthis.state = this._atn.ruleToStopState[p.ruleIndex].stateNumber;\r\n\t\t\t\t\t\tthis.context.exception = e;\r\n\t\t\t\t\t\tthis.errorHandler.reportError(this, e);\r\n\t\t\t\t\t\tthis.recover(e);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic enterRecursionRule(localctx: ParserRuleContext, state: number, ruleIndex: number, precedence: number): void {\r\n\t\tthis._parentContextStack.push([this._ctx, localctx.invokingState]);\r\n\t\tsuper.enterRecursionRule(localctx, state, ruleIndex, precedence);\r\n\t}\r\n\r\n\tprotected get atnState(): ATNState {\r\n\t\treturn this._atn.states[this.state];\r\n\t}\r\n\r\n\tprotected visitState(p: ATNState): void {\r\n\t\tlet predictedAlt: number = 1;\r\n\t\tif (p.numberOfTransitions > 1) {\r\n\t\t\tpredictedAlt = this.visitDecisionState(p as DecisionState);\r\n\t\t}\r\n\r\n\t\tlet transition: Transition = p.transition(predictedAlt - 1);\r\n\t\tswitch (transition.serializationType) {\r\n\t\tcase TransitionType.EPSILON:\r\n\t\t\tif (this.pushRecursionContextStates.get(p.stateNumber) &&\r\n\t\t\t\t!(transition.target instanceof LoopEndState)) {\r\n\t\t\t\t// We are at the start of a left recursive rule's (...)* loop\r\n\t\t\t\t// and we're not taking the exit branch of loop.\r\n\t\t\t\tlet parentContext = this._parentContextStack[this._parentContextStack.length - 1];\r\n\t\t\t\tlet localctx: InterpreterRuleContext =\r\n\t\t\t\t\tthis.createInterpreterRuleContext(parentContext[0], parentContext[1], this._ctx.ruleIndex);\r\n\t\t\t\tthis.pushNewRecursionContext(localctx,\r\n\t\t\t\t\tthis._atn.ruleToStartState[p.ruleIndex].stateNumber,\r\n\t\t\t\t\tthis._ctx.ruleIndex);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ATOM:\r\n\t\t\tthis.match((transition as AtomTransition)._label);\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.RANGE:\r\n\t\tcase TransitionType.SET:\r\n\t\tcase TransitionType.NOT_SET:\r\n\t\t\tif (!transition.matches(this._input.LA(1), Token.MIN_USER_TOKEN_TYPE, 65535)) {\r\n\t\t\t\tthis.recoverInline();\r\n\t\t\t}\r\n\t\t\tthis.matchWildcard();\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.WILDCARD:\r\n\t\t\tthis.matchWildcard();\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.RULE:\r\n\t\t\tlet ruleStartState: RuleStartState = transition.target as RuleStartState;\r\n\t\t\tlet ruleIndex: number = ruleStartState.ruleIndex;\r\n\t\t\tlet newctx: InterpreterRuleContext = this.createInterpreterRuleContext(this._ctx, p.stateNumber, ruleIndex);\r\n\t\t\tif (ruleStartState.isPrecedenceRule) {\r\n\t\t\t\tthis.enterRecursionRule(newctx, ruleStartState.stateNumber, ruleIndex, (transition as RuleTransition).precedence);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.enterRule(newctx, transition.target.stateNumber, ruleIndex);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.PREDICATE:\r\n\t\t\tlet predicateTransition: PredicateTransition = transition as PredicateTransition;\r\n\t\t\tif (!this.sempred(this._ctx, predicateTransition.ruleIndex, predicateTransition.predIndex)) {\r\n\t\t\t\tthrow new FailedPredicateException(this);\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ACTION:\r\n\t\t\tlet actionTransition: ActionTransition = transition as ActionTransition;\r\n\t\t\tthis.action(this._ctx, actionTransition.ruleIndex, actionTransition.actionIndex);\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\tif (!this.precpred(this._ctx, (transition as PrecedencePredicateTransition).precedence)) {\r\n\t\t\t\tlet precedence = (transition as PrecedencePredicateTransition).precedence;\r\n\t\t\t\tthrow new FailedPredicateException(this, `precpred(_ctx, ${precedence})`);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new Error(\"UnsupportedOperationException: Unrecognized ATN transition type.\");\r\n\t\t}\r\n\r\n\t\tthis.state = transition.target.stateNumber;\r\n\t}\r\n\r\n\t/** Method visitDecisionState() is called when the interpreter reaches\r\n\t * a decision state (instance of DecisionState). It gives an opportunity\r\n\t * for subclasses to track interesting things.\r\n\t */\r\n\tprotected visitDecisionState(p: DecisionState): number {\r\n\t\tlet predictedAlt: number;\r\n\t\tthis.errorHandler.sync(this);\r\n\t\tlet decision: number = p.decision;\r\n\t\tif (decision === this.overrideDecision && this._input.index === this.overrideDecisionInputIndex && !this.overrideDecisionReached) {\r\n\t\t\tpredictedAlt = this.overrideDecisionAlt;\r\n\t\t\tthis.overrideDecisionReached = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tpredictedAlt = this.interpreter.adaptivePredict(this._input, decision, this._ctx);\r\n\t\t}\r\n\t\treturn predictedAlt;\r\n\t}\r\n\r\n\t/** Provide simple \"factory\" for InterpreterRuleContext's.\r\n\t * @since 4.5.1\r\n\t */\r\n\tprotected createInterpreterRuleContext(\r\n\t\tparent: ParserRuleContext | undefined,\r\n\t\tinvokingStateNumber: number,\r\n\t\truleIndex: number): InterpreterRuleContext {\r\n\t\treturn new InterpreterRuleContext(ruleIndex, parent, invokingStateNumber);\r\n\t}\r\n\r\n\tprotected visitRuleStopState(p: ATNState): void {\r\n\t\tlet ruleStartState: RuleStartState = this._atn.ruleToStartState[p.ruleIndex];\r\n\t\tif (ruleStartState.isPrecedenceRule) {\r\n\t\t\tlet parentContext: [ParserRuleContext, number] = this._parentContextStack.pop()!;\r\n\t\t\tthis.unrollRecursionContexts(parentContext[0]);\r\n\t\t\tthis.state = parentContext[1];\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.exitRule();\r\n\t\t}\r\n\r\n\t\tlet ruleTransition: RuleTransition = this._atn.states[this.state].transition(0) as RuleTransition;\r\n\t\tthis.state = ruleTransition.followState.stateNumber;\r\n\t}\r\n\r\n\t/** Override this parser interpreters normal decision-making process\r\n\t * at a particular decision and input token index. Instead of\r\n\t * allowing the adaptive prediction mechanism to choose the\r\n\t * first alternative within a block that leads to a successful parse,\r\n\t * force it to take the alternative, 1..n for n alternatives.\r\n\t *\r\n\t * As an implementation limitation right now, you can only specify one\r\n\t * override. This is sufficient to allow construction of different\r\n\t * parse trees for ambiguous input. It means re-parsing the entire input\r\n\t * in general because you're never sure where an ambiguous sequence would\r\n\t * live in the various parse trees. For example, in one interpretation,\r\n\t * an ambiguous input sequence would be matched completely in expression\r\n\t * but in another it could match all the way back to the root.\r\n\t *\r\n\t * s : e '!'? ;\r\n\t * e : ID\r\n\t * | ID '!'\r\n\t * ;\r\n\t *\r\n\t * Here, x! can be matched as (s (e ID) !) or (s (e ID !)). In the first\r\n\t * case, the ambiguous sequence is fully contained only by the root.\r\n\t * In the second case, the ambiguous sequences fully contained within just\r\n\t * e, as in: (e ID !).\r\n\t *\r\n\t * Rather than trying to optimize this and make\r\n\t * some intelligent decisions for optimization purposes, I settled on\r\n\t * just re-parsing the whole input and then using\r\n\t * {link Trees#getRootOfSubtreeEnclosingRegion} to find the minimal\r\n\t * subtree that contains the ambiguous sequence. I originally tried to\r\n\t * record the call stack at the point the parser detected and ambiguity but\r\n\t * left recursive rules create a parse tree stack that does not reflect\r\n\t * the actual call stack. That impedance mismatch was enough to make\r\n\t * it it challenging to restart the parser at a deeply nested rule\r\n\t * invocation.\r\n\t *\r\n\t * Only parser interpreters can override decisions so as to avoid inserting\r\n\t * override checking code in the critical ALL(*) prediction execution path.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tpublic addDecisionOverride(decision: number, tokenIndex: number, forcedAlt: number): void {\r\n\t\tthis.overrideDecision = decision;\r\n\t\tthis.overrideDecisionInputIndex = tokenIndex;\r\n\t\tthis.overrideDecisionAlt = forcedAlt;\r\n\t}\r\n\r\n\tget overrideDecisionRoot(): InterpreterRuleContext | undefined {\r\n\t\treturn this._overrideDecisionRoot;\r\n\t}\r\n\r\n\t/** Rely on the error handler for this parser but, if no tokens are consumed\r\n\t * to recover, add an error node. Otherwise, nothing is seen in the parse\r\n\t * tree.\r\n\t */\r\n\tprotected recover(e: RecognitionException): void {\r\n\t\tlet i: number = this._input.index;\r\n\t\tthis.errorHandler.recover(this, e);\r\n\t\tif (this._input.index === i) {\r\n\t\t\t// no input consumed, better add an error node\r\n\t\t\tlet tok: Token | undefined = e.getOffendingToken();\r\n\t\t\tif (!tok) {\r\n\t\t\t\tthrow new Error(\"Expected exception to have an offending token\");\r\n\t\t\t}\r\n\r\n\t\t\tlet source = tok.tokenSource;\r\n\t\t\tlet stream = source !== undefined ? source.inputStream : undefined;\r\n\t\t\tlet sourcePair = { source, stream };\r\n\r\n\t\t\tif (e instanceof InputMismatchException) {\r\n\t\t\t\tlet expectedTokens = e.expectedTokens;\r\n\t\t\t\tif (expectedTokens === undefined) {\r\n\t\t\t\t\tthrow new Error(\"Expected the exception to provide expected tokens\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet expectedTokenType: number = Token.INVALID_TYPE;\r\n\t\t\t\tif (!expectedTokens.isNil) {\r\n\t\t\t\t\t// get any element\r\n\t\t\t\t\texpectedTokenType = expectedTokens.minElement;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet errToken: Token =\r\n\t\t\t\t\tthis.tokenFactory.create(sourcePair,\r\n\t\t\t\t\t\texpectedTokenType, tok.text,\r\n\t\t\t\t\t\tToken.DEFAULT_CHANNEL,\r\n\t\t\t\t\t\t-1, -1, // invalid start/stop\r\n\t\t\t\t\t\ttok.line, tok.charPositionInLine);\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, errToken));\r\n\t\t\t}\r\n\t\t\telse { // NoViableAlt\r\n\t\t\t\tlet source = tok.tokenSource;\r\n\t\t\t\tlet errToken: Token =\r\n\t\t\t\t\tthis.tokenFactory.create(sourcePair,\r\n\t\t\t\t\t\tToken.INVALID_TYPE, tok.text,\r\n\t\t\t\t\t\tToken.DEFAULT_CHANNEL,\r\n\t\t\t\t\t\t-1, -1, // invalid start/stop\r\n\t\t\t\t\t\ttok.line, tok.charPositionInLine);\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, errToken));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected recoverInline(): Token {\r\n\t\treturn this._errHandler.recoverInline(this);\r\n\t}\r\n\r\n\t/** Return the root of the parse, which can be useful if the parser\r\n\t * bails out. You still can access the top node. Note that,\r\n\t * because of the way left recursive rules add children, it's possible\r\n\t * that the root will not have any children if the start rule immediately\r\n\t * called and left recursive rule that fails.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tget rootContext(): InterpreterRuleContext {\r\n\t\treturn this._rootContext;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { MultiMap } from \"../../misc/MultiMap\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { ParseTreePattern } from \"./ParseTreePattern\";\r\n\r\n/**\r\n * Represents the result of matching a {@link ParseTree} against a tree pattern.\r\n */\r\nexport class ParseTreeMatch {\r\n\t/**\r\n\t * This is the backing field for `tree`.\r\n\t */\r\n\tprivate _tree: ParseTree;\r\n\r\n\t/**\r\n\t * This is the backing field for `pattern`.\r\n\t */\r\n\tprivate _pattern: ParseTreePattern;\r\n\r\n\t/**\r\n\t * This is the backing field for `labels`.\r\n\t */\r\n\tprivate _labels: MultiMap;\r\n\r\n\t/**\r\n\t * This is the backing field for `mismatchedNode`.\r\n\t */\r\n\tprivate _mismatchedNode?: ParseTree;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link ParseTreeMatch} from the specified\r\n\t * parse tree and pattern.\r\n\t *\r\n\t * @param tree The parse tree to match against the pattern.\r\n\t * @param pattern The parse tree pattern.\r\n\t * @param labels A mapping from label names to collections of\r\n\t * {@link ParseTree} objects located by the tree pattern matching process.\r\n\t * @param mismatchedNode The first node which failed to match the tree\r\n\t * pattern during the matching process.\r\n\t *\r\n\t * @throws {@link Error} if `tree` is not defined\r\n\t * @throws {@link Error} if `pattern` is not defined\r\n\t * @throws {@link Error} if `labels` is not defined\r\n\t */\r\n\tconstructor(\r\n\t\t@NotNull tree: ParseTree,\r\n\t\t@NotNull pattern: ParseTreePattern,\r\n\t\t@NotNull labels: MultiMap,\r\n\t\tmismatchedNode: ParseTree | undefined) {\r\n\t\tif (!tree) {\r\n\t\t\tthrow new Error(\"tree cannot be null\");\r\n\t\t}\r\n\r\n\t\tif (!pattern) {\r\n\t\t\tthrow new Error(\"pattern cannot be null\");\r\n\t\t}\r\n\r\n\t\tif (!labels) {\r\n\t\t\tthrow new Error(\"labels cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._tree = tree;\r\n\t\tthis._pattern = pattern;\r\n\t\tthis._labels = labels;\r\n\t\tthis._mismatchedNode = mismatchedNode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the last node associated with a specific `label`.\r\n\t *\r\n\t * For example, for pattern ``, `get(\"id\")` returns the\r\n\t * node matched for that `ID`. If more than one node\r\n\t * matched the specified label, only the last is returned. If there is\r\n\t * no node associated with the label, this returns `undefined`.\r\n\t *\r\n\t * Pattern tags like `` and `` without labels are\r\n\t * considered to be labeled with `ID` and `expr`, respectively.\r\n\t *\r\n\t * @param label The label to check.\r\n\t *\r\n\t * @returns The last {@link ParseTree} to match a tag with the specified\r\n\t * label, or `undefined` if no parse tree matched a tag with the label.\r\n\t */\r\n\tpublic get(label: string): ParseTree | undefined {\r\n\t\tlet parseTrees = this._labels.get(label);\r\n\t\tif (!parseTrees || parseTrees.length === 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn parseTrees[parseTrees.length - 1]; // return last if multiple\r\n\t}\r\n\r\n\t/**\r\n\t * Return all nodes matching a rule or token tag with the specified label.\r\n\t *\r\n\t * If the `label` is the name of a parser rule or token in the\r\n\t * grammar, the resulting list will contain both the parse trees matching\r\n\t * rule or tags explicitly labeled with the label and the complete set of\r\n\t * parse trees matching the labeled and unlabeled tags in the pattern for\r\n\t * the parser rule or token. For example, if `label` is `\"foo\"`,\r\n\t * the result will contain *all* of the following.\r\n\t *\r\n\t * * Parse tree nodes matching tags of the form `` and\r\n\t * ``.\r\n\t * * Parse tree nodes matching tags of the form ``.\r\n\t * * Parse tree nodes matching tags of the form ``.\r\n\t *\r\n\t * @param label The label.\r\n\t *\r\n\t * @returns A collection of all {@link ParseTree} nodes matching tags with\r\n\t * the specified `label`. If no nodes matched the label, an empty list\r\n\t * is returned.\r\n\t */\r\n\t@NotNull\r\n\tpublic getAll(@NotNull label: string): ParseTree[] {\r\n\t\tconst nodes = this._labels.get(label);\r\n\t\tif (!nodes) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\treturn nodes;\r\n\t}\r\n\r\n\t/**\r\n\t * Return a mapping from label → [list of nodes].\r\n\t *\r\n\t * The map includes special entries corresponding to the names of rules and\r\n\t * tokens referenced in tags in the original pattern. For additional\r\n\t * information, see the description of {@link #getAll(String)}.\r\n\t *\r\n\t * @returns A mapping from labels to parse tree nodes. If the parse tree\r\n\t * pattern did not contain any rule or token tags, this map will be empty.\r\n\t */\r\n\t@NotNull\r\n\tget labels(): MultiMap {\r\n\t\treturn this._labels;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the node at which we first detected a mismatch.\r\n\t *\r\n\t * @returns the node at which we first detected a mismatch, or `undefined`\r\n\t * if the match was successful.\r\n\t */\r\n\tget mismatchedNode(): ParseTree | undefined {\r\n\t\treturn this._mismatchedNode;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value indicating whether the match operation succeeded.\r\n\t *\r\n\t * @returns `true` if the match operation succeeded; otherwise,\r\n\t * `false`.\r\n\t */\r\n\tget succeeded(): boolean {\r\n\t\treturn !this._mismatchedNode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tree pattern we are matching against.\r\n\t *\r\n\t * @returns The tree pattern we are matching against.\r\n\t */\r\n\t@NotNull\r\n\tget pattern(): ParseTreePattern {\r\n\t\treturn this._pattern;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the parse tree we are trying to match to a pattern.\r\n\t *\r\n\t * @returns The {@link ParseTree} we are trying to match to a pattern.\r\n\t */\r\n\t@NotNull\r\n\tget tree(): ParseTree {\r\n\t\treturn this._tree;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `Match ${\r\n\t\t\tthis.succeeded ? \"succeeded\" : \"failed\"}; found ${\r\n\t\t\tthis.labels.size} labels`;\r\n\t}\r\n}\r\n", "// Generated from XPathLexer.g4 by ANTLR 4.9.0-SNAPSHOT\r\n\r\n\r\nimport { ATN } from \"../../atn/ATN\";\r\nimport { ATNDeserializer } from \"../../atn/ATNDeserializer\";\r\nimport { CharStream } from \"../../CharStream\";\r\nimport { Lexer } from \"../../Lexer\";\r\nimport { LexerATNSimulator } from \"../../atn/LexerATNSimulator\";\r\nimport { NotNull } from \"../../Decorators\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { RuleContext } from \"../../RuleContext\";\r\nimport { Vocabulary } from \"../../Vocabulary\";\r\nimport { VocabularyImpl } from \"../../VocabularyImpl\";\r\n\r\nimport * as Utils from \"../../misc/Utils\";\r\n\r\n\r\nexport class XPathLexer extends Lexer {\r\n\tpublic static readonly TOKEN_REF = 1;\r\n\tpublic static readonly RULE_REF = 2;\r\n\tpublic static readonly ANYWHERE = 3;\r\n\tpublic static readonly ROOT = 4;\r\n\tpublic static readonly WILDCARD = 5;\r\n\tpublic static readonly BANG = 6;\r\n\tpublic static readonly ID = 7;\r\n\tpublic static readonly STRING = 8;\r\n\r\n\t// tslint:disable:no-trailing-whitespace\r\n\tpublic static readonly channelNames: string[] = [\r\n\t\t\"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\",\r\n\t];\r\n\r\n\t// tslint:disable:no-trailing-whitespace\r\n\tpublic static readonly modeNames: string[] = [\r\n\t\t\"DEFAULT_MODE\",\r\n\t];\r\n\r\n\tpublic static readonly ruleNames: string[] = [\r\n\t\t\"ANYWHERE\", \"ROOT\", \"WILDCARD\", \"BANG\", \"ID\", \"NameChar\", \"NameStartChar\", \r\n\t\t\"STRING\",\r\n\t];\r\n\r\n\tprivate static readonly _LITERAL_NAMES: Array = [\r\n\t\tundefined, undefined, undefined, \"'//'\", \"'/'\", \"'*'\", \"'!'\",\r\n\t];\r\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\r\n\t\tundefined, \"TOKEN_REF\", \"RULE_REF\", \"ANYWHERE\", \"ROOT\", \"WILDCARD\", \"BANG\", \r\n\t\t\"ID\", \"STRING\",\r\n\t];\r\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(XPathLexer._LITERAL_NAMES, XPathLexer._SYMBOLIC_NAMES, []);\r\n\r\n\t// @Override\r\n\t// @NotNull\r\n\tpublic get vocabulary(): Vocabulary {\r\n\t\treturn XPathLexer.VOCABULARY;\r\n\t}\r\n\t// tslint:enable:no-trailing-whitespace\r\n\r\n\r\n\tconstructor(input: CharStream) {\r\n\t\tsuper(input);\r\n\t\tthis._interp = new LexerATNSimulator(XPathLexer._ATN, this);\r\n\t}\r\n\r\n\t// @Override\r\n\tpublic get grammarFileName(): string { return \"XPathLexer.g4\"; }\r\n\r\n\t// @Override\r\n\tpublic get ruleNames(): string[] { return XPathLexer.ruleNames; }\r\n\r\n\t// @Override\r\n\tpublic get serializedATN(): string { return XPathLexer._serializedATN; }\r\n\r\n\t// @Override\r\n\tpublic get channelNames(): string[] { return XPathLexer.channelNames; }\r\n\r\n\t// @Override\r\n\tpublic get modeNames(): string[] { return XPathLexer.modeNames; }\r\n\r\n\t// @Override\r\n\tpublic action(_localctx: RuleContext, ruleIndex: number, actionIndex: number): void {\r\n\t\tswitch (ruleIndex) {\r\n\t\tcase 4:\r\n\t\t\tthis.ID_action(_localctx, actionIndex);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tprivate ID_action(_localctx: RuleContext, actionIndex: number): void {\r\n\t\tswitch (actionIndex) {\r\n\t\tcase 0:\r\n\r\n\t\t\tlet text = this.text;\r\n\t\t\tif (text.charAt(0) === text.charAt(0).toUpperCase()) {\r\n\t\t\t\tthis.type = XPathLexer.TOKEN_REF;\r\n\t\t\t} else {\r\n\t\t\t\tthis.type = XPathLexer.RULE_REF;\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static readonly _serializedATNSegments: number = 2;\r\n\tprivate static readonly _serializedATNSegment0: string =\r\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x02\\n2\\b\\x01\\x04\" +\r\n\t\t\"\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\\x04\" +\r\n\t\t\"\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\" +\r\n\t\t\"\\x03\\x04\\x03\\x04\\x03\\x05\\x03\\x05\\x03\\x06\\x03\\x06\\x07\\x06\\x1F\\n\\x06\\f\\x06\" +\r\n\t\t\"\\x0E\\x06\\\"\\v\\x06\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\b\\x03\\b\\x03\\t\\x03\" +\r\n\t\t\"\\t\\x07\\t,\\n\\t\\f\\t\\x0E\\t/\\v\\t\\x03\\t\\x03\\t\\x03-\\x02\\x02\\n\\x03\\x02\\x05\\x05\" +\r\n\t\t\"\\x02\\x06\\x07\\x02\\x07\\t\\x02\\b\\v\\x02\\t\\r\\x02\\x02\\x0F\\x02\\x02\\x11\\x02\\n\\x03\" +\r\n\t\t\"\\x02\\x02\\x04\\u02B6\\x02\\x02\\x02\\n\\x02\\x10\\x02\\x1D\\x022\\x02;\\x02C\\x02\\\\\" +\r\n\t\t\"\\x02a\\x02a\\x02c\\x02|\\x02\\x81\\x02\\xA1\\x02\\xAC\\x02\\xAC\\x02\\xAF\\x02\\xAF\\x02\" +\r\n\t\t\"\\xB7\\x02\\xB7\\x02\\xBC\\x02\\xBC\\x02\\xC2\\x02\\xD8\\x02\\xDA\\x02\\xF8\\x02\\xFA\\x02\" +\r\n\t\t\"\\u02C3\\x02\\u02C8\\x02\\u02D3\\x02\\u02E2\\x02\\u02E6\\x02\\u02EE\\x02\\u02EE\\x02\" +\r\n\t\t\"\\u02F0\\x02\\u02F0\\x02\\u0302\\x02\\u0376\\x02\\u0378\\x02\\u0379\\x02\\u037C\\x02\" +\r\n\t\t\"\\u037F\\x02\\u0381\\x02\\u0381\\x02\\u0388\\x02\\u0388\\x02\\u038A\\x02\\u038C\\x02\" +\r\n\t\t\"\\u038E\\x02\\u038E\\x02\\u0390\\x02\\u03A3\\x02\\u03A5\\x02\\u03F7\\x02\\u03F9\\x02\" +\r\n\t\t\"\\u0483\\x02\\u0485\\x02\\u0489\\x02\\u048C\\x02\\u0531\\x02\\u0533\\x02\\u0558\\x02\" +\r\n\t\t\"\\u055B\\x02\\u055B\\x02\\u0563\\x02\\u0589\\x02\\u0593\\x02\\u05BF\\x02\\u05C1\\x02\" +\r\n\t\t\"\\u05C1\\x02\\u05C3\\x02\\u05C4\\x02\\u05C6\\x02\\u05C7\\x02\\u05C9\\x02\\u05C9\\x02\" +\r\n\t\t\"\\u05D2\\x02\\u05EC\\x02\\u05F2\\x02\\u05F4\\x02\\u0602\\x02\\u0607\\x02\\u0612\\x02\" +\r\n\t\t\"\\u061C\\x02\\u061E\\x02\\u061E\\x02\\u0622\\x02\\u066B\\x02\\u0670\\x02\\u06D5\\x02\" +\r\n\t\t\"\\u06D7\\x02\\u06DF\\x02\\u06E1\\x02\\u06EA\\x02\\u06EC\\x02\\u06FE\\x02\\u0701\\x02\" +\r\n\t\t\"\\u0701\\x02\\u0711\\x02\\u074C\\x02\\u074F\\x02\\u07B3\\x02\\u07C2\\x02\\u07F7\\x02\" +\r\n\t\t\"\\u07FC\\x02\\u07FC\\x02\\u0802\\x02\\u082F\\x02\\u0842\\x02\\u085D\\x02\\u08A2\\x02\" +\r\n\t\t\"\\u08B6\\x02\\u08B8\\x02\\u08BF\\x02\\u08D6\\x02\\u0965\\x02\\u0968\\x02\\u0971\\x02\" +\r\n\t\t\"\\u0973\\x02\\u0985\\x02\\u0987\\x02\\u098E\\x02\\u0991\\x02\\u0992\\x02\\u0995\\x02\" +\r\n\t\t\"\\u09AA\\x02\\u09AC\\x02\\u09B2\\x02\\u09B4\\x02\\u09B4\\x02\\u09B8\\x02\\u09BB\\x02\" +\r\n\t\t\"\\u09BE\\x02\\u09C6\\x02\\u09C9\\x02\\u09CA\\x02\\u09CD\\x02\\u09D0\\x02\\u09D9\\x02\" +\r\n\t\t\"\\u09D9\\x02\\u09DE\\x02\\u09DF\\x02\\u09E1\\x02\\u09E5\\x02\\u09E8\\x02\\u09F3\\x02\" +\r\n\t\t\"\\u0A03\\x02\\u0A05\\x02\\u0A07\\x02\\u0A0C\\x02\\u0A11\\x02\\u0A12\\x02\\u0A15\\x02\" +\r\n\t\t\"\\u0A2A\\x02\\u0A2C\\x02\\u0A32\\x02\\u0A34\\x02\\u0A35\\x02\\u0A37\\x02\\u0A38\\x02\" +\r\n\t\t\"\\u0A3A\\x02\\u0A3B\\x02\\u0A3E\\x02\\u0A3E\\x02\\u0A40\\x02\\u0A44\\x02\\u0A49\\x02\" +\r\n\t\t\"\\u0A4A\\x02\\u0A4D\\x02\\u0A4F\\x02\\u0A53\\x02\\u0A53\\x02\\u0A5B\\x02\\u0A5E\\x02\" +\r\n\t\t\"\\u0A60\\x02\\u0A60\\x02\\u0A68\\x02\\u0A77\\x02\\u0A83\\x02\\u0A85\\x02\\u0A87\\x02\" +\r\n\t\t\"\\u0A8F\\x02\\u0A91\\x02\\u0A93\\x02\\u0A95\\x02\\u0AAA\\x02\\u0AAC\\x02\\u0AB2\\x02\" +\r\n\t\t\"\\u0AB4\\x02\\u0AB5\\x02\\u0AB7\\x02\\u0ABB\\x02\\u0ABE\\x02\\u0AC7\\x02\\u0AC9\\x02\" +\r\n\t\t\"\\u0ACB\\x02\\u0ACD\\x02\\u0ACF\\x02\\u0AD2\\x02\\u0AD2\\x02\\u0AE2\\x02\\u0AE5\\x02\" +\r\n\t\t\"\\u0AE8\\x02\\u0AF1\\x02\\u0AFB\\x02\\u0AFB\\x02\\u0B03\\x02\\u0B05\\x02\\u0B07\\x02\" +\r\n\t\t\"\\u0B0E\\x02\\u0B11\\x02\\u0B12\\x02\\u0B15\\x02\\u0B2A\\x02\\u0B2C\\x02\\u0B32\\x02\" +\r\n\t\t\"\\u0B34\\x02\\u0B35\\x02\\u0B37\\x02\\u0B3B\\x02\\u0B3E\\x02\\u0B46\\x02\\u0B49\\x02\" +\r\n\t\t\"\\u0B4A\\x02\\u0B4D\\x02\\u0B4F\\x02\\u0B58\\x02\\u0B59\\x02\\u0B5E\\x02\\u0B5F\\x02\" +\r\n\t\t\"\\u0B61\\x02\\u0B65\\x02\\u0B68\\x02\\u0B71\\x02\\u0B73\\x02\\u0B73\\x02\\u0B84\\x02\" +\r\n\t\t\"\\u0B85\\x02\\u0B87\\x02\\u0B8C\\x02\\u0B90\\x02\\u0B92\\x02\\u0B94\\x02\\u0B97\\x02\" +\r\n\t\t\"\\u0B9B\\x02\\u0B9C\\x02\\u0B9E\\x02\\u0B9E\\x02\\u0BA0\\x02\\u0BA1\\x02\\u0BA5\\x02\" +\r\n\t\t\"\\u0BA6\\x02\\u0BAA\\x02\\u0BAC\\x02\\u0BB0\\x02\\u0BBB\\x02\\u0BC0\\x02\\u0BC4\\x02\" +\r\n\t\t\"\\u0BC8\\x02\\u0BCA\\x02\\u0BCC\\x02\\u0BCF\\x02\\u0BD2\\x02\\u0BD2\\x02\\u0BD9\\x02\" +\r\n\t\t\"\\u0BD9\\x02\\u0BE8\\x02\\u0BF1\\x02\\u0C02\\x02\\u0C05\\x02\\u0C07\\x02\\u0C0E\\x02\" +\r\n\t\t\"\\u0C10\\x02\\u0C12\\x02\\u0C14\\x02\\u0C2A\\x02\\u0C2C\\x02\\u0C3B\\x02\\u0C3F\\x02\" +\r\n\t\t\"\\u0C46\\x02\\u0C48\\x02\\u0C4A\\x02\\u0C4C\\x02\\u0C4F\\x02\\u0C57\\x02\\u0C58\\x02\" +\r\n\t\t\"\\u0C5A\\x02\\u0C5C\\x02\\u0C62\\x02\\u0C65\\x02\\u0C68\\x02\\u0C71\\x02\\u0C82\\x02\" +\r\n\t\t\"\\u0C85\\x02\\u0C87\\x02\\u0C8E\\x02\\u0C90\\x02\\u0C92\\x02\\u0C94\\x02\\u0CAA\\x02\" +\r\n\t\t\"\\u0CAC\\x02\\u0CB5\\x02\\u0CB7\\x02\\u0CBB\\x02\\u0CBE\\x02\\u0CC6\\x02\\u0CC8\\x02\" +\r\n\t\t\"\\u0CCA\\x02\\u0CCC\\x02\\u0CCF\\x02\\u0CD7\\x02\\u0CD8\\x02\\u0CE0\\x02\\u0CE0\\x02\" +\r\n\t\t\"\\u0CE2\\x02\\u0CE5\\x02\\u0CE8\\x02\\u0CF1\\x02\\u0CF3\\x02\\u0CF4\\x02\\u0D03\\x02\" +\r\n\t\t\"\\u0D05\\x02\\u0D07\\x02\\u0D0E\\x02\\u0D10\\x02\\u0D12\\x02\\u0D14\\x02\\u0D3C\\x02\" +\r\n\t\t\"\\u0D3F\\x02\\u0D46\\x02\\u0D48\\x02\\u0D4A\\x02\\u0D4C\\x02\\u0D50\\x02\\u0D56\\x02\" +\r\n\t\t\"\\u0D59\\x02\\u0D61\\x02\\u0D65\\x02\\u0D68\\x02\\u0D71\\x02\\u0D7C\\x02\\u0D81\\x02\" +\r\n\t\t\"\\u0D84\\x02\\u0D85\\x02\\u0D87\\x02\\u0D98\\x02\\u0D9C\\x02\\u0DB3\\x02\\u0DB5\\x02\" +\r\n\t\t\"\\u0DBD\\x02\\u0DBF\\x02\\u0DBF\\x02\\u0DC2\\x02\\u0DC8\\x02\\u0DCC\\x02\\u0DCC\\x02\" +\r\n\t\t\"\\u0DD1\\x02\\u0DD6\\x02\\u0DD8\\x02\\u0DD8\\x02\\u0DDA\\x02\\u0DE1\\x02\\u0DE8\\x02\" +\r\n\t\t\"\\u0DF1\\x02\\u0DF4\\x02\\u0DF5\\x02\\u0E03\\x02\\u0E3C\\x02\\u0E42\\x02\\u0E50\\x02\" +\r\n\t\t\"\\u0E52\\x02\\u0E5B\\x02\\u0E83\\x02\\u0E84\\x02\\u0E86\\x02\\u0E86\\x02\\u0E89\\x02\" +\r\n\t\t\"\\u0E8A\\x02\\u0E8C\\x02\\u0E8C\\x02\\u0E8F\\x02\\u0E8F\\x02\\u0E96\\x02\\u0E99\\x02\" +\r\n\t\t\"\\u0E9B\\x02\\u0EA1\\x02\\u0EA3\\x02\\u0EA5\\x02\\u0EA7\\x02\\u0EA7\\x02\\u0EA9\\x02\" +\r\n\t\t\"\\u0EA9\\x02\\u0EAC\\x02\\u0EAD\\x02\\u0EAF\\x02\\u0EBB\\x02\\u0EBD\\x02\\u0EBF\\x02\" +\r\n\t\t\"\\u0EC2\\x02\\u0EC6\\x02\\u0EC8\\x02\\u0EC8\\x02\\u0ECA\\x02\\u0ECF\\x02\\u0ED2\\x02\" +\r\n\t\t\"\\u0EDB\\x02\\u0EDE\\x02\\u0EE1\\x02\\u0F02\\x02\\u0F02\\x02\\u0F1A\\x02\\u0F1B\\x02\" +\r\n\t\t\"\\u0F22\\x02\\u0F2B\\x02\\u0F37\\x02\\u0F37\\x02\\u0F39\\x02\\u0F39\\x02\\u0F3B\\x02\" +\r\n\t\t\"\\u0F3B\\x02\\u0F40\\x02\\u0F49\\x02\\u0F4B\\x02\\u0F6E\\x02\\u0F73\\x02\\u0F86\\x02\" +\r\n\t\t\"\\u0F88\\x02\\u0F99\\x02\\u0F9B\\x02\\u0FBE\\x02\\u0FC8\\x02\\u0FC8\\x02\\u1002\\x02\" +\r\n\t\t\"\\u104B\\x02\\u1052\\x02\\u109F\\x02\\u10A2\\x02\\u10C7\\x02\\u10C9\\x02\\u10C9\\x02\" +\r\n\t\t\"\\u10CF\\x02\\u10CF\\x02\\u10D2\\x02\\u10FC\\x02\\u10FE\\x02\\u124A\\x02\\u124C\\x02\" +\r\n\t\t\"\\u124F\\x02\\u1252\\x02\\u1258\\x02\\u125A\\x02\\u125A\\x02\\u125C\\x02\\u125F\\x02\" +\r\n\t\t\"\\u1262\\x02\\u128A\\x02\\u128C\\x02\\u128F\\x02\\u1292\\x02\\u12B2\\x02\\u12B4\\x02\" +\r\n\t\t\"\\u12B7\\x02\\u12BA\\x02\\u12C0\\x02\\u12C2\\x02\\u12C2\\x02\\u12C4\\x02\\u12C7\\x02\" +\r\n\t\t\"\\u12CA\\x02\\u12D8\\x02\\u12DA\\x02\\u1312\\x02\\u1314\\x02\\u1317\\x02\\u131A\\x02\" +\r\n\t\t\"\\u135C\\x02\\u135F\\x02\\u1361\\x02\\u1382\\x02\\u1391\\x02\\u13A2\\x02\\u13F7\\x02\" +\r\n\t\t\"\\u13FA\\x02\\u13FF\\x02\\u1403\\x02\\u166E\\x02\\u1671\\x02\\u1681\\x02\\u1683\\x02\" +\r\n\t\t\"\\u169C\\x02\\u16A2\\x02\\u16EC\\x02\\u16F0\\x02\\u16FA\\x02\\u1702\\x02\\u170E\\x02\" +\r\n\t\t\"\\u1710\\x02\\u1716\\x02\\u1722\\x02\\u1736\\x02\\u1742\\x02\\u1755\\x02\\u1762\\x02\" +\r\n\t\t\"\\u176E\\x02\\u1770\\x02\\u1772\\x02\\u1774\\x02\\u1775\\x02\\u1782\\x02\\u17D5\\x02\" +\r\n\t\t\"\\u17D9\\x02\\u17D9\\x02\\u17DE\\x02\\u17DF\\x02\\u17E2\\x02\\u17EB\\x02\\u180D\\x02\" +\r\n\t\t\"\\u1810\\x02\\u1812\\x02\\u181B\\x02\\u1822\\x02\\u1879\\x02\\u1882\\x02\\u18AC\\x02\" +\r\n\t\t\"\\u18B2\\x02\\u18F7\\x02\\u1902\\x02\\u1920\\x02\\u1922\\x02\\u192D\\x02\\u1932\\x02\" +\r\n\t\t\"\\u193D\\x02\\u1948\\x02\\u196F\\x02\\u1972\\x02\\u1976\\x02\\u1982\\x02\\u19AD\\x02\" +\r\n\t\t\"\\u19B2\\x02\\u19CB\\x02\\u19D2\\x02\\u19DB\\x02\\u1A02\\x02\\u1A1D\\x02\\u1A22\\x02\" +\r\n\t\t\"\\u1A60\\x02\\u1A62\\x02\\u1A7E\\x02\\u1A81\\x02\\u1A8B\\x02\\u1A92\\x02\\u1A9B\\x02\" +\r\n\t\t\"\\u1AA9\\x02\\u1AA9\\x02\\u1AB2\\x02\\u1ABF\\x02\\u1B02\\x02\\u1B4D\\x02\\u1B52\\x02\" +\r\n\t\t\"\\u1B5B\\x02\\u1B6D\\x02\\u1B75\\x02\\u1B82\\x02\\u1BF5\\x02\\u1C02\\x02\\u1C39\\x02\" +\r\n\t\t\"\\u1C42\\x02\\u1C4B\\x02\\u1C4F\\x02\\u1C7F\\x02\\u1C82\\x02\\u1C8A\\x02\\u1CD2\\x02\" +\r\n\t\t\"\\u1CD4\\x02\\u1CD6\\x02\\u1CF8\\x02\\u1CFA\\x02\\u1CFB\\x02\\u1D02\\x02\\u1DF7\\x02\" +\r\n\t\t\"\\u1DFD\\x02\\u1F17\\x02\\u1F1A\\x02\\u1F1F\\x02\\u1F22\\x02\\u1F47\\x02\\u1F4A\\x02\" +\r\n\t\t\"\\u1F4F\\x02\\u1F52\\x02\\u1F59\\x02\\u1F5B\\x02\\u1F5B\\x02\\u1F5D\\x02\\u1F5D\\x02\" +\r\n\t\t\"\\u1F5F\\x02\\u1F5F\\x02\\u1F61\\x02\\u1F7F\\x02\\u1F82\\x02\\u1FB6\\x02\\u1FB8\\x02\" +\r\n\t\t\"\\u1FBE\\x02\\u1FC0\\x02\\u1FC0\\x02\\u1FC4\\x02\\u1FC6\\x02\\u1FC8\\x02\\u1FCE\\x02\" +\r\n\t\t\"\\u1FD2\\x02\\u1FD5\\x02\\u1FD8\\x02\\u1FDD\\x02\\u1FE2\\x02\\u1FEE\\x02\\u1FF4\\x02\" +\r\n\t\t\"\\u1FF6\\x02\\u1FF8\\x02\\u1FFE\\x02\\u200D\\x02\\u2011\\x02\\u202C\\x02\\u2030\\x02\" +\r\n\t\t\"\\u2041\\x02\\u2042\\x02\\u2056\\x02\\u2056\\x02\\u2062\\x02\\u2066\\x02\\u2068\\x02\" +\r\n\t\t\"\\u2071\\x02\\u2073\\x02\\u2073\\x02\\u2081\\x02\\u2081\\x02\\u2092\\x02\\u209E\\x02\" +\r\n\t\t\"\\u20D2\\x02\\u20DE\\x02\\u20E3\\x02\\u20E3\\x02\\u20E7\\x02\\u20F2\\x02\\u2104\\x02\" +\r\n\t\t\"\\u2104\\x02\\u2109\\x02\\u2109\\x02\\u210C\\x02\\u2115\\x02\\u2117\\x02\\u2117\\x02\" +\r\n\t\t\"\\u211B\\x02\\u211F\\x02\\u2126\\x02\\u2126\\x02\\u2128\\x02\\u2128\\x02\\u212A\\x02\" +\r\n\t\t\"\\u212A\\x02\\u212C\\x02\\u212F\\x02\\u2131\\x02\\u213B\\x02\\u213E\\x02\\u2141\\x02\" +\r\n\t\t\"\\u2147\\x02\\u214B\\x02\\u2150\\x02\\u2150\\x02\\u2162\\x02\\u218A\\x02\\u2C02\\x02\" +\r\n\t\t\"\\u2C30\\x02\\u2C32\\x02\\u2C60\\x02\\u2C62\\x02\\u2CE6\\x02\\u2CED\\x02\\u2CF5\\x02\" +\r\n\t\t\"\\u2D02\\x02\\u2D27\\x02\\u2D29\\x02\\u2D29\\x02\\u2D2F\\x02\\u2D2F\\x02\\u2D32\\x02\" +\r\n\t\t\"\\u2D69\\x02\\u2D71\\x02\\u2D71\\x02\\u2D81\\x02\\u2D98\\x02\\u2DA2\\x02\\u2DA8\\x02\" +\r\n\t\t\"\\u2DAA\\x02\\u2DB0\\x02\\u2DB2\\x02\\u2DB8\\x02\\u2DBA\\x02\\u2DC0\\x02\\u2DC2\\x02\" +\r\n\t\t\"\\u2DC8\\x02\\u2DCA\\x02\\u2DD0\\x02\\u2DD2\\x02\\u2DD8\\x02\\u2DDA\\x02\\u2DE0\\x02\" +\r\n\t\t\"\\u2DE2\\x02\\u2E01\\x02\\u2E31\\x02\\u2E31\\x02\\u3007\\x02\\u3009\\x02\\u3023\\x02\" +\r\n\t\t\"\\u3031\\x02\\u3033\\x02\\u3037\\x02\\u303A\\x02\\u303E\\x02\\u3043\\x02\\u3098\\x02\" +\r\n\t\t\"\\u309B\\x02\\u309C\\x02\\u309F\\x02\\u30A1\\x02\\u30A3\\x02\\u30FC\\x02\\u30FE\\x02\" +\r\n\t\t\"\\u3101\\x02\\u3107\\x02\\u312F\\x02\\u3133\\x02\\u3190\\x02\\u31A2\\x02\\u31BC\\x02\" +\r\n\t\t\"\\u31F2\\x02\\u3201\\x02\\u3402\\x02\\u4DB7\\x02\\u4E02\\x02\\u9FD7\\x02\\uA002\\x02\" +\r\n\t\t\"\\uA48E\\x02\\uA4D2\\x02\\uA4FF\\x02\\uA502\\x02\\uA60E\\x02\\uA612\\x02\\uA62D\\x02\" +\r\n\t\t\"\\uA642\\x02\\uA671\\x02\\uA676\\x02\\uA67F\\x02\\uA681\\x02\\uA6F3\\x02\\uA719\\x02\" +\r\n\t\t\"\\uA721\\x02\\uA724\\x02\\uA78A\\x02\\uA78D\\x02\\uA7B0\\x02\\uA7B2\\x02\\uA7B9\\x02\" +\r\n\t\t\"\\uA7F9\\x02\\uA829\\x02\\uA842\\x02\\uA875\\x02\\uA882\\x02\\uA8C7\\x02\\uA8D2\\x02\" +\r\n\t\t\"\\uA8DB\\x02\\uA8E2\\x02\\uA8F9\\x02\\uA8FD\\x02\\uA8FD\\x02\\uA8FF\\x02\\uA8FF\\x02\" +\r\n\t\t\"\\uA902\\x02\\uA92F\\x02\\uA932\\x02\\uA955\\x02\\uA962\\x02\\uA97E\\x02\\uA982\\x02\" +\r\n\t\t\"\\uA9C2\\x02\\uA9D1\\x02\\uA9DB\\x02\\uA9E2\\x02\\uAA00\\x02\\uAA02\\x02\\uAA38\\x02\" +\r\n\t\t\"\\uAA42\\x02\\uAA4F\\x02\\uAA52\\x02\\uAA5B\\x02\\uAA62\\x02\\uAA78\\x02\\uAA7C\\x02\" +\r\n\t\t\"\\uAAC4\\x02\\uAADD\\x02\\uAADF\\x02\\uAAE2\\x02\\uAAF1\\x02\\uAAF4\\x02\\uAAF8\\x02\" +\r\n\t\t\"\\uAB03\\x02\\uAB08\\x02\\uAB0B\\x02\\uAB10\\x02\\uAB13\\x02\\uAB18\\x02\\uAB22\\x02\" +\r\n\t\t\"\\uAB28\\x02\\uAB2A\\x02\\uAB30\\x02\\uAB32\\x02\\uAB5C\\x02\\uAB5E\\x02\\uAB67\\x02\" +\r\n\t\t\"\\uAB72\\x02\\uABEC\\x02\\uABEE\\x02\\uABEF\\x02\\uABF2\\x02\\uABFB\\x02\\uAC02\\x02\" +\r\n\t\t\"\\uD7A5\\x02\\uD7B2\\x02\\uD7C8\\x02\\uD7CD\\x02\\uD7FD\\x02\\uF902\\x02\\uFA6F\\x02\" +\r\n\t\t\"\\uFA72\\x02\\uFADB\\x02\\uFB02\\x02\\uFB08\\x02\\uFB15\\x02\\uFB19\\x02\\uFB1F\\x02\" +\r\n\t\t\"\\uFB2A\\x02\\uFB2C\\x02\\uFB38\\x02\\uFB3A\\x02\\uFB3E\\x02\\uFB40\\x02\\uFB40\\x02\" +\r\n\t\t\"\\uFB42\\x02\\uFB43\\x02\\uFB45\\x02\\uFB46\\x02\\uFB48\\x02\\uFBB3\\x02\\uFBD5\\x02\" +\r\n\t\t\"\\uFD3F\\x02\\uFD52\\x02\\uFD91\\x02\\uFD94\\x02\\uFDC9\\x02\\uFDF2\\x02\\uFDFD\\x02\" +\r\n\t\t\"\\uFE02\\x02\\uFE11\\x02\\uFE22\\x02\\uFE31\\x02\\uFE35\\x02\\uFE36\\x02\\uFE4F\\x02\" +\r\n\t\t\"\\uFE51\\x02\\uFE72\\x02\\uFE76\\x02\\uFE78\\x02\\uFEFE\\x02\\uFF01\\x02\\uFF01\\x02\" +\r\n\t\t\"\\uFF12\\x02\\uFF1B\\x02\\uFF23\\x02\\uFF3C\\x02\\uFF41\\x02\\uFF41\\x02\\uFF43\\x02\" +\r\n\t\t\"\\uFF5C\\x02\\uFF68\\x02\\uFFC0\\x02\\uFFC4\\x02\\uFFC9\\x02\\uFFCC\\x02\\uFFD1\\x02\" +\r\n\t\t\"\\uFFD4\\x02\\uFFD9\\x02\\uFFDC\\x02\\uFFDE\\x02\\uFFFB\\x02\\uFFFD\\x02\\x02\\x03\\r\" +\r\n\t\t\"\\x03\\x0F\\x03(\\x03*\\x03<\\x03>\\x03?\\x03A\\x03O\\x03R\\x03_\\x03\\x82\\x03\\xFC\" +\r\n\t\t\"\\x03\\u0142\\x03\\u0176\\x03\\u01FF\\x03\\u01FF\\x03\\u0282\\x03\\u029E\\x03\\u02A2\" +\r\n\t\t\"\\x03\\u02D2\\x03\\u02E2\\x03\\u02E2\\x03\\u0302\\x03\\u0321\\x03\\u0332\\x03\\u034C\" +\r\n\t\t\"\\x03\\u0352\\x03\\u037C\\x03\\u0382\\x03\\u039F\\x03\\u03A2\\x03\\u03C5\\x03\\u03CA\" +\r\n\t\t\"\\x03\\u03D1\\x03\\u03D3\\x03\\u03D7\\x03\\u0402\\x03\\u049F\\x03\\u04A2\\x03\\u04AB\" +\r\n\t\t\"\\x03\\u04B2\\x03\\u04D5\\x03\\u04DA\\x03\\u04FD\\x03\\u0502\\x03\\u0529\\x03\\u0532\" +\r\n\t\t\"\\x03\\u0565\\x03\\u0602\\x03\\u0738\\x03\\u0742\\x03\\u0757\\x03\\u0762\\x03\\u0769\" +\r\n\t\t\"\\x03\\u0802\\x03\\u0807\\x03\\u080A\\x03\\u080A\\x03\\u080C\\x03\\u0837\\x03\\u0839\" +\r\n\t\t\"\\x03\\u083A\\x03\\u083E\\x03\\u083E\\x03\\u0841\\x03\\u0857\\x03\\u0862\\x03\\u0878\" +\r\n\t\t\"\\x03\\u0882\\x03\\u08A0\\x03\\u08E2\\x03\\u08F4\\x03\\u08F6\\x03\\u08F7\\x03\\u0902\" +\r\n\t\t\"\\x03\\u0917\\x03\\u0922\\x03\\u093B\\x03\\u0982\\x03\\u09B9\\x03\\u09C0\\x03\\u09C1\" +\r\n\t\t\"\\x03\\u0A02\\x03\\u0A05\\x03\\u0A07\\x03\\u0A08\\x03\\u0A0E\\x03\\u0A15\\x03\\u0A17\" +\r\n\t\t\"\\x03\\u0A19\\x03\\u0A1B\\x03\\u0A35\\x03\\u0A3A\\x03\\u0A3C\\x03\\u0A41\\x03\\u0A41\" +\r\n\t\t\"\\x03\\u0A62\\x03\\u0A7E\\x03\\u0A82\\x03\\u0A9E\\x03\\u0AC2\\x03\\u0AC9\\x03\\u0ACB\" +\r\n\t\t\"\\x03\\u0AE8\\x03\\u0B02\\x03\\u0B37\\x03\\u0B42\\x03\\u0B57\\x03\\u0B62\\x03\\u0B74\" +\r\n\t\t\"\\x03\\u0B82\\x03\\u0B93\\x03\\u0C02\\x03\\u0C4A\\x03\\u0C82\\x03\\u0CB4\\x03\\u0CC2\" +\r\n\t\t\"\\x03\\u0CF4\\x03\\u1002\\x03\\u1048\\x03\\u1068\\x03\\u1071\\x03\\u1081\\x03\\u10BC\" +\r\n\t\t\"\\x03\\u10BF\\x03\\u10BF\\x03\\u10D2\\x03\\u10EA\\x03\\u10F2\\x03\\u10FB\\x03\\u1102\" +\r\n\t\t\"\\x03\\u1136\\x03\\u1138\\x03\\u1141\\x03\\u1152\\x03\\u1175\\x03\\u1178\\x03\\u1178\" +\r\n\t\t\"\\x03\\u1182\\x03\\u11C6\\x03\\u11CC\\x03\\u11CE\\x03\\u11D2\\x03\\u11DC\\x03\\u11DE\" +\r\n\t\t\"\\x03\\u11DE\\x03\\u1202\\x03\\u1213\\x03\\u1215\\x03\\u1239\\x03\\u1240\\x03\\u1240\" +\r\n\t\t\"\\x03\\u1282\\x03\\u1288\\x03\\u128A\\x03\\u128A\\x03\\u128C\\x03\\u128F\\x03\\u1291\" +\r\n\t\t\"\\x03\\u129F\\x03\\u12A1\\x03\\u12AA\\x03\\u12B2\\x03\\u12EC\\x03\\u12F2\\x03\\u12FB\" +\r\n\t\t\"\\x03\\u1302\\x03\\u1305\\x03\\u1307\\x03\\u130E\\x03\\u1311\\x03\\u1312\\x03\\u1315\" +\r\n\t\t\"\\x03\\u132A\\x03\\u132C\\x03\\u1332\\x03\\u1334\\x03\\u1335\\x03\\u1337\\x03\\u133B\" +\r\n\t\t\"\\x03\\u133E\\x03\\u1346\\x03\\u1349\\x03\\u134A\\x03\\u134D\\x03\\u134F\\x03\\u1352\" +\r\n\t\t\"\\x03\\u1352\\x03\\u1359\\x03\\u1359\\x03\\u135F\\x03\\u1365\\x03\\u1368\\x03\\u136E\" +\r\n\t\t\"\\x03\\u1372\\x03\\u1376\\x03\\u1402\\x03\\u144C\\x03\\u1452\\x03\\u145B\\x03\\u1482\" +\r\n\t\t\"\\x03\\u14C7\\x03\\u14C9\\x03\\u14C9\\x03\\u14D2\\x03\\u14DB\\x03\\u1582\\x03\\u15B7\" +\r\n\t\t\"\\x03\\u15BA\\x03\\u15C2\\x03\\u15DA\\x03\\u15DF\\x03\\u1602\\x03\\u1642\\x03\\u1646\" +\r\n\t\t\"\\x03\\u1646\\x03\\u1652\\x03\\u165B\\x03\\u1682\\x03\\u16B9\\x03\\u16C2\\x03\\u16CB\" +\r\n\t\t\"\\x03\\u1702\\x03\\u171B\\x03\\u171F\\x03\\u172D\\x03\\u1732\\x03\\u173B\\x03\\u18A2\" +\r\n\t\t\"\\x03\\u18EB\\x03\\u1901\\x03\\u1901\\x03\\u1AC2\\x03\\u1AFA\\x03\\u1C02\\x03\\u1C0A\" +\r\n\t\t\"\\x03\\u1C0C\\x03\\u1C38\\x03\\u1C3A\\x03\\u1C42\\x03\\u1C52\\x03\\u1C5B\\x03\\u1C74\" +\r\n\t\t\"\\x03\\u1C91\\x03\\u1C94\\x03\\u1CA9\\x03\\u1CAB\\x03\\u1CB8\\x03\\u2002\\x03\\u239B\" +\r\n\t\t\"\\x03\\u2402\\x03\\u2470\\x03\\u2482\\x03\\u2545\\x03\\u3002\\x03\\u3430\\x03\\u4402\" +\r\n\t\t\"\\x03\\u4648\\x03\\u6802\\x03\\u6A3A\\x03\\u6A42\\x03\\u6A60\\x03\\u6A62\\x03\\u6A6B\" +\r\n\t\t\"\\x03\\u6AD2\\x03\\u6AEF\\x03\\u6AF2\\x03\\u6AF6\\x03\\u6B02\\x03\\u6B38\\x03\\u6B42\" +\r\n\t\t\"\\x03\\u6B45\\x03\\u6B52\\x03\\u6B5B\\x03\\u6B65\\x03\\u6B79\\x03\\u6B7F\\x03\\u6B91\" +\r\n\t\t\"\\x03\\u6F02\\x03\\u6F46\\x03\\u6F52\\x03\\u6F80\\x03\\u6F91\\x03\\u6FA1\\x03\\u6FE2\" +\r\n\t\t\"\\x03\\u6FE2\\x03\\u7002\\x03\\u87EE\\x03\\u8802\\x03\\u8AF4\\x03\\uB002\\x03\\uB003\" +\r\n\t\t\"\\x03\\uBC02\\x03\\uBC6C\\x03\\uBC72\\x03\\uBC7E\\x03\\uBC82\\x03\\uBC8A\\x03\\uBC92\" +\r\n\t\t\"\\x03\\uBC9B\\x03\\uBC9F\\x03\\uBCA0\\x03\\uBCA2\\x03\\uBCA5\\x03\\uD167\\x03\\uD16B\" +\r\n\t\t\"\\x03\\uD16F\\x03\\uD184\\x03\\uD187\\x03\\uD18D\\x03\\uD1AC\\x03\\uD1AF\\x03\\uD244\" +\r\n\t\t\"\\x03\\uD246\\x03\\uD402\\x03\\uD456\\x03\\uD458\\x03\\uD49E\\x03\\uD4A0\\x03\\uD4A1\" +\r\n\t\t\"\\x03\\uD4A4\\x03\\uD4A4\\x03\\uD4A7\\x03\\uD4A8\\x03\\uD4AB\\x03\\uD4AE\\x03\\uD4B0\" +\r\n\t\t\"\\x03\\uD4BB\\x03\\uD4BD\\x03\\uD4BD\\x03\\uD4BF\\x03\\uD4C5\\x03\\uD4C7\\x03\\uD507\" +\r\n\t\t\"\\x03\\uD509\\x03\\uD50C\\x03\\uD50F\\x03\\uD516\\x03\\uD518\\x03\\uD51E\\x03\\uD520\" +\r\n\t\t\"\\x03\\uD53B\\x03\\uD53D\\x03\\uD540\\x03\\uD542\\x03\\uD546\\x03\\uD548\\x03\\uD548\" +\r\n\t\t\"\\x03\\uD54C\\x03\\uD552\\x03\\uD554\\x03\\uD6A7\\x03\\uD6AA\\x03\\uD6C2\\x03\\uD6C4\" +\r\n\t\t\"\\x03\\uD6DC\\x03\\uD6DE\\x03\\uD6FC\\x03\\uD6FE\\x03\\uD716\\x03\\uD718\\x03\\uD736\" +\r\n\t\t\"\\x03\\uD738\\x03\\uD750\\x03\\uD752\\x03\\uD770\\x03\\uD772\\x03\\uD78A\\x03\\uD78C\" +\r\n\t\t\"\\x03\\uD7AA\\x03\\uD7AC\\x03\\uD7C4\\x03\\uD7C6\\x03\\uD7CD\\x03\\uD7D0\\x03\\uD801\" +\r\n\t\t\"\\x03\\uDA02\\x03\\uDA38\\x03\\uDA3D\\x03\\uDA6E\\x03\\uDA77\\x03\\uDA77\\x03\\uDA86\" +\r\n\t\t\"\\x03\\uDA86\\x03\\uDA9D\\x03\\uDAA1\\x03\\uDAA3\\x03\\uDAB1\\x03\\uE002\\x03\\uE008\" +\r\n\t\t\"\\x03\\uE00A\\x03\\uE01A\\x03\\uE01D\\x03\\uE023\\x03\\uE025\\x03\\uE026\\x03\\uE028\" +\r\n\t\t\"\\x03\\uE02C\\x03\\uE802\\x03\\uE8C6\\x03\\uE8D2\\x03\\uE8D8\\x03\\uE902\\x03\\uE94C\" +\r\n\t\t\"\\x03\\uE952\\x03\\uE95B\\x03\\uEE02\\x03\\uEE05\\x03\\uEE07\\x03\\uEE21\\x03\\uEE23\" +\r\n\t\t\"\\x03\\uEE24\\x03\\uEE26\\x03\\uEE26\\x03\\uEE29\\x03\\uEE29\\x03\\uEE2B\\x03\\uEE34\" +\r\n\t\t\"\\x03\\uEE36\\x03\\uEE39\\x03\\uEE3B\\x03\\uEE3B\\x03\\uEE3D\\x03\\uEE3D\\x03\\uEE44\" +\r\n\t\t\"\\x03\\uEE44\\x03\\uEE49\\x03\\uEE49\\x03\\uEE4B\\x03\\uEE4B\\x03\\uEE4D\\x03\\uEE4D\" +\r\n\t\t\"\\x03\\uEE4F\\x03\\uEE51\\x03\\uEE53\\x03\\uEE54\\x03\\uEE56\\x03\\uEE56\\x03\\uEE59\" +\r\n\t\t\"\\x03\\uEE59\\x03\\uEE5B\\x03\\uEE5B\\x03\\uEE5D\\x03\\uEE5D\\x03\\uEE5F\\x03\\uEE5F\" +\r\n\t\t\"\\x03\\uEE61\\x03\\uEE61\\x03\\uEE63\\x03\\uEE64\\x03\\uEE66\\x03\\uEE66\\x03\\uEE69\" +\r\n\t\t\"\\x03\\uEE6C\\x03\\uEE6E\\x03\\uEE74\\x03\\uEE76\\x03\\uEE79\\x03\\uEE7B\\x03\\uEE7E\" +\r\n\t\t\"\\x03\\uEE80\\x03\\uEE80\\x03\\uEE82\\x03\\uEE8B\\x03\\uEE8D\\x03\\uEE9D\\x03\\uEEA3\" +\r\n\t\t\"\\x03\\uEEA5\\x03\\uEEA7\\x03\\uEEAB\\x03\\uEEAD\\x03\\uEEBD\\x03\\x02\\x04\\uA6D8\\x04\" +\r\n\t\t\"\\uA702\\x04\\uB736\\x04\\uB742\\x04\\uB81F\\x04\\uB822\\x04\\uCEA3\\x04\\uF802\\x04\" +\r\n\t\t\"\\uFA1F\\x04\\x03\\x10\\x03\\x10\\\"\\x10\\x81\\x10\\u0102\\x10\\u01F1\\x10\\u0240\\x02\" +\r\n\t\t\"C\\x02\\\\\\x02c\\x02|\\x02\\xAC\\x02\\xAC\\x02\\xB7\\x02\\xB7\\x02\\xBC\\x02\\xBC\\x02\" +\r\n\t\t\"\\xC2\\x02\\xD8\\x02\\xDA\\x02\\xF8\\x02\\xFA\\x02\\u02C3\\x02\\u02C8\\x02\\u02D3\\x02\" +\r\n\t\t\"\\u02E2\\x02\\u02E6\\x02\\u02EE\\x02\\u02EE\\x02\\u02F0\\x02\\u02F0\\x02\\u0372\\x02\" +\r\n\t\t\"\\u0376\\x02\\u0378\\x02\\u0379\\x02\\u037C\\x02\\u037F\\x02\\u0381\\x02\\u0381\\x02\" +\r\n\t\t\"\\u0388\\x02\\u0388\\x02\\u038A\\x02\\u038C\\x02\\u038E\\x02\\u038E\\x02\\u0390\\x02\" +\r\n\t\t\"\\u03A3\\x02\\u03A5\\x02\\u03F7\\x02\\u03F9\\x02\\u0483\\x02\\u048C\\x02\\u0531\\x02\" +\r\n\t\t\"\\u0533\\x02\\u0558\\x02\\u055B\\x02\\u055B\\x02\\u0563\\x02\\u0589\\x02\\u05D2\\x02\" +\r\n\t\t\"\\u05EC\\x02\\u05F2\\x02\\u05F4\\x02\\u0622\\x02\\u064C\\x02\\u0670\\x02\\u0671\\x02\" +\r\n\t\t\"\\u0673\\x02\\u06D5\\x02\\u06D7\\x02\\u06D7\\x02\\u06E7\\x02\\u06E8\\x02\\u06F0\\x02\" +\r\n\t\t\"\\u06F1\\x02\\u06FC\\x02\\u06FE\\x02\\u0701\\x02\\u0701\\x02\\u0712\\x02\\u0712\\x02\" +\r\n\t\t\"\\u0714\\x02\\u0731\\x02\\u074F\\x02\\u07A7\\x02\\u07B3\\x02\\u07B3\\x02\\u07CC\\x02\" +\r\n\t\t\"\\u07EC\\x02\\u07F6\\x02\\u07F7\\x02\\u07FC\\x02\\u07FC\\x02\\u0802\\x02\\u0817\\x02\" +\r\n\t\t\"\\u081C\\x02\\u081C\\x02\\u0826\\x02\\u0826\\x02\\u082A\\x02\\u082A\\x02\\u0842\\x02\" +\r\n\t\t\"\\u085A\\x02\\u08A2\\x02\\u08B6\\x02\\u08B8\\x02\\u08BF\\x02\\u0906\\x02\\u093B\\x02\" +\r\n\t\t\"\\u093F\\x02\\u093F\\x02\\u0952\\x02\\u0952\\x02\\u095A\\x02\\u0963\\x02\\u0973\\x02\" +\r\n\t\t\"\\u0982\\x02\\u0987\\x02\\u098E\\x02\\u0991\\x02\\u0992\\x02\\u0995\\x02\\u09AA\\x02\" +\r\n\t\t\"\\u09AC\\x02\\u09B2\\x02\\u09B4\\x02\\u09B4\\x02\\u09B8\\x02\\u09BB\\x02\\u09BF\\x02\" +\r\n\t\t\"\\u09BF\\x02\\u09D0\\x02\\u09D0\\x02\\u09DE\\x02\\u09DF\\x02\\u09E1\\x02\\u09E3\\x02\" +\r\n\t\t\"\\u09F2\\x02\\u09F3\\x02\\u0A07\\x02\\u0A0C\\x02\\u0A11\\x02\\u0A12\\x02\\u0A15\\x02\" +\r\n\t\t\"\\u0A2A\\x02\\u0A2C\\x02\\u0A32\\x02\\u0A34\\x02\\u0A35\\x02\\u0A37\\x02\\u0A38\\x02\" +\r\n\t\t\"\\u0A3A\\x02\\u0A3B\\x02\\u0A5B\\x02\\u0A5E\\x02\\u0A60\\x02\\u0A60\\x02\\u0A74\\x02\" +\r\n\t\t\"\\u0A76\\x02\\u0A87\\x02\\u0A8F\\x02\\u0A91\\x02\\u0A93\\x02\\u0A95\\x02\\u0AAA\\x02\" +\r\n\t\t\"\\u0AAC\\x02\\u0AB2\\x02\\u0AB4\\x02\\u0AB5\\x02\\u0AB7\\x02\\u0ABB\\x02\\u0ABF\\x02\" +\r\n\t\t\"\\u0ABF\\x02\\u0AD2\\x02\\u0AD2\\x02\\u0AE2\\x02\\u0AE3\\x02\\u0AFB\\x02\\u0AFB\\x02\" +\r\n\t\t\"\\u0B07\\x02\\u0B0E\\x02\\u0B11\\x02\\u0B12\\x02\\u0B15\\x02\\u0B2A\\x02\\u0B2C\\x02\" +\r\n\t\t\"\\u0B32\\x02\\u0B34\\x02\\u0B35\\x02\\u0B37\\x02\\u0B3B\\x02\\u0B3F\\x02\\u0B3F\\x02\" +\r\n\t\t\"\\u0B5E\\x02\\u0B5F\\x02\\u0B61\\x02\\u0B63\\x02\\u0B73\\x02\\u0B73\\x02\\u0B85\\x02\" +\r\n\t\t\"\\u0B85\\x02\\u0B87\\x02\\u0B8C\\x02\\u0B90\\x02\\u0B92\\x02\\u0B94\\x02\\u0B97\\x02\" +\r\n\t\t\"\\u0B9B\\x02\\u0B9C\\x02\\u0B9E\\x02\\u0B9E\\x02\\u0BA0\\x02\\u0BA1\\x02\\u0BA5\\x02\" +\r\n\t\t\"\\u0BA6\\x02\\u0BAA\\x02\\u0BAC\\x02\\u0BB0\\x02\\u0BBB\\x02\\u0BD2\\x02\\u0BD2\\x02\" +\r\n\t\t\"\\u0C07\\x02\\u0C0E\\x02\\u0C10\\x02\\u0C12\\x02\\u0C14\\x02\\u0C2A\\x02\\u0C2C\\x02\" +\r\n\t\t\"\\u0C3B\\x02\\u0C3F\\x02\\u0C3F\\x02\\u0C5A\\x02\\u0C5C\\x02\\u0C62\\x02\\u0C63\\x02\" +\r\n\t\t\"\\u0C82\\x02\\u0C82\\x02\\u0C87\\x02\\u0C8E\\x02\\u0C90\\x02\\u0C92\\x02\\u0C94\\x02\" +\r\n\t\t\"\\u0CAA\\x02\\u0CAC\\x02\\u0CB5\\x02\\u0CB7\\x02\\u0CBB\\x02\\u0CBF\\x02\\u0CBF\\x02\" +\r\n\t\t\"\\u0CE0\\x02\\u0CE0\\x02\\u0CE2\\x02\\u0CE3\\x02\\u0CF3\\x02\\u0CF4\\x02\\u0D07\\x02\" +\r\n\t\t\"\\u0D0E\\x02\\u0D10\\x02\\u0D12\\x02\\u0D14\\x02\\u0D3C\\x02\\u0D3F\\x02\\u0D3F\\x02\" +\r\n\t\t\"\\u0D50\\x02\\u0D50\\x02\\u0D56\\x02\\u0D58\\x02\\u0D61\\x02\\u0D63\\x02\\u0D7C\\x02\" +\r\n\t\t\"\\u0D81\\x02\\u0D87\\x02\\u0D98\\x02\\u0D9C\\x02\\u0DB3\\x02\\u0DB5\\x02\\u0DBD\\x02\" +\r\n\t\t\"\\u0DBF\\x02\\u0DBF\\x02\\u0DC2\\x02\\u0DC8\\x02\\u0E03\\x02\\u0E32\\x02\\u0E34\\x02\" +\r\n\t\t\"\\u0E35\\x02\\u0E42\\x02\\u0E48\\x02\\u0E83\\x02\\u0E84\\x02\\u0E86\\x02\\u0E86\\x02\" +\r\n\t\t\"\\u0E89\\x02\\u0E8A\\x02\\u0E8C\\x02\\u0E8C\\x02\\u0E8F\\x02\\u0E8F\\x02\\u0E96\\x02\" +\r\n\t\t\"\\u0E99\\x02\\u0E9B\\x02\\u0EA1\\x02\\u0EA3\\x02\\u0EA5\\x02\\u0EA7\\x02\\u0EA7\\x02\" +\r\n\t\t\"\\u0EA9\\x02\\u0EA9\\x02\\u0EAC\\x02\\u0EAD\\x02\\u0EAF\\x02\\u0EB2\\x02\\u0EB4\\x02\" +\r\n\t\t\"\\u0EB5\\x02\\u0EBF\\x02\\u0EBF\\x02\\u0EC2\\x02\\u0EC6\\x02\\u0EC8\\x02\\u0EC8\\x02\" +\r\n\t\t\"\\u0EDE\\x02\\u0EE1\\x02\\u0F02\\x02\\u0F02\\x02\\u0F42\\x02\\u0F49\\x02\\u0F4B\\x02\" +\r\n\t\t\"\\u0F6E\\x02\\u0F8A\\x02\\u0F8E\\x02\\u1002\\x02\\u102C\\x02\\u1041\\x02\\u1041\\x02\" +\r\n\t\t\"\\u1052\\x02\\u1057\\x02\\u105C\\x02\\u105F\\x02\\u1063\\x02\\u1063\\x02\\u1067\\x02\" +\r\n\t\t\"\\u1068\\x02\\u1070\\x02\\u1072\\x02\\u1077\\x02\\u1083\\x02\\u1090\\x02\\u1090\\x02\" +\r\n\t\t\"\\u10A2\\x02\\u10C7\\x02\\u10C9\\x02\\u10C9\\x02\\u10CF\\x02\\u10CF\\x02\\u10D2\\x02\" +\r\n\t\t\"\\u10FC\\x02\\u10FE\\x02\\u124A\\x02\\u124C\\x02\\u124F\\x02\\u1252\\x02\\u1258\\x02\" +\r\n\t\t\"\\u125A\\x02\\u125A\\x02\\u125C\\x02\\u125F\\x02\\u1262\\x02\\u128A\\x02\\u128C\\x02\" +\r\n\t\t\"\\u128F\\x02\\u1292\\x02\\u12B2\\x02\\u12B4\\x02\\u12B7\\x02\\u12BA\\x02\\u12C0\\x02\" +\r\n\t\t\"\\u12C2\\x02\\u12C2\\x02\\u12C4\\x02\\u12C7\\x02\\u12CA\\x02\\u12D8\\x02\\u12DA\\x02\" +\r\n\t\t\"\\u1312\\x02\\u1314\\x02\\u1317\\x02\\u131A\\x02\\u135C\\x02\\u1382\\x02\\u1391\\x02\" +\r\n\t\t\"\\u13A2\\x02\\u13F7\\x02\\u13FA\\x02\\u13FF\\x02\\u1403\\x02\\u166E\\x02\\u1671\\x02\" +\r\n\t\t\"\\u1681\\x02\\u1683\\x02\\u169C\\x02\\u16A2\\x02\\u16EC\\x02\\u16F0\\x02\\u16FA\\x02\" +\r\n\t\t\"\\u1702\\x02\\u170E\\x02\\u1710\\x02\\u1713\\x02\\u1722\\x02\\u1733\\x02\\u1742\\x02\" +\r\n\t\t\"\\u1753\\x02\\u1762\\x02\\u176E\\x02\\u1770\\x02\\u1772\\x02\\u1782\\x02\\u17B5\\x02\" +\r\n\t\t\"\\u17D9\\x02\\u17D9\\x02\\u17DE\\x02\\u17DE\\x02\\u1822\\x02\\u1879\\x02\\u1882\\x02\" +\r\n\t\t\"\\u1886\\x02\\u1889\\x02\\u18AA\\x02\\u18AC\\x02\\u18AC\\x02\\u18B2\\x02\\u18F7\\x02\" +\r\n\t\t\"\\u1902\\x02\\u1920\\x02\\u1952\\x02\\u196F\\x02\\u1972\\x02\\u1976\\x02\\u1982\\x02\" +\r\n\t\t\"\\u19AD\\x02\\u19B2\\x02\\u19CB\\x02\\u1A02\\x02\\u1A18\\x02\\u1A22\\x02\\u1A56\\x02\" +\r\n\t\t\"\\u1AA9\\x02\\u1AA9\\x02\\u1B07\\x02\\u1B35\\x02\\u1B47\\x02\\u1B4D\\x02\\u1B85\\x02\" +\r\n\t\t\"\\u1BA2\\x02\\u1BB0\\x02\\u1BB1\\x02\\u1BBC\\x02\\u1BE7\\x02\\u1C02\\x02\\u1C25\\x02\" +\r\n\t\t\"\\u1C4F\\x02\\u1C51\\x02\\u1C5C\\x02\\u1C7F\\x02\\u1C82\\x02\\u1C8A\\x02\\u1CEB\\x02\" +\r\n\t\t\"\\u1CEE\\x02\\u1CF0\\x02\\u1CF3\\x02\\u1CF7\\x02\\u1CF8\\x02\\u1D02\\x02\\u1DC1\\x02\" +\r\n\t\t\"\\u1E02\\x02\\u1F17\\x02\\u1F1A\\x02\\u1F1F\\x02\\u1F22\\x02\\u1F47\\x02\\u1F4A\\x02\" +\r\n\t\t\"\\u1F4F\\x02\\u1F52\\x02\\u1F59\\x02\\u1F5B\\x02\\u1F5B\\x02\\u1F5D\\x02\\u1F5D\\x02\" +\r\n\t\t\"\\u1F5F\\x02\\u1F5F\\x02\\u1F61\\x02\\u1F7F\\x02\\u1F82\\x02\\u1FB6\\x02\\u1FB8\\x02\" +\r\n\t\t\"\\u1FBE\\x02\\u1FC0\\x02\\u1FC0\\x02\\u1FC4\\x02\\u1FC6\\x02\\u1FC8\\x02\\u1FCE\\x02\" +\r\n\t\t\"\\u1FD2\\x02\\u1FD5\\x02\\u1FD8\\x02\\u1FDD\\x02\\u1FE2\\x02\\u1FEE\\x02\\u1FF4\\x02\" +\r\n\t\t\"\\u1FF6\\x02\\u1FF8\\x02\\u1FFE\\x02\\u2073\\x02\\u2073\\x02\\u2081\\x02\\u2081\\x02\" +\r\n\t\t\"\\u2092\\x02\\u209E\\x02\\u2104\\x02\\u2104\\x02\\u2109\\x02\\u2109\\x02\\u210C\\x02\" +\r\n\t\t\"\\u2115\\x02\\u2117\\x02\\u2117\\x02\\u211B\\x02\\u211F\\x02\\u2126\\x02\\u2126\\x02\" +\r\n\t\t\"\\u2128\\x02\\u2128\\x02\\u212A\\x02\\u212A\\x02\\u212C\\x02\\u212F\\x02\\u2131\\x02\" +\r\n\t\t\"\\u213B\\x02\\u213E\\x02\\u2141\\x02\\u2147\\x02\\u214B\\x02\\u2150\\x02\\u2150\\x02\" +\r\n\t\t\"\\u2162\\x02\\u218A\\x02\\u2C02\\x02\\u2C30\\x02\\u2C32\\x02\\u2C60\\x02\\u2C62\\x02\" +\r\n\t\t\"\\u2CE6\\x02\\u2CED\\x02\\u2CF0\\x02\\u2CF4\\x02\\u2CF5\\x02\\u2D02\\x02\\u2D27\\x02\" +\r\n\t\t\"\\u2D29\\x02\\u2D29\\x02\\u2D2F\\x02\\u2D2F\\x02\\u2D32\\x02\\u2D69\\x02\\u2D71\\x02\" +\r\n\t\t\"\\u2D71\\x02\\u2D82\\x02\\u2D98\\x02\\u2DA2\\x02\\u2DA8\\x02\\u2DAA\\x02\\u2DB0\\x02\" +\r\n\t\t\"\\u2DB2\\x02\\u2DB8\\x02\\u2DBA\\x02\\u2DC0\\x02\\u2DC2\\x02\\u2DC8\\x02\\u2DCA\\x02\" +\r\n\t\t\"\\u2DD0\\x02\\u2DD2\\x02\\u2DD8\\x02\\u2DDA\\x02\\u2DE0\\x02\\u2E31\\x02\\u2E31\\x02\" +\r\n\t\t\"\\u3007\\x02\\u3009\\x02\\u3023\\x02\\u302B\\x02\\u3033\\x02\\u3037\\x02\\u303A\\x02\" +\r\n\t\t\"\\u303E\\x02\\u3043\\x02\\u3098\\x02\\u309F\\x02\\u30A1\\x02\\u30A3\\x02\\u30FC\\x02\" +\r\n\t\t\"\\u30FE\\x02\\u3101\\x02\\u3107\\x02\\u312F\\x02\\u3133\\x02\\u3190\\x02\\u31A2\\x02\" +\r\n\t\t\"\\u31BC\\x02\\u31F2\\x02\\u3201\\x02\\u3402\\x02\\u4DB7\\x02\\u4E02\\x02\\u9FD7\\x02\" +\r\n\t\t\"\\uA002\\x02\\uA48E\\x02\\uA4D2\\x02\\uA4FF\\x02\\uA502\\x02\\uA60E\\x02\\uA612\\x02\" +\r\n\t\t\"\\uA621\\x02\\uA62C\\x02\\uA62D\\x02\\uA642\\x02\\uA670\\x02\\uA681\\x02\\uA69F\\x02\" +\r\n\t\t\"\\uA6A2\\x02\\uA6F1\\x02\\uA719\\x02\\uA721\\x02\\uA724\\x02\\uA78A\\x02\\uA78D\\x02\" +\r\n\t\t\"\\uA7B0\\x02\\uA7B2\\x02\\uA7B9\\x02\\uA7F9\\x02\\uA803\\x02\\uA805\\x02\\uA807\\x02\" +\r\n\t\t\"\\uA809\\x02\\uA80C\\x02\\uA80E\\x02\\uA824\\x02\\uA842\\x02\\uA875\\x02\\uA884\\x02\" +\r\n\t\t\"\\uA8B5\\x02\\uA8F4\\x02\\uA8F9\\x02\\uA8FD\\x02\\uA8FD\\x02\\uA8FF\\x02\\uA8FF\\x02\" +\r\n\t\t\"\\uA90C\\x02\\uA927\\x02\\uA932\\x02\\uA948\\x02\\uA962\\x02\\uA97E\\x02\\uA986\\x02\" +\r\n\t\t\"\\uA9B4\\x02\\uA9D1\\x02\\uA9D1\\x02\\uA9E2\\x02\\uA9E6\\x02\\uA9E8\\x02\\uA9F1\\x02\" +\r\n\t\t\"\\uA9FC\\x02\\uAA00\\x02\\uAA02\\x02\\uAA2A\\x02\\uAA42\\x02\\uAA44\\x02\\uAA46\\x02\" +\r\n\t\t\"\\uAA4D\\x02\\uAA62\\x02\\uAA78\\x02\\uAA7C\\x02\\uAA7C\\x02\\uAA80\\x02\\uAAB1\\x02\" +\r\n\t\t\"\\uAAB3\\x02\\uAAB3\\x02\\uAAB7\\x02\\uAAB8\\x02\\uAABB\\x02\\uAABF\\x02\\uAAC2\\x02\" +\r\n\t\t\"\\uAAC2\\x02\\uAAC4\\x02\\uAAC4\\x02\\uAADD\\x02\\uAADF\\x02\\uAAE2\\x02\\uAAEC\\x02\" +\r\n\t\t\"\\uAAF4\\x02\\uAAF6\\x02\\uAB03\\x02\\uAB08\\x02\\uAB0B\\x02\\uAB10\\x02\\uAB13\\x02\" +\r\n\t\t\"\\uAB18\\x02\\uAB22\\x02\\uAB28\\x02\\uAB2A\\x02\\uAB30\\x02\\uAB32\\x02\\uAB5C\\x02\" +\r\n\t\t\"\\uAB5E\\x02\\uAB67\\x02\\uAB72\\x02\\uABE4\\x02\\uAC02\\x02\\uD7A5\\x02\\uD7B2\\x02\" +\r\n\t\t\"\\uD7C8\\x02\\uD7CD\\x02\\uD7FD\\x02\\uF902\\x02\\uFA6F\\x02\\uFA72\\x02\\uFADB\\x02\" +\r\n\t\t\"\\uFB02\\x02\\uFB08\\x02\\uFB15\\x02\\uFB19\\x02\\uFB1F\\x02\\uFB1F\\x02\\uFB21\\x02\" +\r\n\t\t\"\\uFB2A\\x02\\uFB2C\\x02\\uFB38\\x02\\uFB3A\\x02\\uFB3E\\x02\\uFB40\\x02\\uFB40\\x02\" +\r\n\t\t\"\\uFB42\\x02\\uFB43\\x02\\uFB45\\x02\\uFB46\\x02\\uFB48\\x02\\uFBB3\\x02\\uFBD5\\x02\" +\r\n\t\t\"\\uFD3F\\x02\\uFD52\\x02\\uFD91\\x02\\uFD94\\x02\\uFDC9\\x02\\uFDF2\\x02\\uFDFD\\x02\" +\r\n\t\t\"\\uFE72\\x02\\uFE76\\x02\\uFE78\\x02\\uFEFE\\x02\\uFF23\\x02\\uFF3C\\x02\\uFF43\\x02\" +\r\n\t\t\"\\uFF5C\\x02\\uFF68\\x02\\uFFC0\\x02\\uFFC4\\x02\\uFFC9\\x02\\uFFCC\\x02\\uFFD1\\x02\" +\r\n\t\t\"\\uFFD4\\x02\\uFFD9\\x02\\uFFDC\\x02\\uFFDE\\x02\\x02\\x03\\r\\x03\\x0F\\x03(\\x03*\\x03\" +\r\n\t\t\"<\\x03>\\x03?\\x03A\\x03O\\x03R\\x03_\\x03\\x82\\x03\\xFC\\x03\\u0142\\x03\\u0176\\x03\" +\r\n\t\t\"\\u0282\\x03\\u029E\\x03\\u02A2\\x03\\u02D2\\x03\\u0302\\x03\\u0321\\x03\\u0332\\x03\" +\r\n\t\t\"\\u034C\\x03\\u0352\\x03\\u0377\\x03\\u0382\\x03\\u039F\\x03\\u03A2\\x03\\u03C5\\x03\" +\r\n\t\t\"\\u03CA\\x03\\u03D1\\x03\\u03D3\\x03\\u03D7\\x03\\u0402\\x03\\u049F\\x03\\u04B2\\x03\" +\r\n\t\t\"\\u04D5\\x03\\u04DA\\x03\\u04FD\\x03\\u0502\\x03\\u0529\\x03\\u0532\\x03\\u0565\\x03\" +\r\n\t\t\"\\u0602\\x03\\u0738\\x03\\u0742\\x03\\u0757\\x03\\u0762\\x03\\u0769\\x03\\u0802\\x03\" +\r\n\t\t\"\\u0807\\x03\\u080A\\x03\\u080A\\x03\\u080C\\x03\\u0837\\x03\\u0839\\x03\\u083A\\x03\" +\r\n\t\t\"\\u083E\\x03\\u083E\\x03\\u0841\\x03\\u0857\\x03\\u0862\\x03\\u0878\\x03\\u0882\\x03\" +\r\n\t\t\"\\u08A0\\x03\\u08E2\\x03\\u08F4\\x03\\u08F6\\x03\\u08F7\\x03\\u0902\\x03\\u0917\\x03\" +\r\n\t\t\"\\u0922\\x03\\u093B\\x03\\u0982\\x03\\u09B9\\x03\\u09C0\\x03\\u09C1\\x03\\u0A02\\x03\" +\r\n\t\t\"\\u0A02\\x03\\u0A12\\x03\\u0A15\\x03\\u0A17\\x03\\u0A19\\x03\\u0A1B\\x03\\u0A35\\x03\" +\r\n\t\t\"\\u0A62\\x03\\u0A7E\\x03\\u0A82\\x03\\u0A9E\\x03\\u0AC2\\x03\\u0AC9\\x03\\u0ACB\\x03\" +\r\n\t\t\"\\u0AE6\\x03\\u0B02\\x03\\u0B37\\x03\\u0B42\\x03\\u0B57\\x03\\u0B62\\x03\\u0B74\\x03\" +\r\n\t\t\"\\u0B82\\x03\\u0B93\\x03\\u0C02\\x03\\u0C4A\\x03\\u0C82\\x03\\u0CB4\\x03\\u0CC2\\x03\" +\r\n\t\t\"\\u0CF4\\x03\\u1005\\x03\\u1039\\x03\\u1085\\x03\\u10B1\\x03\\u10D2\\x03\\u10EA\\x03\" +\r\n\t\t\"\\u1105\\x03\\u1128\\x03\\u1152\\x03\\u1174\\x03\\u1178\\x03\\u1178\\x03\\u1185\\x03\" +\r\n\t\t\"\\u11B4\\x03\\u11C3\\x03\\u11C6\\x03\\u11DC\\x03\\u11DC\\x03\\u11DE\\x03\\u11DE\\x03\" +\r\n\t\t\"\\u1202\\x03\\u1213\\x03\\u1215\\x03\\u122D\\x03\\u1282\\x03\\u1288\\x03\\u128A\\x03\" +\r\n\t\t\"\\u128A\\x03\\u128C\\x03\\u128F\\x03\\u1291\\x03\\u129F\\x03\\u12A1\\x03\\u12AA\\x03\" +\r\n\t\t\"\\u12B2\\x03\\u12E0\\x03\\u1307\\x03\\u130E\\x03\\u1311\\x03\\u1312\\x03\\u1315\\x03\" +\r\n\t\t\"\\u132A\\x03\\u132C\\x03\\u1332\\x03\\u1334\\x03\\u1335\\x03\\u1337\\x03\\u133B\\x03\" +\r\n\t\t\"\\u133F\\x03\\u133F\\x03\\u1352\\x03\\u1352\\x03\\u135F\\x03\\u1363\\x03\\u1402\\x03\" +\r\n\t\t\"\\u1436\\x03\\u1449\\x03\\u144C\\x03\\u1482\\x03\\u14B1\\x03\\u14C6\\x03\\u14C7\\x03\" +\r\n\t\t\"\\u14C9\\x03\\u14C9\\x03\\u1582\\x03\\u15B0\\x03\\u15DA\\x03\\u15DD\\x03\\u1602\\x03\" +\r\n\t\t\"\\u1631\\x03\\u1646\\x03\\u1646\\x03\\u1682\\x03\\u16AC\\x03\\u1702\\x03\\u171B\\x03\" +\r\n\t\t\"\\u18A2\\x03\\u18E1\\x03\\u1901\\x03\\u1901\\x03\\u1AC2\\x03\\u1AFA\\x03\\u1C02\\x03\" +\r\n\t\t\"\\u1C0A\\x03\\u1C0C\\x03\\u1C30\\x03\\u1C42\\x03\\u1C42\\x03\\u1C74\\x03\\u1C91\\x03\" +\r\n\t\t\"\\u2002\\x03\\u239B\\x03\\u2402\\x03\\u2470\\x03\\u2482\\x03\\u2545\\x03\\u3002\\x03\" +\r\n\t\t\"\\u3430\\x03\\u4402\\x03\\u4648\\x03\\u6802\\x03\\u6A3A\\x03\\u6A42\\x03\\u6A60\\x03\" +\r\n\t\t\"\\u6AD2\\x03\\u6AEF\\x03\\u6B02\\x03\\u6B31\\x03\\u6B42\\x03\\u6B45\\x03\\u6B65\\x03\" +\r\n\t\t\"\\u6B79\\x03\\u6B7F\\x03\\u6B91\\x03\\u6F02\\x03\\u6F46\\x03\\u6F52\\x03\\u6F52\\x03\" +\r\n\t\t\"\\u6F95\\x03\\u6FA1\\x03\\u6FE2\\x03\\u6FE2\\x03\\u7002\\x03\\u87EE\\x03\\u8802\\x03\" +\r\n\t\t\"\\u8AF4\\x03\\uB002\\x03\\uB003\\x03\\uBC02\\x03\\uBC6C\\x03\\uBC72\\x03\\uBC7E\\x03\" +\r\n\t\t\"\\uBC82\\x03\\uBC8A\\x03\\uBC92\\x03\\uBC9B\\x03\\uD402\\x03\\uD456\\x03\\uD458\\x03\" +\r\n\t\t\"\\uD49E\\x03\\uD4A0\\x03\\uD4A1\\x03\\uD4A4\\x03\\uD4A4\\x03\\uD4A7\\x03\\uD4A8\\x03\" +\r\n\t\t\"\\uD4AB\\x03\\uD4AE\\x03\\uD4B0\\x03\\uD4BB\\x03\\uD4BD\\x03\\uD4BD\\x03\\uD4BF\\x03\" +\r\n\t\t\"\\uD4C5\\x03\\uD4C7\\x03\\uD507\\x03\\uD509\\x03\\uD50C\\x03\\uD50F\\x03\\uD516\\x03\" +\r\n\t\t\"\\uD518\\x03\\uD51E\\x03\\uD520\\x03\\uD53B\\x03\\uD53D\\x03\\uD540\\x03\\uD542\\x03\" +\r\n\t\t\"\\uD546\\x03\\uD548\\x03\\uD548\";\r\n\tprivate static readonly _serializedATNSegment1: string =\r\n\t\t\"\\x03\\uD54C\\x03\\uD552\\x03\\uD554\\x03\\uD6A7\\x03\\uD6AA\\x03\\uD6C2\\x03\\uD6C4\" +\r\n\t\t\"\\x03\\uD6DC\\x03\\uD6DE\\x03\\uD6FC\\x03\\uD6FE\\x03\\uD716\\x03\\uD718\\x03\\uD736\" +\r\n\t\t\"\\x03\\uD738\\x03\\uD750\\x03\\uD752\\x03\\uD770\\x03\\uD772\\x03\\uD78A\\x03\\uD78C\" +\r\n\t\t\"\\x03\\uD7AA\\x03\\uD7AC\\x03\\uD7C4\\x03\\uD7C6\\x03\\uD7CD\\x03\\uE802\\x03\\uE8C6\" +\r\n\t\t\"\\x03\\uE902\\x03\\uE945\\x03\\uEE02\\x03\\uEE05\\x03\\uEE07\\x03\\uEE21\\x03\\uEE23\" +\r\n\t\t\"\\x03\\uEE24\\x03\\uEE26\\x03\\uEE26\\x03\\uEE29\\x03\\uEE29\\x03\\uEE2B\\x03\\uEE34\" +\r\n\t\t\"\\x03\\uEE36\\x03\\uEE39\\x03\\uEE3B\\x03\\uEE3B\\x03\\uEE3D\\x03\\uEE3D\\x03\\uEE44\" +\r\n\t\t\"\\x03\\uEE44\\x03\\uEE49\\x03\\uEE49\\x03\\uEE4B\\x03\\uEE4B\\x03\\uEE4D\\x03\\uEE4D\" +\r\n\t\t\"\\x03\\uEE4F\\x03\\uEE51\\x03\\uEE53\\x03\\uEE54\\x03\\uEE56\\x03\\uEE56\\x03\\uEE59\" +\r\n\t\t\"\\x03\\uEE59\\x03\\uEE5B\\x03\\uEE5B\\x03\\uEE5D\\x03\\uEE5D\\x03\\uEE5F\\x03\\uEE5F\" +\r\n\t\t\"\\x03\\uEE61\\x03\\uEE61\\x03\\uEE63\\x03\\uEE64\\x03\\uEE66\\x03\\uEE66\\x03\\uEE69\" +\r\n\t\t\"\\x03\\uEE6C\\x03\\uEE6E\\x03\\uEE74\\x03\\uEE76\\x03\\uEE79\\x03\\uEE7B\\x03\\uEE7E\" +\r\n\t\t\"\\x03\\uEE80\\x03\\uEE80\\x03\\uEE82\\x03\\uEE8B\\x03\\uEE8D\\x03\\uEE9D\\x03\\uEEA3\" +\r\n\t\t\"\\x03\\uEEA5\\x03\\uEEA7\\x03\\uEEAB\\x03\\uEEAD\\x03\\uEEBD\\x03\\x02\\x04\\uA6D8\\x04\" +\r\n\t\t\"\\uA702\\x04\\uB736\\x04\\uB742\\x04\\uB81F\\x04\\uB822\\x04\\uCEA3\\x04\\uF802\\x04\" +\r\n\t\t\"\\uFA1F\\x041\\x02\\x03\\x03\\x02\\x02\\x02\\x02\\x05\\x03\\x02\\x02\\x02\\x02\\x07\\x03\" +\r\n\t\t\"\\x02\\x02\\x02\\x02\\t\\x03\\x02\\x02\\x02\\x02\\v\\x03\\x02\\x02\\x02\\x02\\x11\\x03\\x02\" +\r\n\t\t\"\\x02\\x02\\x03\\x13\\x03\\x02\\x02\\x02\\x05\\x16\\x03\\x02\\x02\\x02\\x07\\x18\\x03\\x02\" +\r\n\t\t\"\\x02\\x02\\t\\x1A\\x03\\x02\\x02\\x02\\v\\x1C\\x03\\x02\\x02\\x02\\r%\\x03\\x02\\x02\\x02\" +\r\n\t\t\"\\x0F\\'\\x03\\x02\\x02\\x02\\x11)\\x03\\x02\\x02\\x02\\x13\\x14\\x071\\x02\\x02\\x14\\x15\" +\r\n\t\t\"\\x071\\x02\\x02\\x15\\x04\\x03\\x02\\x02\\x02\\x16\\x17\\x071\\x02\\x02\\x17\\x06\\x03\" +\r\n\t\t\"\\x02\\x02\\x02\\x18\\x19\\x07,\\x02\\x02\\x19\\b\\x03\\x02\\x02\\x02\\x1A\\x1B\\x07#\\x02\" +\r\n\t\t\"\\x02\\x1B\\n\\x03\\x02\\x02\\x02\\x1C \\x05\\x0F\\b\\x02\\x1D\\x1F\\x05\\r\\x07\\x02\\x1E\" +\r\n\t\t\"\\x1D\\x03\\x02\\x02\\x02\\x1F\\\"\\x03\\x02\\x02\\x02 \\x1E\\x03\\x02\\x02\\x02 !\\x03\" +\r\n\t\t\"\\x02\\x02\\x02!#\\x03\\x02\\x02\\x02\\\" \\x03\\x02\\x02\\x02#$\\b\\x06\\x02\\x02$\\f\\x03\" +\r\n\t\t\"\\x02\\x02\\x02%&\\t\\x02\\x02\\x02&\\x0E\\x03\\x02\\x02\\x02\\'(\\t\\x03\\x02\\x02(\\x10\" +\r\n\t\t\"\\x03\\x02\\x02\\x02)-\\x07)\\x02\\x02*,\\v\\x02\\x02\\x02+*\\x03\\x02\\x02\\x02,/\\x03\" +\r\n\t\t\"\\x02\\x02\\x02-.\\x03\\x02\\x02\\x02-+\\x03\\x02\\x02\\x02.0\\x03\\x02\\x02\\x02/-\\x03\" +\r\n\t\t\"\\x02\\x02\\x0201\\x07)\\x02\\x021\\x12\\x03\\x02\\x02\\x02\\x05\\x02 -\\x03\\x03\\x06\" +\r\n\t\t\"\\x02\";\r\n\tpublic static readonly _serializedATN: string = Utils.join(\r\n\t\t[\r\n\t\t\tXPathLexer._serializedATNSegment0,\r\n\t\t\tXPathLexer._serializedATNSegment1,\r\n\t\t],\r\n\t\t\"\",\r\n\t);\r\n\tpublic static __ATN: ATN;\r\n\tpublic static get _ATN(): ATN {\r\n\t\tif (!XPathLexer.__ATN) {\r\n\t\t\tXPathLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(XPathLexer._serializedATN));\r\n\t\t}\r\n\r\n\t\treturn XPathLexer.__ATN;\r\n\t}\r\n\r\n}\r\n\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\n\r\nimport { ANTLRErrorListener } from \"../../ANTLRErrorListener\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { Recognizer } from \"../../Recognizer\";\r\nimport { RecognitionException } from \"../../RecognitionException\";\r\n\r\nexport class XPathLexerErrorListener implements ANTLRErrorListener {\r\n\t@Override\r\n\tpublic syntaxError(\r\n\t\trecognizer: Recognizer, offendingSymbol: T | undefined,\r\n\t\tline: number, charPositionInLine: number, msg: string,\r\n\t\te: RecognitionException | undefined): void {\r\n\t\t// intentionally empty\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\n\r\nexport abstract class XPathElement {\r\n\tprotected nodeName: string;\r\n\tpublic invert: boolean;\r\n\r\n\t/** Construct element like `/ID` or `ID` or `/*` etc...\r\n\t * op is null if just node\r\n\t */\r\n\tconstructor(nodeName: string) {\r\n\t\tthis.nodeName = nodeName;\r\n\t\tthis.invert = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Given tree rooted at `t` return all nodes matched by this path\r\n\t * element.\r\n\t */\r\n\tpublic abstract evaluate(t: ParseTree): ParseTree[];\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet inv: string = this.invert ? \"!\" : \"\";\r\n\t\tlet className: string = Object.constructor.name;\r\n\t\treturn className + \"[\" + inv + this.nodeName + \"]\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\n/**\r\n * Either `ID` at start of path or `...//ID` in middle of path.\r\n */\r\nexport class XPathRuleAnywhereElement extends XPathElement {\r\n\tprotected ruleIndex: number;\r\n\tconstructor(ruleName: string, ruleIndex: number) {\r\n\t\tsuper(ruleName);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\treturn Trees.findAllRuleNodes(t, this.ruleIndex);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathRuleElement extends XPathElement {\r\n\tprotected ruleIndex: number;\r\n\tconstructor(ruleName: string, ruleIndex: number) {\r\n\t\tsuper(ruleName);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\t// return all children of t that match nodeName\r\n\t\tlet nodes: ParseTree[] = [];\r\n\t\tfor (let c of Trees.getChildren(t)) {\r\n\t\t\tif (c instanceof ParserRuleContext) {\r\n\t\t\t\tif ((c.ruleIndex === this.ruleIndex && !this.invert) ||\r\n\t\t\t\t\t(c.ruleIndex !== this.ruleIndex && this.invert)) {\r\n\t\t\t\t\tnodes.push(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nodes;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathTokenAnywhereElement extends XPathElement {\r\n\tprotected tokenType: number;\r\n\tconstructor(tokenName: string, tokenType: number) {\r\n\t\tsuper(tokenName);\r\n\t\tthis.tokenType = tokenType;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\treturn Trees.findAllTokenNodes(t, this.tokenType);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathTokenElement extends XPathElement {\r\n\tprotected tokenType: number;\r\n\tconstructor(tokenName: string, tokenType: number) {\r\n\t\tsuper(tokenName);\r\n\t\tthis.tokenType = tokenType;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\t// return all children of t that match nodeName\r\n\t\tlet nodes: ParseTree[] = [];\r\n\t\tfor (let c of Trees.getChildren(t)) {\r\n\t\t\tif (c instanceof TerminalNode) {\r\n\t\t\t\tif ((c.symbol.type === this.tokenType && !this.invert) ||\r\n\t\t\t\t\t(c.symbol.type !== this.tokenType && this.invert)) {\r\n\t\t\t\t\tnodes.push(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nodes;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPath } from \"./XPath\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathWildcardAnywhereElement extends XPathElement {\r\n\tconstructor() {\r\n\t\tsuper(XPath.WILDCARD);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\tif (this.invert) {\r\n\t\t\t// !* is weird but valid (empty)\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\treturn Trees.getDescendants(t);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPath } from \"./XPath\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathWildcardElement extends XPathElement {\r\n\tconstructor() {\r\n\t\tsuper(XPath.WILDCARD);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\tlet kids: ParseTree[] = [];\r\n\t\tif (this.invert) {\r\n\t\t\t// !* is weird but valid (empty)\r\n\t\t\treturn kids;\r\n\t\t}\r\n\t\tfor (let c of Trees.getChildren(t)) {\r\n\t\t\tkids.push(c);\r\n\t\t}\r\n\t\treturn kids;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.4373888-07:00\r\n\r\nimport { CharStreams } from \"../../CharStreams\";\r\nimport { CommonTokenStream } from \"../../CommonTokenStream\";\r\nimport { LexerNoViableAltException } from \"../../LexerNoViableAltException\";\r\nimport { Parser } from \"../../Parser\";\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Token } from \"../../Token\";\r\nimport { XPathElement } from \"./XPathElement\";\r\nimport { XPathLexer } from \"./XPathLexer\";\r\nimport { XPathLexerErrorListener } from \"./XPathLexerErrorListener\";\r\nimport { XPathRuleAnywhereElement } from \"./XPathRuleAnywhereElement\";\r\nimport { XPathRuleElement } from \"./XPathRuleElement\";\r\nimport { XPathTokenAnywhereElement } from \"./XPathTokenAnywhereElement\";\r\nimport { XPathTokenElement } from \"./XPathTokenElement\";\r\nimport { XPathWildcardAnywhereElement } from \"./XPathWildcardAnywhereElement\";\r\nimport { XPathWildcardElement } from \"./XPathWildcardElement\";\r\n\r\n/**\r\n * Represent a subset of XPath XML path syntax for use in identifying nodes in\r\n * parse trees.\r\n *\r\n * Split path into words and separators `/` and `//` via ANTLR\r\n * itself then walk path elements from left to right. At each separator-word\r\n * pair, find set of nodes. Next stage uses those as work list.\r\n *\r\n * The basic interface is\r\n * {@link XPath#findAll ParseTree.findAll}`(tree, pathString, parser)`.\r\n * But that is just shorthand for:\r\n *\r\n * ```\r\n * let p = new XPath(parser, pathString);\r\n * return p.evaluate(tree);\r\n * ```\r\n *\r\n * See `TestXPath` for descriptions. In short, this\r\n * allows operators:\r\n *\r\n * | | |\r\n * | --- | --- |\r\n * | `/` | root |\r\n * | `//` | anywhere |\r\n * | `!` | invert; this much appear directly after root or anywhere operator |\r\n *\r\n * and path elements:\r\n *\r\n * | | |\r\n * | --- | --- |\r\n * | `ID` | token name |\r\n * | `'string'` | any string literal token from the grammar |\r\n * | `expr` | rule name |\r\n * | `*` | wildcard matching any node |\r\n *\r\n * Whitespace is not allowed.\r\n */\r\nexport class XPath {\r\n\tpublic static readonly WILDCARD: string = \"*\"; // word not operator/separator\r\n\tpublic static readonly NOT: string = \"!\"; \t // word for invert operator\r\n\r\n\tprotected path: string;\r\n\tprotected elements: XPathElement[];\r\n\tprotected parser: Parser;\r\n\r\n\tconstructor(parser: Parser, path: string) {\r\n\t\tthis.parser = parser;\r\n\t\tthis.path = path;\r\n\t\tthis.elements = this.split(path);\r\n\t\t// console.log(this.elements.toString());\r\n\t}\r\n\r\n\t// TODO: check for invalid token/rule names, bad syntax\r\n\r\n\tpublic split(path: string): XPathElement[] {\r\n\t\tlet lexer = new XPathLexer(CharStreams.fromString(path));\r\n\t\tlexer.recover = (e: LexerNoViableAltException) => { throw e; };\r\n\r\n\t\tlexer.removeErrorListeners();\r\n\t\tlexer.addErrorListener(new XPathLexerErrorListener());\r\n\t\tlet tokenStream = new CommonTokenStream(lexer);\r\n\t\ttry {\r\n\t\t\ttokenStream.fill();\r\n\t\t}\r\n\t\tcatch (e) {\r\n\t\t\tif (e instanceof LexerNoViableAltException) {\r\n\t\t\t\tlet pos: number = lexer.charPositionInLine;\r\n\t\t\t\tlet msg: string = \"Invalid tokens or characters at index \" + pos + \" in path '\" + path + \"' -- \" + e.message;\r\n\t\t\t\tthrow new RangeError(msg);\r\n\t\t\t}\r\n\t\t\tthrow e;\r\n\t\t}\r\n\r\n\t\tlet tokens: Token[] = tokenStream.getTokens();\r\n\t\t// console.log(\"path=\" + path + \"=>\" + tokens);\r\n\t\tlet elements: XPathElement[] = [];\r\n\t\tlet n: number = tokens.length;\r\n\t\tlet i: number = 0;\r\n\t\tloop:\r\n\t\twhile (i < n) {\r\n\t\t\tlet el: Token = tokens[i];\r\n\t\t\tlet next: Token | undefined;\r\n\t\t\tswitch (el.type) {\r\n\t\t\t\tcase XPathLexer.ROOT:\r\n\t\t\t\tcase XPathLexer.ANYWHERE:\r\n\t\t\t\t\tlet anywhere: boolean = el.type === XPathLexer.ANYWHERE;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tnext = tokens[i];\r\n\t\t\t\t\tlet invert: boolean = next.type === XPathLexer.BANG;\r\n\t\t\t\t\tif (invert) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tnext = tokens[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet pathElement: XPathElement = this.getXPathElement(next, anywhere);\r\n\t\t\t\t\tpathElement.invert = invert;\r\n\t\t\t\t\telements.push(pathElement);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase XPathLexer.TOKEN_REF:\r\n\t\t\t\tcase XPathLexer.RULE_REF:\r\n\t\t\t\tcase XPathLexer.WILDCARD:\r\n\t\t\t\t\telements.push(this.getXPathElement(el, false));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase Token.EOF:\r\n\t\t\t\t\tbreak loop;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Error(\"Unknowth path element \" + el);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn elements;\r\n\t}\r\n\r\n\t/**\r\n\t * Convert word like `*` or `ID` or `expr` to a path\r\n\t * element. `anywhere` is `true` if `//` precedes the\r\n\t * word.\r\n\t */\r\n\tprotected getXPathElement(wordToken: Token, anywhere: boolean): XPathElement {\r\n\t\tif (wordToken.type === Token.EOF) {\r\n\t\t\tthrow new Error(\"Missing path element at end of path\");\r\n\t\t}\r\n\r\n\t\tlet word = wordToken.text;\r\n\t\tif (word == null) {\r\n\t\t\tthrow new Error(\"Expected wordToken to have text content.\");\r\n\t\t}\r\n\r\n\t\tlet ttype: number = this.parser.getTokenType(word);\r\n\t\tlet ruleIndex: number = this.parser.getRuleIndex(word);\r\n\t\tswitch (wordToken.type) {\r\n\t\t\tcase XPathLexer.WILDCARD:\r\n\t\t\t\treturn anywhere ?\r\n\t\t\t\t\tnew XPathWildcardAnywhereElement() :\r\n\t\t\t\t\tnew XPathWildcardElement();\r\n\t\t\tcase XPathLexer.TOKEN_REF:\r\n\t\t\tcase XPathLexer.STRING:\r\n\t\t\t\tif (ttype === Token.INVALID_TYPE) {\r\n\t\t\t\t\tthrow new Error(word + \" at index \" +\r\n\t\t\t\t\t\twordToken.startIndex +\r\n\t\t\t\t\t\t\" isn't a valid token name\");\r\n\t\t\t\t}\r\n\t\t\t\treturn anywhere ?\r\n\t\t\t\t\tnew XPathTokenAnywhereElement(word, ttype) :\r\n\t\t\t\t\tnew XPathTokenElement(word, ttype);\r\n\t\t\tdefault:\r\n\t\t\t\tif (ruleIndex === -1) {\r\n\t\t\t\t\tthrow new Error(word + \" at index \" +\r\n\t\t\t\t\t\twordToken.startIndex +\r\n\t\t\t\t\t\t\" isn't a valid rule name\");\r\n\t\t\t\t}\r\n\t\t\t\treturn anywhere ?\r\n\t\t\t\t\tnew XPathRuleAnywhereElement(word, ruleIndex) :\r\n\t\t\t\t\tnew XPathRuleElement(word, ruleIndex);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static findAll(tree: ParseTree, xpath: string, parser: Parser): Set {\r\n\t\tlet p: XPath = new XPath(parser, xpath);\r\n\t\treturn p.evaluate(tree);\r\n\t}\r\n\r\n\t/**\r\n\t * Return a list of all nodes starting at `t` as root that satisfy the\r\n\t * path. The root `/` is relative to the node passed to {@link evaluate}.\r\n\t */\r\n\tpublic evaluate(t: ParseTree): Set {\r\n\t\tlet dummyRoot = new ParserRuleContext();\r\n\t\tdummyRoot.addChild(t as ParserRuleContext);\r\n\r\n\t\tlet work = new Set([dummyRoot]);\r\n\r\n\t\tlet i: number = 0;\r\n\t\twhile (i < this.elements.length) {\r\n\t\t\tlet next = new Set();\r\n\t\t\tfor (let node of work) {\r\n\t\t\t\tif (node.childCount > 0) {\r\n\t\t\t\t\t// only try to match next element if it has children\r\n\t\t\t\t\t// e.g., //func/*/stat might have a token node for which\r\n\t\t\t\t\t// we can't go looking for stat nodes.\r\n\t\t\t\t\tlet matching = this.elements[i].evaluate(node);\r\n\t\t\t\t\tmatching.forEach(next.add, next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t\twork = next;\r\n\t\t}\r\n\r\n\t\treturn work;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\nimport { NotNull } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { ParseTreeMatch } from \"./ParseTreeMatch\";\r\nimport { ParseTreePatternMatcher } from \"./ParseTreePatternMatcher\";\r\nimport { XPath } from \"../xpath/XPath\";\r\n\r\n/**\r\n * A pattern like ` = ;` converted to a {@link ParseTree} by\r\n * {@link ParseTreePatternMatcher#compile(String, int)}.\r\n */\r\nexport class ParseTreePattern {\r\n\t/**\r\n\t * This is the backing field for `patternRuleIndex`.\r\n\t */\r\n\tprivate _patternRuleIndex: number;\r\n\r\n\t/**\r\n\t * This is the backing field for `pattern`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _pattern: string;\r\n\r\n\t/**\r\n\t * This is the backing field for `patternTree`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _patternTree: ParseTree;\r\n\r\n\t/**\r\n\t * This is the backing field for `matcher`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _matcher: ParseTreePatternMatcher;\r\n\r\n\t/**\r\n\t * Construct a new instance of the {@link ParseTreePattern} class.\r\n\t *\r\n\t * @param matcher The {@link ParseTreePatternMatcher} which created this\r\n\t * tree pattern.\r\n\t * @param pattern The tree pattern in concrete syntax form.\r\n\t * @param patternRuleIndex The parser rule which serves as the root of the\r\n\t * tree pattern.\r\n\t * @param patternTree The tree pattern in {@link ParseTree} form.\r\n\t */\r\n\tconstructor(\r\n\t\t@NotNull matcher: ParseTreePatternMatcher,\r\n\t\t@NotNull pattern: string,\r\n\t\tpatternRuleIndex: number,\r\n\t\t@NotNull patternTree: ParseTree) {\r\n\t\tthis._matcher = matcher;\r\n\t\tthis._patternRuleIndex = patternRuleIndex;\r\n\t\tthis._pattern = pattern;\r\n\t\tthis._patternTree = patternTree;\r\n\t}\r\n\r\n\t/**\r\n\t * Match a specific parse tree against this tree pattern.\r\n\t *\r\n\t * @param tree The parse tree to match against this tree pattern.\r\n\t * @returns A {@link ParseTreeMatch} object describing the result of the\r\n\t * match operation. The `ParseTreeMatch.succeeded` method can be\r\n\t * used to determine whether or not the match was successful.\r\n\t */\r\n\t@NotNull\r\n\tpublic match(@NotNull tree: ParseTree): ParseTreeMatch {\r\n\t\treturn this._matcher.match(tree, this);\r\n\t}\r\n\r\n\t/**\r\n\t * Determine whether or not a parse tree matches this tree pattern.\r\n\t *\r\n\t * @param tree The parse tree to match against this tree pattern.\r\n\t * @returns `true` if `tree` is a match for the current tree\r\n\t * pattern; otherwise, `false`.\r\n\t */\r\n\tpublic matches(@NotNull tree: ParseTree): boolean {\r\n\t\treturn this._matcher.match(tree, this).succeeded;\r\n\t}\r\n\r\n\t/**\r\n\t * Find all nodes using XPath and then try to match those subtrees against\r\n\t * this tree pattern.\r\n\t *\r\n\t * @param tree The {@link ParseTree} to match against this pattern.\r\n\t * @param xpath An expression matching the nodes\r\n\t *\r\n\t * @returns A collection of {@link ParseTreeMatch} objects describing the\r\n\t * successful matches. Unsuccessful matches are omitted from the result,\r\n\t * regardless of the reason for the failure.\r\n\t */\r\n\t@NotNull\r\n\tpublic findAll(@NotNull tree: ParseTree, @NotNull xpath: string): ParseTreeMatch[] {\r\n\t\tlet subtrees: Set = XPath.findAll(tree, xpath, this._matcher.parser);\r\n\t\tlet matches: ParseTreeMatch[] = [];\r\n\t\tfor (let t of subtrees) {\r\n\t\t\tlet match: ParseTreeMatch = this.match(t);\r\n\t\t\tif (match.succeeded) {\r\n\t\t\t\tmatches.push(match);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn matches;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the {@link ParseTreePatternMatcher} which created this tree pattern.\r\n\t *\r\n\t * @returns The {@link ParseTreePatternMatcher} which created this tree\r\n\t * pattern.\r\n\t */\r\n\t@NotNull\r\n\tget matcher(): ParseTreePatternMatcher {\r\n\t\treturn this._matcher;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tree pattern in concrete syntax form.\r\n\t *\r\n\t * @returns The tree pattern in concrete syntax form.\r\n\t */\r\n\t@NotNull\r\n\tget pattern(): string {\r\n\t\treturn this._pattern;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the parser rule which serves as the outermost rule for the tree\r\n\t * pattern.\r\n\t *\r\n\t * @returns The parser rule which serves as the outermost rule for the tree\r\n\t * pattern.\r\n\t */\r\n\tget patternRuleIndex(): number {\r\n\t\treturn this._patternRuleIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tree pattern as a {@link ParseTree}. The rule and token tags from\r\n\t * the pattern are present in the parse tree as terminal nodes with a symbol\r\n\t * of type {@link RuleTagToken} or {@link TokenTagToken}.\r\n\t *\r\n\t * @returns The tree pattern as a {@link ParseTree}.\r\n\t */\r\n\t@NotNull\r\n\tget patternTree(): ParseTree {\r\n\t\treturn this._patternTree;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.0343500-07:00\r\n\r\nimport { CharStream } from \"../../CharStream\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\nimport { Token } from \"../../Token\";\r\nimport { TokenSource } from \"../../TokenSource\";\r\n\r\n/**\r\n * A {@link Token} object representing an entire subtree matched by a parser\r\n * rule; e.g., ``. These tokens are created for {@link TagChunk}\r\n * chunks where the tag corresponds to a parser rule.\r\n */\r\nexport class RuleTagToken implements Token {\r\n\t/**\r\n\t * This is the backing field for `ruleName`.\r\n\t */\r\n\tprivate _ruleName: string;\r\n\t/**\r\n\t * The token type for the current token. This is the token type assigned to\r\n\t * the bypass alternative for the rule during ATN deserialization.\r\n\t */\r\n\tprivate bypassTokenType: number;\r\n\t/**\r\n\t * This is the backing field for `label`.\r\n\t */\r\n\tprivate _label?: string;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link RuleTagToken} with the specified rule\r\n\t * name, bypass token type, and label.\r\n\t *\r\n\t * @param ruleName The name of the parser rule this rule tag matches.\r\n\t * @param bypassTokenType The bypass token type assigned to the parser rule.\r\n\t * @param label The label associated with the rule tag, or `undefined` if\r\n\t * the rule tag is unlabeled.\r\n\t *\r\n\t * @exception IllegalArgumentException if `ruleName` is not defined\r\n\t * or empty.\r\n\t */\r\n\tconstructor(@NotNull ruleName: string, bypassTokenType: number, label?: string) {\r\n\t\tif (ruleName == null || ruleName.length === 0) {\r\n\t\t\tthrow new Error(\"ruleName cannot be null or empty.\");\r\n\t\t}\r\n\r\n\t\tthis._ruleName = ruleName;\r\n\t\tthis.bypassTokenType = bypassTokenType;\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the name of the rule associated with this rule tag.\r\n\t *\r\n\t * @returns The name of the parser rule associated with this rule tag.\r\n\t */\r\n\t@NotNull\r\n\tget ruleName(): string {\r\n\t\treturn this._ruleName;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the label associated with the rule tag.\r\n\t *\r\n\t * @returns The name of the label associated with the rule tag, or\r\n\t * `undefined` if this is an unlabeled rule tag.\r\n\t */\r\n\tget label(): string | undefined {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * Rule tag tokens are always placed on the {@link #DEFAULT_CHANNEL}.\r\n\t */\r\n\t@Override\r\n\tget channel(): number {\r\n\t\treturn Token.DEFAULT_CHANNEL;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This method returns the rule tag formatted with `<` and `>`\r\n\t * delimiters.\r\n\t */\r\n\t@Override\r\n\tget text(): string {\r\n\t\tif (this._label != null) {\r\n\t\t\treturn \"<\" + this._label + \":\" + this._ruleName + \">\";\r\n\t\t}\r\n\r\n\t\treturn \"<\" + this._ruleName + \">\";\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * Rule tag tokens have types assigned according to the rule bypass\r\n\t * transitions created during ATN deserialization.\r\n\t */\r\n\t@Override\r\n\tget type(): number {\r\n\t\treturn this.bypassTokenType;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns 0.\r\n\t */\r\n\t@Override\r\n\tget line(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget tokenIndex(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget startIndex(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget stopIndex(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns `undefined`.\r\n\t */\r\n\t@Override\r\n\tget tokenSource(): TokenSource | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns `undefined`.\r\n\t */\r\n\t@Override\r\n\tget inputStream(): CharStream | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} returns a string of the form\r\n\t * `ruleName:bypassTokenType`.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this._ruleName + \":\" + this.bypassTokenType;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:45.2799060-07:00\r\n\r\n/**\r\n * A chunk is either a token tag, a rule tag, or a span of literal text within a\r\n * tree pattern.\r\n *\r\n * The method {@link ParseTreePatternMatcher#split(String)} returns a list of\r\n * chunks in preparation for creating a token stream by\r\n * {@link ParseTreePatternMatcher#tokenize(String)}. From there, we get a parse\r\n * tree from with {@link ParseTreePatternMatcher#compile(String, int)}. These\r\n * chunks are converted to {@link RuleTagToken}, {@link TokenTagToken}, or the\r\n * regular tokens of the text surrounding the tags.\r\n */\r\nexport abstract class Chunk {\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.1670669-07:00\r\n\r\nimport { Chunk } from \"./Chunk\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\n\r\n/**\r\n * Represents a placeholder tag in a tree pattern. A tag can have any of the\r\n * following forms.\r\n *\r\n * * `expr`: An unlabeled placeholder for a parser rule `expr`.\r\n * * `ID`: An unlabeled placeholder for a token of type `ID`.\r\n * * `e:expr`: A labeled placeholder for a parser rule `expr`.\r\n * * `id:ID`: A labeled placeholder for a token of type `ID`.\r\n *\r\n * This class does not perform any validation on the tag or label names aside\r\n * from ensuring that the tag is a defined, non-empty string.\r\n */\r\nexport class TagChunk extends Chunk {\r\n\t/**\r\n\t * This is the backing field for `tag`.\r\n\t */\r\n\tprivate _tag: string;\r\n\t/**\r\n\t * This is the backing field for `label`.\r\n\t */\r\n\tprivate _label?: string;\r\n\r\n\t/**\r\n\t * Construct a new instance of {@link TagChunk} using the specified label\r\n\t * and tag.\r\n\t *\r\n\t * @param label The label for the tag. If this is `undefined`, the\r\n\t * {@link TagChunk} represents an unlabeled tag.\r\n\t * @param tag The tag, which should be the name of a parser rule or token\r\n\t * type.\r\n\t *\r\n\t * @exception IllegalArgumentException if `tag` is not defined or\r\n\t * empty.\r\n\t */\r\n\tconstructor(tag: string, label?: string) {\r\n\t\tsuper();\r\n\r\n\t\tif (tag == null || tag.length === 0) {\r\n\t\t\tthrow new Error(\"tag cannot be null or empty\");\r\n\t\t}\r\n\r\n\t\tthis._tag = tag;\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tag for this chunk.\r\n\t *\r\n\t * @returns The tag for the chunk.\r\n\t */\r\n\t@NotNull\r\n\tget tag(): string {\r\n\t\treturn this._tag;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the label, if any, assigned to this chunk.\r\n\t *\r\n\t * @returns The label assigned to this chunk, or `undefined` if no label is\r\n\t * assigned to the chunk.\r\n\t */\r\n\tget label(): string | undefined {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * This method returns a text representation of the tag chunk. Labeled tags\r\n\t * are returned in the form `label:tag`, and unlabeled tags are\r\n\t * returned as just the tag name.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (this._label != null) {\r\n\t\t\treturn this._label + \":\" + this._tag;\r\n\t\t}\r\n\r\n\t\treturn this._tag;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.2521448-07:00\r\n\r\nimport { Chunk } from \"./Chunk\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\n\r\n/**\r\n * Represents a span of raw text (concrete syntax) between tags in a tree\r\n * pattern string.\r\n */\r\nexport class TextChunk extends Chunk {\r\n\t/**\r\n\t * This is the backing field for {@link #getText}.\r\n\t */\r\n\t@NotNull\r\n\tprivate _text: string;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link TextChunk} with the specified text.\r\n\t *\r\n\t * @param text The text of this chunk.\r\n\t * @exception IllegalArgumentException if `text` is not defined.\r\n\t */\r\n\tconstructor(@NotNull text: string) {\r\n\t\tsuper();\r\n\r\n\t\tif (text == null) {\r\n\t\t\tthrow new Error(\"text cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._text = text;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the raw text of this chunk.\r\n\t *\r\n\t * @returns The text of the chunk.\r\n\t */\r\n\t@NotNull\r\n\tget text(): string {\r\n\t\treturn this._text;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link TextChunk} returns the result of\r\n\t * `text` in single quotes.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"'\" + this._text + \"'\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.3281988-07:00\r\n\r\nimport { CommonToken } from \"../../CommonToken\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\n\r\n/**\r\n * A {@link Token} object representing a token of a particular type; e.g.,\r\n * ``. These tokens are created for {@link TagChunk} chunks where the\r\n * tag corresponds to a lexer rule or token type.\r\n */\r\nexport class TokenTagToken extends CommonToken {\r\n\t/**\r\n\t * This is the backing field for `tokenName`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _tokenName: string;\r\n\t/**\r\n\t * This is the backing field for `label`.\r\n\t */\r\n\tprivate _label: string | undefined;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link TokenTagToken} with the specified\r\n\t * token name, type, and label.\r\n\t *\r\n\t * @param tokenName The token name.\r\n\t * @param type The token type.\r\n\t * @param label The label associated with the token tag, or `undefined` if\r\n\t * the token tag is unlabeled.\r\n\t */\r\n\tconstructor(@NotNull tokenName: string, type: number, label?: string) {\r\n\t\tsuper(type);\r\n\t\tthis._tokenName = tokenName;\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the token name.\r\n\t * @returns The token name.\r\n\t */\r\n\t@NotNull\r\n\tget tokenName(): string {\r\n\t\treturn this._tokenName;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the label associated with the rule tag.\r\n\t *\r\n\t * @returns The name of the label associated with the rule tag, or\r\n\t * `undefined` if this is an unlabeled rule tag.\r\n\t */\r\n\tget label(): string | undefined {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link TokenTagToken} returns the token tag\r\n\t * formatted with `<` and `>` delimiters.\r\n\t */\r\n\t@Override\r\n\tget text(): string {\r\n\t\tif (this._label != null) {\r\n\t\t\treturn \"<\" + this._label + \":\" + this._tokenName + \">\";\r\n\t\t}\r\n\r\n\t\treturn \"<\" + this._tokenName + \">\";\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link TokenTagToken} returns a string of the form\r\n\t * `tokenName:type`.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this._tokenName + \":\" + this.type;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSTION complete, Burt Harris 10/14/2016\r\n\r\nimport { BailErrorStrategy } from \"../../BailErrorStrategy\";\r\nimport { CharStreams } from \"../../CharStreams\";\r\nimport { Chunk } from \"./Chunk\";\r\nimport { CommonTokenStream } from \"../../CommonTokenStream\";\r\nimport { Lexer } from \"../../Lexer\";\r\nimport { ListTokenSource } from \"../../ListTokenSource\";\r\nimport { MultiMap } from \"../../misc/MultiMap\";\r\nimport { NotNull } from \"../../Decorators\";\r\nimport { ParseCancellationException } from \"../../misc/ParseCancellationException\";\r\nimport { Parser } from \"../../Parser\";\r\nimport { ParserInterpreter } from \"../../ParserInterpreter\";\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { ParseTreeMatch } from \"./ParseTreeMatch\";\r\nimport { ParseTreePattern } from \"./ParseTreePattern\";\r\nimport { RecognitionException } from \"../../RecognitionException\";\r\nimport { RuleNode } from \"../RuleNode\";\r\nimport { RuleTagToken } from \"./RuleTagToken\";\r\nimport { TagChunk } from \"./TagChunk\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { TextChunk } from \"./TextChunk\";\r\nimport { Token } from \"../../Token\";\r\nimport { TokenTagToken } from \"./TokenTagToken\";\r\n\r\n/**\r\n * A tree pattern matching mechanism for ANTLR {@link ParseTree}s.\r\n *\r\n * Patterns are strings of source input text with special tags representing\r\n * token or rule references such as:\r\n *\r\n * ```\r\n * = ;\r\n * ```\r\n *\r\n * Given a pattern start rule such as `statement`, this object constructs\r\n * a {@link ParseTree} with placeholders for the `ID` and `expr`\r\n * subtree. Then the {@link #match} routines can compare an actual\r\n * {@link ParseTree} from a parse with this pattern. Tag `` matches\r\n * any `ID` token and tag `` references the result of the\r\n * `expr` rule (generally an instance of `ExprContext`.\r\n *\r\n * Pattern `x = 0;` is a similar pattern that matches the same pattern\r\n * except that it requires the identifier to be `x` and the expression to\r\n * be `0`.\r\n *\r\n * The {@link #matches} routines return `true` or `false` based\r\n * upon a match for the tree rooted at the parameter sent in. The\r\n * {@link #match} routines return a {@link ParseTreeMatch} object that\r\n * contains the parse tree, the parse tree pattern, and a map from tag name to\r\n * matched nodes (more below). A subtree that fails to match, returns with\r\n * {@link ParseTreeMatch#mismatchedNode} set to the first tree node that did not\r\n * match.\r\n *\r\n * For efficiency, you can compile a tree pattern in string form to a\r\n * {@link ParseTreePattern} object.\r\n *\r\n * See `TestParseTreeMatcher` for lots of examples.\r\n * {@link ParseTreePattern} has two static helper methods:\r\n * {@link ParseTreePattern#findAll} and {@link ParseTreePattern#match} that\r\n * are easy to use but not super efficient because they create new\r\n * {@link ParseTreePatternMatcher} objects each time and have to compile the\r\n * pattern in string form before using it.\r\n *\r\n * The lexer and parser that you pass into the {@link ParseTreePatternMatcher}\r\n * constructor are used to parse the pattern in string form. The lexer converts\r\n * the ` = ;` into a sequence of four tokens (assuming lexer\r\n * throws out whitespace or puts it on a hidden channel). Be aware that the\r\n * input stream is reset for the lexer (but not the parser; a\r\n * {@link ParserInterpreter} is created to parse the input.). Any user-defined\r\n * fields you have put into the lexer might get changed when this mechanism asks\r\n * it to scan the pattern string.\r\n *\r\n * Normally a parser does not accept token `` as a valid\r\n * `expr` but, from the parser passed in, we create a special version of\r\n * the underlying grammar representation (an {@link ATN}) that allows imaginary\r\n * tokens representing rules (``) to match entire rules. We call\r\n * these *bypass alternatives*.\r\n *\r\n * Delimiters are `<`} and `>`}, with `\\` as the escape string\r\n * by default, but you can set them to whatever you want using\r\n * {@link #setDelimiters}. You must escape both start and stop strings\r\n * `\\<` and `\\>`.\r\n */\r\nexport class ParseTreePatternMatcher {\r\n\t/**\r\n\t * This is the backing field for `lexer`.\r\n\t */\r\n\tprivate _lexer: Lexer;\r\n\r\n\t/**\r\n\t * This is the backing field for `parser`.\r\n\t */\r\n\tprivate _parser: Parser;\r\n\r\n\tprotected start = \"<\";\r\n\tprotected stop = \">\";\r\n\tprotected escape = \"\\\\\"; // e.g., \\< and \\> must escape BOTH!\r\n\r\n\t/**\r\n\t * Regular expression corresponding to escape, for global replace\r\n\t */\r\n\tprotected escapeRE = /\\\\/g;\r\n\r\n\t/**\r\n\t * Constructs a {@link ParseTreePatternMatcher} or from a {@link Lexer} and\r\n\t * {@link Parser} object. The lexer input stream is altered for tokenizing\r\n\t * the tree patterns. The parser is used as a convenient mechanism to get\r\n\t * the grammar name, plus token, rule names.\r\n\t */\r\n\tconstructor(lexer: Lexer, parser: Parser) {\r\n\t\tthis._lexer = lexer;\r\n\t\tthis._parser = parser;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the delimiters used for marking rule and token tags within concrete\r\n\t * syntax used by the tree pattern parser.\r\n\t *\r\n\t * @param start The start delimiter.\r\n\t * @param stop The stop delimiter.\r\n\t * @param escapeLeft The escape sequence to use for escaping a start or stop delimiter.\r\n\t *\r\n\t * @throws {@link Error} if `start` is not defined or empty.\r\n\t * @throws {@link Error} if `stop` is not defined or empty.\r\n\t */\r\n\tpublic setDelimiters(start: string, stop: string, escapeLeft: string): void {\r\n\t\tif (!start) {\r\n\t\t\tthrow new Error(\"start cannot be null or empty\");\r\n\t\t}\r\n\r\n\t\tif (!stop) {\r\n\t\t\tthrow new Error(\"stop cannot be null or empty\");\r\n\t\t}\r\n\r\n\t\tthis.start = start;\r\n\t\tthis.stop = stop;\r\n\t\tthis.escape = escapeLeft;\r\n\t\tthis.escapeRE = new RegExp(escapeLeft.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"), \"g\");\r\n\t}\r\n\r\n\t/** Does `pattern` matched as rule `patternRuleIndex` match `tree`? */\r\n\tpublic matches(tree: ParseTree, pattern: string, patternRuleIndex: number): boolean;\r\n\r\n\t/** Does `pattern` matched as rule patternRuleIndex match tree? Pass in a\r\n\t * compiled pattern instead of a string representation of a tree pattern.\r\n\t */\r\n\tpublic matches(tree: ParseTree, pattern: ParseTreePattern): boolean;\r\n\r\n\tpublic matches(tree: ParseTree, pattern: string | ParseTreePattern, patternRuleIndex: number = 0): boolean {\r\n\t\tif (typeof pattern === \"string\") {\r\n\t\t\tlet p: ParseTreePattern = this.compile(pattern, patternRuleIndex);\r\n\t\t\treturn this.matches(tree, p);\r\n\t\t} else {\r\n\t\t\tlet labels = new MultiMap();\r\n\t\t\tlet mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels);\r\n\t\t\treturn !mismatchedNode;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Compare `pattern` matched as rule `patternRuleIndex` against\r\n\t * `tree` and return a {@link ParseTreeMatch} object that contains the\r\n\t * matched elements, or the node at which the match failed.\r\n\t */\r\n\tpublic match(tree: ParseTree, pattern: string, patternRuleIndex: number): ParseTreeMatch;\r\n\r\n\t/**\r\n\t * Compare `pattern` matched against `tree` and return a\r\n\t * {@link ParseTreeMatch} object that contains the matched elements, or the\r\n\t * node at which the match failed. Pass in a compiled pattern instead of a\r\n\t * string representation of a tree pattern.\r\n\t */\r\n\tpublic match(tree: ParseTree, pattern: ParseTreePattern): ParseTreeMatch;\r\n\r\n\t// Implementation of match\r\n\t@NotNull\r\n\tpublic match(tree: ParseTree, @NotNull pattern: string | ParseTreePattern, patternRuleIndex: number = 0): ParseTreeMatch {\r\n\t\tif (typeof pattern === \"string\") {\r\n\t\t\tlet p: ParseTreePattern = this.compile(pattern, patternRuleIndex);\r\n\t\t\treturn this.match(tree, p);\r\n\t\t} else {\r\n\t\t\tlet labels = new MultiMap();\r\n\t\t\tlet mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels);\r\n\t\t\treturn new ParseTreeMatch(tree, pattern, labels, mismatchedNode);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * For repeated use of a tree pattern, compile it to a\r\n\t * {@link ParseTreePattern} using this method.\r\n\t */\r\n\tpublic compile(pattern: string, patternRuleIndex: number): ParseTreePattern {\r\n\t\tlet tokenList = this.tokenize(pattern);\r\n\t\tlet tokenSrc = new ListTokenSource(tokenList);\r\n\t\tlet tokens = new CommonTokenStream(tokenSrc);\r\n\t\tconst parser = this._parser;\r\n\r\n\t\tlet parserInterp = new ParserInterpreter(\r\n\t\t\tparser.grammarFileName,\r\n\t\t\tparser.vocabulary,\r\n\t\t\tparser.ruleNames,\r\n\t\t\tparser.getATNWithBypassAlts(),\r\n\t\t\ttokens);\r\n\r\n\t\tlet tree: ParseTree;\r\n\t\ttry {\r\n\t\t\tparserInterp.errorHandler = new BailErrorStrategy();\r\n\t\t\ttree = parserInterp.parse(patternRuleIndex);\r\n//\t\t\tSystem.out.println(\"pattern tree = \"+tree.toStringTree(parserInterp));\r\n\t\t} catch (e) {\r\n\t\t\tif (e instanceof ParseCancellationException) {\r\n\t\t\t\tthrow e.getCause();\r\n\t\t\t} else if (e instanceof RecognitionException) {\r\n\t\t\t\tthrow e;\r\n\t\t\t} else if (e instanceof Error) {\r\n\t\t\t\tthrow new ParseTreePatternMatcher.CannotInvokeStartRule(e);\r\n\t\t\t} else {\r\n\t\t\t\tthrow e;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Make sure tree pattern compilation checks for a complete parse\r\n\t\tif (tokens.LA(1) !== Token.EOF) {\r\n\t\t\tthrow new ParseTreePatternMatcher.StartRuleDoesNotConsumeFullPattern();\r\n\t\t}\r\n\r\n\t\treturn new ParseTreePattern(this, pattern, patternRuleIndex, tree);\r\n\t}\r\n\r\n\t/**\r\n\t * Used to convert the tree pattern string into a series of tokens. The\r\n\t * input stream is reset.\r\n\t */\r\n\t@NotNull\r\n\tget lexer(): Lexer {\r\n\t\treturn this._lexer;\r\n\t}\r\n\r\n\t/**\r\n\t * Used to collect to the grammar file name, token names, rule names for\r\n\t * used to parse the pattern into a parse tree.\r\n\t */\r\n\t@NotNull\r\n\tget parser(): Parser {\r\n\t\treturn this._parser;\r\n\t}\r\n\r\n\t// ---- SUPPORT CODE ----\r\n\r\n\t/**\r\n\t * Recursively walk `tree` against `patternTree`, filling\r\n\t * `match.`{@link ParseTreeMatch#labels labels}.\r\n\t *\r\n\t * @returns the first node encountered in `tree` which does not match\r\n\t * a corresponding node in `patternTree`, or `undefined` if the match\r\n\t * was successful. The specific node returned depends on the matching\r\n\t * algorithm used by the implementation, and may be overridden.\r\n\t */\r\n\tprotected matchImpl(\r\n\t\t@NotNull tree: ParseTree,\r\n\t\t@NotNull patternTree: ParseTree,\r\n\t\t@NotNull labels: MultiMap): ParseTree | undefined {\r\n\t\tif (!tree) {\r\n\t\t\tthrow new TypeError(\"tree cannot be null\");\r\n\t\t}\r\n\r\n\t\tif (!patternTree) {\r\n\t\t\tthrow new TypeError(\"patternTree cannot be null\");\r\n\t\t}\r\n\r\n\t\t// x and , x and y, or x and x; or could be mismatched types\r\n\t\tif (tree instanceof TerminalNode && patternTree instanceof TerminalNode) {\r\n\t\t\tlet mismatchedNode: ParseTree | undefined;\r\n\t\t\t// both are tokens and they have same type\r\n\t\t\tif (tree.symbol.type === patternTree.symbol.type) {\r\n\t\t\t\tif (patternTree.symbol instanceof TokenTagToken) { // x and \r\n\t\t\t\t\tlet tokenTagToken = patternTree.symbol;\r\n\t\t\t\t\t// track label->list-of-nodes for both token name and label (if any)\r\n\t\t\t\t\tlabels.map(tokenTagToken.tokenName, tree);\r\n\t\t\t\t\tconst l = tokenTagToken.label;\r\n\t\t\t\t\tif (l) {\r\n\t\t\t\t\t\tlabels.map(l, tree);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (tree.text === patternTree.text) {\r\n\t\t\t\t\t// x and x\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// x and y\r\n\t\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn mismatchedNode;\r\n\t\t}\r\n\r\n\t\tif (tree instanceof ParserRuleContext\r\n\t\t\t&& patternTree instanceof ParserRuleContext) {\r\n\t\t\tlet mismatchedNode: ParseTree | undefined;\r\n\t\t\t// (expr ...) and \r\n\t\t\tlet ruleTagToken = this.getRuleTagToken(patternTree);\r\n\t\t\tif (ruleTagToken) {\r\n\t\t\t\tlet m: ParseTreeMatch;\r\n\t\t\t\tif (tree.ruleContext.ruleIndex === patternTree.ruleContext.ruleIndex) {\r\n\t\t\t\t\t// track label->list-of-nodes for both rule name and label (if any)\r\n\t\t\t\t\tlabels.map(ruleTagToken.ruleName, tree);\r\n\t\t\t\t\tconst l = ruleTagToken.label;\r\n\t\t\t\t\tif (l) {\r\n\t\t\t\t\t\tlabels.map(l, tree);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn mismatchedNode;\r\n\t\t\t}\r\n\r\n\t\t\t// (expr ...) and (expr ...)\r\n\t\t\tif (tree.childCount !== patternTree.childCount) {\r\n\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn mismatchedNode;\r\n\t\t\t}\r\n\r\n\t\t\tlet n: number = tree.childCount;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet childMatch = this.matchImpl(tree.getChild(i), patternTree.getChild(i), labels);\r\n\t\t\t\tif (childMatch) {\r\n\t\t\t\t\treturn childMatch;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn mismatchedNode;\r\n\t\t}\r\n\r\n\t\t// if nodes aren't both tokens or both rule nodes, can't match\r\n\t\treturn tree;\r\n\t}\r\n\r\n\t/** Is `t` `(expr )` subtree? */\r\n\tprotected getRuleTagToken(t: ParseTree): RuleTagToken | undefined {\r\n\t\tif (t instanceof RuleNode) {\r\n\t\t\tif (t.childCount === 1 && t.getChild(0) instanceof TerminalNode) {\r\n\t\t\t\tlet c = t.getChild(0) as TerminalNode;\r\n\t\t\t\tif (c.symbol instanceof RuleTagToken) {\r\n//\t\t\t\t\tSystem.out.println(\"rule tag subtree \"+t.toStringTree(parser));\r\n\t\t\t\t\treturn c.symbol;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic tokenize(pattern: string): Token[] {\r\n\t\t// split pattern into chunks: sea (raw input) and islands (, )\r\n\t\tlet chunks = this.split(pattern);\r\n\r\n\t\t// create token stream from text and tags\r\n\t\tlet tokens: Token[] = [];\r\n\r\n\t\tfor (let chunk of chunks) {\r\n\t\t\tif (chunk instanceof TagChunk) {\r\n\t\t\t\tlet tagChunk = chunk;\r\n\t\t\t\tconst firstChar = tagChunk.tag.substr(0, 1);\r\n\t\t\t\t// add special rule token or conjure up new token from name\r\n\t\t\t\tif (firstChar === firstChar.toUpperCase()) {\r\n\t\t\t\t\tlet ttype: number = this._parser.getTokenType(tagChunk.tag);\r\n\t\t\t\t\tif (ttype === Token.INVALID_TYPE) {\r\n\t\t\t\t\t\tthrow new Error(\"Unknown token \" + tagChunk.tag + \" in pattern: \" + pattern);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet t: TokenTagToken = new TokenTagToken(tagChunk.tag, ttype, tagChunk.label);\r\n\t\t\t\t\ttokens.push(t);\r\n\t\t\t\t}\r\n\t\t\t\telse if (firstChar === firstChar.toLowerCase()) {\r\n\t\t\t\t\tlet ruleIndex: number = this._parser.getRuleIndex(tagChunk.tag);\r\n\t\t\t\t\tif (ruleIndex === -1) {\r\n\t\t\t\t\t\tthrow new Error(\"Unknown rule \" + tagChunk.tag + \" in pattern: \" + pattern);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet ruleImaginaryTokenType: number = this._parser.getATNWithBypassAlts().ruleToTokenType[ruleIndex];\r\n\t\t\t\t\ttokens.push(new RuleTagToken(tagChunk.tag, ruleImaginaryTokenType, tagChunk.label));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthrow new Error(\"invalid tag: \" + tagChunk.tag + \" in pattern: \" + pattern);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlet textChunk = chunk as TextChunk;\r\n\t\t\t\tthis._lexer.inputStream = CharStreams.fromString(textChunk.text);\r\n\t\t\t\tlet t: Token = this._lexer.nextToken();\r\n\t\t\t\twhile (t.type !== Token.EOF) {\r\n\t\t\t\t\ttokens.push(t);\r\n\t\t\t\t\tt = this._lexer.nextToken();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t\tSystem.out.println(\"tokens=\"+tokens);\r\n\t\treturn tokens;\r\n\t}\r\n\r\n\t/** Split ` = ;` into 4 chunks for tokenizing by {@link #tokenize}. */\r\n\tpublic split(pattern: string): Chunk[] {\r\n\t\tlet p: number = 0;\r\n\t\tlet n: number = pattern.length;\r\n\t\tlet chunks: Chunk[] = [];\r\n\t\tlet buf: \"\";\r\n\t\t// find all start and stop indexes first, then collect\r\n\t\tlet starts: number[] = [];\r\n\t\tlet stops: number[] = [];\r\n\t\twhile (p < n) {\r\n\t\t\tif (p === pattern.indexOf(this.escape + this.start, p)) {\r\n\t\t\t\tp += this.escape.length + this.start.length;\r\n\t\t\t}\r\n\t\t\telse if (p === pattern.indexOf(this.escape + this.stop, p)) {\r\n\t\t\t\tp += this.escape.length + this.stop.length;\r\n\t\t\t}\r\n\t\t\telse if (p === pattern.indexOf(this.start, p)) {\r\n\t\t\t\tstarts.push(p);\r\n\t\t\t\tp += this.start.length;\r\n\t\t\t}\r\n\t\t\telse if (p === pattern.indexOf(this.stop, p)) {\r\n\t\t\t\tstops.push(p);\r\n\t\t\t\tp += this.stop.length;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tp++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t\tSystem.out.println(\"\");\r\n//\t\tSystem.out.println(starts);\r\n//\t\tSystem.out.println(stops);\r\n\t\tif (starts.length > stops.length) {\r\n\t\t\tthrow new Error(\"unterminated tag in pattern: \" + pattern);\r\n\t\t}\r\n\r\n\t\tif (starts.length < stops.length) {\r\n\t\t\tthrow new Error(\"missing start tag in pattern: \" + pattern);\r\n\t\t}\r\n\r\n\t\tlet ntags: number = starts.length;\r\n\t\tfor (let i = 0; i < ntags; i++) {\r\n\t\t\tif (starts[i] >= stops[i]) {\r\n\t\t\t\tthrow new Error(\"tag delimiters out of order in pattern: \" + pattern);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// collect into chunks now\r\n\t\tif (ntags === 0) {\r\n\t\t\tlet text: string = pattern.substring(0, n);\r\n\t\t\tchunks.push(new TextChunk(text));\r\n\t\t}\r\n\r\n\t\tif (ntags > 0 && starts[0] > 0) { // copy text up to first tag into chunks\r\n\t\t\tlet text: string = pattern.substring(0, starts[0]);\r\n\t\t\tchunks.push(new TextChunk(text));\r\n\t\t}\r\n\t\tfor (let i = 0; i < ntags; i++) {\r\n\t\t\t// copy inside of \r\n\t\t\tlet tag: string = pattern.substring(starts[i] + this.start.length, stops[i]);\r\n\t\t\tlet ruleOrToken: string = tag;\r\n\t\t\tlet label: string | undefined;\r\n\t\t\tlet colon: number = tag.indexOf(\":\");\r\n\t\t\tif (colon >= 0) {\r\n\t\t\t\tlabel = tag.substring(0, colon);\r\n\t\t\t\truleOrToken = tag.substring(colon + 1, tag.length);\r\n\t\t\t}\r\n\t\t\tchunks.push(new TagChunk(ruleOrToken, label));\r\n\t\t\tif (i + 1 < ntags) {\r\n\t\t\t\t// copy from end of to start of next\r\n\t\t\t\tlet text: string = pattern.substring(stops[i] + this.stop.length, starts[i + 1]);\r\n\t\t\t\tchunks.push(new TextChunk(text));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (ntags > 0) {\r\n\t\t\tlet afterLastTag: number = stops[ntags - 1] + this.stop.length;\r\n\t\t\tif (afterLastTag < n) { // copy text from end of last tag to end\r\n\t\t\t\tlet text: string = pattern.substring(afterLastTag, n);\r\n\t\t\t\tchunks.push(new TextChunk(text));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// strip out the escape sequences from text chunks but not tags\r\n\t\tfor (let i = 0; i < chunks.length; i++) {\r\n\t\t\tlet c: Chunk = chunks[i];\r\n\t\t\tif (c instanceof TextChunk) {\r\n\t\t\t\tlet unescaped: string = c.text.replace(this.escapeRE, \"\");\r\n\t\t\t\tif (unescaped.length < c.text.length) {\r\n\t\t\t\t\tchunks[i] = new TextChunk(unescaped);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn chunks;\r\n\t}\r\n}\r\n\r\nexport namespace ParseTreePatternMatcher {\r\n\texport class CannotInvokeStartRule extends Error {\r\n\t\tpublic constructor(public error: Error) {\r\n\t\t\tsuper(`CannotInvokeStartRule: ${error}`);\r\n\t\t}\r\n\t}\r\n\r\n\t// Fixes https://github.com/antlr/antlr4/issues/413\r\n\t// \"Tree pattern compilation doesn't check for a complete parse\"\r\n\texport class StartRuleDoesNotConsumeFullPattern extends Error {\r\n\t\tconstructor() {\r\n\t\t\tsuper(\"StartRuleDoesNotConsumeFullPattern\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.2401032-07:00\r\n\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This is the base class for gathering detailed information about prediction\r\n * events which occur during parsing.\r\n *\r\n * Note that we could record the parser call stack at the time this event\r\n * occurred but in the presence of left recursive rules, the stack is kind of\r\n * meaningless. It's better to look at the individual configurations for their\r\n * individual stacks. Of course that is a {@link PredictionContext} object\r\n * not a parse tree node and so it does not have information about the extent\r\n * (start...stop) of the various subtrees. Examining the stack tops of all\r\n * configurations provide the return states for the rule invocations.\r\n * From there you can get the enclosing rule.\r\n *\r\n * @since 4.3\r\n */\r\nexport class DecisionEventInfo {\r\n\t/**\r\n\t * The invoked decision number which this event is related to.\r\n\t *\r\n\t * @see ATN#decisionToState\r\n\t */\r\n\tpublic decision: number;\r\n\r\n\t/**\r\n\t * The simulator state containing additional information relevant to the\r\n\t * prediction state when the current event occurred, or `undefined` if no\r\n\t * additional information is relevant or available.\r\n\t */\r\n\tpublic state: SimulatorState | undefined;\r\n\r\n\t/**\r\n\t * The input token stream which is being parsed.\r\n\t */\r\n\t@NotNull\r\n\tpublic input: TokenStream;\r\n\r\n\t/**\r\n\t * The token index in the input stream at which the current prediction was\r\n\t * originally invoked.\r\n\t */\r\n\tpublic startIndex: number;\r\n\r\n\t/**\r\n\t * The token index in the input stream at which the current event occurred.\r\n\t */\r\n\tpublic stopIndex: number;\r\n\r\n\t/**\r\n\t * `true` if the current event occurred during LL prediction;\r\n\t * otherwise, `false` if the input occurred during SLL prediction.\r\n\t */\r\n\tpublic fullCtx: boolean;\r\n\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\tstate: SimulatorState | undefined,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tfullCtx: boolean) {\r\n\r\n\t\tthis.decision = decision;\r\n\t\tthis.fullCtx = fullCtx;\r\n\t\tthis.stopIndex = stopIndex;\r\n\t\tthis.input = input;\r\n\t\tthis.startIndex = startIndex;\r\n\t\tthis.state = state;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:24.8229279-07:00\r\n\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for an ambiguity.\r\n * Ambiguities are decisions where a particular input resulted in an SLL\r\n * conflict, followed by LL prediction also reaching a conflict state\r\n * (indicating a true ambiguity in the grammar).\r\n *\r\n * This event may be reported during SLL prediction in cases where the\r\n * conflicting SLL configuration set provides sufficient information to\r\n * determine that the SLL conflict is truly an ambiguity. For example, if none\r\n * of the ATN configurations in the conflicting SLL configuration set have\r\n * traversed a global follow transition (i.e.\r\n * {@link ATNConfig#getReachesIntoOuterContext} is `false` for all\r\n * configurations), then the result of SLL prediction for that input is known to\r\n * be equivalent to the result of LL prediction for that input.\r\n *\r\n * In some cases, the minimum represented alternative in the conflicting LL\r\n * configuration set is not equal to the minimum represented alternative in the\r\n * conflicting SLL configuration set. Grammars and inputs which result in this\r\n * scenario are unable to use {@link PredictionMode#SLL}, which in turn means\r\n * they cannot use the two-stage parsing strategy to improve parsing performance\r\n * for that input.\r\n *\r\n * @see ParserATNSimulator#reportAmbiguity\r\n * @see ParserErrorListener#reportAmbiguity\r\n *\r\n * @since 4.3\r\n */\r\nexport class AmbiguityInfo extends DecisionEventInfo {\r\n\t/** The set of alternative numbers for this decision event that lead to a valid parse. */\r\n\t@NotNull\r\n\tprivate ambigAlts: BitSet;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link AmbiguityInfo} class with the\r\n\t * specified detailed ambiguity information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state identifying the ambiguous\r\n\t * alternatives for the current input\r\n\t * @param ambigAlts The set of alternatives in the decision that lead to a valid parse.\r\n\t * The predicted alt is the min(ambigAlts)\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the ambiguity was identified during\r\n\t * prediction\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\t@NotNull state: SimulatorState,\r\n\t\t@NotNull ambigAlts: BitSet,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number) {\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, state.useContext);\r\n\t\tthis.ambigAlts = ambigAlts;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the set of alternatives in the decision that lead to a valid parse.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\t@NotNull\r\n\tget ambiguousAlternatives(): BitSet {\r\n\t\treturn this.ambigAlts;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.1575933-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for a context sensitivity.\r\n * Context sensitivities are decisions where a particular input resulted in an\r\n * SLL conflict, but LL prediction produced a single unique alternative.\r\n *\r\n * In some cases, the unique alternative identified by LL prediction is not\r\n * equal to the minimum represented alternative in the conflicting SLL\r\n * configuration set. Grammars and inputs which result in this scenario are\r\n * unable to use {@link PredictionMode#SLL}, which in turn means they cannot use\r\n * the two-stage parsing strategy to improve parsing performance for that\r\n * input.\r\n *\r\n * @see ParserATNSimulator#reportContextSensitivity\r\n * @see ParserErrorListener#reportContextSensitivity\r\n *\r\n * @since 4.3\r\n */\r\nexport class ContextSensitivityInfo extends DecisionEventInfo {\r\n\t/**\r\n\t * Constructs a new instance of the {@link ContextSensitivityInfo} class\r\n\t * with the specified detailed context sensitivity information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state containing the unique\r\n\t * alternative identified by full-context prediction\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the context sensitivity was\r\n\t * identified during full-context prediction\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\t@NotNull state: SimulatorState,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, true);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.3330673-07:00\r\n\r\nimport { AmbiguityInfo } from \"./AmbiguityInfo\";\r\nimport { ContextSensitivityInfo } from \"./ContextSensitivityInfo\";\r\nimport { ErrorInfo } from \"./ErrorInfo\";\r\nimport { LookaheadEventInfo } from \"./LookaheadEventInfo\";\r\nimport { Override } from \"../Decorators\";\r\nimport { PredicateEvalInfo } from \"./PredicateEvalInfo\";\r\n\r\n/**\r\n * This class contains profiling gathered for a particular decision.\r\n *\r\n * Parsing performance in ANTLR 4 is heavily influenced by both static factors\r\n * (e.g. the form of the rules in the grammar) and dynamic factors (e.g. the\r\n * choice of input and the state of the DFA cache at the time profiling\r\n * operations are started). For best results, gather and use aggregate\r\n * statistics from a large sample of inputs representing the inputs expected in\r\n * production before using the results to make changes in the grammar.\r\n *\r\n * @since 4.3\r\n */\r\nexport class DecisionInfo {\r\n\t/**\r\n\t * The decision number, which is an index into {@link ATN#decisionToState}.\r\n\t */\r\n\tpublic decision: number;\r\n\r\n\t/**\r\n\t * The total number of times {@link ParserATNSimulator#adaptivePredict} was\r\n\t * invoked for this decision.\r\n\t */\r\n\tpublic invocations: number = 0;\r\n\r\n\t/**\r\n\t * The total time spent in {@link ParserATNSimulator#adaptivePredict} for\r\n\t * this decision, in nanoseconds.\r\n\t *\r\n\t * The value of this field contains the sum of differential results obtained\r\n\t * by {@link System#nanoTime()}, and is not adjusted to compensate for JIT\r\n\t * and/or garbage collection overhead. For best accuracy, use a modern JVM\r\n\t * implementation that provides precise results from\r\n\t * {@link System#nanoTime()}, and perform profiling in a separate process\r\n\t * which is warmed up by parsing the input prior to profiling. If desired,\r\n\t * call {@link ATNSimulator#clearDFA} to reset the DFA cache to its initial\r\n\t * state before starting the profiling measurement pass.\r\n\t */\r\n\tpublic timeInPrediction: number = 0;\r\n\r\n\t/**\r\n\t * The sum of the lookahead required for SLL prediction for this decision.\r\n\t * Note that SLL prediction is used before LL prediction for performance\r\n\t * reasons even when {@link PredictionMode#LL} or\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} is used.\r\n\t */\r\n\tpublic SLL_TotalLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the minimum lookahead required for any single SLL prediction to\r\n\t * complete for this decision, by reaching a unique prediction, reaching an\r\n\t * SLL conflict state, or encountering a syntax error.\r\n\t */\r\n\tpublic SLL_MinLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the maximum lookahead required for any single SLL prediction to\r\n\t * complete for this decision, by reaching a unique prediction, reaching an\r\n\t * SLL conflict state, or encountering a syntax error.\r\n\t */\r\n\tpublic SLL_MaxLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the {@link LookaheadEventInfo} associated with the event where the\r\n\t * {@link #SLL_MaxLook} value was set.\r\n\t */\r\n\tpublic SLL_MaxLookEvent?: LookaheadEventInfo;\r\n\r\n\t/**\r\n\t * The sum of the lookahead required for LL prediction for this decision.\r\n\t * Note that LL prediction is only used when SLL prediction reaches a\r\n\t * conflict state.\r\n\t */\r\n\tpublic LL_TotalLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the minimum lookahead required for any single LL prediction to\r\n\t * complete for this decision. An LL prediction completes when the algorithm\r\n\t * reaches a unique prediction, a conflict state (for\r\n\t * {@link PredictionMode#LL}, an ambiguity state (for\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error.\r\n\t */\r\n\tpublic LL_MinLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the maximum lookahead required for any single LL prediction to\r\n\t * complete for this decision. An LL prediction completes when the algorithm\r\n\t * reaches a unique prediction, a conflict state (for\r\n\t * {@link PredictionMode#LL}, an ambiguity state (for\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error.\r\n\t */\r\n\tpublic LL_MaxLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the {@link LookaheadEventInfo} associated with the event where the\r\n\t * {@link #LL_MaxLook} value was set.\r\n\t */\r\n\tpublic LL_MaxLookEvent?: LookaheadEventInfo;\r\n\r\n\t/**\r\n\t * A collection of {@link ContextSensitivityInfo} instances describing the\r\n\t * context sensitivities encountered during LL prediction for this decision.\r\n\t *\r\n\t * @see ContextSensitivityInfo\r\n\t */\r\n\tpublic contextSensitivities: ContextSensitivityInfo[] = [];\r\n\r\n\t/**\r\n\t * A collection of {@link ErrorInfo} instances describing the parse errors\r\n\t * identified during calls to {@link ParserATNSimulator#adaptivePredict} for\r\n\t * this decision.\r\n\t *\r\n\t * @see ErrorInfo\r\n\t */\r\n\tpublic errors: ErrorInfo[] = [];\r\n\r\n\t/**\r\n\t * A collection of {@link AmbiguityInfo} instances describing the\r\n\t * ambiguities encountered during LL prediction for this decision.\r\n\t *\r\n\t * @see AmbiguityInfo\r\n\t */\r\n\tpublic ambiguities: AmbiguityInfo[] = [];\r\n\r\n\t/**\r\n\t * A collection of {@link PredicateEvalInfo} instances describing the\r\n\t * results of evaluating individual predicates during prediction for this\r\n\t * decision.\r\n\t *\r\n\t * @see PredicateEvalInfo\r\n\t */\r\n\tpublic predicateEvals: PredicateEvalInfo[] = [];\r\n\r\n\t/**\r\n\t * The total number of ATN transitions required during SLL prediction for\r\n\t * this decision. An ATN transition is determined by the number of times the\r\n\t * DFA does not contain an edge that is required for prediction, resulting\r\n\t * in on-the-fly computation of that edge.\r\n\t *\r\n\t * If DFA caching of SLL transitions is employed by the implementation, ATN\r\n\t * computation may cache the computed edge for efficient lookup during\r\n\t * future parsing of this decision. Otherwise, the SLL parsing algorithm\r\n\t * will use ATN transitions exclusively.\r\n\t *\r\n\t * @see #SLL_ATNTransitions\r\n\t * @see ParserATNSimulator#computeTargetState\r\n\t * @see LexerATNSimulator#computeTargetState\r\n\t */\r\n\tpublic SLL_ATNTransitions: number = 0;\r\n\r\n\t/**\r\n\t * The total number of DFA transitions required during SLL prediction for\r\n\t * this decision.\r\n\t *\r\n\t * If the ATN simulator implementation does not use DFA caching for SLL\r\n\t * transitions, this value will be 0.\r\n\t *\r\n\t * @see ParserATNSimulator#getExistingTargetState\r\n\t * @see LexerATNSimulator#getExistingTargetState\r\n\t */\r\n\tpublic SLL_DFATransitions: number = 0;\r\n\r\n\t/**\r\n\t * Gets the total number of times SLL prediction completed in a conflict\r\n\t * state, resulting in fallback to LL prediction.\r\n\t *\r\n\t * Note that this value is not related to whether or not\r\n\t * {@link PredictionMode#SLL} may be used successfully with a particular\r\n\t * grammar. If the ambiguity resolution algorithm applied to the SLL\r\n\t * conflicts for this decision produce the same result as LL prediction for\r\n\t * this decision, {@link PredictionMode#SLL} would produce the same overall\r\n\t * parsing result as {@link PredictionMode#LL}.\r\n\t */\r\n\tpublic LL_Fallback: number = 0;\r\n\r\n\t/**\r\n\t * The total number of ATN transitions required during LL prediction for\r\n\t * this decision. An ATN transition is determined by the number of times the\r\n\t * DFA does not contain an edge that is required for prediction, resulting\r\n\t * in on-the-fly computation of that edge.\r\n\t *\r\n\t * If DFA caching of LL transitions is employed by the implementation, ATN\r\n\t * computation may cache the computed edge for efficient lookup during\r\n\t * future parsing of this decision. Otherwise, the LL parsing algorithm will\r\n\t * use ATN transitions exclusively.\r\n\t *\r\n\t * @see #LL_DFATransitions\r\n\t * @see ParserATNSimulator#computeTargetState\r\n\t * @see LexerATNSimulator#computeTargetState\r\n\t */\r\n\tpublic LL_ATNTransitions: number = 0;\r\n\r\n\t/**\r\n\t * The total number of DFA transitions required during LL prediction for\r\n\t * this decision.\r\n\t *\r\n\t * If the ATN simulator implementation does not use DFA caching for LL\r\n\t * transitions, this value will be 0.\r\n\t *\r\n\t * @see ParserATNSimulator#getExistingTargetState\r\n\t * @see LexerATNSimulator#getExistingTargetState\r\n\t */\r\n\tpublic LL_DFATransitions: number = 0;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link DecisionInfo} class to contain\r\n\t * statistics for a particular decision.\r\n\t *\r\n\t * @param decision The decision number\r\n\t */\r\n\tconstructor(decision: number) {\r\n\t\tthis.decision = decision;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"{\" +\r\n\t\t\t\"decision=\" + this.decision +\r\n\t\t\t\", contextSensitivities=\" + this.contextSensitivities.length +\r\n\t\t\t\", errors=\" + this.errors.length +\r\n\t\t\t\", ambiguities=\" + this.ambiguities.length +\r\n\t\t\t\", SLL_lookahead=\" + this.SLL_TotalLook +\r\n\t\t\t\", SLL_ATNTransitions=\" + this.SLL_ATNTransitions +\r\n\t\t\t\", SLL_DFATransitions=\" + this.SLL_DFATransitions +\r\n\t\t\t\", LL_Fallback=\" + this.LL_Fallback +\r\n\t\t\t\", LL_lookahead=\" + this.LL_TotalLook +\r\n\t\t\t\", LL_ATNTransitions=\" + this.LL_ATNTransitions +\r\n\t\t\t\"}\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.7213647-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for a syntax error\r\n * identified during prediction. Syntax errors occur when the prediction\r\n * algorithm is unable to identify an alternative which would lead to a\r\n * successful parse.\r\n *\r\n * @see Parser#notifyErrorListeners(Token, String, RecognitionException)\r\n * @see ANTLRErrorListener#syntaxError\r\n *\r\n * @since 4.3\r\n */\r\nexport class ErrorInfo extends DecisionEventInfo {\r\n\t/**\r\n\t * Constructs a new instance of the {@link ErrorInfo} class with the\r\n\t * specified detailed syntax error information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state reached during prediction\r\n\t * prior to reaching the {@link ATNSimulator#ERROR} state\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the syntax error was identified\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\t@NotNull state: SimulatorState,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, state.useContext);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.6852565-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for tracking the lookahead\r\n * depth required in order to make a prediction.\r\n *\r\n * @since 4.3\r\n */\r\nexport class LookaheadEventInfo extends DecisionEventInfo {\r\n\t/** The alternative chosen by adaptivePredict(), not necessarily\r\n\t * the outermost alt shown for a rule; left-recursive rules have\r\n\t * user-level alts that differ from the rewritten rule with a (...) block\r\n\t * and a (..)* loop.\r\n\t */\r\n\tpublic predictedAlt: number;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link LookaheadEventInfo} class with\r\n\t * the specified detailed lookahead information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state containing the necessary\r\n\t * information to determine the result of a prediction, or `undefined` if\r\n\t * the final state is not available\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the prediction was finally made\r\n\t * @param fullCtx `true` if the current lookahead is part of an LL\r\n\t * prediction; otherwise, `false` if the current lookahead is part of\r\n\t * an SLL prediction\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\tstate: SimulatorState | undefined,\r\n\t\tpredictedAlt: number,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tfullCtx: boolean) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, fullCtx);\r\n\t\tthis.predictedAlt = predictedAlt;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.1914305-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for semantic predicate\r\n * evaluations which occur during prediction.\r\n *\r\n * @see ParserATNSimulator#evalSemanticContext\r\n *\r\n * @since 4.3\r\n */\r\nexport class PredicateEvalInfo extends DecisionEventInfo {\r\n\t/**\r\n\t * The semantic context which was evaluated.\r\n\t */\r\n\tpublic semctx: SemanticContext;\r\n\t/**\r\n\t * The alternative number for the decision which is guarded by the semantic\r\n\t * context {@link #semctx}. Note that other ATN\r\n\t * configurations may predict the same alternative which are guarded by\r\n\t * other semantic contexts and/or {@link SemanticContext#NONE}.\r\n\t */\r\n\tpublic predictedAlt: number;\r\n\t/**\r\n\t * The result of evaluating the semantic context {@link #semctx}.\r\n\t */\r\n\tpublic evalResult: boolean;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link PredicateEvalInfo} class with the\r\n\t * specified detailed predicate evaluation information.\r\n\t *\r\n\t * @param state The simulator state\r\n\t * @param decision The decision number\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the predicate evaluation was\r\n\t * triggered. Note that the input stream may be reset to other positions for\r\n\t * the actual evaluation of individual predicates.\r\n\t * @param semctx The semantic context which was evaluated\r\n\t * @param evalResult The results of evaluating the semantic context\r\n\t * @param predictedAlt The alternative number for the decision which is\r\n\t * guarded by the semantic context `semctx`. See {@link #predictedAlt}\r\n\t * for more information.\r\n\t *\r\n\t * @see ParserATNSimulator#evalSemanticContext(SemanticContext, ParserRuleContext, int)\r\n\t * @see SemanticContext#eval(Recognizer, RuleContext)\r\n\t */\r\n\tconstructor(\r\n\t\t@NotNull state: SimulatorState,\r\n\t\tdecision: number,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\t@NotNull semctx: SemanticContext,\r\n\t\tevalResult: boolean,\r\n\t\tpredictedAlt: number) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, state.useContext);\r\n\t\tthis.semctx = semctx;\r\n\t\tthis.evalResult = evalResult;\r\n\t\tthis.predictedAlt = predictedAlt;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.4188352-07:00\r\n\r\nimport { AmbiguityInfo } from \"./AmbiguityInfo\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { ContextSensitivityInfo } from \"./ContextSensitivityInfo\";\r\nimport { DecisionInfo } from \"./DecisionInfo\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { ErrorInfo } from \"./ErrorInfo\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { LookaheadEventInfo } from \"./LookaheadEventInfo\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParserATNSimulator } from \"./ParserATNSimulator\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\nimport { PredicateEvalInfo } from \"./PredicateEvalInfo\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * @since 4.3\r\n */\r\nexport class ProfilingATNSimulator extends ParserATNSimulator {\r\n\tprotected decisions: DecisionInfo[];\r\n\tprotected numDecisions: number;\r\n\r\n\tprotected _input: TokenStream | undefined;\r\n\tprotected _startIndex: number = 0;\r\n\tprotected _sllStopIndex: number = 0;\r\n\tprotected _llStopIndex: number = 0;\r\n\r\n\tprotected currentDecision: number = 0;\r\n\tprotected currentState: SimulatorState | undefined;\r\n\r\n\t/** At the point of LL failover, we record how SLL would resolve the conflict so that\r\n\t * we can determine whether or not a decision / input pair is context-sensitive.\r\n\t * If LL gives a different result than SLL's predicted alternative, we have a\r\n\t * context sensitivity for sure. The converse is not necessarily true, however.\r\n\t * It's possible that after conflict resolution chooses minimum alternatives,\r\n\t * SLL could get the same answer as LL. Regardless of whether or not the result indicates\r\n\t * an ambiguity, it is not treated as a context sensitivity because LL prediction\r\n\t * was not required in order to produce a correct prediction for this decision and input sequence.\r\n\t * It may in fact still be a context sensitivity but we don't know by looking at the\r\n\t * minimum alternatives for the current input.\r\n\t */\r\n\tprotected conflictingAltResolvedBySLL: number = 0;\r\n\r\n\tconstructor(parser: Parser) {\r\n\t\tsuper(parser.interpreter.atn, parser);\r\n\t\tthis.optimize_ll1 = false;\r\n\t\tthis.reportAmbiguities = true;\r\n\t\tthis.numDecisions = this.atn.decisionToState.length;\r\n\t\tthis.decisions = [];\r\n\t\tfor (let i = 0; i < this.numDecisions; i++) {\r\n\t\t\tthis.decisions.push(new DecisionInfo(i));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined): number;\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext: boolean): number;\r\n\t@Override\r\n\tpublic adaptivePredict(\r\n\t\t@NotNull input: TokenStream,\r\n\t\tdecision: number,\r\n\t\touterContext: ParserRuleContext | undefined,\r\n\t\tuseContext?: boolean): number {\r\n\t\tif (useContext !== undefined) {\r\n\t\t\treturn super.adaptivePredict(input, decision, outerContext, useContext);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tthis._input = input;\r\n\t\t\tthis._startIndex = input.index;\r\n\t\t\t// it's possible for SLL to reach a conflict state without consuming any input\r\n\t\t\tthis._sllStopIndex = this._startIndex - 1;\r\n\t\t\tthis._llStopIndex = -1;\r\n\t\t\tthis.currentDecision = decision;\r\n\t\t\tthis.currentState = undefined;\r\n\t\t\tthis.conflictingAltResolvedBySLL = ATN.INVALID_ALT_NUMBER;\r\n\t\t\tlet start: number[] = process.hrtime();\r\n\t\t\tlet alt: number = super.adaptivePredict(input, decision, outerContext);\r\n\t\t\tlet stop: number[] = process.hrtime();\r\n\r\n\t\t\tlet nanoseconds: number = (stop[0] - start[0]) * 1000000000;\r\n\t\t\tif (nanoseconds === 0) {\r\n\t\t\t\tnanoseconds = stop[1] - start[1];\r\n\t\t\t} else {\r\n\t\t\t\t// Add nanoseconds from start to end of that second, plus start of the end second to end\r\n\t\t\t\tnanoseconds += (1000000000 - start[1]) + stop[1];\r\n\t\t\t}\r\n\r\n\t\t\tthis.decisions[decision].timeInPrediction += nanoseconds;\r\n\t\t\tthis.decisions[decision].invocations++;\r\n\r\n\t\t\tlet SLL_k: number = this._sllStopIndex - this._startIndex + 1;\r\n\t\t\tthis.decisions[decision].SLL_TotalLook += SLL_k;\r\n\t\t\tthis.decisions[decision].SLL_MinLook = this.decisions[decision].SLL_MinLook === 0 ? SLL_k : Math.min(this.decisions[decision].SLL_MinLook, SLL_k);\r\n\t\t\tif (SLL_k > this.decisions[decision].SLL_MaxLook) {\r\n\t\t\t\tthis.decisions[decision].SLL_MaxLook = SLL_k;\r\n\t\t\t\tthis.decisions[decision].SLL_MaxLookEvent =\r\n\t\t\t\t\tnew LookaheadEventInfo(decision, undefined, alt, input, this._startIndex, this._sllStopIndex, false);\r\n\t\t\t}\r\n\r\n\t\t\tif (this._llStopIndex >= 0) {\r\n\t\t\t\tlet LL_k: number = this._llStopIndex - this._startIndex + 1;\r\n\t\t\t\tthis.decisions[decision].LL_TotalLook += LL_k;\r\n\t\t\t\tthis.decisions[decision].LL_MinLook = this.decisions[decision].LL_MinLook === 0 ? LL_k : Math.min(this.decisions[decision].LL_MinLook, LL_k);\r\n\t\t\t\tif (LL_k > this.decisions[decision].LL_MaxLook) {\r\n\t\t\t\t\tthis.decisions[decision].LL_MaxLook = LL_k;\r\n\t\t\t\t\tthis.decisions[decision].LL_MaxLookEvent =\r\n\t\t\t\t\t\tnew LookaheadEventInfo(decision, undefined, alt, input, this._startIndex, this._llStopIndex, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn alt;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tthis._input = undefined;\r\n\t\t\tthis.currentDecision = -1;\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tprotected getStartState(dfa: DFA, input: TokenStream, outerContext: ParserRuleContext, useContext: boolean): SimulatorState | undefined {\r\n\t\tlet state: SimulatorState | undefined = super.getStartState(dfa, input, outerContext, useContext);\r\n\t\tthis.currentState = state;\r\n\t\treturn state;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected computeStartState(dfa: DFA, globalContext: ParserRuleContext, useContext: boolean): SimulatorState {\r\n\t\tlet state: SimulatorState = super.computeStartState(dfa, globalContext, useContext);\r\n\t\tthis.currentState = state;\r\n\t\treturn state;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected computeReachSet(dfa: DFA, previous: SimulatorState, t: number, contextCache: PredictionContextCache): SimulatorState | undefined {\r\n\t\tif (this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tlet reachState: SimulatorState | undefined = super.computeReachSet(dfa, previous, t, contextCache);\r\n\t\tif (reachState == null) {\r\n\t\t\t// no reach on current lookahead symbol. ERROR.\r\n\t\t\tthis.decisions[this.currentDecision].errors.push(\r\n\t\t\t\tnew ErrorInfo(this.currentDecision, previous, this._input, this._startIndex, this._input.index),\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tthis.currentState = reachState;\r\n\t\treturn reachState;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected getExistingTargetState(previousD: DFAState, t: number): DFAState | undefined {\r\n\t\tif (this.currentState === undefined || this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\t// this method is called after each time the input position advances\r\n\t\tif (this.currentState.useContext) {\r\n\t\t\tthis._llStopIndex = this._input.index;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._sllStopIndex = this._input.index;\r\n\t\t}\r\n\r\n\t\tlet existingTargetState: DFAState | undefined = super.getExistingTargetState(previousD, t);\r\n\t\tif (existingTargetState != null) {\r\n\t\t\t// this method is directly called by execDFA; must construct a SimulatorState\r\n\t\t\t// to represent the current state for this case\r\n\t\t\tthis.currentState = new SimulatorState(this.currentState.outerContext, existingTargetState, this.currentState.useContext, this.currentState.remainingOuterContext);\r\n\r\n\t\t\tif (this.currentState.useContext) {\r\n\t\t\t\tthis.decisions[this.currentDecision].LL_DFATransitions++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.decisions[this.currentDecision].SLL_DFATransitions++; // count only if we transition over a DFA state\r\n\t\t\t}\r\n\r\n\t\t\tif (existingTargetState === ATNSimulator.ERROR) {\r\n\t\t\t\tlet state: SimulatorState = new SimulatorState(this.currentState.outerContext, previousD, this.currentState.useContext, this.currentState.remainingOuterContext);\r\n\t\t\t\tthis.decisions[this.currentDecision].errors.push(\r\n\t\t\t\t\tnew ErrorInfo(this.currentDecision, state, this._input, this._startIndex, this._input.index),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn existingTargetState;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected computeTargetState(dfa: DFA, s: DFAState, remainingGlobalContext: ParserRuleContext, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] {\r\n\t\tlet targetState: [DFAState, ParserRuleContext | undefined] = super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache);\r\n\r\n\t\tif (useContext) {\r\n\t\t\tthis.decisions[this.currentDecision].LL_ATNTransitions++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.decisions[this.currentDecision].SLL_ATNTransitions++;\r\n\t\t}\r\n\r\n\t\treturn targetState;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected evalSemanticContextImpl(pred: SemanticContext, parserCallStack: ParserRuleContext, alt: number): boolean {\r\n\t\tif (this.currentState === undefined || this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tlet result: boolean = super.evalSemanticContextImpl(pred, parserCallStack, alt);\r\n\t\tif (!(pred instanceof SemanticContext.PrecedencePredicate)) {\r\n\t\t\tlet fullContext: boolean = this._llStopIndex >= 0;\r\n\t\t\tlet stopIndex: number = fullContext ? this._llStopIndex : this._sllStopIndex;\r\n\t\t\tthis.decisions[this.currentDecision].predicateEvals.push(\r\n\t\t\t\tnew PredicateEvalInfo(this.currentState, this.currentDecision, this._input, this._startIndex, stopIndex, pred, result, alt),\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected reportContextSensitivity(dfa: DFA, prediction: number, acceptState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tif (prediction !== this.conflictingAltResolvedBySLL) {\r\n\t\t\tthis.decisions[this.currentDecision].contextSensitivities.push(\r\n\t\t\t\tnew ContextSensitivityInfo(this.currentDecision, acceptState, this._input, startIndex, stopIndex),\r\n\t\t\t);\r\n\t\t}\r\n\t\tsuper.reportContextSensitivity(dfa, prediction, acceptState, startIndex, stopIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected reportAttemptingFullContext(dfa: DFA, conflictingAlts: BitSet, conflictState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (conflictingAlts != null) {\r\n\t\t\tthis.conflictingAltResolvedBySLL = conflictingAlts.nextSetBit(0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.conflictingAltResolvedBySLL = conflictState.s0.configs.getRepresentedAlternatives().nextSetBit(0);\r\n\t\t}\r\n\t\tthis.decisions[this.currentDecision].LL_Fallback++;\r\n\t\tsuper.reportAttemptingFullContext(dfa, conflictingAlts, conflictState, startIndex, stopIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected reportAmbiguity(@NotNull dfa: DFA, D: DFAState, startIndex: number, stopIndex: number, exact: boolean, @NotNull ambigAlts: BitSet, @NotNull configs: ATNConfigSet): void {\r\n\t\tif (this.currentState === undefined || this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tlet prediction: number;\r\n\t\tif (ambigAlts != null) {\r\n\t\t\tprediction = ambigAlts.nextSetBit(0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tprediction = configs.getRepresentedAlternatives().nextSetBit(0);\r\n\t\t}\r\n\t\tif (this.conflictingAltResolvedBySLL !== ATN.INVALID_ALT_NUMBER && prediction !== this.conflictingAltResolvedBySLL) {\r\n\t\t\t// Even though this is an ambiguity we are reporting, we can\r\n\t\t\t// still detect some context sensitivities. Both SLL and LL\r\n\t\t\t// are showing a conflict, hence an ambiguity, but if they resolve\r\n\t\t\t// to different minimum alternatives we have also identified a\r\n\t\t\t// context sensitivity.\r\n\t\t\tthis.decisions[this.currentDecision].contextSensitivities.push(\r\n\t\t\t\tnew ContextSensitivityInfo(this.currentDecision, this.currentState, this._input, startIndex, stopIndex),\r\n\t\t\t);\r\n\t\t}\r\n\t\tthis.decisions[this.currentDecision].ambiguities.push(\r\n\t\t\tnew AmbiguityInfo(this.currentDecision, this.currentState, ambigAlts, this._input, startIndex, stopIndex),\r\n\t\t);\r\n\t\tsuper.reportAmbiguity(dfa, D, startIndex, stopIndex, exact, ambigAlts, configs);\r\n\t}\r\n\r\n\t// ---------------------------------------------------------------------\r\n\r\n\tpublic getDecisionInfo(): DecisionInfo[] {\r\n\t\treturn this.decisions;\r\n\t}\r\n\r\n\tpublic getCurrentState(): SimulatorState | undefined {\r\n\t\treturn this.currentState;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.4399193-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ANTLRErrorStrategy } from \"./ANTLRErrorStrategy\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNDeserializationOptions } from \"./atn/ATNDeserializationOptions\";\r\nimport { ATNDeserializer } from \"./atn/ATNDeserializer\";\r\nimport { ATNSimulator } from \"./atn/ATNSimulator\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { DefaultErrorStrategy } from \"./DefaultErrorStrategy\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { ErrorNode } from \"./tree/ErrorNode\";\r\nimport { IntegerStack } from \"./misc/IntegerStack\";\r\nimport { IntervalSet } from \"./misc/IntervalSet\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { Override, NotNull, Nullable } from \"./Decorators\";\r\nimport { ParseInfo } from \"./atn/ParseInfo\";\r\nimport { ParserATNSimulator } from \"./atn/ParserATNSimulator\";\r\nimport { ParserErrorListener } from \"./ParserErrorListener\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { ParseTreeListener } from \"./tree/ParseTreeListener\";\r\nimport { ParseTreePattern } from \"./tree/pattern/ParseTreePattern\";\r\nimport { ProxyParserErrorListener } from \"./ProxyParserErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { RuleTransition } from \"./atn/RuleTransition\";\r\nimport { TerminalNode } from \"./tree/TerminalNode\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { TokenStream } from \"./TokenStream\";\r\n\r\nclass TraceListener implements ParseTreeListener {\r\n\tconstructor(private ruleNames: string[], private tokenStream: TokenStream) {\r\n\t}\r\n\r\n\t@Override\r\n\tpublic enterEveryRule(ctx: ParserRuleContext): void {\r\n\t\tconsole.log(\"enter \" + this.ruleNames[ctx.ruleIndex] +\r\n\t\t\t\", LT(1)=\" + this.tokenStream.LT(1).text);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic exitEveryRule(ctx: ParserRuleContext): void {\r\n\t\tconsole.log(\"exit \" + this.ruleNames[ctx.ruleIndex] +\r\n\t\t\t\", LT(1)=\" + this.tokenStream.LT(1).text);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic visitErrorNode(node: ErrorNode): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t@Override\r\n\tpublic visitTerminal(node: TerminalNode): void {\r\n\t\tlet parent = node.parent!.ruleContext;\r\n\t\tlet token: Token = node.symbol;\r\n\t\tconsole.log(\"consume \" + token + \" rule \" + this.ruleNames[parent.ruleIndex]);\r\n\t}\r\n}\r\n\r\n/** This is all the parsing support code essentially; most of it is error recovery stuff. */\r\nexport abstract class Parser extends Recognizer {\r\n\t/**\r\n\t * This field maps from the serialized ATN string to the deserialized {@link ATN} with\r\n\t * bypass alternatives.\r\n\t *\r\n\t * @see ATNDeserializationOptions.isGenerateRuleBypassTransitions\r\n\t */\r\n\tprivate static readonly bypassAltsAtnCache = new Map();\r\n\r\n\t/**\r\n\t * The error handling strategy for the parser. The default value is a new\r\n\t * instance of {@link DefaultErrorStrategy}.\r\n\t *\r\n\t * @see #getErrorHandler\r\n\t * @see #setErrorHandler\r\n\t */\r\n\t@NotNull\r\n\tprotected _errHandler: ANTLRErrorStrategy = new DefaultErrorStrategy();\r\n\r\n\t/**\r\n\t * The input stream.\r\n\t *\r\n\t * @see #getInputStream\r\n\t * @see #setInputStream\r\n\t */\r\n\tprotected _input!: TokenStream;\r\n\r\n\tprotected readonly _precedenceStack: IntegerStack = new IntegerStack();\r\n\r\n\t/**\r\n\t * The {@link ParserRuleContext} object for the currently executing rule.\r\n\t *\r\n\t * This is always non-undefined during the parsing process.\r\n\t */\r\n\tprotected _ctx!: ParserRuleContext;\r\n\r\n\t/**\r\n\t * Specifies whether or not the parser should construct a parse tree during\r\n\t * the parsing process. The default value is `true`.\r\n\t *\r\n\t * @see `buildParseTree`\r\n\t */\r\n\tprivate _buildParseTrees: boolean = true;\r\n\r\n\t/**\r\n\t * When {@link #setTrace}`(true)` is called, a reference to the\r\n\t * {@link TraceListener} is stored here so it can be easily removed in a\r\n\t * later call to {@link #setTrace}`(false)`. The listener itself is\r\n\t * implemented as a parser listener so this field is not directly used by\r\n\t * other parser methods.\r\n\t */\r\n\tprivate _tracer: TraceListener | undefined;\r\n\r\n\t/**\r\n\t * The list of {@link ParseTreeListener} listeners registered to receive\r\n\t * events during the parse.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tprotected _parseListeners: ParseTreeListener[] = [];\r\n\r\n\t/**\r\n\t * The number of syntax errors reported during parsing. This value is\r\n\t * incremented each time {@link #notifyErrorListeners} is called.\r\n\t */\r\n\tprotected _syntaxErrors: number = 0;\r\n\r\n\t/** Indicates parser has match()ed EOF token. See {@link #exitRule()}. */\r\n\tprotected matchedEOF: boolean = false;\r\n\r\n\tconstructor(input: TokenStream) {\r\n\t\tsuper();\r\n\t\tthis._precedenceStack.push(0);\r\n\t\tthis.inputStream = input;\r\n\t}\r\n\r\n\t/** reset the parser's state */\r\n\tpublic reset(): void;\r\n\tpublic reset(resetInput: boolean): void;\r\n\tpublic reset(resetInput?: boolean): void {\r\n\t\t// Note: this method executes when not parsing, so _ctx can be undefined\r\n\t\tif (resetInput === undefined || resetInput) {\r\n\t\t\tthis.inputStream.seek(0);\r\n\t\t}\r\n\r\n\t\tthis._errHandler.reset(this);\r\n\t\tthis._ctx = undefined as any;\r\n\t\tthis._syntaxErrors = 0;\r\n\t\tthis.matchedEOF = false;\r\n\t\tthis.isTrace = false;\r\n\t\tthis._precedenceStack.clear();\r\n\t\tthis._precedenceStack.push(0);\r\n\t\tlet interpreter: ATNSimulator = this.interpreter;\r\n\t\tif (interpreter != null) {\r\n\t\t\tinterpreter.reset();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Match current input symbol against `ttype`. If the symbol type\r\n\t * matches, {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are\r\n\t * called to complete the match process.\r\n\t *\r\n\t * If the symbol type does not match,\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is called on the current error\r\n\t * strategy to attempt recovery. If {@link #getBuildParseTree} is\r\n\t * `true` and the token index of the symbol returned by\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is -1, the symbol is added to\r\n\t * the parse tree by calling {@link #createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)}.\r\n\t *\r\n\t * @param ttype the token type to match\r\n\t * @returns the matched symbol\r\n\t * @ if the current input symbol did not match\r\n\t * `ttype` and the error strategy could not recover from the\r\n\t * mismatched symbol\r\n\t */\r\n\t@NotNull\r\n\tpublic match(ttype: number): Token {\r\n\t\tlet t: Token = this.currentToken;\r\n\t\tif (t.type === ttype) {\r\n\t\t\tif (ttype === Token.EOF) {\r\n\t\t\t\tthis.matchedEOF = true;\r\n\t\t\t}\r\n\t\t\tthis._errHandler.reportMatch(this);\r\n\t\t\tthis.consume();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tt = this._errHandler.recoverInline(this);\r\n\t\t\tif (this._buildParseTrees && t.tokenIndex === -1) {\r\n\t\t\t\t// we must have conjured up a new token during single token insertion\r\n\t\t\t\t// if it's not the current symbol\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, t));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * Match current input symbol as a wildcard. If the symbol type matches\r\n\t * (i.e. has a value greater than 0), {@link ANTLRErrorStrategy#reportMatch}\r\n\t * and {@link #consume} are called to complete the match process.\r\n\t *\r\n\t * If the symbol type does not match,\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is called on the current error\r\n\t * strategy to attempt recovery. If {@link #getBuildParseTree} is\r\n\t * `true` and the token index of the symbol returned by\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is -1, the symbol is added to\r\n\t * the parse tree by calling {@link Parser#createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)}.\r\n\t *\r\n\t * @returns the matched symbol\r\n\t * @ if the current input symbol did not match\r\n\t * a wildcard and the error strategy could not recover from the mismatched\r\n\t * symbol\r\n\t */\r\n\t@NotNull\r\n\tpublic matchWildcard(): Token {\r\n\t\tlet t: Token = this.currentToken;\r\n\t\tif (t.type > 0) {\r\n\t\t\tthis._errHandler.reportMatch(this);\r\n\t\t\tthis.consume();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tt = this._errHandler.recoverInline(this);\r\n\t\t\tif (this._buildParseTrees && t.tokenIndex === -1) {\r\n\t\t\t\t// we must have conjured up a new token during single token insertion\r\n\t\t\t\t// if it's not the current symbol\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, t));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * Track the {@link ParserRuleContext} objects during the parse and hook\r\n\t * them up using the {@link ParserRuleContext#children} list so that it\r\n\t * forms a parse tree. The {@link ParserRuleContext} returned from the start\r\n\t * rule represents the root of the parse tree.\r\n\t *\r\n\t * Note that if we are not building parse trees, rule contexts only point\r\n\t * upwards. When a rule exits, it returns the context but that gets garbage\r\n\t * collected if nobody holds a reference. It points upwards but nobody\r\n\t * points at it.\r\n\t *\r\n\t * When we build parse trees, we are adding all of these contexts to\r\n\t * {@link ParserRuleContext#children} list. Contexts are then not candidates\r\n\t * for garbage collection.\r\n\t */\r\n\tset buildParseTree(buildParseTrees: boolean) {\r\n\t\tthis._buildParseTrees = buildParseTrees;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether or not a complete parse tree will be constructed while\r\n\t * parsing. This property is `true` for a newly constructed parser.\r\n\t *\r\n\t * @returns `true` if a complete parse tree will be constructed while\r\n\t * parsing, otherwise `false`\r\n\t */\r\n\tget buildParseTree(): boolean {\r\n\t\treturn this._buildParseTrees;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getParseListeners(): ParseTreeListener[] {\r\n\t\treturn this._parseListeners;\r\n\t}\r\n\r\n\t/**\r\n\t * Registers `listener` to receive events during the parsing process.\r\n\t *\r\n\t * To support output-preserving grammar transformations (including but not\r\n\t * limited to left-recursion removal, automated left-factoring, and\r\n\t * optimized code generation), calls to listener methods during the parse\r\n\t * may differ substantially from calls made by\r\n\t * {@link ParseTreeWalker#DEFAULT} used after the parse is complete. In\r\n\t * particular, rule entry and exit events may occur in a different order\r\n\t * during the parse than after the parser. In addition, calls to certain\r\n\t * rule entry methods may be omitted.\r\n\t *\r\n\t * With the following specific exceptions, calls to listener events are\r\n\t * *deterministic*, i.e. for identical input the calls to listener\r\n\t * methods will be the same.\r\n\t *\r\n\t * * Alterations to the grammar used to generate code may change the\r\n\t * behavior of the listener calls.\r\n\t * * Alterations to the command line options passed to ANTLR 4 when\r\n\t * generating the parser may change the behavior of the listener calls.\r\n\t * * Changing the version of the ANTLR Tool used to generate the parser\r\n\t * may change the behavior of the listener calls.\r\n\t *\r\n\t * @param listener the listener to add\r\n\t *\r\n\t * @throws {@link TypeError} if `listener` is `undefined`\r\n\t */\r\n\tpublic addParseListener(@NotNull listener: ParseTreeListener): void {\r\n\t\tif (listener == null) {\r\n\t\t\tthrow new TypeError(\"listener cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._parseListeners.push(listener);\r\n\t}\r\n\r\n\t/**\r\n\t * Remove `listener` from the list of parse listeners.\r\n\t *\r\n\t * If `listener` is `undefined` or has not been added as a parse\r\n\t * listener, this method does nothing.\r\n\t *\r\n\t * @see #addParseListener\r\n\t *\r\n\t * @param listener the listener to remove\r\n\t */\r\n\tpublic removeParseListener(listener: ParseTreeListener): void {\r\n\t\tlet index = this._parseListeners.findIndex((l) => l === listener);\r\n\t\tif (index !== -1) {\r\n\t\t\tthis._parseListeners.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Remove all parse listeners.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tpublic removeParseListeners(): void {\r\n\t\tthis._parseListeners.length = 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Notify any parse listeners of an enter rule event.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tprotected triggerEnterRuleEvent(): void {\r\n\t\tfor (let listener of this._parseListeners) {\r\n\t\t\tif (listener.enterEveryRule) {\r\n\t\t\t\tlistener.enterEveryRule(this._ctx);\r\n\t\t\t}\r\n\r\n\t\t\tthis._ctx.enterRule(listener);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Notify any parse listeners of an exit rule event.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tprotected triggerExitRuleEvent(): void {\r\n\t\t// reverse order walk of listeners\r\n\t\tfor (let i = this._parseListeners.length - 1; i >= 0; i--) {\r\n\t\t\tlet listener: ParseTreeListener = this._parseListeners[i];\r\n\t\t\tthis._ctx.exitRule(listener);\r\n\t\t\tif (listener.exitEveryRule) {\r\n\t\t\t\tlistener.exitEveryRule(this._ctx);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the number of syntax errors reported during parsing. This value is\r\n\t * incremented each time {@link #notifyErrorListeners} is called.\r\n\t *\r\n\t * @see #notifyErrorListeners\r\n\t */\r\n\tget numberOfSyntaxErrors(): number {\r\n\t\treturn this._syntaxErrors;\r\n\t}\r\n\r\n\tget tokenFactory(): TokenFactory {\r\n\t\treturn this._input.tokenSource.tokenFactory;\r\n\t}\r\n\r\n\t/**\r\n\t * The ATN with bypass alternatives is expensive to create so we create it\r\n\t * lazily.\r\n\t *\r\n\t * @ if the current parser does not\r\n\t * implement the `serializedATN` property.\r\n\t */\r\n\t@NotNull\r\n\tpublic getATNWithBypassAlts(): ATN {\r\n\t\tlet serializedAtn: string = this.serializedATN;\r\n\t\tif (serializedAtn == null) {\r\n\t\t\tthrow new Error(\"The current parser does not support an ATN with bypass alternatives.\");\r\n\t\t}\r\n\r\n\t\tlet result = Parser.bypassAltsAtnCache.get(serializedAtn);\r\n\t\tif (result == null) {\r\n\t\t\tlet deserializationOptions: ATNDeserializationOptions = new ATNDeserializationOptions();\r\n\t\t\tdeserializationOptions.isGenerateRuleBypassTransitions = true;\r\n\t\t\tresult = new ATNDeserializer(deserializationOptions).deserialize(Utils.toCharArray(serializedAtn));\r\n\t\t\tParser.bypassAltsAtnCache.set(serializedAtn, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * The preferred method of getting a tree pattern. For example, here's a\r\n\t * sample use:\r\n\t *\r\n\t * ```\r\n\t * let t: ParseTree = parser.expr();\r\n\t * let p: ParseTreePattern = await parser.compileParseTreePattern(\"+0\", MyParser.RULE_expr);\r\n\t * let m: ParseTreeMatch = p.match(t);\r\n\t * let id: string = m.get(\"ID\");\r\n\t * ```\r\n\t */\r\n\tpublic compileParseTreePattern(pattern: string, patternRuleIndex: number): Promise;\r\n\r\n\t/**\r\n\t * The same as {@link #compileParseTreePattern(String, int)} but specify a\r\n\t * {@link Lexer} rather than trying to deduce it from this parser.\r\n\t */\r\n\tpublic compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): Promise;\r\n\r\n\tpublic async compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): Promise {\r\n\t\tif (!lexer) {\r\n\t\t\tif (this.inputStream) {\r\n\t\t\t\tlet tokenSource = this.inputStream.tokenSource;\r\n\t\t\t\tif (tokenSource instanceof Lexer) {\r\n\t\t\t\t\tlexer = tokenSource;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!lexer) {\r\n\t\t\t\tthrow new Error(\"Parser can't discover a lexer to use\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet currentLexer = lexer;\r\n\t\tlet m = await import(\"./tree/pattern/ParseTreePatternMatcher\");\r\n\t\tlet matcher = new m.ParseTreePatternMatcher(currentLexer, this);\r\n\t\treturn matcher.compile(pattern, patternRuleIndex);\r\n\t}\r\n\r\n\t@NotNull\r\n\tget errorHandler(): ANTLRErrorStrategy {\r\n\t\treturn this._errHandler;\r\n\t}\r\n\r\n\tset errorHandler(@NotNull handler: ANTLRErrorStrategy) {\r\n\t\tthis._errHandler = handler;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): TokenStream {\r\n\t\treturn this._input;\r\n\t}\r\n\r\n\t/** Set the token stream and reset the parser. */\r\n\tset inputStream(input: TokenStream) {\r\n\t\tthis.reset(false);\r\n\t\tthis._input = input;\r\n\t}\r\n\r\n\t/** Match needs to return the current input symbol, which gets put\r\n\t * into the label for the associated token ref; e.g., x=ID.\r\n\t */\r\n\t@NotNull\r\n\tget currentToken(): Token {\r\n\t\treturn this._input.LT(1);\r\n\t}\r\n\r\n\tpublic notifyErrorListeners(/*@NotNull*/ msg: string): void;\r\n\tpublic notifyErrorListeners(/*@NotNull*/ msg: string, /*@NotNull*/ offendingToken: Token | null, e: RecognitionException | undefined): void;\r\n\r\n\tpublic notifyErrorListeners(msg: string, offendingToken?: Token | null, e?: RecognitionException | undefined): void {\r\n\t\tif (offendingToken === undefined) {\r\n\t\t\toffendingToken = this.currentToken;\r\n\t\t} else if (offendingToken === null) {\r\n\t\t\toffendingToken = undefined;\r\n\t\t}\r\n\r\n\t\tthis._syntaxErrors++;\r\n\t\tlet line: number = -1;\r\n\t\tlet charPositionInLine: number = -1;\r\n\t\tif (offendingToken != null) {\r\n\t\t\tline = offendingToken.line;\r\n\t\t\tcharPositionInLine = offendingToken.charPositionInLine;\r\n\t\t}\r\n\r\n\t\tlet listener = this.getErrorListenerDispatch();\r\n\t\tif (listener.syntaxError) {\r\n\t\t\tlistener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Consume and return the [current symbol](`currentToken`).\r\n\t *\r\n\t * E.g., given the following input with `A` being the current\r\n\t * lookahead symbol, this function moves the cursor to `B` and returns\r\n\t * `A`.\r\n\t *\r\n\t * ```\r\n\t * A B\r\n\t * ^\r\n\t * ```\r\n\t *\r\n\t * If the parser is not in error recovery mode, the consumed symbol is added\r\n\t * to the parse tree using {@link ParserRuleContext#addChild(TerminalNode)}, and\r\n\t * {@link ParseTreeListener#visitTerminal} is called on any parse listeners.\r\n\t * If the parser *is* in error recovery mode, the consumed symbol is\r\n\t * added to the parse tree using {@link #createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)} and\r\n\t * {@link ParseTreeListener#visitErrorNode} is called on any parse\r\n\t * listeners.\r\n\t */\r\n\tpublic consume(): Token {\r\n\t\tlet o: Token = this.currentToken;\r\n\t\tif (o.type !== Parser.EOF) {\r\n\t\t\tthis.inputStream.consume();\r\n\t\t}\r\n\t\tlet hasListener: boolean = this._parseListeners.length !== 0;\r\n\t\tif (this._buildParseTrees || hasListener) {\r\n\t\t\tif (this._errHandler.inErrorRecoveryMode(this)) {\r\n\t\t\t\tlet node: ErrorNode = this._ctx.addErrorNode(this.createErrorNode(this._ctx, o));\r\n\t\t\t\tif (hasListener) {\r\n\t\t\t\t\tfor (let listener of this._parseListeners) {\r\n\t\t\t\t\t\tif (listener.visitErrorNode) {\r\n\t\t\t\t\t\t\tlistener.visitErrorNode(node);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlet node: TerminalNode = this.createTerminalNode(this._ctx, o);\r\n\t\t\t\tthis._ctx.addChild(node);\r\n\t\t\t\tif (hasListener) {\r\n\t\t\t\t\tfor (let listener of this._parseListeners) {\r\n\t\t\t\t\t\tif (listener.visitTerminal) {\r\n\t\t\t\t\t\t\tlistener.visitTerminal(node);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn o;\r\n\t}\r\n\r\n\t/**\r\n\t * How to create a token leaf node associated with a parent.\r\n\t * Typically, the terminal node to create is not a function of the parent.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic createTerminalNode(parent: ParserRuleContext, t: Token): TerminalNode {\r\n\t\treturn new TerminalNode(t);\r\n\t}\r\n\r\n\t/**\r\n\t * How to create an error node, given a token, associated with a parent.\r\n\t * Typically, the error node to create is not a function of the parent.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic createErrorNode(parent: ParserRuleContext, t: Token): ErrorNode {\r\n\t\treturn new ErrorNode(t);\r\n\t}\r\n\r\n\tprotected addContextToParseTree(): void {\r\n\t\tlet parent = this._ctx._parent as ParserRuleContext | undefined;\r\n\t\t// add current context to parent if we have a parent\r\n\t\tif (parent != null) {\r\n\t\t\tparent.addChild(this._ctx);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Always called by generated parsers upon entry to a rule. Access field\r\n\t * {@link #_ctx} get the current context.\r\n\t */\r\n\tpublic enterRule(@NotNull localctx: ParserRuleContext, state: number, ruleIndex: number): void {\r\n\t\tthis.state = state;\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = this._input.LT(1);\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tthis.addContextToParseTree();\r\n\t\t}\r\n\t\tthis.triggerEnterRuleEvent();\r\n\t}\r\n\r\n\tpublic enterLeftFactoredRule(localctx: ParserRuleContext, state: number, ruleIndex: number): void {\r\n\t\tthis.state = state;\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tlet factoredContext = this._ctx.getChild(this._ctx.childCount - 1) as ParserRuleContext;\r\n\t\t\tthis._ctx.removeLastChild();\r\n\t\t\tfactoredContext._parent = localctx;\r\n\t\t\tlocalctx.addChild(factoredContext);\r\n\t\t}\r\n\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = this._input.LT(1);\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tthis.addContextToParseTree();\r\n\t\t}\r\n\r\n\t\tthis.triggerEnterRuleEvent();\r\n\t}\r\n\r\n\tpublic exitRule(): void {\r\n\t\tif (this.matchedEOF) {\r\n\t\t\t// if we have matched EOF, it cannot consume past EOF so we use LT(1) here\r\n\t\t\tthis._ctx._stop = this._input.LT(1); // LT(1) will be end of file\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._ctx._stop = this._input.tryLT(-1); // stop node is what we just matched\r\n\t\t}\r\n\t\t// trigger event on _ctx, before it reverts to parent\r\n\t\tthis.triggerExitRuleEvent();\r\n\t\tthis.state = this._ctx.invokingState;\r\n\t\tthis._ctx = this._ctx._parent as ParserRuleContext;\r\n\t}\r\n\r\n\tpublic enterOuterAlt(localctx: ParserRuleContext, altNum: number): void {\r\n\t\tlocalctx.altNumber = altNum;\r\n\t\t// if we have new localctx, make sure we replace existing ctx\r\n\t\t// that is previous child of parse tree\r\n\t\tif (this._buildParseTrees && this._ctx !== localctx) {\r\n\t\t\tlet parent = this._ctx._parent as ParserRuleContext | undefined;\r\n\t\t\tif (parent != null) {\r\n\t\t\t\tparent.removeLastChild();\r\n\t\t\t\tparent.addChild(localctx);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._ctx = localctx;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the precedence level for the top-most precedence rule.\r\n\t *\r\n\t * @returns The precedence level for the top-most precedence rule, or -1 if\r\n\t * the parser context is not nested within a precedence rule.\r\n\t */\r\n\tget precedence(): number {\r\n\t\tif (this._precedenceStack.isEmpty) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\treturn this._precedenceStack.peek();\r\n\t}\r\n\r\n\tpublic enterRecursionRule(localctx: ParserRuleContext, state: number, ruleIndex: number, precedence: number): void {\r\n\t\tthis.state = state;\r\n\t\tthis._precedenceStack.push(precedence);\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = this._input.LT(1);\r\n\t\tthis.triggerEnterRuleEvent(); // simulates rule entry for left-recursive rules\r\n\t}\r\n\r\n\t/** Like {@link #enterRule} but for recursive rules.\r\n\t * Make the current context the child of the incoming localctx.\r\n\t */\r\n\tpublic pushNewRecursionContext(localctx: ParserRuleContext, state: number, ruleIndex: number): void {\r\n\t\tlet previous: ParserRuleContext = this._ctx;\r\n\t\tprevious._parent = localctx;\r\n\t\tprevious.invokingState = state;\r\n\t\tprevious._stop = this._input.tryLT(-1);\r\n\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = previous._start;\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tthis._ctx.addChild(previous);\r\n\t\t}\r\n\r\n\t\tthis.triggerEnterRuleEvent(); // simulates rule entry for left-recursive rules\r\n\t}\r\n\r\n\tpublic unrollRecursionContexts(_parentctx: ParserRuleContext): void {\r\n\t\tthis._precedenceStack.pop();\r\n\t\tthis._ctx._stop = this._input.tryLT(-1);\r\n\t\tlet retctx: ParserRuleContext = this._ctx; // save current ctx (return value)\r\n\r\n\t\t// unroll so _ctx is as it was before call to recursive method\r\n\t\tif (this._parseListeners.length > 0) {\r\n\t\t\twhile (this._ctx !== _parentctx) {\r\n\t\t\t\tthis.triggerExitRuleEvent();\r\n\t\t\t\tthis._ctx = this._ctx._parent as ParserRuleContext;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._ctx = _parentctx;\r\n\t\t}\r\n\r\n\t\t// hook into tree\r\n\t\tretctx._parent = _parentctx;\r\n\r\n\t\tif (this._buildParseTrees && _parentctx != null) {\r\n\t\t\t// add return ctx into invoking rule's tree\r\n\t\t\t_parentctx.addChild(retctx);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getInvokingContext(ruleIndex: number): ParserRuleContext | undefined {\r\n\t\tlet p = this._ctx;\r\n\t\twhile (p && p.ruleIndex !== ruleIndex) {\r\n\t\t\tp = p._parent as ParserRuleContext;\r\n\t\t}\r\n\t\treturn p;\r\n\t}\r\n\r\n\tget context(): ParserRuleContext {\r\n\t\treturn this._ctx;\r\n\t}\r\n\r\n\tset context(ctx: ParserRuleContext) {\r\n\t\tthis._ctx = ctx;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic precpred(@Nullable localctx: RuleContext, precedence: number): boolean {\r\n\t\treturn precedence >= this._precedenceStack.peek();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getErrorListenerDispatch(): ParserErrorListener {\r\n\t\treturn new ProxyParserErrorListener(this.getErrorListeners());\r\n\t}\r\n\r\n\tpublic inContext(context: string): boolean {\r\n\t\t// TODO: useful in parser?\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks whether or not `symbol` can follow the current state in the\r\n\t * ATN. The behavior of this method is equivalent to the following, but is\r\n\t * implemented such that the complete context-sensitive follow set does not\r\n\t * need to be explicitly constructed.\r\n\t *\r\n\t * ```\r\n\t * return getExpectedTokens().contains(symbol);\r\n\t * ```\r\n\t *\r\n\t * @param symbol the symbol type to check\r\n\t * @returns `true` if `symbol` can follow the current state in\r\n\t * the ATN, otherwise `false`.\r\n\t */\r\n\tpublic isExpectedToken(symbol: number): boolean {\r\n// \t\treturn interpreter.atn.nextTokens(_ctx);\r\n\t\tlet atn: ATN = this.interpreter.atn;\r\n\t\tlet ctx: ParserRuleContext = this._ctx;\r\n\t\tlet s: ATNState = atn.states[this.state];\r\n\t\tlet following: IntervalSet = atn.nextTokens(s);\r\n\t\tif (following.contains(symbol)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n// System.out.println(\"following \"+s+\"=\"+following);\r\n\t\tif (!following.contains(Token.EPSILON)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\twhile (ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {\r\n\t\t\tlet invokingState: ATNState = atn.states[ctx.invokingState];\r\n\t\t\tlet rt = invokingState.transition(0) as RuleTransition;\r\n\t\t\tfollowing = atn.nextTokens(rt.followState);\r\n\t\t\tif (following.contains(symbol)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tctx = ctx._parent as ParserRuleContext;\r\n\t\t}\r\n\r\n\t\tif (following.contains(Token.EPSILON) && symbol === Token.EOF) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget isMatchedEOF(): boolean {\r\n\t\treturn this.matchedEOF;\r\n\t}\r\n\r\n\t/**\r\n\t * Computes the set of input symbols which could follow the current parser\r\n\t * state and context, as given by {@link #getState} and {@link #getContext},\r\n\t * respectively.\r\n\t *\r\n\t * @see ATN#getExpectedTokens(int, RuleContext)\r\n\t */\r\n\t@NotNull\r\n\tpublic getExpectedTokens(): IntervalSet {\r\n\t\treturn this.atn.getExpectedTokens(this.state, this.context);\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getExpectedTokensWithinCurrentRule(): IntervalSet {\r\n\t\tlet atn: ATN = this.interpreter.atn;\r\n\t\tlet s: ATNState = atn.states[this.state];\r\n\t\treturn atn.nextTokens(s);\r\n\t}\r\n\r\n\t/** Get a rule's index (i.e., `RULE_ruleName` field) or -1 if not found. */\r\n\tpublic getRuleIndex(ruleName: string): number {\r\n\t\tlet ruleIndex = this.getRuleIndexMap().get(ruleName);\r\n\t\tif (ruleIndex != null) {\r\n\t\t\treturn ruleIndex;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}\r\n\r\n\tget ruleContext(): ParserRuleContext { return this._ctx; }\r\n\r\n\t/** Return List<String> of the rule names in your parser instance\r\n\t * leading up to a call to the current rule. You could override if\r\n\t * you want more details such as the file/line info of where\r\n\t * in the ATN a rule is invoked.\r\n\t *\r\n\t * This is very useful for error messages.\r\n\t */\r\n\r\n\tpublic getRuleInvocationStack(ctx: RuleContext = this._ctx): string[] {\r\n\t\tlet p: RuleContext | undefined = ctx; \t\t// Workaround for Microsoft/TypeScript#14487\r\n\t\tlet ruleNames: string[] = this.ruleNames;\r\n\t\tlet stack: string[] = [];\r\n\t\twhile (p != null) {\r\n\t\t\t// compute what follows who invoked us\r\n\t\t\tlet ruleIndex: number = p.ruleIndex;\r\n\t\t\tif (ruleIndex < 0) {\r\n\t\t\t\tstack.push(\"n/a\");\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(ruleNames[ruleIndex]);\r\n\t\t\t}\r\n\t\t\tp = p._parent as RuleContext;\r\n\t\t}\r\n\t\treturn stack;\r\n\t}\r\n\r\n\t/** For debugging and other purposes. */\r\n\tpublic getDFAStrings(): string[] {\r\n\t\tlet s: string[] = [];\r\n\t\tfor (let dfa of this._interp.atn.decisionToDFA) {\r\n\t\t\ts.push(dfa.toString(this.vocabulary, this.ruleNames));\r\n\t\t}\r\n\t\treturn s;\r\n\t}\r\n\r\n\t/** For debugging and other purposes. */\r\n\tpublic dumpDFA(): void {\r\n\t\tlet seenOne: boolean = false;\r\n\t\tfor (let dfa of this._interp.atn.decisionToDFA) {\r\n\t\t\tif (!dfa.isEmpty) {\r\n\t\t\t\tif (seenOne) {\r\n\t\t\t\t\tconsole.log();\r\n\t\t\t\t}\r\n\t\t\t\tconsole.log(\"Decision \" + dfa.decision + \":\");\r\n\t\t\t\tprocess.stdout.write(dfa.toString(this.vocabulary, this.ruleNames));\r\n\t\t\t\tseenOne = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tget sourceName(): string {\r\n\t\treturn this._input.sourceName;\r\n\t}\r\n\r\n\t@Override\r\n\tget parseInfo(): Promise {\r\n\t\treturn import(\"./atn/ProfilingATNSimulator\").then((m) => {\r\n\t\t\tlet interp: ParserATNSimulator = this.interpreter;\r\n\t\t\tif (interp instanceof m.ProfilingATNSimulator) {\r\n\t\t\t\treturn new ParseInfo(interp);\r\n\t\t\t}\r\n\r\n\t\t\treturn undefined;\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * @since 4.3\r\n\t */\r\n\tpublic async setProfile(profile: boolean): Promise {\r\n\t\tlet m = await import(\"./atn/ProfilingATNSimulator\");\r\n\t\tlet interp: ParserATNSimulator = this.interpreter;\r\n\t\tif (profile) {\r\n\t\t\tif (!(interp instanceof m.ProfilingATNSimulator)) {\r\n\t\t\t\tthis.interpreter = new m.ProfilingATNSimulator(this);\r\n\t\t\t}\r\n\t\t} else if (interp instanceof m.ProfilingATNSimulator) {\r\n\t\t\tthis.interpreter = new ParserATNSimulator(this.atn, this);\r\n\t\t}\r\n\r\n\t\tthis.interpreter.setPredictionMode(interp.getPredictionMode());\r\n\t}\r\n\r\n\t/** During a parse is sometimes useful to listen in on the rule entry and exit\r\n\t * events as well as token matches. This is for quick and dirty debugging.\r\n\t */\r\n\tset isTrace(trace: boolean) {\r\n\t\tif (!trace) {\r\n\t\t\tif (this._tracer) {\r\n\t\t\t\tthis.removeParseListener(this._tracer);\r\n\t\t\t\tthis._tracer = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this._tracer) {\r\n\t\t\t\tthis.removeParseListener(this._tracer);\r\n\t\t\t} else {\r\n\t\t\t\tthis._tracer = new TraceListener(this.ruleNames, this._input);\r\n\t\t\t}\r\n\r\n\t\t\tthis.addParseListener(this._tracer);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether a {@link TraceListener} is registered as a parse listener\r\n\t * for the parser.\r\n\t */\r\n\tget isTrace(): boolean {\r\n\t\treturn this._tracer != null;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.3255548-07:00\r\n\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { NotNull } from \"./Decorators\";\r\n\r\n/** Indicates that the parser could not decide which of two or more paths\r\n * to take based upon the remaining input. It tracks the starting token\r\n * of the offending input and also knows where the parser was\r\n * in the various paths when the error. Reported by reportNoViableAlternative()\r\n */\r\nexport class NoViableAltException extends RecognitionException {\r\n\t//private static serialVersionUID: number = 5096000008992867052L;\r\n\r\n\t/** Which configurations did we try at input.index that couldn't match input.LT(1)? */\r\n\tprivate _deadEndConfigs?: ATNConfigSet;\r\n\r\n\t/** The token object at the start index; the input stream might\r\n\t * \tnot be buffering tokens so get a reference to it. (At the\r\n\t * time the error occurred, of course the stream needs to keep a\r\n\t * buffer all of the tokens but later we might not have access to those.)\r\n\t */\r\n\t@NotNull\r\n\tprivate _startToken: Token;\r\n\r\n\tconstructor(/*@NotNull*/ recognizer: Parser);\r\n\tconstructor(\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Recognizer,\r\n\t\t/*@NotNull*/\r\n\t\tinput: TokenStream,\r\n\t\t/*@NotNull*/\r\n\t\tstartToken: Token,\r\n\t\t/*@NotNull*/\r\n\t\toffendingToken: Token,\r\n\t\tdeadEndConfigs: ATNConfigSet | undefined,\r\n\t\t/*@NotNull*/\r\n\t\tctx: ParserRuleContext);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Recognizer,\r\n\t\tinput?: TokenStream,\r\n\t\tstartToken?: Token,\r\n\t\toffendingToken?: Token,\r\n\t\tdeadEndConfigs?: ATNConfigSet,\r\n\t\tctx?: ParserRuleContext) {\r\n\t\tif (recognizer instanceof Parser) {\r\n\t\t\tif (input === undefined) {\r\n\t\t\t\tinput = recognizer.inputStream;\r\n\t\t\t}\r\n\r\n\t\t\tif (startToken === undefined) {\r\n\t\t\t\tstartToken = recognizer.currentToken;\r\n\t\t\t}\r\n\r\n\t\t\tif (offendingToken === undefined) {\r\n\t\t\t\toffendingToken = recognizer.currentToken;\r\n\t\t\t}\r\n\r\n\t\t\tif (ctx === undefined) {\r\n\t\t\t\tctx = recognizer.context;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsuper(recognizer, input, ctx);\r\n\t\tthis._deadEndConfigs = deadEndConfigs;\r\n\t\tthis._startToken = startToken as Token;\r\n\t\tthis.setOffendingToken(recognizer, offendingToken);\r\n\t}\r\n\r\n\tget startToken(): Token {\r\n\t\treturn this._startToken;\r\n\t}\r\n\r\n\tget deadEndConfigs(): ATNConfigSet | undefined {\r\n\t\treturn this._deadEndConfigs;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.8290527-07:00\r\n\r\nimport { ANTLRErrorStrategy } from \"./ANTLRErrorStrategy\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { ATNStateType } from \"./atn/ATNStateType\";\r\nimport { FailedPredicateException } from \"./FailedPredicateException\";\r\nimport { InputMismatchException } from \"./InputMismatchException\";\r\nimport { IntervalSet } from \"./misc/IntervalSet\";\r\nimport { NoViableAltException } from \"./NoViableAltException\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { PredictionContext } from \"./atn/PredictionContext\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { RuleTransition } from \"./atn/RuleTransition\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\nimport { Override, NotNull } from \"./Decorators\";\r\n\r\n/**\r\n * This is the default implementation of {@link ANTLRErrorStrategy} used for\r\n * error reporting and recovery in ANTLR parsers.\r\n */\r\nexport class DefaultErrorStrategy implements ANTLRErrorStrategy {\r\n\t/**\r\n\t * Indicates whether the error strategy is currently \"recovering from an\r\n\t * error\". This is used to suppress reporting multiple error messages while\r\n\t * attempting to recover from a detected syntax error.\r\n\t *\r\n\t * @see #inErrorRecoveryMode\r\n\t */\r\n\tprotected errorRecoveryMode: boolean = false;\r\n\r\n\t/** The index into the input stream where the last error occurred.\r\n\t * \tThis is used to prevent infinite loops where an error is found\r\n\t * but no token is consumed during recovery...another error is found,\r\n\t * ad nauseum. This is a failsafe mechanism to guarantee that at least\r\n\t * one token/tree node is consumed for two errors.\r\n\t */\r\n\tprotected lastErrorIndex: number = -1;\r\n\r\n\tprotected lastErrorStates?: IntervalSet;\r\n\r\n\t/**\r\n\t * This field is used to propagate information about the lookahead following\r\n\t * the previous match. Since prediction prefers completing the current rule\r\n\t * to error recovery efforts, error reporting may occur later than the\r\n\t * original point where it was discoverable. The original context is used to\r\n\t * compute the true expected sets as though the reporting occurred as early\r\n\t * as possible.\r\n\t */\r\n\tprotected nextTokensContext?: ParserRuleContext;\r\n\r\n\t/**\r\n\t * @see #nextTokensContext\r\n\t */\r\n\tprotected nextTokensState: number = ATNState.INVALID_STATE_NUMBER;\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation simply calls {@link #endErrorCondition} to\r\n\t * ensure that the handler is not in error recovery mode.\r\n\t */\r\n\t@Override\r\n\tpublic reset(recognizer: Parser): void {\r\n\t\tthis.endErrorCondition(recognizer);\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to enter error recovery mode when a recognition\r\n\t * exception is reported.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\tprotected beginErrorCondition(@NotNull recognizer: Parser): void {\r\n\t\tthis.errorRecoveryMode = true;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tpublic inErrorRecoveryMode(recognizer: Parser): boolean {\r\n\t\treturn this.errorRecoveryMode;\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to leave error recovery mode after recovering from\r\n\t * a recognition exception.\r\n\t *\r\n\t * @param recognizer\r\n\t */\r\n\tprotected endErrorCondition(@NotNull recognizer: Parser): void {\r\n\t\tthis.errorRecoveryMode = false;\r\n\t\tthis.lastErrorStates = undefined;\r\n\t\tthis.lastErrorIndex = -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation simply calls {@link #endErrorCondition}.\r\n\t */\r\n\t@Override\r\n\tpublic reportMatch(recognizer: Parser): void {\r\n\t\tthis.endErrorCondition(recognizer);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation returns immediately if the handler is already\r\n\t * in error recovery mode. Otherwise, it calls {@link #beginErrorCondition}\r\n\t * and dispatches the reporting task based on the runtime type of `e`\r\n\t * according to the following table.\r\n\t *\r\n\t * * {@link NoViableAltException}: Dispatches the call to\r\n\t * {@link #reportNoViableAlternative}\r\n\t * * {@link InputMismatchException}: Dispatches the call to\r\n\t * {@link #reportInputMismatch}\r\n\t * * {@link FailedPredicateException}: Dispatches the call to\r\n\t * {@link #reportFailedPredicate}\r\n\t * * All other types: calls {@link Parser#notifyErrorListeners} to report\r\n\t * the exception\r\n\t */\r\n\t@Override\r\n\tpublic reportError(\r\n\t\trecognizer: Parser,\r\n\t\te: RecognitionException): void {\r\n\t\t// if we've already reported an error and have not matched a token\r\n\t\t// yet successfully, don't report any errors.\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n//\t\t\tSystem.err.print(\"[SPURIOUS] \");\r\n\t\t\treturn; // don't report spurious errors\r\n\t\t}\r\n\t\tthis.beginErrorCondition(recognizer);\r\n\t\tif (e instanceof NoViableAltException) {\r\n\t\t\tthis.reportNoViableAlternative(recognizer, e);\r\n\t\t}\r\n\t\telse if (e instanceof InputMismatchException) {\r\n\t\t\tthis.reportInputMismatch(recognizer, e);\r\n\t\t}\r\n\t\telse if (e instanceof FailedPredicateException) {\r\n\t\t\tthis.reportFailedPredicate(recognizer, e);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tconsole.error(`unknown recognition error type: ${e}`);\r\n\t\t\tthis.notifyErrorListeners(recognizer, e.toString(), e);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected notifyErrorListeners(@NotNull recognizer: Parser, message: string, e: RecognitionException): void {\r\n\t\tlet offendingToken: Token | null | undefined = e.getOffendingToken(recognizer);\r\n\t\tif (offendingToken === undefined) {\r\n\t\t\t// Pass null to notifyErrorListeners so it in turn calls the error listeners with undefined as the offending\r\n\t\t\t// token. If we passed undefined, it would instead call the listeners with currentToken from the parser.\r\n\t\t\toffendingToken = null;\r\n\t\t}\r\n\r\n\t\trecognizer.notifyErrorListeners(message, offendingToken, e);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation resynchronizes the parser by consuming tokens\r\n\t * until we find one in the resynchronization set--loosely the set of tokens\r\n\t * that can follow the current rule.\r\n\t */\r\n\t@Override\r\n\tpublic recover(recognizer: Parser, e: RecognitionException): void {\r\n//\t\tSystem.out.println(\"recover in \"+recognizer.getRuleInvocationStack()+\r\n//\t\t\t\t\t\t \" index=\"+recognizer.inputStream.index+\r\n//\t\t\t\t\t\t \", lastErrorIndex=\"+\r\n//\t\t\t\t\t\t lastErrorIndex+\r\n//\t\t\t\t\t\t \", states=\"+lastErrorStates);\r\n\t\tif (this.lastErrorIndex === recognizer.inputStream.index &&\r\n\t\t\tthis.lastErrorStates &&\r\n\t\t\tthis.lastErrorStates.contains(recognizer.state)) {\r\n\t\t\t// uh oh, another error at same token index and previously-visited\r\n\t\t\t// state in ATN; must be a case where LT(1) is in the recovery\r\n\t\t\t// token set so nothing got consumed. Consume a single token\r\n\t\t\t// at least to prevent an infinite loop; this is a failsafe.\r\n//\t\t\tSystem.err.println(\"seen error condition before index=\"+\r\n//\t\t\t\t\t\t\t lastErrorIndex+\", states=\"+lastErrorStates);\r\n//\t\t\tSystem.err.println(\"FAILSAFE consumes \"+recognizer.getTokenNames()[recognizer.inputStream.LA(1)]);\r\n\t\t\trecognizer.consume();\r\n\t\t}\r\n\t\tthis.lastErrorIndex = recognizer.inputStream.index;\r\n\t\tif (!this.lastErrorStates) {\r\n\t\t\tthis.lastErrorStates = new IntervalSet();\r\n\t\t}\r\n\t\tthis.lastErrorStates.add(recognizer.state);\r\n\t\tlet followSet: IntervalSet = this.getErrorRecoverySet(recognizer);\r\n\t\tthis.consumeUntil(recognizer, followSet);\r\n\t}\r\n\r\n\t/**\r\n\t * The default implementation of {@link ANTLRErrorStrategy#sync} makes sure\r\n\t * that the current lookahead symbol is consistent with what were expecting\r\n\t * at this point in the ATN. You can call this anytime but ANTLR only\r\n\t * generates code to check before subrules/loops and each iteration.\r\n\t *\r\n\t * Implements Jim Idle's magic sync mechanism in closures and optional\r\n\t * subrules. E.g.,\r\n\t *\r\n\t * ```antlr\r\n\t * a : sync ( stuff sync )* ;\r\n\t * sync : {consume to what can follow sync} ;\r\n\t * ```\r\n\t *\r\n\t * At the start of a sub rule upon error, {@link #sync} performs single\r\n\t * token deletion, if possible. If it can't do that, it bails on the current\r\n\t * rule and uses the default error recovery, which consumes until the\r\n\t * resynchronization set of the current rule.\r\n\t *\r\n\t * If the sub rule is optional (`(...)?`, `(...)*`, or block\r\n\t * with an empty alternative), then the expected set includes what follows\r\n\t * the subrule.\r\n\t *\r\n\t * During loop iteration, it consumes until it sees a token that can start a\r\n\t * sub rule or what follows loop. Yes, that is pretty aggressive. We opt to\r\n\t * stay in the loop as long as possible.\r\n\t *\r\n\t * **ORIGINS**\r\n\t *\r\n\t * Previous versions of ANTLR did a poor job of their recovery within loops.\r\n\t * A single mismatch token or missing token would force the parser to bail\r\n\t * out of the entire rules surrounding the loop. So, for rule\r\n\t *\r\n\t * ```antlr\r\n\t * classDef : 'class' ID '{' member* '}'\r\n\t * ```\r\n\t *\r\n\t * input with an extra token between members would force the parser to\r\n\t * consume until it found the next class definition rather than the next\r\n\t * member definition of the current class.\r\n\t *\r\n\t * This functionality cost a little bit of effort because the parser has to\r\n\t * compare token set at the start of the loop and at each iteration. If for\r\n\t * some reason speed is suffering for you, you can turn off this\r\n\t * functionality by simply overriding this method as a blank { }.\r\n\t */\r\n\t@Override\r\n\tpublic sync(recognizer: Parser): void {\r\n\t\tlet s: ATNState = recognizer.interpreter.atn.states[recognizer.state];\r\n//\t\tSystem.err.println(\"sync @ \"+s.stateNumber+\"=\"+s.getClass().getSimpleName());\r\n\t\t// If already recovering, don't try to sync\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet tokens: TokenStream = recognizer.inputStream;\r\n\t\tlet la: number = tokens.LA(1);\r\n\r\n\t\t// try cheaper subset first; might get lucky. seems to shave a wee bit off\r\n\t\tlet nextTokens: IntervalSet = recognizer.atn.nextTokens(s);\r\n\t\tif (nextTokens.contains(la)) {\r\n\t\t\t// We are sure the token matches\r\n\t\t\tthis.nextTokensContext = undefined;\r\n\t\t\tthis.nextTokensState = ATNState.INVALID_STATE_NUMBER;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (nextTokens.contains(Token.EPSILON)) {\r\n\t\t\tif (this.nextTokensContext === undefined) {\r\n\t\t\t\t// It's possible the next token won't match; information tracked\r\n\t\t\t\t// by sync is restricted for performance.\r\n\t\t\t\tthis.nextTokensContext = recognizer.context;\r\n\t\t\t\tthis.nextTokensState = recognizer.state;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tswitch (s.stateType) {\r\n\t\tcase ATNStateType.BLOCK_START:\r\n\t\tcase ATNStateType.STAR_BLOCK_START:\r\n\t\tcase ATNStateType.PLUS_BLOCK_START:\r\n\t\tcase ATNStateType.STAR_LOOP_ENTRY:\r\n\t\t\t// report error and recover if possible\r\n\t\t\tif (this.singleTokenDeletion(recognizer)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthrow new InputMismatchException(recognizer);\r\n\r\n\t\tcase ATNStateType.PLUS_LOOP_BACK:\r\n\t\tcase ATNStateType.STAR_LOOP_BACK:\r\n//\t\t\tSystem.err.println(\"at loop back: \"+s.getClass().getSimpleName());\r\n\t\t\tthis.reportUnwantedToken(recognizer);\r\n\t\t\tlet expecting: IntervalSet = recognizer.getExpectedTokens();\r\n\t\t\tlet whatFollowsLoopIterationOrRule: IntervalSet =\r\n\t\t\t\texpecting.or(this.getErrorRecoverySet(recognizer));\r\n\t\t\tthis.consumeUntil(recognizer, whatFollowsLoopIterationOrRule);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\t// do nothing if we can't identify the exact kind of ATN state\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This is called by {@link #reportError} when the exception is a\r\n\t * {@link NoViableAltException}.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception\r\n\t */\r\n\tprotected reportNoViableAlternative(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull e: NoViableAltException): void {\r\n\t\tlet tokens: TokenStream = recognizer.inputStream;\r\n\t\tlet input: string;\r\n\t\tif (tokens) {\r\n\t\t\tif (e.startToken.type === Token.EOF) {\r\n\t\t\t\tinput = \"\";\r\n\t\t\t} else {\r\n\t\t\t\tinput = tokens.getTextFromRange(e.startToken, e.getOffendingToken());\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tinput = \"\";\r\n\t\t}\r\n\t\tlet msg: string = \"no viable alternative at input \" + this.escapeWSAndQuote(input);\r\n\t\tthis.notifyErrorListeners(recognizer, msg, e);\r\n\t}\r\n\r\n\t/**\r\n\t * This is called by {@link #reportError} when the exception is an\r\n\t * {@link InputMismatchException}.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception\r\n\t */\r\n\tprotected reportInputMismatch(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull e: InputMismatchException): void {\r\n\t\tlet expected = e.expectedTokens;\r\n\t\tlet expectedString = expected ? expected.toStringVocabulary(recognizer.vocabulary) : \"\";\r\n\t\tlet msg: string = \"mismatched input \" + this.getTokenErrorDisplay(e.getOffendingToken(recognizer)) +\r\n\t\t\t\" expecting \" + expectedString;\r\n\t\tthis.notifyErrorListeners(recognizer, msg, e);\r\n\t}\r\n\r\n\t/**\r\n\t * This is called by {@link #reportError} when the exception is a\r\n\t * {@link FailedPredicateException}.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception\r\n\t */\r\n\tprotected reportFailedPredicate(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull e: FailedPredicateException): void {\r\n\t\tlet ruleName: string = recognizer.ruleNames[recognizer.context.ruleIndex];\r\n\t\tlet msg: string = \"rule \" + ruleName + \" \" + e.message;\r\n\t\tthis.notifyErrorListeners(recognizer, msg, e);\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to report a syntax error which requires the removal\r\n\t * of a token from the input stream. At the time this method is called, the\r\n\t * erroneous symbol is current `LT(1)` symbol and has not yet been\r\n\t * removed from the input stream. When this method returns,\r\n\t * `recognizer` is in error recovery mode.\r\n\t *\r\n\t * This method is called when {@link #singleTokenDeletion} identifies\r\n\t * single-token deletion as a viable recovery strategy for a mismatched\r\n\t * input error.\r\n\t *\r\n\t * The default implementation simply returns if the handler is already in\r\n\t * error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to\r\n\t * enter error recovery mode, followed by calling\r\n\t * {@link Parser#notifyErrorListeners}.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\tprotected reportUnwantedToken(@NotNull recognizer: Parser): void {\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.beginErrorCondition(recognizer);\r\n\r\n\t\tlet t: Token = recognizer.currentToken;\r\n\t\tlet tokenName: string = this.getTokenErrorDisplay(t);\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tlet msg: string = \"extraneous input \" + tokenName + \" expecting \" +\r\n\t\t\texpecting.toStringVocabulary(recognizer.vocabulary);\r\n\t\trecognizer.notifyErrorListeners(msg, t, undefined);\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to report a syntax error which requires the\r\n\t * insertion of a missing token into the input stream. At the time this\r\n\t * method is called, the missing token has not yet been inserted. When this\r\n\t * method returns, `recognizer` is in error recovery mode.\r\n\t *\r\n\t * This method is called when {@link #singleTokenInsertion} identifies\r\n\t * single-token insertion as a viable recovery strategy for a mismatched\r\n\t * input error.\r\n\t *\r\n\t * The default implementation simply returns if the handler is already in\r\n\t * error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to\r\n\t * enter error recovery mode, followed by calling\r\n\t * {@link Parser#notifyErrorListeners}.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\tprotected reportMissingToken(@NotNull recognizer: Parser): void {\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.beginErrorCondition(recognizer);\r\n\r\n\t\tlet t: Token = recognizer.currentToken;\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tlet msg: string = \"missing \" + expecting.toStringVocabulary(recognizer.vocabulary) +\r\n\t\t\t\" at \" + this.getTokenErrorDisplay(t);\r\n\r\n\t\trecognizer.notifyErrorListeners(msg, t, undefined);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation attempts to recover from the mismatched input\r\n\t * by using single token insertion and deletion as described below. If the\r\n\t * recovery attempt fails, this method\r\n\t * {@link InputMismatchException}.\r\n\t *\r\n\t * **EXTRA TOKEN** (single token deletion)\r\n\t *\r\n\t * `LA(1)` is not what we are looking for. If `LA(2)` has the\r\n\t * right token, however, then assume `LA(1)` is some extra spurious\r\n\t * token and delete it. Then consume and return the next token (which was\r\n\t * the `LA(2)` token) as the successful result of the match operation.\r\n\t *\r\n\t * This recovery strategy is implemented by {@link #singleTokenDeletion}.\r\n\t *\r\n\t * **MISSING TOKEN** (single token insertion)\r\n\t *\r\n\t * If current token (at `LA(1)`) is consistent with what could come\r\n\t * after the expected `LA(1)` token, then assume the token is missing\r\n\t * and use the parser's {@link TokenFactory} to create it on the fly. The\r\n\t * \"insertion\" is performed by returning the created token as the successful\r\n\t * result of the match operation.\r\n\t *\r\n\t * This recovery strategy is implemented by {@link #singleTokenInsertion}.\r\n\t *\r\n\t * **EXAMPLE**\r\n\t *\r\n\t * For example, Input `i=(3;` is clearly missing the `')'`. When\r\n\t * the parser returns from the nested call to `expr`, it will have\r\n\t * call chain:\r\n\t *\r\n\t * ```\r\n\t * stat \u2192 expr \u2192 atom\r\n\t * ```\r\n\t *\r\n\t * and it will be trying to match the `')'` at this point in the\r\n\t * derivation:\r\n\t *\r\n\t * ```\r\n\t * => ID '=' '(' INT ')' ('+' atom)* ';'\r\n\t * ^\r\n\t * ```\r\n\t *\r\n\t * The attempt to match `')'` will fail when it sees `';'` and\r\n\t * call {@link #recoverInline}. To recover, it sees that `LA(1)==';'`\r\n\t * is in the set of tokens that can follow the `')'` token reference\r\n\t * in rule `atom`. It can assume that you forgot the `')'`.\r\n\t */\r\n\t@Override\r\n\tpublic recoverInline(recognizer: Parser): Token {\r\n\t\t// SINGLE TOKEN DELETION\r\n\t\tlet matchedSymbol = this.singleTokenDeletion(recognizer);\r\n\t\tif (matchedSymbol) {\r\n\t\t\t// we have deleted the extra token.\r\n\t\t\t// now, move past ttype token as if all were ok\r\n\t\t\trecognizer.consume();\r\n\t\t\treturn matchedSymbol;\r\n\t\t}\r\n\r\n\t\t// SINGLE TOKEN INSERTION\r\n\t\tif (this.singleTokenInsertion(recognizer)) {\r\n\t\t\treturn this.getMissingSymbol(recognizer);\r\n\t\t}\r\n\r\n\t\t// even that didn't work; must throw the exception\r\n\t\tif (this.nextTokensContext === undefined) {\r\n\t\t\tthrow new InputMismatchException(recognizer);\r\n\t\t} else {\r\n\t\t\tthrow new InputMismatchException(recognizer, this.nextTokensState, this.nextTokensContext);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This method implements the single-token insertion inline error recovery\r\n\t * strategy. It is called by {@link #recoverInline} if the single-token\r\n\t * deletion strategy fails to recover from the mismatched input. If this\r\n\t * method returns `true`, `recognizer` will be in error recovery\r\n\t * mode.\r\n\t *\r\n\t * This method determines whether or not single-token insertion is viable by\r\n\t * checking if the `LA(1)` input symbol could be successfully matched\r\n\t * if it were instead the `LA(2)` symbol. If this method returns\r\n\t * `true`, the caller is responsible for creating and inserting a\r\n\t * token with the correct type to produce this behavior.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @returns `true` if single-token insertion is a viable recovery\r\n\t * strategy for the current mismatched input, otherwise `false`\r\n\t */\r\n\tprotected singleTokenInsertion(@NotNull recognizer: Parser): boolean {\r\n\t\tlet currentSymbolType: number = recognizer.inputStream.LA(1);\r\n\t\t// if current token is consistent with what could come after current\r\n\t\t// ATN state, then we know we're missing a token; error recovery\r\n\t\t// is free to conjure up and insert the missing token\r\n\t\tlet currentState = recognizer.interpreter.atn.states[recognizer.state];\r\n\t\tlet next: ATNState = currentState.transition(0).target;\r\n\t\tlet atn: ATN = recognizer.interpreter.atn;\r\n\t\tlet expectingAtLL2: IntervalSet = atn.nextTokens(next, PredictionContext.fromRuleContext(atn, recognizer.context));\r\n//\t\tconsole.warn(\"LT(2) set=\"+expectingAtLL2.toString(recognizer.getTokenNames()));\r\n\t\tif (expectingAtLL2.contains(currentSymbolType)) {\r\n\t\t\tthis.reportMissingToken(recognizer);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * This method implements the single-token deletion inline error recovery\r\n\t * strategy. It is called by {@link #recoverInline} to attempt to recover\r\n\t * from mismatched input. If this method returns `undefined`, the parser and error\r\n\t * handler state will not have changed. If this method returns non-`undefined`,\r\n\t * `recognizer` will *not* be in error recovery mode since the\r\n\t * returned token was a successful match.\r\n\t *\r\n\t * If the single-token deletion is successful, this method calls\r\n\t * {@link #reportUnwantedToken} to report the error, followed by\r\n\t * {@link Parser#consume} to actually \"delete\" the extraneous token. Then,\r\n\t * before returning {@link #reportMatch} is called to signal a successful\r\n\t * match.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @returns the successfully matched {@link Token} instance if single-token\r\n\t * deletion successfully recovers from the mismatched input, otherwise\r\n\t * `undefined`\r\n\t */\r\n\tprotected singleTokenDeletion(@NotNull recognizer: Parser): Token | undefined {\r\n\t\tlet nextTokenType: number = recognizer.inputStream.LA(2);\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tif (expecting.contains(nextTokenType)) {\r\n\t\t\tthis.reportUnwantedToken(recognizer);\r\n\t\t\t/*\r\n\t\t\tSystem.err.println(\"recoverFromMismatchedToken deleting \"+\r\n\t\t\t\t\t\t\t ((TokenStream)recognizer.inputStream).LT(1)+\r\n\t\t\t\t\t\t\t \" since \"+((TokenStream)recognizer.inputStream).LT(2)+\r\n\t\t\t\t\t\t\t \" is what we want\");\r\n\t\t\t*/\r\n\t\t\trecognizer.consume(); // simply delete extra token\r\n\t\t\t// we want to return the token we're actually matching\r\n\t\t\tlet matchedSymbol: Token = recognizer.currentToken;\r\n\t\t\tthis.reportMatch(recognizer); // we know current token is correct\r\n\t\t\treturn matchedSymbol;\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/** Conjure up a missing token during error recovery.\r\n\t *\r\n\t * The recognizer attempts to recover from single missing\r\n\t * symbols. But, actions might refer to that missing symbol.\r\n\t * For example, x=ID {f($x);}. The action clearly assumes\r\n\t * that there has been an identifier matched previously and that\r\n\t * $x points at that token. If that token is missing, but\r\n\t * the next token in the stream is what we want we assume that\r\n\t * this token is missing and we keep going. Because we\r\n\t * have to return some token to replace the missing token,\r\n\t * we have to conjure one up. This method gives the user control\r\n\t * over the tokens returned for missing tokens. Mostly,\r\n\t * you will want to create something special for identifier\r\n\t * tokens. For literals such as '{' and ',', the default\r\n\t * action in the parser or tree parser works. It simply creates\r\n\t * a CommonToken of the appropriate type. The text will be the token.\r\n\t * If you change what tokens must be created by the lexer,\r\n\t * override this method to create the appropriate tokens.\r\n\t */\r\n\t@NotNull\r\n\tprotected getMissingSymbol(@NotNull recognizer: Parser): Token {\r\n\t\tlet currentSymbol: Token = recognizer.currentToken;\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tlet expectedTokenType: number = Token.INVALID_TYPE;\r\n\t\tif (!expecting.isNil) {\r\n\t\t\t// get any element\r\n\t\t\texpectedTokenType = expecting.minElement;\r\n\t\t}\r\n\r\n\t\tlet tokenText: string;\r\n\t\tif (expectedTokenType === Token.EOF) {\r\n\t\t\ttokenText = \"\";\r\n\t\t} else {\r\n\t\t\ttokenText = \"\";\r\n\t\t}\r\n\t\tlet current: Token = currentSymbol;\r\n\t\tlet lookback = recognizer.inputStream.tryLT(-1);\r\n\t\tif (current.type === Token.EOF && lookback != null) {\r\n\t\t\tcurrent = lookback;\r\n\t\t}\r\n\r\n\t\treturn this.constructToken(recognizer.inputStream.tokenSource, expectedTokenType, tokenText, current);\r\n\t}\r\n\r\n\tprotected constructToken(\r\n\t\ttokenSource: TokenSource,\r\n\t\texpectedTokenType: number,\r\n\t\ttokenText: string,\r\n\t\tcurrent: Token): Token {\r\n\t\tlet factory: TokenFactory = tokenSource.tokenFactory;\r\n\t\tlet x = current.tokenSource;\r\n\t\tlet stream = x ? x.inputStream : undefined;\r\n\r\n\t\treturn factory.create(\r\n\t\t\t{ source: tokenSource, stream },\r\n\t\t\texpectedTokenType, tokenText,\r\n\t\t\tToken.DEFAULT_CHANNEL,\r\n\t\t\t-1, -1,\r\n\t\t\tcurrent.line, current.charPositionInLine);\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected getExpectedTokens(@NotNull recognizer: Parser): IntervalSet {\r\n\t\treturn recognizer.getExpectedTokens();\r\n\t}\r\n\r\n\t/** How should a token be displayed in an error message? The default\r\n\t * is to display just the text, but during development you might\r\n\t * want to have a lot of information spit out. Override in that case\r\n\t * to use t.toString() (which, for CommonToken, dumps everything about\r\n\t * the token). This is better than forcing you to override a method in\r\n\t * your token objects because you don't have to go modify your lexer\r\n\t * so that it creates a new Java type.\r\n\t */\r\n\tprotected getTokenErrorDisplay(t: Token | undefined): string {\r\n\t\tif (!t) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tlet s = this.getSymbolText(t);\r\n\t\tif (!s) {\r\n\t\t\tif (this.getSymbolType(t) === Token.EOF) {\r\n\t\t\t\ts = \"\";\r\n\t\t\t} else {\r\n\t\t\t\ts = `<${this.getSymbolType(t)}>`;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this.escapeWSAndQuote(s);\r\n\t}\r\n\r\n\tprotected getSymbolText(@NotNull symbol: Token): string | undefined {\r\n\t\treturn symbol.text;\r\n\t}\r\n\r\n\tprotected getSymbolType(@NotNull symbol: Token): number {\r\n\t\treturn symbol.type;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected escapeWSAndQuote(@NotNull s: string): string {\r\n//\t\tif ( s==null ) return s;\r\n\t\ts = s.replace(\"\\n\", \"\\\\n\");\r\n\t\ts = s.replace(\"\\r\", \"\\\\r\");\r\n\t\ts = s.replace(\"\\t\", \"\\\\t\");\r\n\t\treturn \"'\" + s + \"'\";\r\n\t}\r\n\r\n\t/* Compute the error recovery set for the current rule. During\r\n\t * rule invocation, the parser pushes the set of tokens that can\r\n\t * follow that rule reference on the stack; this amounts to\r\n\t * computing FIRST of what follows the rule reference in the\r\n\t * enclosing rule. See LinearApproximator.FIRST().\r\n\t * This local follow set only includes tokens\r\n\t * from within the rule; i.e., the FIRST computation done by\r\n\t * ANTLR stops at the end of a rule.\r\n\t *\r\n\t * EXAMPLE\r\n\t *\r\n\t * When you find a \"no viable alt exception\", the input is not\r\n\t * consistent with any of the alternatives for rule r. The best\r\n\t * thing to do is to consume tokens until you see something that\r\n\t * can legally follow a call to r *or* any rule that called r.\r\n\t * You don't want the exact set of viable next tokens because the\r\n\t * input might just be missing a token--you might consume the\r\n\t * rest of the input looking for one of the missing tokens.\r\n\t *\r\n\t * Consider grammar:\r\n\t *\r\n\t * a : '[' b ']'\r\n\t * | '(' b ')'\r\n\t * ;\r\n\t * b : c '^' INT ;\r\n\t * c : ID\r\n\t * | INT\r\n\t * ;\r\n\t *\r\n\t * At each rule invocation, the set of tokens that could follow\r\n\t * that rule is pushed on a stack. Here are the various\r\n\t * context-sensitive follow sets:\r\n\t *\r\n\t * FOLLOW(b1_in_a) = FIRST(']') = ']'\r\n\t * FOLLOW(b2_in_a) = FIRST(')') = ')'\r\n\t * FOLLOW(c_in_b) = FIRST('^') = '^'\r\n\t *\r\n\t * Upon erroneous input \"[]\", the call chain is\r\n\t *\r\n\t * a -> b -> c\r\n\t *\r\n\t * and, hence, the follow context stack is:\r\n\t *\r\n\t * depth follow set start of rule execution\r\n\t * 0 a (from main())\r\n\t * 1 ']' b\r\n\t * 2 '^' c\r\n\t *\r\n\t * Notice that ')' is not included, because b would have to have\r\n\t * been called from a different context in rule a for ')' to be\r\n\t * included.\r\n\t *\r\n\t * For error recovery, we cannot consider FOLLOW(c)\r\n\t * (context-sensitive or otherwise). We need the combined set of\r\n\t * all context-sensitive FOLLOW sets--the set of all tokens that\r\n\t * could follow any reference in the call chain. We need to\r\n\t * resync to one of those tokens. Note that FOLLOW(c)='^' and if\r\n\t * we resync'd to that token, we'd consume until EOF. We need to\r\n\t * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.\r\n\t * In this case, for input \"[]\", LA(1) is ']' and in the set, so we would\r\n\t * not consume anything. After printing an error, rule c would\r\n\t * return normally. Rule b would not find the required '^' though.\r\n\t * At this point, it gets a mismatched token error and\r\n\t * exception (since LA(1) is not in the viable following token\r\n\t * set). The rule exception handler tries to recover, but finds\r\n\t * the same recovery set and doesn't consume anything. Rule b\r\n\t * exits normally returning to rule a. Now it finds the ']' (and\r\n\t * with the successful match exits errorRecovery mode).\r\n\t *\r\n\t * So, you can see that the parser walks up the call chain looking\r\n\t * for the token that was a member of the recovery set.\r\n\t *\r\n\t * Errors are not generated in errorRecovery mode.\r\n\t *\r\n\t * ANTLR's error recovery mechanism is based upon original ideas:\r\n\t *\r\n\t * \"Algorithms + Data Structures = Programs\" by Niklaus Wirth\r\n\t *\r\n\t * and\r\n\t *\r\n\t * \"A note on error recovery in recursive descent parsers\":\r\n\t * http://portal.acm.org/citation.cfm?id=947902.947905\r\n\t *\r\n\t * Later, Josef Grosch had some good ideas:\r\n\t *\r\n\t * \"Efficient and Comfortable Error Recovery in Recursive Descent\r\n\t * Parsers\":\r\n\t * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip\r\n\t *\r\n\t * Like Grosch I implement context-sensitive FOLLOW sets that are combined\r\n\t * at run-time upon error to avoid overhead during parsing.\r\n\t */\r\n\t@NotNull\r\n\tprotected getErrorRecoverySet(@NotNull recognizer: Parser): IntervalSet {\r\n\t\tlet atn: ATN = recognizer.interpreter.atn;\r\n\t\tlet ctx: RuleContext | undefined = recognizer.context;\r\n\t\tlet recoverSet: IntervalSet = new IntervalSet();\r\n\t\twhile (ctx && ctx.invokingState >= 0) {\r\n\t\t\t// compute what follows who invoked us\r\n\t\t\tlet invokingState: ATNState = atn.states[ctx.invokingState];\r\n\t\t\tlet rt = invokingState.transition(0) as RuleTransition;\r\n\t\t\tlet follow: IntervalSet = atn.nextTokens(rt.followState);\r\n\t\t\trecoverSet.addAll(follow);\r\n\t\t\tctx = ctx._parent;\r\n\t\t}\r\n\t\trecoverSet.remove(Token.EPSILON);\r\n//\t\tSystem.out.println(\"recover set \"+recoverSet.toString(recognizer.getTokenNames()));\r\n\t\treturn recoverSet;\r\n\t}\r\n\r\n\t/** Consume tokens until one matches the given token set. */\r\n\tprotected consumeUntil(@NotNull recognizer: Parser, @NotNull set: IntervalSet): void {\r\n//\t\tSystem.err.println(\"consumeUntil(\"+set.toString(recognizer.getTokenNames())+\")\");\r\n\t\tlet ttype: number = recognizer.inputStream.LA(1);\r\n\t\twhile (ttype !== Token.EOF && !set.contains(ttype)) {\r\n\t\t\t//System.out.println(\"consume during recover LA(1)=\"+getTokenNames()[input.LA(1)]);\r\n//\t\t\trecognizer.inputStream.consume();\r\n\t\t\trecognizer.consume();\r\n\t\t\tttype = recognizer.inputStream.LA(1);\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:49.2855056-07:00\r\n\r\nimport { DefaultErrorStrategy } from \"./DefaultErrorStrategy\";\r\nimport { Parser } from \"./Parser\";\r\nimport { InputMismatchException } from \"./InputMismatchException\";\r\nimport { Override } from \"./Decorators\";\r\nimport { ParseCancellationException } from \"./misc/ParseCancellationException\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Token } from \"./Token\";\r\n\r\n/**\r\n * This implementation of {@link ANTLRErrorStrategy} responds to syntax errors\r\n * by immediately canceling the parse operation with a\r\n * {@link ParseCancellationException}. The implementation ensures that the\r\n * {@link ParserRuleContext#exception} field is set for all parse tree nodes\r\n * that were not completed prior to encountering the error.\r\n *\r\n * This error strategy is useful in the following scenarios.\r\n *\r\n * * **Two-stage parsing:** This error strategy allows the first\r\n * stage of two-stage parsing to immediately terminate if an error is\r\n * encountered, and immediately fall back to the second stage. In addition to\r\n * avoiding wasted work by attempting to recover from errors here, the empty\r\n * implementation of {@link BailErrorStrategy#sync} improves the performance of\r\n * the first stage.\r\n * * **Silent validation:** When syntax errors are not being\r\n * reported or logged, and the parse result is simply ignored if errors occur,\r\n * the {@link BailErrorStrategy} avoids wasting work on recovering from errors\r\n * when the result will be ignored either way.\r\n *\r\n * ```\r\n * myparser.errorHandler = new BailErrorStrategy();\r\n * ```\r\n *\r\n * @see Parser.errorHandler\r\n */\r\nexport class BailErrorStrategy extends DefaultErrorStrategy {\r\n\t/** Instead of recovering from exception `e`, re-throw it wrapped\r\n\t * in a {@link ParseCancellationException} so it is not caught by the\r\n\t * rule function catches. Use {@link Exception#getCause()} to get the\r\n\t * original {@link RecognitionException}.\r\n\t */\r\n\t@Override\r\n\tpublic recover(recognizer: Parser, e: RecognitionException): void {\r\n\t\tfor (let context: ParserRuleContext | undefined = recognizer.context; context; context = context.parent) {\r\n\t\t\tcontext.exception = e;\r\n\t\t}\r\n\r\n\t\tthrow new ParseCancellationException(e);\r\n\t}\r\n\r\n\t/** Make sure we don't attempt to recover inline; if the parser\r\n\t * successfully recovers, it won't throw an exception.\r\n\t */\r\n\t@Override\r\n\tpublic recoverInline(recognizer: Parser): Token {\r\n\t\tlet e = new InputMismatchException(recognizer);\r\n\t\tfor (let context: ParserRuleContext | undefined = recognizer.context; context; context = context.parent) {\r\n\t\t\tcontext.exception = e;\r\n\t\t}\r\n\r\n\t\tthrow new ParseCancellationException(e);\r\n\t}\r\n\r\n\t/** Make sure we don't attempt to recover from problems in subrules. */\r\n\t@Override\r\n\tpublic sync(recognizer: Parser): void {\r\n\t\t// intentionally empty\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.0659297-07:00\r\n\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { IntStream } from \"./IntStream\";\r\n\r\n/** A source of characters for an ANTLR lexer. */\r\nexport interface CharStream extends IntStream {\r\n\t/**\r\n\t * This method returns the text for a range of characters within this input\r\n\t * stream. This method is guaranteed to not throw an exception if the\r\n\t * specified `interval` lies entirely within a marked range. For more\r\n\t * information about marked ranges, see {@link IntStream#mark}.\r\n\t *\r\n\t * @param interval an interval within the stream\r\n\t * @returns the text of the specified interval\r\n\t *\r\n\t * @throws NullPointerException if `interval` is `undefined`\r\n\t * @throws IllegalArgumentException if `interval.a < 0`, or if\r\n\t * `interval.b < interval.a - 1`, or if `interval.b` lies at or\r\n\t * past the end of the stream\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * getting the text of the specified interval\r\n\t */\r\n\t//@NotNull\r\n\tgetText(/*@NotNull*/ interval: Interval): string;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.1349829-07:00\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport enum Dependents {\r\n\r\n\t/**\r\n\t * The element is dependent upon the specified rule.\r\n\t */\r\n\tSELF,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's parents\r\n\t * (rules which directly reference it).\r\n\t */\r\n\tPARENTS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's children\r\n\t * (rules which it directly references).\r\n\t */\r\n\tCHILDREN,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's ancestors\r\n\t * (the transitive closure of `PARENTS` rules).\r\n\t */\r\n\tANCESTORS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's descendants\r\n\t * (the transitive closure of `CHILDREN` rules).\r\n\t */\r\n\tDESCENDANTS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's siblings\r\n\t * (the union of `CHILDREN` of its `PARENTS`).\r\n\t */\r\n\tSIBLINGS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's preceeding\r\n\t * siblings (the union of `CHILDREN` of its `PARENTS` which\r\n\t * appear before a reference to the rule).\r\n\t */\r\n\tPRECEEDING_SIBLINGS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's following\r\n\t * siblings (the union of `CHILDREN` of its `PARENTS` which\r\n\t * appear after a reference to the rule).\r\n\t */\r\n\tFOLLOWING_SIBLINGS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's preceeding\r\n\t * elements (rules which might end before the start of the specified rule\r\n\t * while parsing). This is calculated by taking the\r\n\t * `PRECEEDING_SIBLINGS` of the rule and each of its\r\n\t * `ANCESTORS`, along with the `DESCENDANTS` of those\r\n\t * elements.\r\n\t */\r\n\tPRECEEDING,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's following\r\n\t * elements (rules which might start after the end of the specified rule\r\n\t * while parsing). This is calculated by taking the\r\n\t * `FOLLOWING_SIBLINGS` of the rule and each of its\r\n\t * `ANCESTORS`, along with the `DESCENDANTS` of those\r\n\t * elements.\r\n\t */\r\n\tFOLLOWING,\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.2133685-07:00\r\n\r\nimport { ATNConfig } from \"./atn/ATNConfig\";\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserErrorListener } from \"./ParserErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { SimulatorState } from \"./atn/SimulatorState\";\r\nimport { Token } from \"./Token\";\r\nimport { Override, NotNull } from \"./Decorators\";\r\nimport { Interval } from \"./misc/Interval\";\r\n\r\n/**\r\n * This implementation of {@link ANTLRErrorListener} can be used to identify\r\n * certain potential correctness and performance problems in grammars. \"Reports\"\r\n * are made by calling {@link Parser#notifyErrorListeners} with the appropriate\r\n * message.\r\n *\r\n * * **Ambiguities**: These are cases where more than one path through the\r\n * grammar can match the input.\r\n * * **Weak context sensitivity**: These are cases where full-context\r\n * prediction resolved an SLL conflict to a unique alternative which equaled the\r\n * minimum alternative of the SLL conflict.\r\n * * **Strong (forced) context sensitivity**: These are cases where the\r\n * full-context prediction resolved an SLL conflict to a unique alternative,\r\n * *and* the minimum alternative of the SLL conflict was found to not be\r\n * a truly viable alternative. Two-stage parsing cannot be used for inputs where\r\n * this situation occurs.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class DiagnosticErrorListener implements ParserErrorListener {\r\n\r\n\t/**\r\n\t * Initializes a new instance of {@link DiagnosticErrorListener}, specifying\r\n\t * whether all ambiguities or only exact ambiguities are reported.\r\n\t *\r\n\t * @param exactOnly `true` to report only exact ambiguities, otherwise\r\n\t * `false` to report all ambiguities. Defaults to true.\r\n\t */\r\n\tconstructor(protected exactOnly: boolean = true) {\r\n\t\tthis.exactOnly = exactOnly;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic syntaxError(\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingSymbol: T | undefined,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\t/*@NotNull*/\r\n\t\tmsg: string,\r\n\t\te: RecognitionException | undefined): void\r\n\t{\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAmbiguity(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\tambigAlts: BitSet | undefined,\r\n\t\t@NotNull configs: ATNConfigSet): void {\r\n\t\tif (this.exactOnly && !exact) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet decision: string = this.getDecisionDescription(recognizer, dfa);\r\n\t\tlet conflictingAlts: BitSet = this.getConflictingAlts(ambigAlts, configs);\r\n\t\tlet text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex));\r\n\t\tlet message: string = `reportAmbiguity d=${decision}: ambigAlts=${conflictingAlts}, input='${text}'`;\r\n\t\trecognizer.notifyErrorListeners(message);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAttemptingFullContext(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tconflictingAlts: BitSet | undefined,\r\n\t\t@NotNull conflictState: SimulatorState): void {\r\n\t\tlet format: string = \"reportAttemptingFullContext d=%s, input='%s'\";\r\n\t\tlet decision: string = this.getDecisionDescription(recognizer, dfa);\r\n\t\tlet text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex));\r\n\t\tlet message: string = `reportAttemptingFullContext d=${decision}, input='${text}'`;\r\n\t\trecognizer.notifyErrorListeners(message);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportContextSensitivity(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tprediction: number,\r\n\t\t@NotNull acceptState: SimulatorState): void {\r\n\t\tlet format: string = \"reportContextSensitivity d=%s, input='%s'\";\r\n\t\tlet decision: string = this.getDecisionDescription(recognizer, dfa);\r\n\t\tlet text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex));\r\n\t\tlet message: string = `reportContextSensitivity d=${decision}, input='${text}'`;\r\n\t\trecognizer.notifyErrorListeners(message);\r\n\t}\r\n\r\n\tprotected getDecisionDescription(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA): string {\r\n\t\tlet decision: number = dfa.decision;\r\n\t\tlet ruleIndex: number = dfa.atnStartState.ruleIndex;\r\n\r\n\t\tlet ruleNames: string[] = recognizer.ruleNames;\r\n\t\tif (ruleIndex < 0 || ruleIndex >= ruleNames.length) {\r\n\t\t\treturn decision.toString();\r\n\t\t}\r\n\r\n\t\tlet ruleName: string = ruleNames[ruleIndex];\r\n\t\tif (!ruleName) {\r\n\t\t\treturn decision.toString();\r\n\t\t}\r\n\r\n\t\treturn `${decision} (${ruleName})`;\r\n\t}\r\n\r\n\t/**\r\n\t * Computes the set of conflicting or ambiguous alternatives from a\r\n\t * configuration set, if that information was not already provided by the\r\n\t * parser.\r\n\t *\r\n\t * @param reportedAlts The set of conflicting or ambiguous alternatives, as\r\n\t * reported by the parser.\r\n\t * @param configs The conflicting or ambiguous configuration set.\r\n\t * @returns Returns `reportedAlts` if it is not `undefined`, otherwise\r\n\t * returns the set of alternatives represented in `configs`.\r\n\t */\r\n\t@NotNull\r\n\tprotected getConflictingAlts(reportedAlts: BitSet | undefined, @NotNull configs: ATNConfigSet): BitSet {\r\n\t\tif (reportedAlts != null) {\r\n\t\t\treturn reportedAlts;\r\n\t\t}\r\n\r\n\t\tlet result: BitSet = new BitSet();\r\n\t\tfor (let config of configs) {\r\n\t\t\tresult.set(config.alt);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.9954566-07:00\r\n\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNType } from \"./atn/ATNType\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { LexerATNSimulator } from \"./atn/LexerATNSimulator\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\n\r\nexport class LexerInterpreter extends Lexer {\r\n\tprotected _grammarFileName: string;\r\n\tprotected _atn: ATN;\r\n\r\n\tprotected _ruleNames: string[];\r\n\tprotected _channelNames: string[];\r\n\tprotected _modeNames: string[];\r\n\t@NotNull\r\n\tprivate _vocabulary: Vocabulary;\r\n\r\n\tconstructor(grammarFileName: string, @NotNull vocabulary: Vocabulary, ruleNames: string[], channelNames: string[], modeNames: string[], atn: ATN, input: CharStream) {\r\n\t\tsuper(input);\r\n\r\n\t\tif (atn.grammarType !== ATNType.LEXER) {\r\n\t\t\tthrow new Error(\"IllegalArgumentException: The ATN must be a lexer ATN.\");\r\n\t\t}\r\n\r\n\t\tthis._grammarFileName = grammarFileName;\r\n\t\tthis._atn = atn;\r\n\r\n\t\tthis._ruleNames = ruleNames.slice(0);\r\n\t\tthis._channelNames = channelNames.slice(0);\r\n\t\tthis._modeNames = modeNames.slice(0);\r\n\t\tthis._vocabulary = vocabulary;\r\n\t\tthis._interp = new LexerATNSimulator(atn, this);\r\n\t}\r\n\r\n\t@Override\r\n\tget atn(): ATN {\r\n\t\treturn this._atn;\r\n\t}\r\n\r\n\t@Override\r\n\tget grammarFileName(): string {\r\n\t\treturn this._grammarFileName;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleNames(): string[] {\r\n\t\treturn this._ruleNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget channelNames(): string[] {\r\n\t\treturn this._channelNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget modeNames(): string[] {\r\n\t\treturn this._modeNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget vocabulary(): Vocabulary {\r\n\t\treturn this._vocabulary;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.9471863-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { Parser } from \"./Parser\";\r\nimport { SimulatorState } from \"./atn/SimulatorState\";\r\nimport { Token } from \"./Token\";\r\nimport * as Stubs from \"./misc/Stubs\";\r\nimport * as Exception from \"./RecognitionException\";\r\n\r\n/** How to emit recognition errors for parsers.\r\n */\r\nexport interface ParserErrorListener extends ANTLRErrorListener {\r\n\t/**\r\n\t * This method is called by the parser when a full-context prediction\r\n\t * results in an ambiguity.\r\n\t *\r\n\t * Each full-context prediction which does not result in a syntax error\r\n\t * will call either {@link #reportContextSensitivity} or\r\n\t * {@link #reportAmbiguity}.\r\n\t *\r\n\t * When `ambigAlts` is not `undefined`, it contains the set of potentially\r\n\t * viable alternatives identified by the prediction algorithm. When\r\n\t * `ambigAlts` is `undefined`, use\r\n\t * {@link ATNConfigSet#getRepresentedAlternatives} to obtain the represented\r\n\t * alternatives from the `configs` argument.\r\n\t *\r\n\t * When `exact` is `true`, *all* of the potentially\r\n\t * viable alternatives are truly viable, i.e. this is reporting an exact\r\n\t * ambiguity. When `exact` is `false`, *at least two* of\r\n\t * the potentially viable alternatives are viable for the current input, but\r\n\t * the prediction algorithm terminated as soon as it determined that at\r\n\t * least the *minimum* potentially viable alternative is truly\r\n\t * viable.\r\n\t *\r\n\t * When the {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} prediction\r\n\t * mode is used, the parser is required to identify exact ambiguities so\r\n\t * `exact` will always be `true`.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param dfa the DFA for the current decision\r\n\t * @param startIndex the input index where the decision started\r\n\t * @param stopIndex the input input where the ambiguity was identified\r\n\t * @param exact `true` if the ambiguity is exactly known, otherwise\r\n\t * `false`. This is always `true` when\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} is used.\r\n\t * @param ambigAlts the potentially ambiguous alternatives, or `undefined`\r\n\t * to indicate that the potentially ambiguous alternatives are the complete\r\n\t * set of represented alternatives in `configs`\r\n\t * @param configs the ATN configuration set where the ambiguity was\r\n\t * identified\r\n\t */\r\n\treportAmbiguity?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Parser,\r\n\t\t/*@NotNull*/\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\tambigAlts: BitSet | undefined,\r\n\t\t/*@NotNull*/\r\n\t\tconfigs: ATNConfigSet) => void;\r\n\r\n\t/**\r\n\t * This method is called when an SLL conflict occurs and the parser is about\r\n\t * to use the full context information to make an LL decision.\r\n\t *\r\n\t * If one or more configurations in `configs` contains a semantic\r\n\t * predicate, the predicates are evaluated before this method is called. The\r\n\t * subset of alternatives which are still viable after predicates are\r\n\t * evaluated is reported in `conflictingAlts`.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param dfa the DFA for the current decision\r\n\t * @param startIndex the input index where the decision started\r\n\t * @param stopIndex the input index where the SLL conflict occurred\r\n\t * @param conflictingAlts The specific conflicting alternatives. If this is\r\n\t * `undefined`, the conflicting alternatives are all alternatives\r\n\t * represented in `configs`.\r\n\t * @param conflictState the simulator state when the SLL conflict was\r\n\t * detected\r\n\t */\r\n\treportAttemptingFullContext?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Parser,\r\n\t\t/*@NotNull*/\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tconflictingAlts: BitSet | undefined,\r\n\t\t/*@NotNull*/\r\n\t\tconflictState: SimulatorState) => void;\r\n\r\n\t/**\r\n\t * This method is called by the parser when a full-context prediction has a\r\n\t * unique result.\r\n\t *\r\n\t * Each full-context prediction which does not result in a syntax error\r\n\t * will call either {@link #reportContextSensitivity} or\r\n\t * {@link #reportAmbiguity}.\r\n\t *\r\n\t * For prediction implementations that only evaluate full-context\r\n\t * predictions when an SLL conflict is found (including the default\r\n\t * {@link ParserATNSimulator} implementation), this method reports cases\r\n\t * where SLL conflicts were resolved to unique full-context predictions,\r\n\t * i.e. the decision was context-sensitive. This report does not necessarily\r\n\t * indicate a problem, and it may appear even in completely unambiguous\r\n\t * grammars.\r\n\t *\r\n\t * `configs` may have more than one represented alternative if the\r\n\t * full-context prediction algorithm does not evaluate predicates before\r\n\t * beginning the full-context prediction. In all cases, the final prediction\r\n\t * is passed as the `prediction` argument.\r\n\t *\r\n\t * Note that the definition of \"context sensitivity\" in this method\r\n\t * differs from the concept in {@link DecisionInfo#contextSensitivities}.\r\n\t * This method reports all instances where an SLL conflict occurred but LL\r\n\t * parsing produced a unique result, whether or not that unique result\r\n\t * matches the minimum alternative in the SLL conflicting set.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param dfa the DFA for the current decision\r\n\t * @param startIndex the input index where the decision started\r\n\t * @param stopIndex the input index where the context sensitivity was\r\n\t * finally determined\r\n\t * @param prediction the unambiguous result of the full-context prediction\r\n\t * @param acceptState the simulator state when the unambiguous prediction\r\n\t * was determined\r\n\t */\r\n\treportContextSensitivity?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Parser,\r\n\t\t/*@NotNull*/\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tprediction: number,\r\n\t\t/*@NotNull*/\r\n\t\tacceptState: SimulatorState) => void;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.4741196-07:00\r\n\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { Override } from \"./Decorators\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/** A handy class for use with\r\n *\r\n * options {contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum;}\r\n *\r\n * that provides a backing field / impl for the outer alternative number\r\n * matched for an internal parse tree node.\r\n *\r\n * I'm only putting into Java runtime as I'm certain I'm the only one that\r\n * will really every use this.\r\n */\r\nexport class RuleContextWithAltNum extends ParserRuleContext {\r\n\tprivate _altNumber: number;\r\n\r\n\tconstructor();\r\n\tconstructor(parent: ParserRuleContext | undefined, invokingStateNumber: number);\r\n\tconstructor(parent?: ParserRuleContext, invokingStateNumber?: number) {\r\n\t\tif (invokingStateNumber !== undefined) {\r\n\t\t\tsuper(parent, invokingStateNumber);\r\n\t\t} else {\r\n\t\t\tsuper();\r\n\t\t}\r\n\r\n\t\tthis._altNumber = ATN.INVALID_ALT_NUMBER;\r\n\t}\r\n\r\n\t@Override\r\n\tget altNumber(): number {\r\n\t\treturn this._altNumber;\r\n\t}\r\n\r\n\t// @Override\r\n\tset altNumber(altNum: number) {\r\n\t\tthis._altNumber = altNum;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.6271221-07:00\r\n\r\nimport { Dependents } from \"./Dependents\";\r\nimport { Parser } from \"./Parser\";\r\n\r\n/**\r\n * Declares a dependency upon a grammar rule, along with a set of zero or more dependent rules.\r\n *\r\n * Version numbers within a grammar should be assigned on a monotonically increasing basis to allow for accurate\r\n * tracking of dependent rules.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport function RuleDependency(dependency: DependencySpecification) {\r\n\treturn (target: object, propertyKey: PropertyKey, propertyDescriptor: PropertyDescriptor) => {\r\n\t\t// intentionally empty\r\n\t};\r\n}\r\n\r\nexport interface DependencySpecification {\r\n\treadonly recognizer: { new (...args: any[]): Parser; };\r\n\r\n\treadonly rule: number;\r\n\r\n\treadonly version: number;\r\n\r\n\t/**\r\n\t * Specifies the set of grammar rules related to `rule` which the annotated element depends on. Even when absent\r\n\t * from this set, the annotated element is implicitly dependent upon the explicitly specified `rule`, which\r\n\t * corresponds to the `Dependents.SELF` element.\r\n\t *\r\n\t * By default, the annotated element is dependent upon the specified `rule` and its `Dependents.PARENTS`, i.e. the\r\n\t * rule within one level of context information. The parents are included since the most frequent assumption about a\r\n\t * rule is where it's used in the grammar.\r\n\t */\r\n\treadonly dependents?: Dependents[];\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.7170027-07:00\r\n\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport function RuleVersion(version: number) {\r\n\r\n\treturn (target: Parser, propertyKey: PropertyKey, propertyDescriptor: TypedPropertyDescriptor<(...args: any[]) => T>) => {\r\n\t\t// intentionally empty\r\n\t};\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.8783640-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/** The default mechanism for creating tokens. It's used by default in Lexer and\r\n * the error handling strategy (to create missing tokens). Notifying the parser\r\n * of a new factory means that it notifies its token source and error strategy.\r\n */\r\nexport interface TokenFactory {\r\n\t/** This is the method used to create tokens in the lexer and in the\r\n\t * error handling strategy. If text!=undefined, than the start and stop positions\r\n\t * are wiped to -1 in the text override is set in the CommonToken.\r\n\t */\r\n\t//@NotNull\r\n\tcreate(\r\n\t\t/*@NotNull*/\r\n\t\tsource: { source?: TokenSource, stream?: CharStream },\r\n\t\ttype: number,\r\n\t\ttext: string | undefined,\r\n\t\tchannel: number,\r\n\t\tstart: number,\r\n\t\tstop: number,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number): Token;\r\n\r\n\t/** Generically useful */\r\n\t//@NotNull\r\n\tcreateSimple(type: number, text: string): Token;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.9604200-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\n\r\n/**\r\n * A source of tokens must provide a sequence of tokens via {@link #nextToken()}\r\n * and also must reveal it's source of characters; {@link CommonToken}'s text is\r\n * computed from a {@link CharStream}; it only store indices into the char\r\n * stream.\r\n *\r\n * Errors from the lexer are never passed to the parser. Either you want to keep\r\n * going or you do not upon token recognition error. If you do not want to\r\n * continue lexing then you do not want to continue parsing. Just throw an\r\n * exception not under {@link RecognitionException} and Java will naturally toss\r\n * you all the way out of the recognizers. If you want to continue lexing then\r\n * you should not throw an exception to the parser--it has already requested a\r\n * token. Keep lexing until you get a valid one. Just report errors and keep\r\n * going, looking for a valid token.\r\n */\r\nexport interface TokenSource {\r\n\t/**\r\n\t * Return a {@link Token} object from your input stream (usually a\r\n\t * {@link CharStream}). Do not fail/return upon lexing error; keep chewing\r\n\t * on the characters until you get a good one; errors are not passed through\r\n\t * to the parser.\r\n\t */\r\n\t//@NotNull\r\n\tnextToken(): Token;\r\n\r\n\t/**\r\n\t * Get the line number for the current position in the input stream. The\r\n\t * first line in the input is line 1.\r\n\t *\r\n\t * @returns The line number for the current position in the input stream, or\r\n\t * 0 if the current token source does not track line numbers.\r\n\t */\r\n\treadonly line: number;\r\n\r\n\t/**\r\n\t * Get the index into the current line for the current position in the input\r\n\t * stream. The first character on a line has position 0.\r\n\t *\r\n\t * @returns The line number for the current position in the input stream, or\r\n\t * -1 if the current token source does not track character positions.\r\n\t */\r\n\treadonly charPositionInLine: number;\r\n\r\n\t/**\r\n\t * Get the {@link CharStream} from which this token source is currently\r\n\t * providing tokens.\r\n\t *\r\n\t * @returns The {@link CharStream} associated with the current position in\r\n\t * the input, or `undefined` if no input stream is available for the token\r\n\t * source.\r\n\t */\r\n\treadonly inputStream: CharStream | undefined;\r\n\r\n\t/**\r\n\t * Gets the name of the underlying input source. This method returns a\r\n\t * non-undefined, non-empty string. If such a name is not known, this method\r\n\t * returns {@link IntStream#UNKNOWN_SOURCE_NAME}.\r\n\t */\r\n\t//@NotNull\r\n\treadonly sourceName: string;\r\n\r\n\t/**\r\n\t * Gets or sets the `TokenFactory` this token source is currently using for\r\n\t * creating `Token` objects from the input.\r\n\t */\r\n\t//@NotNull\r\n\ttokenFactory: TokenFactory;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:58.0433998-07:00\r\n\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * An {@link IntStream} whose symbols are {@link Token} instances.\r\n */\r\nexport interface TokenStream extends IntStream {\r\n\t/**\r\n\t * Get the `Token` instance associated with the value returned by `LA(k)`. This method has the same pre- and\r\n\t * post-conditions as `IntStream.LA`. In addition, when the preconditions of this method are met, the return value\r\n\t * is non-undefined and the value of `LT(k).type === LA(k)`.\r\n\t *\r\n\t * A `RangeError` is thrown if `k<0` and fewer than `-k` calls to `consume()` have occurred from the beginning of\r\n\t * the stream before calling this method.\r\n\t *\r\n\t * See `IntStream.LA`\r\n\t */\r\n\tLT(k: number): Token;\r\n\r\n\t/**\r\n\t * Get the `Token` instance associated with the value returned by `LA(k)`. This method has the same pre- and\r\n\t * post-conditions as `IntStream.LA`. In addition, when the preconditions of this method are met, the return value\r\n\t * is non-undefined and the value of `tryLT(k).type === LA(k)`.\r\n\t *\r\n\t * The return value is `undefined` if `k<0` and fewer than `-k` calls to `consume()` have occurred from the\r\n\t * beginning of the stream before calling this method.\r\n\t *\r\n\t * See `IntStream.LA`\r\n\t */\r\n\ttryLT(k: number): Token | undefined;\r\n\r\n\t/**\r\n\t * Gets the {@link Token} at the specified `index` in the stream. When\r\n\t * the preconditions of this method are met, the return value is non-undefined.\r\n\t *\r\n\t * The preconditions for this method are the same as the preconditions of\r\n\t * {@link IntStream#seek}. If the behavior of `seek(index)` is\r\n\t * unspecified for the current state and given `index`, then the\r\n\t * behavior of this method is also unspecified.\r\n\t *\r\n\t * The symbol referred to by `index` differs from `seek()` only\r\n\t * in the case of filtering streams where `index` lies before the end\r\n\t * of the stream. Unlike `seek()`, this method does not adjust\r\n\t * `index` to point to a non-ignored symbol.\r\n\t *\r\n\t * @throws IllegalArgumentException if {code index} is less than 0\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * retrieving the token at the specified index\r\n\t */\r\n\t//@NotNull\r\n\tget(i: number): Token;\r\n\r\n\t/**\r\n\t * Gets the underlying {@link TokenSource} which provides tokens for this\r\n\t * stream.\r\n\t */\r\n\t//@NotNull\r\n\treadonly tokenSource: TokenSource;\r\n\r\n\t/**\r\n\t * Return the text of all tokens within the specified `interval`. This\r\n\t * method behaves like the following code (including potential exceptions\r\n\t * for violating preconditions of {@link #get}, but may be optimized by the\r\n\t * specific implementation.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = \"\";\r\n\t * for (int i = interval.a; i <= interval.b; i++) {\r\n\t * text += stream.get(i).text;\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param interval The interval of tokens within this stream to get text\r\n\t * for.\r\n\t * @returns The text of all tokens within the specified interval in this\r\n\t * stream.\r\n\t *\r\n\t * @throws NullPointerException if `interval` is `undefined`\r\n\t */\r\n\t//@NotNull\r\n\tgetText(/*@NotNull*/ interval: Interval): string;\r\n\r\n\t/**\r\n\t * Return the text of all tokens in the stream. This method behaves like the\r\n\t * following code, including potential exceptions from the calls to\r\n\t * {@link IntStream#size} and {@link #getText(Interval)}, but may be\r\n\t * optimized by the specific implementation.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = stream.getText(new Interval(0, stream.size));\r\n\t * ```\r\n\t *\r\n\t * @returns The text of all tokens in the stream.\r\n\t */\r\n\t//@NotNull\r\n\tgetText(): string;\r\n\r\n\t/**\r\n\t * Return the text of all tokens in the source interval of the specified\r\n\t * context. This method behaves like the following code, including potential\r\n\t * exceptions from the call to {@link #getText(Interval)}, but may be\r\n\t * optimized by the specific implementation.\r\n\t *\r\n\t * If `ctx.sourceInterval` does not return a valid interval of\r\n\t * tokens provided by this stream, the behavior is unspecified.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = stream.getText(ctx.sourceInterval);\r\n\t * ```\r\n\t *\r\n\t * @param ctx The context providing the source interval of tokens to get\r\n\t * text for.\r\n\t * @returns The text of all tokens within the source interval of `ctx`.\r\n\t */\r\n\t//@NotNull\r\n\tgetText(/*@NotNull*/ ctx: RuleContext): string;\r\n\r\n\t/**\r\n\t * Return the text of all tokens in this stream between `start` and\r\n\t * `stop` (inclusive).\r\n\t *\r\n\t * If the specified `start` or `stop` token was not provided by\r\n\t * this stream, or if the `stop` occurred before the `start`}\r\n\t * token, the behavior is unspecified.\r\n\t *\r\n\t * For streams which ensure that the `Token.tokenIndex` method is\r\n\t * accurate for all of its provided tokens, this method behaves like the\r\n\t * following code. Other streams may implement this method in other ways\r\n\t * provided the behavior is consistent with this at a high level.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = \"\";\r\n\t * for (int i = start.tokenIndex; i <= stop.tokenIndex; i++) {\r\n\t * text += stream.get(i).text;\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param start The first token in the interval to get text for.\r\n\t * @param stop The last token in the interval to get text for (inclusive).\r\n\t * @returns The text of all tokens lying between the specified `start`\r\n\t * and `stop` tokens.\r\n\t *\r\n\t * @throws UnsupportedOperationException if this stream does not support\r\n\t * this method for the specified tokens\r\n\t */\r\n\t//@NotNull\r\n\tgetTextFromRange(start: any, stop: any): string;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:58.1768850-07:00\r\n\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenStream } from \"./TokenStream\";\r\n\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\n/**\r\n * Useful for rewriting out a buffered input token stream after doing some\r\n * augmentation or other manipulations on it.\r\n *\r\n * You can insert stuff, replace, and delete chunks. Note that the operations\r\n * are done lazily--only if you convert the buffer to a {@link String} with\r\n * {@link TokenStream#getText()}. This is very efficient because you are not\r\n * moving data around all the time. As the buffer of tokens is converted to\r\n * strings, the {@link #getText()} method(s) scan the input token stream and\r\n * check to see if there is an operation at the current index. If so, the\r\n * operation is done and then normal {@link String} rendering continues on the\r\n * buffer. This is like having multiple Turing machine instruction streams\r\n * (programs) operating on a single input tape. :)\r\n *\r\n * This rewriter makes no modifications to the token stream. It does not ask the\r\n * stream to fill itself up nor does it advance the input cursor. The token\r\n * stream `TokenStream.index` will return the same value before and\r\n * after any {@link #getText()} call.\r\n *\r\n * The rewriter only works on tokens that you have in the buffer and ignores the\r\n * current input cursor. If you are buffering tokens on-demand, calling\r\n * {@link #getText()} halfway through the input will only do rewrites for those\r\n * tokens in the first half of the file.\r\n *\r\n * Since the operations are done lazily at {@link #getText}-time, operations do\r\n * not screw up the token index values. That is, an insert operation at token\r\n * index `i` does not change the index values for tokens\r\n * `i`+1..n-1.\r\n *\r\n * Because operations never actually alter the buffer, you may always get the\r\n * original token stream back without undoing anything. Since the instructions\r\n * are queued up, you can easily simulate transactions and roll back any changes\r\n * if there is an error just by removing instructions. For example,\r\n *\r\n * ```\r\n * CharStream input = new ANTLRFileStream(\"input\");\r\n * TLexer lex = new TLexer(input);\r\n * CommonTokenStream tokens = new CommonTokenStream(lex);\r\n * T parser = new T(tokens);\r\n * TokenStreamRewriter rewriter = new TokenStreamRewriter(tokens);\r\n * parser.startRule();\r\n * ```\r\n *\r\n * Then in the rules, you can execute (assuming rewriter is visible):\r\n *\r\n * ```\r\n * Token t,u;\r\n * ...\r\n * rewriter.insertAfter(t, \"text to put after t\");}\r\n * rewriter.insertAfter(u, \"text after u\");}\r\n * System.out.println(rewriter.getText());\r\n * ```\r\n *\r\n * You can also have multiple \"instruction streams\" and get multiple rewrites\r\n * from a single pass over the input. Just name the instruction streams and use\r\n * that name again when printing the buffer. This could be useful for generating\r\n * a C file and also its header file--all from the same buffer:\r\n *\r\n * ```\r\n * rewriter.insertAfter(\"pass1\", t, \"text to put after t\");}\r\n * rewriter.insertAfter(\"pass2\", u, \"text after u\");}\r\n * System.out.println(rewriter.getText(\"pass1\"));\r\n * System.out.println(rewriter.getText(\"pass2\"));\r\n * ```\r\n *\r\n * If you don't use named rewrite streams, a \"default\" stream is used as the\r\n * first example shows.\r\n */\r\nexport class TokenStreamRewriter {\r\n\tpublic static readonly DEFAULT_PROGRAM_NAME: string = \"default\";\r\n\tpublic static readonly PROGRAM_INIT_SIZE: number = 100;\r\n\tpublic static readonly MIN_TOKEN_INDEX: number = 0;\r\n\r\n\t/** Our source stream */\r\n\tprotected tokens: TokenStream;\r\n\r\n\t/** You may have multiple, named streams of rewrite operations.\r\n\t * I'm calling these things \"programs.\"\r\n\t * Maps String (name) → rewrite (List)\r\n\t */\r\n\tprotected programs: Map;\r\n\r\n\t/** Map String (program name) → Integer index */\r\n\tprotected lastRewriteTokenIndexes: Map;\r\n\r\n\tconstructor(tokens: TokenStream) {\r\n\t\tthis.tokens = tokens;\r\n\t\tthis.programs = new Map();\r\n\t\tthis.programs.set(TokenStreamRewriter.DEFAULT_PROGRAM_NAME, []);\r\n\t\tthis.lastRewriteTokenIndexes = new Map();\r\n\t}\r\n\r\n\tpublic getTokenStream(): TokenStream {\r\n\t\treturn this.tokens;\r\n\t}\r\n\r\n\tpublic rollback(instructionIndex: number): void;\r\n\t/** Rollback the instruction stream for a program so that\r\n\t * the indicated instruction (via instructionIndex) is no\r\n\t * longer in the stream. UNTESTED!\r\n\t */\r\n\tpublic rollback(instructionIndex: number, programName: string): void;\r\n\tpublic rollback(instructionIndex: number, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tlet is: RewriteOperation[] | undefined = this.programs.get(programName);\r\n\t\tif ( is != null ) {\r\n\t\t\tthis.programs.set(programName, is.slice(TokenStreamRewriter.MIN_TOKEN_INDEX, instructionIndex));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic deleteProgram(): void;\r\n\r\n\t/** Reset the program so that no instructions exist */\r\n\tpublic deleteProgram(programName: string): void;\r\n\tpublic deleteProgram(programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tthis.rollback(TokenStreamRewriter.MIN_TOKEN_INDEX, programName);\r\n\t}\r\n\r\n\tpublic insertAfter(t: Token, text: {}): void;\r\n\tpublic insertAfter(index: number, text: {}): void;\r\n\tpublic insertAfter(t: Token, text: {}, programName: string): void;\r\n\tpublic insertAfter(index: number, text: {}, programName: string): void;\r\n\tpublic insertAfter(tokenOrIndex: Token | number, text: {}, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tlet index: number;\r\n\t\tif (typeof tokenOrIndex === \"number\") {\r\n\t\t\tindex = tokenOrIndex;\r\n\t\t} else {\r\n\t\t\tindex = tokenOrIndex.tokenIndex;\r\n\t\t}\r\n\r\n\t\t// to insert after, just insert before next index (even if past end)\r\n\t\tlet rewrites: RewriteOperation[] = this.getProgram(programName);\r\n\t\tlet op = new InsertAfterOp(this.tokens, index, rewrites.length, text);\r\n\t\trewrites.push(op);\r\n\t}\r\n\r\n\tpublic insertBefore(t: Token, text: {}): void;\r\n\tpublic insertBefore(index: number, text: {}): void;\r\n\tpublic insertBefore(t: Token, text: {}, programName: string): void;\r\n\tpublic insertBefore(index: number, text: {}, programName: string): void;\r\n\tpublic insertBefore(tokenOrIndex: Token | number, text: {}, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tlet index: number;\r\n\t\tif (typeof tokenOrIndex === \"number\") {\r\n\t\t\tindex = tokenOrIndex;\r\n\t\t} else {\r\n\t\t\tindex = tokenOrIndex.tokenIndex;\r\n\t\t}\r\n\r\n\t\tlet rewrites: RewriteOperation[] = this.getProgram(programName);\r\n\t\tlet op: RewriteOperation = new InsertBeforeOp(this.tokens, index, rewrites.length, text);\r\n\t\trewrites.push(op);\r\n\t}\r\n\r\n\tpublic replaceSingle(index: number, text: {}): void;\r\n\tpublic replaceSingle(indexT: Token, text: {}): void;\r\n\tpublic replaceSingle(index: Token | number, text: {}): void {\r\n\t\tif (typeof index === \"number\") {\r\n\t\t\tthis.replace(index, index, text);\r\n\t\t} else {\r\n\t\t\tthis.replace(index, index, text);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic replace(from: number, to: number, text: {}): void;\r\n\r\n\tpublic replace(from: Token, to: Token, text: {}): void;\r\n\r\n\tpublic replace(from: number, to: number, text: {}, programName: string): void;\r\n\r\n\tpublic replace(from: Token, to: Token, text: {}, programName: string): void;\r\n\r\n\tpublic replace(from: Token | number, to: Token | number, text: {}, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tif (typeof from !== \"number\") {\r\n\t\t\tfrom = from.tokenIndex;\r\n\t\t}\r\n\r\n\t\tif (typeof to !== \"number\") {\r\n\t\t\tto = to.tokenIndex;\r\n\t\t}\r\n\r\n\t\tif ( from > to || from < 0 || to < 0 || to >= this.tokens.size ) {\r\n\t\t\tthrow new RangeError(`replace: range invalid: ${from}..${to}(size=${this.tokens.size})`);\r\n\t\t}\r\n\r\n\t\tlet rewrites: RewriteOperation[] = this.getProgram(programName);\r\n\t\tlet op: RewriteOperation = new ReplaceOp(this.tokens, from, to, rewrites.length, text);\r\n\t\trewrites.push(op);\r\n\t}\r\n\r\n\tpublic delete(index: number): void;\r\n\r\n\tpublic delete(from: number, to: number): void;\r\n\r\n\tpublic delete(indexT: Token): void;\r\n\r\n\tpublic delete(from: Token, to: Token): void;\r\n\r\n\tpublic delete(from: number, to: number, programName: string): void;\r\n\r\n\tpublic delete(from: Token, to: Token, programName: string): void;\r\n\r\n\tpublic delete(from: Token | number, to?: Token | number, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tif (to === undefined) {\r\n\t\t\tto = from;\r\n\t\t}\r\n\r\n\t\tif (typeof from === \"number\") {\r\n\t\t\tthis.replace(from, to as number, \"\", programName);\r\n\t\t} else {\r\n\t\t\tthis.replace(from, to as Token, \"\", programName);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getLastRewriteTokenIndex(): number;\r\n\r\n\tprotected getLastRewriteTokenIndex(programName: string): number;\r\n\r\n\tprotected getLastRewriteTokenIndex(programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): number {\r\n\t\tlet I: number | undefined = this.lastRewriteTokenIndexes.get(programName);\r\n\t\tif ( I == null ) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\treturn I;\r\n\t}\r\n\r\n\tprotected setLastRewriteTokenIndex(programName: string, i: number): void {\r\n\t\tthis.lastRewriteTokenIndexes.set(programName, i);\r\n\t}\r\n\r\n\tprotected getProgram(name: string): RewriteOperation[] {\r\n\t\tlet is: RewriteOperation[] | undefined = this.programs.get(name);\r\n\t\tif ( is == null ) {\r\n\t\t\tis = this.initializeProgram(name);\r\n\t\t}\r\n\r\n\t\treturn is;\r\n\t}\r\n\r\n\tprivate initializeProgram(name: string): RewriteOperation[] {\r\n\t\tlet is: RewriteOperation[] = [];\r\n\t\tthis.programs.set(name, is);\r\n\t\treturn is;\r\n\t}\r\n\r\n\t/** Return the text from the original tokens altered per the\r\n\t * instructions given to this rewriter.\r\n\t */\r\n\tpublic getText(): string;\r\n\r\n\t/** Return the text from the original tokens altered per the\r\n\t * instructions given to this rewriter in programName.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tpublic getText(programName: string): string;\r\n\r\n\t/** Return the text associated with the tokens in the interval from the\r\n\t * original token stream but with the alterations given to this rewriter.\r\n\t * The interval refers to the indexes in the original token stream.\r\n\t * We do not alter the token stream in any way, so the indexes\r\n\t * and intervals are still consistent. Includes any operations done\r\n\t * to the first and last token in the interval. So, if you did an\r\n\t * insertBefore on the first token, you would get that insertion.\r\n\t * The same is true if you do an insertAfter the stop token.\r\n\t */\r\n\tpublic getText(interval: Interval): string;\r\n\r\n\tpublic getText(interval: Interval, programName: string): string;\r\n\r\n\tpublic getText(intervalOrProgram?: Interval | string, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): string {\r\n\t\tlet interval: Interval;\r\n\t\tif (intervalOrProgram instanceof Interval) {\r\n\t\t\tinterval = intervalOrProgram;\r\n\t\t} else {\r\n\t\t\tinterval = Interval.of(0, this.tokens.size - 1);\r\n\t\t}\r\n\r\n\t\tif (typeof intervalOrProgram === \"string\") {\r\n\t\t\tprogramName = intervalOrProgram;\r\n\t\t}\r\n\r\n\t\tlet rewrites: RewriteOperation[] | undefined = this.programs.get(programName);\r\n\t\tlet start: number = interval.a;\r\n\t\tlet stop: number = interval.b;\r\n\r\n\t\t// ensure start/end are in range\r\n\t\tif ( stop > this.tokens.size - 1 ) {\r\n\t\t\tstop = this.tokens.size - 1;\r\n\t\t}\r\n\t\tif ( start < 0 ) {\r\n\t\t\tstart = 0;\r\n\t\t}\r\n\r\n\t\tif ( rewrites == null || rewrites.length === 0 ) {\r\n\t\t\treturn this.tokens.getText(interval); // no instructions to execute\r\n\t\t}\r\n\r\n\t\tlet buf: string[] = [];\r\n\r\n\t\t// First, optimize instruction stream\r\n\t\tlet indexToOp: Map = this.reduceToSingleOperationPerIndex(rewrites);\r\n\r\n\t\t// Walk buffer, executing instructions and emitting tokens\r\n\t\tlet i: number = start;\r\n\t\twhile ( i <= stop && i < this.tokens.size ) {\r\n\t\t\tlet op: RewriteOperation | undefined = indexToOp.get(i);\r\n\t\t\tindexToOp.delete(i); // remove so any left have index size-1\r\n\t\t\tlet t: Token = this.tokens.get(i);\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\t// no operation at that index, just dump token\r\n\t\t\t\tif ( t.type !== Token.EOF ) {\r\n\t\t\t\t\tbuf.push(String(t.text));\r\n\t\t\t\t}\r\n\t\t\t\ti++; // move to next token\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ti = op.execute(buf); // execute operation and skip\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// include stuff after end if it's last index in buffer\r\n\t\t// So, if they did an insertAfter(lastValidIndex, \"foo\"), include\r\n\t\t// foo if end==lastValidIndex.\r\n\t\tif ( stop === this.tokens.size - 1 ) {\r\n\t\t\t// Scan any remaining operations after last token\r\n\t\t\t// should be included (they will be inserts).\r\n\t\t\tfor (let op of indexToOp.values()) {\r\n\t\t\t\tif ( op.index >= this.tokens.size - 1 ) {\r\n\t\t\t\t\tbuf.push(op.text.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn buf.join(\"\");\r\n\t}\r\n\r\n\t/** We need to combine operations and report invalid operations (like\r\n\t * overlapping replaces that are not completed nested). Inserts to\r\n\t * same index need to be combined etc... Here are the cases:\r\n\t *\r\n\t * I.i.u I.j.v\t\t\t\t\t\t\t\tleave alone, nonoverlapping\r\n\t * I.i.u I.i.v\t\t\t\t\t\t\t\tcombine: Iivu\r\n\t *\r\n\t * R.i-j.u R.x-y.v\t| i-j in x-y\t\t\tdelete first R\r\n\t * R.i-j.u R.i-j.v\t\t\t\t\t\t\tdelete first R\r\n\t * R.i-j.u R.x-y.v\t| x-y in i-j\t\t\tERROR\r\n\t * R.i-j.u R.x-y.v\t| boundaries overlap\tERROR\r\n\t *\r\n\t * Delete special case of replace (text==undefined):\r\n\t * D.i-j.u D.x-y.v\t| boundaries overlap\tcombine to max(min)..max(right)\r\n\t *\r\n\t * I.i.u R.x-y.v | i in (x+1)-y\t\t\tdelete I (since insert before\r\n\t * \t\t\t\t\t\t\t\t\t\t\twe're not deleting i)\r\n\t * I.i.u R.x-y.v | i not in (x+1)-y\t\tleave alone, nonoverlapping\r\n\t * R.x-y.v I.i.u | i in x-y\t\t\t\tERROR\r\n\t * R.x-y.v I.x.u \t\t\t\t\t\t\tR.x-y.uv (combine, delete I)\r\n\t * R.x-y.v I.i.u | i not in x-y\t\t\tleave alone, nonoverlapping\r\n\t *\r\n\t * I.i.u = insert u before op @ index i\r\n\t * R.x-y.u = replace x-y indexed tokens with u\r\n\t *\r\n\t * First we need to examine replaces. For any replace op:\r\n\t *\r\n\t * \t\t1. wipe out any insertions before op within that range.\r\n\t * \t\t2. Drop any replace op before that is contained completely within\r\n\t * \t that range.\r\n\t * \t\t3. Throw exception upon boundary overlap with any previous replace.\r\n\t *\r\n\t * Then we can deal with inserts:\r\n\t *\r\n\t * \t\t1. for any inserts to same index, combine even if not adjacent.\r\n\t * \t\t2. for any prior replace with same left boundary, combine this\r\n\t * \t insert with replace and delete this replace.\r\n\t * \t\t3. throw exception if index in same range as previous replace\r\n\t *\r\n\t * Don't actually delete; make op undefined in list. Easier to walk list.\r\n\t * Later we can throw as we add to index → op map.\r\n\t *\r\n\t * Note that I.2 R.2-2 will wipe out I.2 even though, technically, the\r\n\t * inserted stuff would be before the replace range. But, if you\r\n\t * add tokens in front of a method body '{' and then delete the method\r\n\t * body, I think the stuff before the '{' you added should disappear too.\r\n\t *\r\n\t * Return a map from token index to operation.\r\n\t */\r\n\tprotected reduceToSingleOperationPerIndex(rewrites: Array): Map {\r\n\t\t// console.log(`rewrites=[${Utils.join(rewrites, \", \")}]`);\r\n\r\n\t\t// WALK REPLACES\r\n\t\tfor (let i = 0; i < rewrites.length; i++) {\r\n\t\t\tlet op: RewriteOperation | undefined = rewrites[i];\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( !(op instanceof ReplaceOp) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tlet rop: ReplaceOp = op;\r\n\t\t\t// Wipe prior inserts within range\r\n\t\t\tlet inserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i);\r\n\t\t\tfor (let iop of inserts) {\r\n\t\t\t\tif ( iop.index === rop.index ) {\r\n\t\t\t\t\t// E.g., insert before 2, delete 2..2; update replace\r\n\t\t\t\t\t// text to include insert before, kill insert\r\n\t\t\t\t\trewrites[iop.instructionIndex] = undefined;\r\n\t\t\t\t\trop.text = iop.text.toString() + (rop.text != null ? rop.text.toString() : \"\");\r\n\t\t\t\t}\r\n\t\t\t\telse if ( iop.index > rop.index && iop.index <= rop.lastIndex ) {\r\n\t\t\t\t\t// delete insert as it's a no-op.\r\n\t\t\t\t\trewrites[iop.instructionIndex] = undefined;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Drop any prior replaces contained within\r\n\t\t\tlet prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i);\r\n\t\t\tfor (let prevRop of prevReplaces) {\r\n\t\t\t\tif ( prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex ) {\r\n\t\t\t\t\t// delete replace as it's a no-op.\r\n\t\t\t\t\trewrites[prevRop.instructionIndex] = undefined;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// throw exception unless disjoint or identical\r\n\t\t\t\tlet disjoint: boolean =\r\n\t\t\t\t\tprevRop.lastIndex < rop.index || prevRop.index > rop.lastIndex;\r\n\t\t\t\t// Delete special case of replace (text==null):\r\n\t\t\t\t// D.i-j.u D.x-y.v\t| boundaries overlap\tcombine to max(min)..max(right)\r\n\t\t\t\tif ( prevRop.text == null && rop.text == null && !disjoint ) {\r\n\t\t\t\t\t// console.log(`overlapping deletes: ${prevRop}, ${rop}`);\r\n\t\t\t\t\trewrites[prevRop.instructionIndex] = undefined; // kill first delete\r\n\t\t\t\t\trop.index = Math.min(prevRop.index, rop.index);\r\n\t\t\t\t\trop.lastIndex = Math.max(prevRop.lastIndex, rop.lastIndex);\r\n\t\t\t\t\t// console.log(`new rop ${rop}`);\r\n\t\t\t\t}\r\n\t\t\t\telse if ( !disjoint ) {\r\n\t\t\t\t\tthrow new Error(`replace op boundaries of ${rop} overlap with previous ${prevRop}`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// WALK INSERTS\r\n\t\tfor (let i = 0; i < rewrites.length; i++) {\r\n\t\t\tlet op: RewriteOperation | undefined = rewrites[i];\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( !(op instanceof InsertBeforeOp) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tlet iop: InsertBeforeOp = op;\r\n\t\t\t// combine current insert with prior if any at same index\r\n\t\t\tlet prevInserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i);\r\n\t\t\tfor (let prevIop of prevInserts) {\r\n\t\t\t\tif ( prevIop.index === iop.index ) {\r\n\t\t\t\t\tif (prevIop instanceof InsertAfterOp) {\r\n\t\t\t\t\t\tiop.text = this.catOpText(prevIop.text, iop.text);\r\n\t\t\t\t\t\trewrites[prevIop.instructionIndex] = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (prevIop instanceof InsertBeforeOp) { // combine objects\r\n\t\t\t\t\t\t// convert to strings...we're in process of toString'ing\r\n\t\t\t\t\t\t// whole token buffer so no lazy eval issue with any templates\r\n\t\t\t\t\t\tiop.text = this.catOpText(iop.text, prevIop.text);\r\n\t\t\t\t\t\t// delete redundant prior insert\r\n\t\t\t\t\t\trewrites[prevIop.instructionIndex] = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// look for replaces where iop.index is in range; error\r\n\t\t\tlet prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i);\r\n\t\t\tfor (let rop of prevReplaces) {\r\n\t\t\t\tif ( iop.index === rop.index ) {\r\n\t\t\t\t\trop.text = this.catOpText(iop.text, rop.text);\r\n\t\t\t\t\trewrites[i] = undefined;\t// delete current insert\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif ( iop.index >= rop.index && iop.index <= rop.lastIndex ) {\r\n\t\t\t\t\tthrow new Error(`insert op ${iop} within boundaries of previous ${rop}`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// console.log(`rewrites after=[${Utils.join(rewrites, \", \")}]`);\r\n\t\tlet m: Map = new Map();\r\n\t\tfor (let op of rewrites) {\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\t// ignore deleted ops\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( m.get(op.index) != null ) {\r\n\t\t\t\tthrow new Error(\"should only be one op per index\");\r\n\t\t\t}\r\n\t\t\tm.set(op.index, op);\r\n\t\t}\r\n\t\t// console.log(`index to op: ${m}`);\r\n\t\treturn m;\r\n\t}\r\n\r\n\tprotected catOpText(a: {}, b: {}): string {\r\n\t\tlet x: string = \"\";\r\n\t\tlet y: string = \"\";\r\n\t\tif ( a != null ) {\r\n\t\t\tx = a.toString();\r\n\t\t}\r\n\t\tif ( b != null ) {\r\n\t\t\ty = b.toString();\r\n\t\t}\r\n\t\treturn x + y;\r\n\t}\r\n\r\n\t/** Get all operations before an index of a particular kind */\r\n\tprotected getKindOfOps(rewrites: Array, kind: {new(...args: any[]): T}, before: number): T[] {\r\n\t\tlet ops: T[] = [];\r\n\t\tfor (let i = 0; i < before && i < rewrites.length; i++) {\r\n\t\t\tlet op: RewriteOperation | undefined = rewrites[i];\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\t// ignore deleted\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( op instanceof kind ) {\r\n\t\t\t\tops.push(op);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ops;\r\n\t}\r\n}\r\n\r\n// Define the rewrite operation hierarchy\r\n\r\nexport class RewriteOperation {\r\n\tprotected readonly tokens: TokenStream;\r\n\t/** What index into rewrites List are we? */\r\n\tpublic readonly instructionIndex: number;\r\n\t/** Token buffer index. */\r\n\tpublic index: number;\r\n\tpublic text: {};\r\n\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number);\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text: {});\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text?: {}) {\r\n\t\tthis.tokens = tokens;\r\n\t\tthis.instructionIndex = instructionIndex;\r\n\t\tthis.index = index;\r\n\t\tthis.text = text === undefined ? \"\" : text;\r\n\t}\r\n\r\n\t/** Execute the rewrite operation by possibly adding to the buffer.\r\n\t * Return the index of the next token to operate on.\r\n\t */\r\n\tpublic execute(buf: string[]): number {\r\n\t\treturn this.index;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet opName: string = this.constructor.name;\r\n\t\tlet $index = opName.indexOf(\"$\");\r\n\t\topName = opName.substring($index + 1, opName.length);\r\n\t\treturn \"<\" + opName + \"@\" + this.tokens.get(this.index) +\r\n\t\t\t\t\":\\\"\" + this.text + \"\\\">\";\r\n\t}\r\n}\r\n\r\nclass InsertBeforeOp extends RewriteOperation {\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text: {}) {\r\n\t\tsuper(tokens, index, instructionIndex, text);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic execute(buf: string[]): number {\r\n\t\tbuf.push(this.text.toString());\r\n\t\tif ( this.tokens.get(this.index).type !== Token.EOF ) {\r\n\t\t\tbuf.push(String(this.tokens.get(this.index).text));\r\n\t\t}\r\n\t\treturn this.index + 1;\r\n\t}\r\n}\r\n\r\n/** Distinguish between insert after/before to do the \"insert afters\"\r\n * first and then the \"insert befores\" at same index. Implementation\r\n * of \"insert after\" is \"insert before index+1\".\r\n */\r\nclass InsertAfterOp extends InsertBeforeOp {\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text: {}) {\r\n\t\tsuper(tokens, index + 1, instructionIndex, text); // insert after is insert before index+1\r\n\t}\r\n}\r\n\r\n/** I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp\r\n * instructions.\r\n */\r\nclass ReplaceOp extends RewriteOperation {\r\n\tpublic lastIndex: number;\r\n\tconstructor(tokens: TokenStream, from: number, to: number, instructionIndex: number, text: {}) {\r\n\t\tsuper(tokens, from, instructionIndex, text);\r\n\t\tthis.lastIndex = to;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic execute(buf: string[]): number {\r\n\t\tif ( this.text != null ) {\r\n\t\t\tbuf.push(this.text.toString());\r\n\t\t}\r\n\t\treturn this.lastIndex + 1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif ( this.text == null ) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:59.4986610-07:00\r\n\r\n/**\r\n * This interface provides information about the vocabulary used by a\r\n * recognizer.\r\n *\r\n * @see Recognizer.vocabulary\r\n * @author Sam Harwell\r\n */\r\nexport interface Vocabulary {\r\n\r\n\t/**\r\n\t * Returns the highest token type value. It can be used to iterate from\r\n\t * zero to that number, inclusively, thus querying all stored entries.\r\n\t * @returns the highest token type value\r\n\t */\r\n\treadonly maxTokenType: number;\r\n\r\n\t/**\r\n\t * Gets the string literal associated with a token type. The string returned\r\n\t * by this method, when not `undefined`, can be used unaltered in a parser\r\n\t * grammar to represent this token type.\r\n\t *\r\n\t * The following table shows examples of lexer rules and the literal\r\n\t * names assigned to the corresponding token types.\r\n\t *\r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t *
RuleLiteral NameJava String Literal
`THIS : 'this';``'this'``\"'this'\"`
`SQUOTE : '\\'';``'\\''``\"'\\\\''\"`
`ID : [A-Z]+;`n/a`undefined`
\r\n\t *\r\n\t * @param tokenType The token type.\r\n\t *\r\n\t * @returns The string literal associated with the specified token type, or\r\n\t * `undefined` if no string literal is associated with the type.\r\n\t */\r\n\tgetLiteralName(tokenType: number): string | undefined;\r\n\r\n\t/**\r\n\t * Gets the symbolic name associated with a token type. The string returned\r\n\t * by this method, when not `undefined`, can be used unaltered in a parser\r\n\t * grammar to represent this token type.\r\n\t *\r\n\t * This method supports token types defined by any of the following\r\n\t * methods:\r\n\t *\r\n\t * * Tokens created by lexer rules.\r\n\t * * Tokens defined in a `tokens{}` block in a lexer or parser\r\n\t * grammar.\r\n\t * * The implicitly defined `EOF` token, which has the token type\r\n\t * {@link Token#EOF}.\r\n\t *\r\n\t * The following table shows examples of lexer rules and the literal\r\n\t * names assigned to the corresponding token types.\r\n\t *\r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t *
RuleSymbolic Name
`THIS : 'this';``THIS`
`SQUOTE : '\\'';``SQUOTE`
`ID : [A-Z]+;``ID`
\r\n\t *\r\n\t * @param tokenType The token type.\r\n\t *\r\n\t * @returns The symbolic name associated with the specified token type, or\r\n\t * `undefined` if no symbolic name is associated with the type.\r\n\t */\r\n\tgetSymbolicName(tokenType: number): string | undefined;\r\n\r\n\t/**\r\n\t * Gets the display name of a token type.\r\n\t *\r\n\t * ANTLR provides a default implementation of this method, but\r\n\t * applications are free to override the behavior in any manner which makes\r\n\t * sense for the application. The default implementation returns the first\r\n\t * result from the following list which produces a non-`undefined`\r\n\t * result.\r\n\t *\r\n\t * 1. The result of {@link #getLiteralName}\r\n\t * 1. The result of {@link #getSymbolicName}\r\n\t * 1. The result of {@link Integer#toString}\r\n\t *\r\n\t * @param tokenType The token type.\r\n\t *\r\n\t * @returns The display name of the token type, for use in error reporting or\r\n\t * other user-visible messages which reference specific token types.\r\n\t */\r\n\t//@NotNull\r\n\tgetDisplayName(tokenType: number): string;\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:59.7015751-07:00\r\n\r\nimport { Token } from \"./Token\";\r\n\r\nexport interface WritableToken extends Token {\r\n\ttext: string | undefined;\r\n\r\n\ttype: number;\r\n\r\n\tline: number;\r\n\r\n\tcharPositionInLine: number;\r\n\r\n\tchannel: number;\r\n\r\n\ttokenIndex: number;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport * from \"./ANTLRErrorListener\";\r\nexport * from \"./ANTLRErrorStrategy\";\r\n// export * from \"./ANTLRFileStream\";\r\nexport * from \"./ANTLRInputStream\";\r\nexport * from \"./BailErrorStrategy\";\r\nexport * from \"./BufferedTokenStream\";\r\nexport * from \"./CharStream\";\r\nexport * from \"./CharStreams\";\r\nexport * from \"./CodePointBuffer\";\r\nexport * from \"./CodePointCharStream\";\r\nexport * from \"./CommonToken\";\r\nexport * from \"./CommonTokenFactory\";\r\nexport * from \"./CommonTokenStream\";\r\nexport * from \"./ConsoleErrorListener\";\r\nexport * from \"./DefaultErrorStrategy\";\r\nexport * from \"./Dependents\";\r\nexport * from \"./DiagnosticErrorListener\";\r\nexport * from \"./FailedPredicateException\";\r\nexport * from \"./InputMismatchException\";\r\nexport * from \"./InterpreterRuleContext\";\r\nexport * from \"./IntStream\";\r\nexport * from \"./Lexer\";\r\nexport * from \"./LexerInterpreter\";\r\nexport * from \"./LexerNoViableAltException\";\r\nexport * from \"./ListTokenSource\";\r\nexport * from \"./NoViableAltException\";\r\nexport * from \"./Parser\";\r\nexport * from \"./ParserErrorListener\";\r\nexport * from \"./ParserInterpreter\";\r\nexport * from \"./ParserRuleContext\";\r\nexport * from \"./ProxyErrorListener\";\r\nexport * from \"./ProxyParserErrorListener\";\r\nexport * from \"./RecognitionException\";\r\nexport * from \"./Recognizer\";\r\nexport * from \"./RuleContext\";\r\nexport * from \"./RuleContextWithAltNum\";\r\nexport * from \"./RuleDependency\";\r\nexport * from \"./RuleVersion\";\r\nexport * from \"./Token\";\r\nexport * from \"./TokenFactory\";\r\nexport * from \"./TokenSource\";\r\nexport * from \"./TokenStream\";\r\nexport * from \"./TokenStreamRewriter\";\r\n// export * from \"./UnbufferedCharStream\";\r\n// export * from \"./UnbufferedTokenStream\";\r\nexport * from \"./Vocabulary\";\r\nexport * from \"./VocabularyImpl\";\r\nexport * from \"./WritableToken\";\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:47.3092279-07:00\r\n\r\nimport { ErrorNode } from \"./ErrorNode\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { RuleNode } from \"./RuleNode\";\r\nimport { TerminalNode } from \"./TerminalNode\";\r\n\r\nexport abstract class AbstractParseTreeVisitor implements ParseTreeVisitor {\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation calls {@link ParseTree#accept} on the\r\n\t * specified tree.\r\n\t */\r\n\t@Override\r\n\tpublic visit(@NotNull tree: ParseTree): Result {\r\n\t\treturn tree.accept(this);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation initializes the aggregate result to\r\n\t * {@link #defaultResult defaultResult()}. Before visiting each child, it\r\n\t * calls {@link #shouldVisitNextChild shouldVisitNextChild}; if the result\r\n\t * is `false` no more children are visited and the current aggregate\r\n\t * result is returned. After visiting a child, the aggregate result is\r\n\t * updated by calling {@link #aggregateResult aggregateResult} with the\r\n\t * previous aggregate result and the result of visiting the child.\r\n\t *\r\n\t * The default implementation is not safe for use in visitors that modify\r\n\t * the tree structure. Visitors that modify the tree should override this\r\n\t * method to behave properly in respect to the specific algorithm in use.\r\n\t */\r\n\t@Override\r\n\tpublic visitChildren(@NotNull node: RuleNode): Result {\r\n\t\tlet result: Result = this.defaultResult();\r\n\t\tlet n: number = node.childCount;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tif (!this.shouldVisitNextChild(node, result)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tlet c: ParseTree = node.getChild(i);\r\n\t\t\tlet childResult: Result = c.accept(this);\r\n\t\t\tresult = this.aggregateResult(result, childResult);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation returns the result of\r\n\t * {@link #defaultResult defaultResult}.\r\n\t */\r\n\t@Override\r\n\tpublic visitTerminal(@NotNull node: TerminalNode): Result {\r\n\t\treturn this.defaultResult();\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation returns the result of\r\n\t * {@link #defaultResult defaultResult}.\r\n\t */\r\n\t@Override\r\n\tpublic visitErrorNode(@NotNull node: ErrorNode): Result {\r\n\t\treturn this.defaultResult();\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the default value returned by visitor methods. This value is\r\n\t * returned by the default implementations of\r\n\t * {@link #visitTerminal visitTerminal}, {@link #visitErrorNode visitErrorNode}.\r\n\t * The default implementation of {@link #visitChildren visitChildren}\r\n\t * initializes its aggregate result to this value.\r\n\t *\r\n\t * @returns The default value returned by visitor methods.\r\n\t */\r\n\tprotected abstract defaultResult(): Result;\r\n\r\n\t/**\r\n\t * Aggregates the results of visiting multiple children of a node. After\r\n\t * either all children are visited or {@link #shouldVisitNextChild} returns\r\n\t * `false`, the aggregate value is returned as the result of\r\n\t * {@link #visitChildren}.\r\n\t *\r\n\t * The default implementation returns `nextResult`, meaning\r\n\t * {@link #visitChildren} will return the result of the last child visited\r\n\t * (or return the initial value if the node has no children).\r\n\t *\r\n\t * @param aggregate The previous aggregate value. In the default\r\n\t * implementation, the aggregate value is initialized to\r\n\t * {@link #defaultResult}, which is passed as the `aggregate` argument\r\n\t * to this method after the first child node is visited.\r\n\t * @param nextResult The result of the immediately preceeding call to visit\r\n\t * a child node.\r\n\t *\r\n\t * @returns The updated aggregate result.\r\n\t */\r\n\tprotected aggregateResult(aggregate: Result, nextResult: Result): Result {\r\n\t\treturn nextResult;\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called after visiting each child in\r\n\t * {@link #visitChildren}. This method is first called before the first\r\n\t * child is visited; at that point `currentResult` will be the initial\r\n\t * value (in the default implementation, the initial value is returned by a\r\n\t * call to {@link #defaultResult}. This method is not called after the last\r\n\t * child is visited.\r\n\t *\r\n\t * The default implementation always returns `true`, indicating that\r\n\t * `visitChildren` should only return after all children are visited.\r\n\t * One reason to override this method is to provide a \"short circuit\"\r\n\t * evaluation option for situations where the result of visiting a single\r\n\t * child has the potential to determine the result of the visit operation as\r\n\t * a whole.\r\n\t *\r\n\t * @param node The {@link RuleNode} whose children are currently being\r\n\t * visited.\r\n\t * @param currentResult The current aggregate result of the children visited\r\n\t * to the current point.\r\n\t *\r\n\t * @returns `true` to continue visiting children. Otherwise return\r\n\t * `false` to stop visiting children and immediately return the\r\n\t * current aggregate result from {@link #visitChildren}.\r\n\t */\r\n\tprotected shouldVisitNextChild(@NotNull node: RuleNode, currentResult: Result): boolean {\r\n\t\treturn true;\r\n\t}\r\n}\r\n", "", "export * from \"./parser\";\n\nexport type { ParseOptions } from \"./types\";\n", "import { ANTLRInputStream, CharStreams, CommonTokenStream } from 'antlr4ts'\n\nimport { SolidityLexer } from './antlr/SolidityLexer'\nimport { SolidityParser } from './antlr/SolidityParser'\nimport { ASTNode, astNodeTypes, ASTNodeTypeString, ASTVisitor, SourceUnit } from './ast-types'\nimport { ASTBuilder } from './ASTBuilder'\nimport ErrorListener from './ErrorListener'\n//import { buildTokenList } from './tokens'\nimport { ParseOptions, Token, TokenizeOptions } from './types'\nimport util from 'util'\nimport { ParseTreeListener } from 'antlr4ts/tree/ParseTreeListener'\nimport { ContractContext, FunctionContext, FunctionDescriptorContext, FunctionnameContext, SolidityBlocksParser } from './antlr/SolidityBlocksParser';\nimport { SolidityBlocksLexer } from './antlr/SolidityBlocksLexer'\nimport { SolidityBlocksListener } from './antlr/SolidityBlocksListener'\ninterface ParserErrorItem {\n message: string\n line: number\n column: number\n}\n\ntype ParseResult = SourceUnit & {\n errors?: any[]\n tokens?: Token[]\n}\n\nexport class ParserError extends Error {\n public errors: ParserErrorItem[]\n\n constructor(args: { errors: ParserErrorItem[] }) {\n super()\n const { message, line, column } = args.errors[0]\n this.message = `${message} (${line}:${column})`\n this.errors = args.errors\n\n if (Error.captureStackTrace !== undefined) {\n Error.captureStackTrace(this, this.constructor)\n } else {\n this.stack = new Error().stack\n }\n }\n}/*\nexport function tokenize(input: string, options: TokenizeOptions = {}): any {\n const inputStream = new ANTLRInputStream(input)\n const lexer = new SolidityLexer(inputStream)\n\n return buildTokenList(lexer.getAllTokens(), options)\n}\n*/\n\n\n\nexport function parse(\n input: string,\n options: ParseOptions = {},\n parseListsener: ParseTreeListener = {}\n\n): ParseResult | null {\n const inputStream = new ANTLRInputStream(input)\n const lexer = new SolidityLexer(inputStream)\n const tokenStream = new CommonTokenStream(lexer)\n const parser = new SolidityParser(tokenStream)\n\n const listener = new ErrorListener()\n lexer.removeErrorListeners()\n lexer.addErrorListener(listener)\n\n parser.removeErrorListeners()\n parser.addErrorListener(listener)\n\n const startTime = Date.now()\n parser.buildParseTree = true\n const sourceUnit = parser.sourceUnit()\n const endTime = Date.now()\n //console.log(`Parsing took ${endTime - startTime}ms`)\n \n const astBuilder = new ASTBuilder(options)\n\n astBuilder.visit(sourceUnit)\n\n const ast: ParseResult | null = astBuilder.result as any\n\n if (ast === null) {\n throw new Error('ast should never be null')\n }\n\n if (options.tolerant !== true && listener.hasErrors()) {\n throw new ParserError({ errors: listener.getErrors() })\n }\n if (options.tolerant === true && listener.hasErrors()) {\n ast.errors = listener.getErrors()\n }\n return ast\n}\n\n\n\nexport function parseBlock(\n input: string,\n options: ParseOptions = {},\n parseListsener: ParseTreeListener = {}\n\n): ParseResult | null {\n const inputStream = CharStreams.fromString(input)\n const lexer = new SolidityBlocksLexer(inputStream)\n const tokenStream = new CommonTokenStream(lexer)\n const parser = new SolidityBlocksParser(tokenStream)\n\n const listener = new ErrorListener()\n lexer.removeErrorListeners()\n lexer.addErrorListener(listener)\n\n parser.removeErrorListeners()\n parser.addErrorListener(listener)\n\n const result:any = []\n\n const l:SolidityBlocksListener = {\n exitContract(ctx:ContractContext){\n //console.log(ctx.exception)\n result.push({\n type: 'contract',\n name: ctx.functionname().text,\n start: ctx.start.startIndex,\n end: ctx.stop?.stopIndex,\n startLine: ctx.start.line,\n startColumn: ctx.start.charPositionInLine,\n endLine: ctx.stop?.line,\n endColumn: ctx.stop?.charPositionInLine,\n })\n //console.log(ctx.start.line)\n //console.log(ctx.stop?.line)\n },\n exitFunction(ctx:FunctionContext){\n\n const parentType = ctx.parent?.constructor.name\n let parentName = ''\n if(parentType === 'ContractContext'){\n if((ctx.parent as ContractContext)?.functionname){\n parentName = (ctx.parent as ContractContext)?.functionname().text\n }\n }\n result.push({\n type: 'function',\n name: ctx.functionDescriptor()?.functionname()?.text \n || ctx.functionDescriptor()?.Constructorkeyword()?.text\n || null,\n parent: parentName,\n start: ctx.start.startIndex,\n end: ctx.stop?.stopIndex,\n startLine: ctx.start.line,\n startColumn: ctx.start.charPositionInLine,\n endLine: ctx.stop?.line,\n endColumn: ctx.stop?.charPositionInLine,\n })\n //console.log(ctx.start.line)\n //console.log(ctx.stop?.line)\n }\n }\n\n parser.addParseListener(l)\n\n const startTime = Date.now()\n parser.buildParseTree = true\n const sourceUnit = parser.sol()\n const endTime = Date.now()\n //console.log(`Parsing blocks took ${endTime - startTime}ms`)\n result.sort((a:any, b:any) => (a.start > b.start) ? 1 : -1)\n return result\n}\n\nfunction _isASTNode(node: unknown): node is ASTNode {\n if (typeof node !== 'object' || node === null) {\n return false\n }\n\n const nodeAsAny: any = node\n\n if (Object.prototype.hasOwnProperty.call(nodeAsAny, 'type') && typeof nodeAsAny.type === \"string\") {\n return astNodeTypes.includes(nodeAsAny.type)\n }\n\n return false;\n}\n\nexport function visit(node: unknown, visitor: ASTVisitor, nodeParent?: ASTNode): void {\n if (Array.isArray(node)) {\n node.forEach((child) => visit(child, visitor, nodeParent))\n }\n\n if (!_isASTNode(node)) return\n\n let cont = true\n\n if (visitor[node.type] !== undefined) {\n // TODO can we avoid this `as any`\n cont = visitor[node.type]!(node as any, nodeParent)\n }\n\n if (cont === false) return\n\n for (const prop in node) {\n if (Object.prototype.hasOwnProperty.call(node, prop)) {\n // TODO can we avoid this `as any`\n visit((node as any)[prop], visitor, node)\n }\n }\n\n const selector = (node.type + ':exit') as `${ASTNodeTypeString}:exit`\n if (visitor[selector] !== undefined) {\n // TODO can we avoid this `as any`\n visitor[selector]!(node as any, nodeParent)\n }\n}\n", "// Generated from antlr/Solidity.g4 by ANTLR 4.9.0-SNAPSHOT\n\n\nimport { ATN } from \"antlr4ts/atn/ATN\";\nimport { ATNDeserializer } from \"antlr4ts/atn/ATNDeserializer\";\nimport { CharStream } from \"antlr4ts/CharStream\";\nimport { Lexer } from \"antlr4ts/Lexer\";\nimport { LexerATNSimulator } from \"antlr4ts/atn/LexerATNSimulator\";\nimport { NotNull } from \"antlr4ts/Decorators\";\nimport { Override } from \"antlr4ts/Decorators\";\nimport { RuleContext } from \"antlr4ts/RuleContext\";\nimport { Vocabulary } from \"antlr4ts/Vocabulary\";\nimport { VocabularyImpl } from \"antlr4ts/VocabularyImpl\";\n\nimport * as Utils from \"antlr4ts/misc/Utils\";\n\n\nexport class SolidityLexer extends Lexer {\n\tpublic static readonly T__0 = 1;\n\tpublic static readonly T__1 = 2;\n\tpublic static readonly T__2 = 3;\n\tpublic static readonly T__3 = 4;\n\tpublic static readonly T__4 = 5;\n\tpublic static readonly T__5 = 6;\n\tpublic static readonly T__6 = 7;\n\tpublic static readonly T__7 = 8;\n\tpublic static readonly T__8 = 9;\n\tpublic static readonly T__9 = 10;\n\tpublic static readonly T__10 = 11;\n\tpublic static readonly T__11 = 12;\n\tpublic static readonly T__12 = 13;\n\tpublic static readonly T__13 = 14;\n\tpublic static readonly T__14 = 15;\n\tpublic static readonly T__15 = 16;\n\tpublic static readonly T__16 = 17;\n\tpublic static readonly T__17 = 18;\n\tpublic static readonly T__18 = 19;\n\tpublic static readonly T__19 = 20;\n\tpublic static readonly T__20 = 21;\n\tpublic static readonly T__21 = 22;\n\tpublic static readonly T__22 = 23;\n\tpublic static readonly T__23 = 24;\n\tpublic static readonly T__24 = 25;\n\tpublic static readonly T__25 = 26;\n\tpublic static readonly T__26 = 27;\n\tpublic static readonly T__27 = 28;\n\tpublic static readonly T__28 = 29;\n\tpublic static readonly T__29 = 30;\n\tpublic static readonly T__30 = 31;\n\tpublic static readonly T__31 = 32;\n\tpublic static readonly T__32 = 33;\n\tpublic static readonly T__33 = 34;\n\tpublic static readonly T__34 = 35;\n\tpublic static readonly T__35 = 36;\n\tpublic static readonly T__36 = 37;\n\tpublic static readonly T__37 = 38;\n\tpublic static readonly T__38 = 39;\n\tpublic static readonly T__39 = 40;\n\tpublic static readonly T__40 = 41;\n\tpublic static readonly T__41 = 42;\n\tpublic static readonly T__42 = 43;\n\tpublic static readonly T__43 = 44;\n\tpublic static readonly T__44 = 45;\n\tpublic static readonly T__45 = 46;\n\tpublic static readonly T__46 = 47;\n\tpublic static readonly T__47 = 48;\n\tpublic static readonly T__48 = 49;\n\tpublic static readonly T__49 = 50;\n\tpublic static readonly T__50 = 51;\n\tpublic static readonly T__51 = 52;\n\tpublic static readonly T__52 = 53;\n\tpublic static readonly T__53 = 54;\n\tpublic static readonly T__54 = 55;\n\tpublic static readonly T__55 = 56;\n\tpublic static readonly T__56 = 57;\n\tpublic static readonly T__57 = 58;\n\tpublic static readonly T__58 = 59;\n\tpublic static readonly T__59 = 60;\n\tpublic static readonly T__60 = 61;\n\tpublic static readonly T__61 = 62;\n\tpublic static readonly T__62 = 63;\n\tpublic static readonly T__63 = 64;\n\tpublic static readonly T__64 = 65;\n\tpublic static readonly T__65 = 66;\n\tpublic static readonly T__66 = 67;\n\tpublic static readonly T__67 = 68;\n\tpublic static readonly T__68 = 69;\n\tpublic static readonly T__69 = 70;\n\tpublic static readonly T__70 = 71;\n\tpublic static readonly T__71 = 72;\n\tpublic static readonly T__72 = 73;\n\tpublic static readonly T__73 = 74;\n\tpublic static readonly T__74 = 75;\n\tpublic static readonly T__75 = 76;\n\tpublic static readonly T__76 = 77;\n\tpublic static readonly T__77 = 78;\n\tpublic static readonly T__78 = 79;\n\tpublic static readonly T__79 = 80;\n\tpublic static readonly T__80 = 81;\n\tpublic static readonly T__81 = 82;\n\tpublic static readonly T__82 = 83;\n\tpublic static readonly T__83 = 84;\n\tpublic static readonly T__84 = 85;\n\tpublic static readonly T__85 = 86;\n\tpublic static readonly T__86 = 87;\n\tpublic static readonly T__87 = 88;\n\tpublic static readonly T__88 = 89;\n\tpublic static readonly T__89 = 90;\n\tpublic static readonly T__90 = 91;\n\tpublic static readonly T__91 = 92;\n\tpublic static readonly T__92 = 93;\n\tpublic static readonly T__93 = 94;\n\tpublic static readonly T__94 = 95;\n\tpublic static readonly T__95 = 96;\n\tpublic static readonly T__96 = 97;\n\tpublic static readonly Int = 98;\n\tpublic static readonly Uint = 99;\n\tpublic static readonly Byte = 100;\n\tpublic static readonly Fixed = 101;\n\tpublic static readonly Ufixed = 102;\n\tpublic static readonly BooleanLiteral = 103;\n\tpublic static readonly DecimalNumber = 104;\n\tpublic static readonly HexNumber = 105;\n\tpublic static readonly NumberUnit = 106;\n\tpublic static readonly HexLiteralFragment = 107;\n\tpublic static readonly ReservedKeyword = 108;\n\tpublic static readonly AnonymousKeyword = 109;\n\tpublic static readonly BreakKeyword = 110;\n\tpublic static readonly ConstantKeyword = 111;\n\tpublic static readonly ImmutableKeyword = 112;\n\tpublic static readonly ContinueKeyword = 113;\n\tpublic static readonly LeaveKeyword = 114;\n\tpublic static readonly ExternalKeyword = 115;\n\tpublic static readonly IndexedKeyword = 116;\n\tpublic static readonly InternalKeyword = 117;\n\tpublic static readonly PayableKeyword = 118;\n\tpublic static readonly PrivateKeyword = 119;\n\tpublic static readonly PublicKeyword = 120;\n\tpublic static readonly VirtualKeyword = 121;\n\tpublic static readonly PureKeyword = 122;\n\tpublic static readonly TypeKeyword = 123;\n\tpublic static readonly ViewKeyword = 124;\n\tpublic static readonly GlobalKeyword = 125;\n\tpublic static readonly ConstructorKeyword = 126;\n\tpublic static readonly FallbackKeyword = 127;\n\tpublic static readonly ReceiveKeyword = 128;\n\tpublic static readonly Identifier = 129;\n\tpublic static readonly StringLiteralFragment = 130;\n\tpublic static readonly VersionLiteral = 131;\n\tpublic static readonly WS = 132;\n\tpublic static readonly COMMENT = 133;\n\tpublic static readonly LINE_COMMENT = 134;\n\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly channelNames: string[] = [\n\t\t\"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\",\n\t];\n\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly modeNames: string[] = [\n\t\t\"DEFAULT_MODE\",\n\t];\n\n\tpublic static readonly ruleNames: string[] = [\n\t\t\"T__0\", \"T__1\", \"T__2\", \"T__3\", \"T__4\", \"T__5\", \"T__6\", \"T__7\", \"T__8\", \n\t\t\"T__9\", \"T__10\", \"T__11\", \"T__12\", \"T__13\", \"T__14\", \"T__15\", \"T__16\", \n\t\t\"T__17\", \"T__18\", \"T__19\", \"T__20\", \"T__21\", \"T__22\", \"T__23\", \"T__24\", \n\t\t\"T__25\", \"T__26\", \"T__27\", \"T__28\", \"T__29\", \"T__30\", \"T__31\", \"T__32\", \n\t\t\"T__33\", \"T__34\", \"T__35\", \"T__36\", \"T__37\", \"T__38\", \"T__39\", \"T__40\", \n\t\t\"T__41\", \"T__42\", \"T__43\", \"T__44\", \"T__45\", \"T__46\", \"T__47\", \"T__48\", \n\t\t\"T__49\", \"T__50\", \"T__51\", \"T__52\", \"T__53\", \"T__54\", \"T__55\", \"T__56\", \n\t\t\"T__57\", \"T__58\", \"T__59\", \"T__60\", \"T__61\", \"T__62\", \"T__63\", \"T__64\", \n\t\t\"T__65\", \"T__66\", \"T__67\", \"T__68\", \"T__69\", \"T__70\", \"T__71\", \"T__72\", \n\t\t\"T__73\", \"T__74\", \"T__75\", \"T__76\", \"T__77\", \"T__78\", \"T__79\", \"T__80\", \n\t\t\"T__81\", \"T__82\", \"T__83\", \"T__84\", \"T__85\", \"T__86\", \"T__87\", \"T__88\", \n\t\t\"T__89\", \"T__90\", \"T__91\", \"T__92\", \"T__93\", \"T__94\", \"T__95\", \"T__96\", \n\t\t\"Int\", \"Uint\", \"Byte\", \"Fixed\", \"Ufixed\", \"BooleanLiteral\", \"DecimalNumber\", \n\t\t\"DecimalDigits\", \"HexNumber\", \"HexDigits\", \"NumberUnit\", \"HexLiteralFragment\", \n\t\t\"HexPair\", \"HexCharacter\", \"ReservedKeyword\", \"AnonymousKeyword\", \"BreakKeyword\", \n\t\t\"ConstantKeyword\", \"ImmutableKeyword\", \"ContinueKeyword\", \"LeaveKeyword\", \n\t\t\"ExternalKeyword\", \"IndexedKeyword\", \"InternalKeyword\", \"PayableKeyword\", \n\t\t\"PrivateKeyword\", \"PublicKeyword\", \"VirtualKeyword\", \"PureKeyword\", \"TypeKeyword\", \n\t\t\"ViewKeyword\", \"GlobalKeyword\", \"ConstructorKeyword\", \"FallbackKeyword\", \n\t\t\"ReceiveKeyword\", \"Identifier\", \"IdentifierStart\", \"IdentifierPart\", \"StringLiteralFragment\", \n\t\t\"DoubleQuotedStringCharacter\", \"SingleQuotedStringCharacter\", \"VersionLiteral\", \n\t\t\"WS\", \"COMMENT\", \"LINE_COMMENT\",\n\t];\n\n\tprivate static readonly _LITERAL_NAMES: Array = [\n\t\tundefined, \"'pragma'\", \"';'\", \"'*'\", \"'||'\", \"'^'\", \"'~'\", \"'>='\", \"'>'\", \n\t\t\"'<'\", \"'<='\", \"'='\", \"'as'\", \"'import'\", \"'from'\", \"'{'\", \"','\", \"'}'\", \n\t\t\"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'is'\", \"'('\", \n\t\t\"')'\", \"'error'\", \"'using'\", \"'for'\", \"'struct'\", \"'modifier'\", \"'function'\", \n\t\t\"'returns'\", \"'event'\", \"'enum'\", \"'['\", \"']'\", \"'address'\", \"'.'\", \"'mapping'\", \n\t\t\"'=>'\", \"'memory'\", \"'storage'\", \"'calldata'\", \"'if'\", \"'else'\", \"'try'\", \n\t\t\"'catch'\", \"'while'\", \"'unchecked'\", \"'assembly'\", \"'do'\", \"'return'\", \n\t\t\"'throw'\", \"'emit'\", \"'revert'\", \"'var'\", \"'bool'\", \"'string'\", \"'byte'\", \n\t\t\"'++'\", \"'--'\", \"'new'\", \"':'\", \"'+'\", \"'-'\", \"'after'\", \"'delete'\", \"'!'\", \n\t\t\"'**'\", \"'/'\", \"'%'\", \"'<<'\", \"'>>'\", \"'&'\", \"'|'\", \"'=='\", \"'!='\", \"'&&'\", \n\t\t\"'?'\", \"'|='\", \"'^='\", \"'&='\", \"'<<='\", \"'>>='\", \"'+='\", \"'-='\", \"'*='\", \n\t\t\"'/='\", \"'%='\", \"'let'\", \"':='\", \"'=:'\", \"'switch'\", \"'case'\", \"'default'\", \n\t\t\"'->'\", \"'callback'\", \"'override'\", undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"'anonymous'\", \"'break'\", \"'constant'\", \"'immutable'\", \"'continue'\", \"'leave'\", \n\t\t\"'external'\", \"'indexed'\", \"'internal'\", \"'payable'\", \"'private'\", \"'public'\", \n\t\t\"'virtual'\", \"'pure'\", \"'type'\", \"'view'\", \"'global'\", \"'constructor'\", \n\t\t\"'fallback'\", \"'receive'\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"Int\", \"Uint\", \"Byte\", \"Fixed\", \"Ufixed\", \"BooleanLiteral\", \"DecimalNumber\", \n\t\t\"HexNumber\", \"NumberUnit\", \"HexLiteralFragment\", \"ReservedKeyword\", \"AnonymousKeyword\", \n\t\t\"BreakKeyword\", \"ConstantKeyword\", \"ImmutableKeyword\", \"ContinueKeyword\", \n\t\t\"LeaveKeyword\", \"ExternalKeyword\", \"IndexedKeyword\", \"InternalKeyword\", \n\t\t\"PayableKeyword\", \"PrivateKeyword\", \"PublicKeyword\", \"VirtualKeyword\", \n\t\t\"PureKeyword\", \"TypeKeyword\", \"ViewKeyword\", \"GlobalKeyword\", \"ConstructorKeyword\", \n\t\t\"FallbackKeyword\", \"ReceiveKeyword\", \"Identifier\", \"StringLiteralFragment\", \n\t\t\"VersionLiteral\", \"WS\", \"COMMENT\", \"LINE_COMMENT\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityLexer._LITERAL_NAMES, SolidityLexer._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityLexer.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\n\tconstructor(input: CharStream) {\n\t\tsuper(input);\n\t\tthis._interp = new LexerATNSimulator(SolidityLexer._ATN, this);\n\t}\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"Solidity.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityLexer.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityLexer._serializedATN; }\n\n\t// @Override\n\tpublic get channelNames(): string[] { return SolidityLexer.channelNames; }\n\n\t// @Override\n\tpublic get modeNames(): string[] { return SolidityLexer.modeNames; }\n\n\tprivate static readonly _serializedATNSegments: number = 4;\n\tprivate static readonly _serializedATNSegment0: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x02\\x88\\u0757\\b\\x01\" +\n\t\t\"\\x04\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\" +\n\t\t\"\\x04\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x04\\n\\t\\n\\x04\\v\\t\\v\\x04\\f\\t\\f\\x04\\r\" +\n\t\t\"\\t\\r\\x04\\x0E\\t\\x0E\\x04\\x0F\\t\\x0F\\x04\\x10\\t\\x10\\x04\\x11\\t\\x11\\x04\\x12\\t\" +\n\t\t\"\\x12\\x04\\x13\\t\\x13\\x04\\x14\\t\\x14\\x04\\x15\\t\\x15\\x04\\x16\\t\\x16\\x04\\x17\\t\" +\n\t\t\"\\x17\\x04\\x18\\t\\x18\\x04\\x19\\t\\x19\\x04\\x1A\\t\\x1A\\x04\\x1B\\t\\x1B\\x04\\x1C\\t\" +\n\t\t\"\\x1C\\x04\\x1D\\t\\x1D\\x04\\x1E\\t\\x1E\\x04\\x1F\\t\\x1F\\x04 \\t \\x04!\\t!\\x04\\\"\\t\" +\n\t\t\"\\\"\\x04#\\t#\\x04$\\t$\\x04%\\t%\\x04&\\t&\\x04\\'\\t\\'\\x04(\\t(\\x04)\\t)\\x04*\\t*\\x04\" +\n\t\t\"+\\t+\\x04,\\t,\\x04-\\t-\\x04.\\t.\\x04/\\t/\\x040\\t0\\x041\\t1\\x042\\t2\\x043\\t3\\x04\" +\n\t\t\"4\\t4\\x045\\t5\\x046\\t6\\x047\\t7\\x048\\t8\\x049\\t9\\x04:\\t:\\x04;\\t;\\x04<\\t<\\x04\" +\n\t\t\"=\\t=\\x04>\\t>\\x04?\\t?\\x04@\\t@\\x04A\\tA\\x04B\\tB\\x04C\\tC\\x04D\\tD\\x04E\\tE\\x04\" +\n\t\t\"F\\tF\\x04G\\tG\\x04H\\tH\\x04I\\tI\\x04J\\tJ\\x04K\\tK\\x04L\\tL\\x04M\\tM\\x04N\\tN\\x04\" +\n\t\t\"O\\tO\\x04P\\tP\\x04Q\\tQ\\x04R\\tR\\x04S\\tS\\x04T\\tT\\x04U\\tU\\x04V\\tV\\x04W\\tW\\x04\" +\n\t\t\"X\\tX\\x04Y\\tY\\x04Z\\tZ\\x04[\\t[\\x04\\\\\\t\\\\\\x04]\\t]\\x04^\\t^\\x04_\\t_\\x04`\\t\" +\n\t\t\"`\\x04a\\ta\\x04b\\tb\\x04c\\tc\\x04d\\td\\x04e\\te\\x04f\\tf\\x04g\\tg\\x04h\\th\\x04\" +\n\t\t\"i\\ti\\x04j\\tj\\x04k\\tk\\x04l\\tl\\x04m\\tm\\x04n\\tn\\x04o\\to\\x04p\\tp\\x04q\\tq\\x04\" +\n\t\t\"r\\tr\\x04s\\ts\\x04t\\tt\\x04u\\tu\\x04v\\tv\\x04w\\tw\\x04x\\tx\\x04y\\ty\\x04z\\tz\\x04\" +\n\t\t\"{\\t{\\x04|\\t|\\x04}\\t}\\x04~\\t~\\x04\\x7F\\t\\x7F\\x04\\x80\\t\\x80\\x04\\x81\\t\\x81\" +\n\t\t\"\\x04\\x82\\t\\x82\\x04\\x83\\t\\x83\\x04\\x84\\t\\x84\\x04\\x85\\t\\x85\\x04\\x86\\t\\x86\" +\n\t\t\"\\x04\\x87\\t\\x87\\x04\\x88\\t\\x88\\x04\\x89\\t\\x89\\x04\\x8A\\t\\x8A\\x04\\x8B\\t\\x8B\" +\n\t\t\"\\x04\\x8C\\t\\x8C\\x04\\x8D\\t\\x8D\\x04\\x8E\\t\\x8E\\x04\\x8F\\t\\x8F\\x03\\x02\\x03\\x02\" +\n\t\t\"\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\\x03\\x04\\x03\\x04\" +\n\t\t\"\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\b\\x03\\b\\x03\" +\n\t\t\"\\b\\x03\\t\\x03\\t\\x03\\n\\x03\\n\\x03\\v\\x03\\v\\x03\\v\\x03\\f\\x03\\f\\x03\\r\\x03\\r\\x03\" +\n\t\t\"\\r\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0F\\x03\" +\n\t\t\"\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x10\\x03\\x10\\x03\\x11\\x03\\x11\\x03\\x12\\x03\" +\n\t\t\"\\x12\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\" +\n\t\t\"\\x13\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\" +\n\t\t\"\\x14\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\" +\n\t\t\"\\x15\\x03\\x15\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\" +\n\t\t\"\\x16\\x03\\x17\\x03\\x17\\x03\\x17\\x03\\x18\\x03\\x18\\x03\\x19\\x03\\x19\\x03\\x1A\\x03\" +\n\t\t\"\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\" +\n\t\t\"\\x1B\\x03\\x1B\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1D\\x03\\x1D\\x03\\x1D\\x03\" +\n\t\t\"\\x1D\\x03\\x1D\\x03\\x1D\\x03\\x1D\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\" +\n\t\t\"\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\" +\n\t\t\"\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03 \\x03 \\x03 \\x03 \\x03 \\x03 \\x03 \\x03 \\x03\" +\n\t\t\"!\\x03!\\x03!\\x03!\\x03!\\x03!\\x03\\\"\\x03\\\"\\x03\\\"\\x03\\\"\\x03\\\"\\x03#\\x03#\\x03\" +\n\t\t\"$\\x03$\\x03%\\x03%\\x03%\\x03%\\x03%\\x03%\\x03%\\x03%\\x03&\\x03&\\x03\\'\\x03\\'\\x03\" +\n\t\t\"\\'\\x03\\'\\x03\\'\\x03\\'\\x03\\'\\x03\\'\\x03(\\x03(\\x03(\\x03)\\x03)\\x03)\\x03)\\x03\" +\n\t\t\")\\x03)\\x03)\\x03*\\x03*\\x03*\\x03*\\x03*\\x03*\\x03*\\x03*\\x03+\\x03+\\x03+\\x03\" +\n\t\t\"+\\x03+\\x03+\\x03+\\x03+\\x03+\\x03,\\x03,\\x03,\\x03-\\x03-\\x03-\\x03-\\x03-\\x03\" +\n\t\t\".\\x03.\\x03.\\x03.\\x03/\\x03/\\x03/\\x03/\\x03/\\x03/\\x030\\x030\\x030\\x030\\x03\" +\n\t\t\"0\\x030\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x032\\x032\\x03\" +\n\t\t\"2\\x032\\x032\\x032\\x032\\x032\\x032\\x033\\x033\\x033\\x034\\x034\\x034\\x034\\x03\" +\n\t\t\"4\\x034\\x034\\x035\\x035\\x035\\x035\\x035\\x035\\x036\\x036\\x036\\x036\\x036\\x03\" +\n\t\t\"7\\x037\\x037\\x037\\x037\\x037\\x037\\x038\\x038\\x038\\x038\\x039\\x039\\x039\\x03\" +\n\t\t\"9\\x039\\x03:\\x03:\\x03:\\x03:\\x03:\\x03:\\x03:\\x03;\\x03;\\x03;\\x03;\\x03;\\x03\" +\n\t\t\"<\\x03<\\x03<\\x03=\\x03=\\x03=\\x03>\\x03>\\x03>\\x03>\\x03?\\x03?\\x03@\\x03@\\x03\" +\n\t\t\"A\\x03A\\x03B\\x03B\\x03B\\x03B\\x03B\\x03B\\x03C\\x03C\\x03C\\x03C\\x03C\\x03C\\x03\" +\n\t\t\"C\\x03D\\x03D\\x03E\\x03E\\x03E\\x03F\\x03F\\x03G\\x03G\\x03H\\x03H\\x03H\\x03I\\x03\" +\n\t\t\"I\\x03I\\x03J\\x03J\\x03K\\x03K\\x03L\\x03L\\x03L\\x03M\\x03M\\x03M\\x03N\\x03N\\x03\" +\n\t\t\"N\\x03O\\x03O\\x03P\\x03P\\x03P\\x03Q\\x03Q\\x03Q\\x03R\\x03R\\x03R\\x03S\\x03S\\x03\" +\n\t\t\"S\\x03S\\x03T\\x03T\\x03T\\x03T\\x03U\\x03U\\x03U\\x03V\\x03V\\x03V\\x03W\\x03W\\x03\" +\n\t\t\"W\\x03X\\x03X\\x03X\\x03Y\\x03Y\\x03Y\\x03Z\\x03Z\\x03Z\\x03Z\\x03[\\x03[\\x03[\\x03\" +\n\t\t\"\\\\\\x03\\\\\\x03\\\\\\x03]\\x03]\\x03]\\x03]\\x03]\\x03]\\x03]\\x03^\\x03^\\x03^\\x03^\" +\n\t\t\"\\x03^\\x03_\\x03_\\x03_\\x03_\\x03_\\x03_\\x03_\\x03_\\x03`\\x03`\\x03`\\x03a\\x03\" +\n\t\t\"a\\x03a\\x03a\\x03a\\x03a\\x03a\\x03a\\x03a\\x03b\\x03b\\x03b\\x03b\\x03b\\x03b\\x03\" +\n\t\t\"b\\x03b\\x03b\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x05c\\u038B\\nc\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x05d\\u0464\\nd\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x05e\\u0542\\ne\\x03f\\x03\" +\n\t\t\"f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x06f\\u0550\\nf\\rf\\x0E\" +\n\t\t\"f\\u0551\\x03f\\x03f\\x06f\\u0556\\nf\\rf\\x0Ef\\u0557\\x05f\\u055A\\nf\\x03g\\x03g\" +\n\t\t\"\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x06g\\u056A\" +\n\t\t\"\\ng\\rg\\x0Eg\\u056B\\x03g\\x03g\\x06g\\u0570\\ng\\rg\\x0Eg\\u0571\\x05g\\u0574\\ng\" +\n\t\t\"\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x05h\\u057F\\nh\\x03i\\x03i\" +\n\t\t\"\\x05i\\u0583\\ni\\x03i\\x03i\\x05i\\u0587\\ni\\x03i\\x03i\\x05i\\u058B\\ni\\x03j\\x03\" +\n\t\t\"j\\x05j\\u058F\\nj\\x03j\\x07j\\u0592\\nj\\fj\\x0Ej\\u0595\\vj\\x03k\\x03k\\x03k\\x03\" +\n\t\t\"k\\x03l\\x03l\\x05l\\u059D\\nl\\x03l\\x07l\\u05A0\\nl\\fl\\x0El\\u05A3\\vl\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x05m\\u05DD\" +\n\t\t\"\\nm\\x03n\\x03n\\x03n\\x03n\\x03n\\x03n\\x05n\\u05E5\\nn\\x03n\\x03n\\x03n\\x05n\\u05EA\" +\n\t\t\"\\nn\\x03n\\x05n\\u05ED\\nn\\x03o\\x03o\\x03o\\x03p\\x03p\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x05\" +\n\t\t\"q\\u064C\\nq\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03s\\x03\" +\n\t\t\"s\\x03s\\x03s\\x03s\\x03s\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03\" +\n\t\t\"u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03v\\x03v\\x03v\\x03v\\x03\" +\n\t\t\"v\\x03v\\x03v\\x03v\\x03v\\x03w\\x03w\\x03w\\x03w\\x03w\\x03w\\x03x\\x03x\\x03x\\x03\" +\n\t\t\"x\\x03x\\x03x\\x03x\\x03x\\x03x\\x03y\\x03y\\x03y\\x03y\\x03y\\x03y\\x03y\\x03y\\x03\" +\n\t\t\"z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03{\\x03{\\x03{\\x03{\\x03{\\x03\" +\n\t\t\"{\\x03{\\x03{\\x03|\\x03|\\x03|\\x03|\\x03|\\x03|\\x03|\\x03|\\x03}\\x03}\\x03}\\x03\" +\n\t\t\"}\\x03}\\x03}\\x03}\\x03~\\x03~\\x03~\\x03~\\x03~\\x03~\\x03~\\x03~\\x03\\x7F\\x03\\x7F\" +\n\t\t\"\\x03\\x7F\\x03\\x7F\\x03\\x7F\\x03\\x80\\x03\\x80\\x03\\x80\\x03\\x80\\x03\\x80\\x03\\x81\" +\n\t\t\"\\x03\\x81\\x03\\x81\\x03\\x81\\x03\\x81\\x03\\x82\\x03\\x82\\x03\\x82\\x03\\x82\\x03\\x82\" +\n\t\t\"\\x03\\x82\\x03\\x82\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\" +\n\t\t\"\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x84\" +\n\t\t\"\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x85\\x03\\x85\\x03\\x85\\x03\\x85\" +\n\t\t\"\\x03\\x85\\x03\\x85\\x03\\x85\\x03\\x85\\x03\\x86\\x03\\x86\\x07\\x86\\u06EE\\n\\x86\\f\" +\n\t\t\"\\x86\\x0E\\x86\\u06F1\\v\\x86\\x03\\x87\\x03\\x87\\x03\\x88\\x03\\x88\\x03\\x89\\x03\\x89\" +\n\t\t\"\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x05\\x89\\u06FE\\n\\x89\\x03\\x89\\x03\" +\n\t\t\"\\x89\\x07\\x89\\u0702\\n\\x89\\f\\x89\\x0E\\x89\\u0705\\v\\x89\\x03\\x89\\x03\\x89\\x03\" +\n\t\t\"\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x05\\x89\\u070F\\n\\x89\\x03\\x89\" +\n\t\t\"\\x03\\x89\\x07\\x89\\u0713\\n\\x89\\f\\x89\\x0E\\x89\\u0716\\v\\x89\\x03\\x89\\x05\\x89\" +\n\t\t\"\\u0719\\n\\x89\\x03\\x8A\\x03\\x8A\\x03\\x8A\\x05\\x8A\\u071E\\n\\x8A\\x03\\x8B\\x03\\x8B\" +\n\t\t\"\\x03\\x8B\\x05\\x8B\\u0723\\n\\x8B\\x03\\x8C\\x06\\x8C\\u0726\\n\\x8C\\r\\x8C\\x0E\\x8C\" +\n\t\t\"\\u0727\\x03\\x8C\\x03\\x8C\\x06\\x8C\\u072C\\n\\x8C\\r\\x8C\\x0E\\x8C\\u072D\\x03\\x8C\" +\n\t\t\"\\x03\\x8C\\x06\\x8C\\u0732\\n\\x8C\\r\\x8C\\x0E\\x8C\\u0733\\x05\\x8C\\u0736\\n\\x8C\\x03\" +\n\t\t\"\\x8D\\x06\\x8D\\u0739\\n\\x8D\\r\\x8D\\x0E\\x8D\\u073A\\x03\\x8D\\x03\\x8D\\x03\\x8E\\x03\" +\n\t\t\"\\x8E\\x03\\x8E\\x03\\x8E\\x07\\x8E\\u0743\\n\\x8E\\f\\x8E\\x0E\\x8E\\u0746\\v\\x8E\\x03\" +\n\t\t\"\\x8E\\x03\\x8E\\x03\\x8E\\x03\\x8E\\x03\\x8E\\x03\\x8F\\x03\\x8F\\x03\\x8F\\x03\\x8F\\x07\" +\n\t\t\"\\x8F\\u0751\\n\\x8F\\f\\x8F\\x0E\\x8F\\u0754\\v\\x8F\\x03\\x8F\\x03\\x8F\\x03\\u0744\\x02\" +\n\t\t\"\\x02\\x90\\x03\\x02\\x03\\x05\\x02\\x04\\x07\\x02\\x05\\t\\x02\\x06\\v\\x02\\x07\\r\\x02\" +\n\t\t\"\\b\\x0F\\x02\\t\\x11\\x02\\n\\x13\\x02\\v\\x15\\x02\\f\\x17\\x02\\r\\x19\\x02\\x0E\\x1B\\x02\" +\n\t\t\"\\x0F\\x1D\\x02\\x10\\x1F\\x02\\x11!\\x02\\x12#\\x02\\x13%\\x02\\x14\\'\\x02\\x15)\\x02\" +\n\t\t\"\\x16+\\x02\\x17-\\x02\\x18/\\x02\\x191\\x02\\x1A3\\x02\\x1B5\\x02\\x1C7\\x02\\x1D9\\x02\" +\n\t\t\"\\x1E;\\x02\\x1F=\\x02 ?\\x02!A\\x02\\\"C\\x02#E\\x02$G\\x02%I\\x02&K\\x02\\'M\\x02(\" +\n\t\t\"O\\x02)Q\\x02*S\\x02+U\\x02,W\\x02-Y\\x02.[\\x02/]\\x020_\\x021a\\x022c\\x023e\\x02\" +\n\t\t\"4g\\x025i\\x026k\\x027m\\x028o\\x029q\\x02:s\\x02;u\\x02{\\x02?}\\x02\" +\n\t\t\"@\\x7F\\x02A\\x81\\x02B\\x83\\x02C\\x85\\x02D\\x87\\x02E\\x89\\x02F\\x8B\\x02G\\x8D\\x02\" +\n\t\t\"H\\x8F\\x02I\\x91\\x02J\\x93\\x02K\\x95\\x02L\\x97\\x02M\\x99\\x02N\\x9B\\x02O\\x9D\\x02\" +\n\t\t\"P\\x9F\\x02Q\\xA1\\x02R\\xA3\\x02S\\xA5\\x02T\\xA7\\x02U\\xA9\\x02V\\xAB\\x02W\\xAD\\x02\" +\n\t\t\"X\\xAF\\x02Y\\xB1\\x02Z\\xB3\\x02[\\xB5\\x02\\\\\\xB7\\x02]\\xB9\\x02^\\xBB\\x02_\\xBD\" +\n\t\t\"\\x02`\\xBF\\x02a\\xC1\\x02b\\xC3\\x02c\\xC5\\x02d\\xC7\\x02e\\xC9\\x02f\\xCB\\x02g\\xCD\" +\n\t\t\"\\x02h\\xCF\\x02i\\xD1\\x02j\\xD3\\x02\\x02\\xD5\\x02k\\xD7\\x02\\x02\\xD9\\x02l\\xDB\" +\n\t\t\"\\x02m\\xDD\\x02\\x02\\xDF\\x02\\x02\\xE1\\x02n\\xE3\\x02o\\xE5\\x02p\\xE7\\x02q\\xE9\" +\n\t\t\"\\x02r\\xEB\\x02s\\xED\\x02t\\xEF\\x02u\\xF1\\x02v\\xF3\\x02w\\xF5\\x02x\\xF7\\x02y\\xF9\" +\n\t\t\"\\x02z\\xFB\\x02{\\xFD\\x02|\\xFF\\x02}\\u0101\\x02~\\u0103\\x02\\x7F\\u0105\\x02\\x80\" +\n\t\t\"\\u0107\\x02\\x81\\u0109\\x02\\x82\\u010B\\x02\\x83\\u010D\\x02\\x02\\u010F\\x02\\x02\" +\n\t\t\"\\u0111\\x02\\x84\\u0113\\x02\\x02\\u0115\\x02\\x02\\u0117\\x02\\x85\\u0119\\x02\\x86\" +\n\t\t\"\\u011B\\x02\\x87\\u011D\\x02\\x88\\x03\\x02\\f\\x03\\x022;\\x04\\x02GGgg\\x04\\x02Z\" +\n\t\t\"Zzz\\x05\\x022;CHch\\x06\\x02&&C\\\\aac|\\x07\\x02&&2;C\\\\aac|\\x06\\x02\\f\\f\\x0F\" +\n\t\t\"\\x0F$$^^\\x06\\x02\\f\\f\\x0F\\x0F))^^\\x05\\x02\\v\\f\\x0E\\x0F\\\"\\\"\\x04\\x02\\f\\f\\x0F\" +\n\t\t\"\\x0F\\x02\\u07E8\\x02\\x03\\x03\\x02\\x02\\x02\\x02\\x05\\x03\\x02\\x02\\x02\\x02\\x07\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x02\\t\\x03\\x02\\x02\\x02\\x02\\v\\x03\\x02\\x02\\x02\\x02\\r\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02\\x0F\\x03\\x02\\x02\\x02\\x02\\x11\\x03\\x02\\x02\\x02\\x02\\x13\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02\\x15\\x03\\x02\\x02\\x02\\x02\\x17\\x03\\x02\\x02\\x02\\x02\\x19\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02\\x1B\\x03\\x02\\x02\\x02\\x02\\x1D\\x03\\x02\\x02\\x02\\x02\\x1F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02!\\x03\\x02\\x02\\x02\\x02#\\x03\\x02\\x02\\x02\\x02%\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\'\\x03\\x02\\x02\\x02\\x02)\\x03\\x02\\x02\\x02\\x02+\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"-\\x03\\x02\\x02\\x02\\x02/\\x03\\x02\\x02\\x02\\x021\\x03\\x02\\x02\\x02\\x023\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x025\\x03\\x02\\x02\\x02\\x027\\x03\\x02\\x02\\x02\\x029\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02;\\x03\\x02\\x02\\x02\\x02=\\x03\\x02\\x02\\x02\\x02?\\x03\\x02\\x02\\x02\\x02A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02C\\x03\\x02\\x02\\x02\\x02E\\x03\\x02\\x02\\x02\\x02G\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02I\\x03\\x02\\x02\\x02\\x02K\\x03\\x02\\x02\\x02\\x02M\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"O\\x03\\x02\\x02\\x02\\x02Q\\x03\\x02\\x02\\x02\\x02S\\x03\\x02\\x02\\x02\\x02U\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02W\\x03\\x02\\x02\\x02\\x02Y\\x03\\x02\\x02\\x02\\x02[\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02]\\x03\\x02\\x02\\x02\\x02_\\x03\\x02\\x02\\x02\\x02a\\x03\\x02\\x02\\x02\\x02c\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02e\\x03\\x02\\x02\\x02\\x02g\\x03\\x02\\x02\\x02\\x02i\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02k\\x03\\x02\\x02\\x02\\x02m\\x03\\x02\\x02\\x02\\x02o\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"q\\x03\\x02\\x02\\x02\\x02s\\x03\\x02\\x02\\x02\\x02u\\x03\\x02\\x02\\x02\\x02w\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02y\\x03\\x02\\x02\\x02\\x02{\\x03\\x02\\x02\\x02\\x02}\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x7F\\x03\\x02\\x02\\x02\\x02\\x81\\x03\\x02\\x02\\x02\\x02\\x83\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x85\\x03\\x02\\x02\\x02\\x02\\x87\\x03\\x02\\x02\\x02\\x02\\x89\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x8B\\x03\\x02\\x02\\x02\\x02\\x8D\\x03\\x02\\x02\\x02\\x02\\x8F\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x91\\x03\\x02\\x02\\x02\\x02\\x93\\x03\\x02\\x02\\x02\\x02\\x95\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x97\\x03\\x02\\x02\\x02\\x02\\x99\\x03\\x02\\x02\\x02\\x02\\x9B\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x9D\\x03\\x02\\x02\\x02\\x02\\x9F\\x03\\x02\\x02\\x02\\x02\\xA1\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xA3\\x03\\x02\\x02\\x02\\x02\\xA5\\x03\\x02\\x02\\x02\\x02\\xA7\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xA9\\x03\\x02\\x02\\x02\\x02\\xAB\\x03\\x02\\x02\\x02\\x02\\xAD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xAF\\x03\\x02\\x02\\x02\\x02\\xB1\\x03\\x02\\x02\\x02\\x02\\xB3\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xB5\\x03\\x02\\x02\\x02\\x02\\xB7\\x03\\x02\\x02\\x02\\x02\\xB9\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xBB\\x03\\x02\\x02\\x02\\x02\\xBD\\x03\\x02\\x02\\x02\\x02\\xBF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xC1\\x03\\x02\\x02\\x02\\x02\\xC3\\x03\\x02\\x02\\x02\\x02\\xC5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xC7\\x03\\x02\\x02\\x02\\x02\\xC9\\x03\\x02\\x02\\x02\\x02\\xCB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xCD\\x03\\x02\\x02\\x02\\x02\\xCF\\x03\\x02\\x02\\x02\\x02\\xD1\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xD5\\x03\\x02\\x02\\x02\\x02\\xD9\\x03\\x02\\x02\\x02\\x02\\xDB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xE1\\x03\\x02\\x02\\x02\\x02\\xE3\\x03\\x02\\x02\\x02\\x02\\xE5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xE7\\x03\\x02\\x02\\x02\";\n\tprivate static readonly _serializedATNSegment1: string =\n\t\t\"\\x02\\xE9\\x03\\x02\\x02\\x02\\x02\\xEB\\x03\\x02\\x02\\x02\\x02\\xED\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xEF\\x03\\x02\\x02\\x02\\x02\\xF1\\x03\\x02\\x02\\x02\\x02\\xF3\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xF5\\x03\\x02\\x02\\x02\\x02\\xF7\\x03\\x02\\x02\\x02\\x02\\xF9\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xFB\\x03\\x02\\x02\\x02\\x02\\xFD\\x03\\x02\\x02\\x02\\x02\\xFF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\u0101\\x03\\x02\\x02\\x02\\x02\\u0103\\x03\\x02\\x02\\x02\\x02\\u0105\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02\\u0107\\x03\\x02\\x02\\x02\\x02\\u0109\\x03\\x02\\x02\\x02\\x02\\u010B\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x02\\u0111\\x03\\x02\\x02\\x02\\x02\\u0117\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"\\u0119\\x03\\x02\\x02\\x02\\x02\\u011B\\x03\\x02\\x02\\x02\\x02\\u011D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x03\\u011F\\x03\\x02\\x02\\x02\\x05\\u0126\\x03\\x02\\x02\\x02\\x07\\u0128\\x03\" +\n\t\t\"\\x02\\x02\\x02\\t\\u012A\\x03\\x02\\x02\\x02\\v\\u012D\\x03\\x02\\x02\\x02\\r\\u012F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x0F\\u0131\\x03\\x02\\x02\\x02\\x11\\u0134\\x03\\x02\\x02\\x02\\x13\\u0136\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x15\\u0138\\x03\\x02\\x02\\x02\\x17\\u013B\\x03\\x02\\x02\\x02\\x19\" +\n\t\t\"\\u013D\\x03\\x02\\x02\\x02\\x1B\\u0140\\x03\\x02\\x02\\x02\\x1D\\u0147\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x1F\\u014C\\x03\\x02\\x02\\x02!\\u014E\\x03\\x02\\x02\\x02#\\u0150\\x03\\x02\\x02\" +\n\t\t\"\\x02%\\u0152\\x03\\x02\\x02\\x02\\'\\u015B\\x03\\x02\\x02\\x02)\\u0164\\x03\\x02\\x02\" +\n\t\t\"\\x02+\\u016E\\x03\\x02\\x02\\x02-\\u0176\\x03\\x02\\x02\\x02/\\u0179\\x03\\x02\\x02\" +\n\t\t\"\\x021\\u017B\\x03\\x02\\x02\\x023\\u017D\\x03\\x02\\x02\\x025\\u0183\\x03\\x02\\x02\" +\n\t\t\"\\x027\\u0189\\x03\\x02\\x02\\x029\\u018D\\x03\\x02\\x02\\x02;\\u0194\\x03\\x02\\x02\" +\n\t\t\"\\x02=\\u019D\\x03\\x02\\x02\\x02?\\u01A6\\x03\\x02\\x02\\x02A\\u01AE\\x03\\x02\\x02\" +\n\t\t\"\\x02C\\u01B4\\x03\\x02\\x02\\x02E\\u01B9\\x03\\x02\\x02\\x02G\\u01BB\\x03\\x02\\x02\" +\n\t\t\"\\x02I\\u01BD\\x03\\x02\\x02\\x02K\\u01C5\\x03\\x02\\x02\\x02M\\u01C7\\x03\\x02\\x02\" +\n\t\t\"\\x02O\\u01CF\\x03\\x02\\x02\\x02Q\\u01D2\\x03\\x02\\x02\\x02S\\u01D9\\x03\\x02\\x02\" +\n\t\t\"\\x02U\\u01E1\\x03\\x02\\x02\\x02W\\u01EA\\x03\\x02\\x02\\x02Y\\u01ED\\x03\\x02\\x02\" +\n\t\t\"\\x02[\\u01F2\\x03\\x02\\x02\\x02]\\u01F6\\x03\\x02\\x02\\x02_\\u01FC\\x03\\x02\\x02\" +\n\t\t\"\\x02a\\u0202\\x03\\x02\\x02\\x02c\\u020C\\x03\\x02\\x02\\x02e\\u0215\\x03\\x02\\x02\" +\n\t\t\"\\x02g\\u0218\\x03\\x02\\x02\\x02i\\u021F\\x03\\x02\\x02\\x02k\\u0225\\x03\\x02\\x02\" +\n\t\t\"\\x02m\\u022A\\x03\\x02\\x02\\x02o\\u0231\\x03\\x02\\x02\\x02q\\u0235\\x03\\x02\\x02\" +\n\t\t\"\\x02s\\u023A\\x03\\x02\\x02\\x02u\\u0241\\x03\\x02\\x02\\x02w\\u0246\\x03\\x02\\x02\" +\n\t\t\"\\x02y\\u0249\\x03\\x02\\x02\\x02{\\u024C\\x03\\x02\\x02\\x02}\\u0250\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x7F\\u0252\\x03\\x02\\x02\\x02\\x81\\u0254\\x03\\x02\\x02\\x02\\x83\\u0256\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x85\\u025C\\x03\\x02\\x02\\x02\\x87\\u0263\\x03\\x02\\x02\\x02\\x89\\u0265\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x8B\\u0268\\x03\\x02\\x02\\x02\\x8D\\u026A\\x03\\x02\\x02\\x02\\x8F\" +\n\t\t\"\\u026C\\x03\\x02\\x02\\x02\\x91\\u026F\\x03\\x02\\x02\\x02\\x93\\u0272\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x95\\u0274\\x03\\x02\\x02\\x02\\x97\\u0276\\x03\\x02\\x02\\x02\\x99\\u0279\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x9B\\u027C\\x03\\x02\\x02\\x02\\x9D\\u027F\\x03\\x02\\x02\\x02\\x9F\\u0281\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA1\\u0284\\x03\\x02\\x02\\x02\\xA3\\u0287\\x03\\x02\\x02\\x02\\xA5\" +\n\t\t\"\\u028A\\x03\\x02\\x02\\x02\\xA7\\u028E\\x03\\x02\\x02\\x02\\xA9\\u0292\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xAB\\u0295\\x03\\x02\\x02\\x02\\xAD\\u0298\\x03\\x02\\x02\\x02\\xAF\\u029B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xB1\\u029E\\x03\\x02\\x02\\x02\\xB3\\u02A1\\x03\\x02\\x02\\x02\\xB5\\u02A5\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xB7\\u02A8\\x03\\x02\\x02\\x02\\xB9\\u02AB\\x03\\x02\\x02\\x02\\xBB\" +\n\t\t\"\\u02B2\\x03\\x02\\x02\\x02\\xBD\\u02B7\\x03\\x02\\x02\\x02\\xBF\\u02BF\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xC1\\u02C2\\x03\\x02\\x02\\x02\\xC3\\u02CB\\x03\\x02\\x02\\x02\\xC5\\u038A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xC7\\u0463\\x03\\x02\\x02\\x02\\xC9\\u0541\\x03\\x02\\x02\\x02\\xCB\\u0559\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xCD\\u0573\\x03\\x02\\x02\\x02\\xCF\\u057E\\x03\\x02\\x02\\x02\\xD1\" +\n\t\t\"\\u0586\\x03\\x02\\x02\\x02\\xD3\\u058C\\x03\\x02\\x02\\x02\\xD5\\u0596\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xD7\\u059A\\x03\\x02\\x02\\x02\\xD9\\u05DC\\x03\\x02\\x02\\x02\\xDB\\u05DE\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xDD\\u05EE\\x03\\x02\\x02\\x02\\xDF\\u05F1\\x03\\x02\\x02\\x02\\xE1\\u064B\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xE3\\u064D\\x03\\x02\\x02\\x02\\xE5\\u0657\\x03\\x02\\x02\\x02\\xE7\" +\n\t\t\"\\u065D\\x03\\x02\\x02\\x02\\xE9\\u0666\\x03\\x02\\x02\\x02\\xEB\\u0670\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xED\\u0679\\x03\\x02\\x02\\x02\\xEF\\u067F\\x03\\x02\\x02\\x02\\xF1\\u0688\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xF3\\u0690\\x03\\x02\\x02\\x02\\xF5\\u0699\\x03\\x02\\x02\\x02\\xF7\\u06A1\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF9\\u06A9\\x03\\x02\\x02\\x02\\xFB\\u06B0\\x03\\x02\\x02\\x02\\xFD\" +\n\t\t\"\\u06B8\\x03\\x02\\x02\\x02\\xFF\\u06BD\\x03\\x02\\x02\\x02\\u0101\\u06C2\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0103\\u06C7\\x03\\x02\\x02\\x02\\u0105\\u06CE\\x03\\x02\\x02\\x02\\u0107\\u06DA\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0109\\u06E3\\x03\\x02\\x02\\x02\\u010B\\u06EB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u010D\\u06F2\\x03\\x02\\x02\\x02\\u010F\\u06F4\\x03\\x02\\x02\\x02\\u0111\\u0718\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0113\\u071D\\x03\\x02\\x02\\x02\\u0115\\u0722\\x03\\x02\\x02\\x02\\u0117\" +\n\t\t\"\\u0725\\x03\\x02\\x02\\x02\\u0119\\u0738\\x03\\x02\\x02\\x02\\u011B\\u073E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u011D\\u074C\\x03\\x02\\x02\\x02\\u011F\\u0120\\x07r\\x02\\x02\\u0120\\u0121\" +\n\t\t\"\\x07t\\x02\\x02\\u0121\\u0122\\x07c\\x02\\x02\\u0122\\u0123\\x07i\\x02\\x02\\u0123\" +\n\t\t\"\\u0124\\x07o\\x02\\x02\\u0124\\u0125\\x07c\\x02\\x02\\u0125\\x04\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0126\\u0127\\x07=\\x02\\x02\\u0127\\x06\\x03\\x02\\x02\\x02\\u0128\\u0129\\x07,\\x02\" +\n\t\t\"\\x02\\u0129\\b\\x03\\x02\\x02\\x02\\u012A\\u012B\\x07~\\x02\\x02\\u012B\\u012C\\x07\" +\n\t\t\"~\\x02\\x02\\u012C\\n\\x03\\x02\\x02\\x02\\u012D\\u012E\\x07`\\x02\\x02\\u012E\\f\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u012F\\u0130\\x07\\x80\\x02\\x02\\u0130\\x0E\\x03\\x02\\x02\\x02\\u0131\" +\n\t\t\"\\u0132\\x07@\\x02\\x02\\u0132\\u0133\\x07?\\x02\\x02\\u0133\\x10\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0134\\u0135\\x07@\\x02\\x02\\u0135\\x12\\x03\\x02\\x02\\x02\\u0136\\u0137\\x07>\\x02\" +\n\t\t\"\\x02\\u0137\\x14\\x03\\x02\\x02\\x02\\u0138\\u0139\\x07>\\x02\\x02\\u0139\\u013A\\x07\" +\n\t\t\"?\\x02\\x02\\u013A\\x16\\x03\\x02\\x02\\x02\\u013B\\u013C\\x07?\\x02\\x02\\u013C\\x18\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u013D\\u013E\\x07c\\x02\\x02\\u013E\\u013F\\x07u\\x02\\x02\\u013F\" +\n\t\t\"\\x1A\\x03\\x02\\x02\\x02\\u0140\\u0141\\x07k\\x02\\x02\\u0141\\u0142\\x07o\\x02\\x02\" +\n\t\t\"\\u0142\\u0143\\x07r\\x02\\x02\\u0143\\u0144\\x07q\\x02\\x02\\u0144\\u0145\\x07t\\x02\" +\n\t\t\"\\x02\\u0145\\u0146\\x07v\\x02\\x02\\u0146\\x1C\\x03\\x02\\x02\\x02\\u0147\\u0148\\x07\" +\n\t\t\"h\\x02\\x02\\u0148\\u0149\\x07t\\x02\\x02\\u0149\\u014A\\x07q\\x02\\x02\\u014A\\u014B\" +\n\t\t\"\\x07o\\x02\\x02\\u014B\\x1E\\x03\\x02\\x02\\x02\\u014C\\u014D\\x07}\\x02\\x02\\u014D\" +\n\t\t\" \\x03\\x02\\x02\\x02\\u014E\\u014F\\x07.\\x02\\x02\\u014F\\\"\\x03\\x02\\x02\\x02\\u0150\" +\n\t\t\"\\u0151\\x07\\x7F\\x02\\x02\\u0151$\\x03\\x02\\x02\\x02\\u0152\\u0153\\x07c\\x02\\x02\" +\n\t\t\"\\u0153\\u0154\\x07d\\x02\\x02\\u0154\\u0155\\x07u\\x02\\x02\\u0155\\u0156\\x07v\\x02\" +\n\t\t\"\\x02\\u0156\\u0157\\x07t\\x02\\x02\\u0157\\u0158\\x07c\\x02\\x02\\u0158\\u0159\\x07\" +\n\t\t\"e\\x02\\x02\\u0159\\u015A\\x07v\\x02\\x02\\u015A&\\x03\\x02\\x02\\x02\\u015B\\u015C\" +\n\t\t\"\\x07e\\x02\\x02\\u015C\\u015D\\x07q\\x02\\x02\\u015D\\u015E\\x07p\\x02\\x02\\u015E\" +\n\t\t\"\\u015F\\x07v\\x02\\x02\\u015F\\u0160\\x07t\\x02\\x02\\u0160\\u0161\\x07c\\x02\\x02\" +\n\t\t\"\\u0161\\u0162\\x07e\\x02\\x02\\u0162\\u0163\\x07v\\x02\\x02\\u0163(\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0164\\u0165\\x07k\\x02\\x02\\u0165\\u0166\\x07p\\x02\\x02\\u0166\\u0167\\x07\" +\n\t\t\"v\\x02\\x02\\u0167\\u0168\\x07g\\x02\\x02\\u0168\\u0169\\x07t\\x02\\x02\\u0169\\u016A\" +\n\t\t\"\\x07h\\x02\\x02\\u016A\\u016B\\x07c\\x02\\x02\\u016B\\u016C\\x07e\\x02\\x02\\u016C\" +\n\t\t\"\\u016D\\x07g\\x02\\x02\\u016D*\\x03\\x02\\x02\\x02\\u016E\\u016F\\x07n\\x02\\x02\\u016F\" +\n\t\t\"\\u0170\\x07k\\x02\\x02\\u0170\\u0171\\x07d\\x02\\x02\\u0171\\u0172\\x07t\\x02\\x02\" +\n\t\t\"\\u0172\\u0173\\x07c\\x02\\x02\\u0173\\u0174\\x07t\\x02\\x02\\u0174\\u0175\\x07{\\x02\" +\n\t\t\"\\x02\\u0175,\\x03\\x02\\x02\\x02\\u0176\\u0177\\x07k\\x02\\x02\\u0177\\u0178\\x07u\" +\n\t\t\"\\x02\\x02\\u0178.\\x03\\x02\\x02\\x02\\u0179\\u017A\\x07*\\x02\\x02\\u017A0\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u017B\\u017C\\x07+\\x02\\x02\\u017C2\\x03\\x02\\x02\\x02\\u017D\\u017E\\x07\" +\n\t\t\"g\\x02\\x02\\u017E\\u017F\\x07t\\x02\\x02\\u017F\\u0180\\x07t\\x02\\x02\\u0180\\u0181\" +\n\t\t\"\\x07q\\x02\\x02\\u0181\\u0182\\x07t\\x02\\x02\\u01824\\x03\\x02\\x02\\x02\\u0183\\u0184\" +\n\t\t\"\\x07w\\x02\\x02\\u0184\\u0185\\x07u\\x02\\x02\\u0185\\u0186\\x07k\\x02\\x02\\u0186\" +\n\t\t\"\\u0187\\x07p\\x02\\x02\\u0187\\u0188\\x07i\\x02\\x02\\u01886\\x03\\x02\\x02\\x02\\u0189\" +\n\t\t\"\\u018A\\x07h\\x02\\x02\\u018A\\u018B\\x07q\\x02\\x02\\u018B\\u018C\\x07t\\x02\\x02\" +\n\t\t\"\\u018C8\\x03\\x02\\x02\\x02\\u018D\\u018E\\x07u\\x02\\x02\\u018E\\u018F\\x07v\\x02\" +\n\t\t\"\\x02\\u018F\\u0190\\x07t\\x02\\x02\\u0190\\u0191\\x07w\\x02\\x02\\u0191\\u0192\\x07\" +\n\t\t\"e\\x02\\x02\\u0192\\u0193\\x07v\\x02\\x02\\u0193:\\x03\\x02\\x02\\x02\\u0194\\u0195\" +\n\t\t\"\\x07o\\x02\\x02\\u0195\\u0196\\x07q\\x02\\x02\\u0196\\u0197\\x07f\\x02\\x02\\u0197\" +\n\t\t\"\\u0198\\x07k\\x02\\x02\\u0198\\u0199\\x07h\\x02\\x02\\u0199\\u019A\\x07k\\x02\\x02\" +\n\t\t\"\\u019A\\u019B\\x07g\\x02\\x02\\u019B\\u019C\\x07t\\x02\\x02\\u019C<\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u019D\\u019E\\x07h\\x02\\x02\\u019E\\u019F\\x07w\\x02\\x02\\u019F\\u01A0\\x07\" +\n\t\t\"p\\x02\\x02\\u01A0\\u01A1\\x07e\\x02\\x02\\u01A1\\u01A2\\x07v\\x02\\x02\\u01A2\\u01A3\" +\n\t\t\"\\x07k\\x02\\x02\\u01A3\\u01A4\\x07q\\x02\\x02\\u01A4\\u01A5\\x07p\\x02\\x02\\u01A5\" +\n\t\t\">\\x03\\x02\\x02\\x02\\u01A6\\u01A7\\x07t\\x02\\x02\\u01A7\\u01A8\\x07g\\x02\\x02\\u01A8\" +\n\t\t\"\\u01A9\\x07v\\x02\\x02\\u01A9\\u01AA\\x07w\\x02\\x02\\u01AA\\u01AB\\x07t\\x02\\x02\" +\n\t\t\"\\u01AB\\u01AC\\x07p\\x02\\x02\\u01AC\\u01AD\\x07u\\x02\\x02\\u01AD@\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01AE\\u01AF\\x07g\\x02\\x02\\u01AF\\u01B0\\x07x\\x02\\x02\\u01B0\\u01B1\\x07\" +\n\t\t\"g\\x02\\x02\\u01B1\\u01B2\\x07p\\x02\\x02\\u01B2\\u01B3\\x07v\\x02\\x02\\u01B3B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01B4\\u01B5\\x07g\\x02\\x02\\u01B5\\u01B6\\x07p\\x02\\x02\\u01B6\\u01B7\" +\n\t\t\"\\x07w\\x02\\x02\\u01B7\\u01B8\\x07o\\x02\\x02\\u01B8D\\x03\\x02\\x02\\x02\\u01B9\\u01BA\" +\n\t\t\"\\x07]\\x02\\x02\\u01BAF\\x03\\x02\\x02\\x02\\u01BB\\u01BC\\x07_\\x02\\x02\\u01BCH\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01BD\\u01BE\\x07c\\x02\\x02\\u01BE\\u01BF\\x07f\\x02\\x02\\u01BF\\u01C0\" +\n\t\t\"\\x07f\\x02\\x02\\u01C0\\u01C1\\x07t\\x02\\x02\\u01C1\\u01C2\\x07g\\x02\\x02\\u01C2\" +\n\t\t\"\\u01C3\\x07u\\x02\\x02\\u01C3\\u01C4\\x07u\\x02\\x02\\u01C4J\\x03\\x02\\x02\\x02\\u01C5\" +\n\t\t\"\\u01C6\\x070\\x02\\x02\\u01C6L\\x03\\x02\\x02\\x02\\u01C7\\u01C8\\x07o\\x02\\x02\\u01C8\" +\n\t\t\"\\u01C9\\x07c\\x02\\x02\\u01C9\\u01CA\\x07r\\x02\\x02\\u01CA\\u01CB\\x07r\\x02\\x02\" +\n\t\t\"\\u01CB\\u01CC\\x07k\\x02\\x02\\u01CC\\u01CD\\x07p\\x02\\x02\\u01CD\\u01CE\\x07i\\x02\" +\n\t\t\"\\x02\\u01CEN\\x03\\x02\\x02\\x02\\u01CF\\u01D0\\x07?\\x02\\x02\\u01D0\\u01D1\\x07@\" +\n\t\t\"\\x02\\x02\\u01D1P\\x03\\x02\\x02\\x02\\u01D2\\u01D3\\x07o\\x02\\x02\\u01D3\\u01D4\\x07\" +\n\t\t\"g\\x02\\x02\\u01D4\\u01D5\\x07o\\x02\\x02\\u01D5\\u01D6\\x07q\\x02\\x02\\u01D6\\u01D7\" +\n\t\t\"\\x07t\\x02\\x02\\u01D7\\u01D8\\x07{\\x02\\x02\\u01D8R\\x03\\x02\\x02\\x02\\u01D9\\u01DA\" +\n\t\t\"\\x07u\\x02\\x02\\u01DA\\u01DB\\x07v\\x02\\x02\\u01DB\\u01DC\\x07q\\x02\\x02\\u01DC\" +\n\t\t\"\\u01DD\\x07t\\x02\\x02\\u01DD\\u01DE\\x07c\\x02\\x02\\u01DE\\u01DF\\x07i\\x02\\x02\" +\n\t\t\"\\u01DF\\u01E0\\x07g\\x02\\x02\\u01E0T\\x03\\x02\\x02\\x02\\u01E1\\u01E2\\x07e\\x02\" +\n\t\t\"\\x02\\u01E2\\u01E3\\x07c\\x02\\x02\\u01E3\\u01E4\\x07n\\x02\\x02\\u01E4\\u01E5\\x07\" +\n\t\t\"n\\x02\\x02\\u01E5\\u01E6\\x07f\\x02\\x02\\u01E6\\u01E7\\x07c\\x02\\x02\\u01E7\\u01E8\" +\n\t\t\"\\x07v\\x02\\x02\\u01E8\\u01E9\\x07c\\x02\\x02\\u01E9V\\x03\\x02\\x02\\x02\\u01EA\\u01EB\" +\n\t\t\"\\x07k\\x02\\x02\\u01EB\\u01EC\\x07h\\x02\\x02\\u01ECX\\x03\\x02\\x02\\x02\\u01ED\\u01EE\" +\n\t\t\"\\x07g\\x02\\x02\\u01EE\\u01EF\\x07n\\x02\\x02\\u01EF\\u01F0\\x07u\\x02\\x02\\u01F0\" +\n\t\t\"\\u01F1\\x07g\\x02\\x02\\u01F1Z\\x03\\x02\\x02\\x02\\u01F2\\u01F3\\x07v\\x02\\x02\\u01F3\" +\n\t\t\"\\u01F4\\x07t\\x02\\x02\\u01F4\\u01F5\\x07{\\x02\\x02\\u01F5\\\\\\x03\\x02\\x02\\x02\\u01F6\" +\n\t\t\"\\u01F7\\x07e\\x02\\x02\\u01F7\\u01F8\\x07c\\x02\\x02\\u01F8\\u01F9\\x07v\\x02\\x02\" +\n\t\t\"\\u01F9\\u01FA\\x07e\\x02\\x02\\u01FA\\u01FB\\x07j\\x02\\x02\\u01FB^\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01FC\\u01FD\\x07y\\x02\\x02\\u01FD\\u01FE\\x07j\\x02\\x02\\u01FE\\u01FF\\x07\" +\n\t\t\"k\\x02\\x02\\u01FF\\u0200\\x07n\\x02\\x02\\u0200\\u0201\\x07g\\x02\\x02\\u0201`\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0202\\u0203\\x07w\\x02\\x02\\u0203\\u0204\\x07p\\x02\\x02\\u0204\\u0205\" +\n\t\t\"\\x07e\\x02\\x02\\u0205\\u0206\\x07j\\x02\\x02\\u0206\\u0207\\x07g\\x02\\x02\\u0207\" +\n\t\t\"\\u0208\\x07e\\x02\\x02\\u0208\\u0209\\x07m\\x02\\x02\\u0209\\u020A\\x07g\\x02\\x02\" +\n\t\t\"\\u020A\\u020B\\x07f\\x02\\x02\\u020Bb\\x03\\x02\\x02\\x02\\u020C\\u020D\\x07c\\x02\" +\n\t\t\"\\x02\\u020D\\u020E\\x07u\\x02\\x02\\u020E\\u020F\\x07u\\x02\\x02\\u020F\\u0210\\x07\" +\n\t\t\"g\\x02\\x02\\u0210\\u0211\\x07o\\x02\\x02\\u0211\\u0212\\x07d\\x02\\x02\\u0212\\u0213\" +\n\t\t\"\\x07n\\x02\\x02\\u0213\\u0214\\x07{\\x02\\x02\\u0214d\\x03\\x02\\x02\\x02\\u0215\\u0216\" +\n\t\t\"\\x07f\\x02\\x02\\u0216\\u0217\\x07q\\x02\\x02\\u0217f\\x03\\x02\\x02\\x02\\u0218\\u0219\" +\n\t\t\"\\x07t\\x02\\x02\\u0219\\u021A\\x07g\\x02\\x02\\u021A\\u021B\\x07v\\x02\\x02\\u021B\" +\n\t\t\"\\u021C\\x07w\\x02\\x02\\u021C\\u021D\\x07t\\x02\\x02\\u021D\\u021E\\x07p\\x02\\x02\" +\n\t\t\"\\u021Eh\\x03\\x02\\x02\\x02\\u021F\\u0220\\x07v\\x02\\x02\\u0220\\u0221\\x07j\\x02\" +\n\t\t\"\\x02\\u0221\\u0222\\x07t\\x02\\x02\\u0222\\u0223\\x07q\\x02\\x02\\u0223\\u0224\\x07\" +\n\t\t\"y\\x02\\x02\\u0224j\\x03\\x02\\x02\\x02\\u0225\\u0226\\x07g\\x02\\x02\\u0226\\u0227\" +\n\t\t\"\\x07o\\x02\\x02\\u0227\\u0228\\x07k\\x02\\x02\\u0228\\u0229\\x07v\\x02\\x02\\u0229\" +\n\t\t\"l\\x03\\x02\\x02\\x02\\u022A\\u022B\\x07t\\x02\\x02\\u022B\\u022C\\x07g\\x02\\x02\\u022C\" +\n\t\t\"\\u022D\\x07x\\x02\\x02\\u022D\\u022E\\x07g\\x02\\x02\\u022E\\u022F\\x07t\\x02\\x02\" +\n\t\t\"\\u022F\\u0230\\x07v\\x02\\x02\\u0230n\\x03\\x02\\x02\\x02\\u0231\\u0232\\x07x\\x02\" +\n\t\t\"\\x02\\u0232\\u0233\\x07c\\x02\\x02\\u0233\\u0234\\x07t\\x02\\x02\\u0234p\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0235\\u0236\\x07d\\x02\\x02\\u0236\\u0237\\x07q\\x02\\x02\\u0237\\u0238\" +\n\t\t\"\\x07q\\x02\\x02\\u0238\\u0239\\x07n\\x02\\x02\\u0239r\\x03\\x02\\x02\\x02\\u023A\\u023B\" +\n\t\t\"\\x07u\\x02\\x02\\u023B\\u023C\\x07v\\x02\\x02\\u023C\\u023D\\x07t\\x02\\x02\\u023D\" +\n\t\t\"\\u023E\\x07k\\x02\\x02\\u023E\\u023F\\x07p\\x02\\x02\\u023F\\u0240\\x07i\\x02\\x02\" +\n\t\t\"\\u0240t\\x03\\x02\\x02\\x02\\u0241\\u0242\\x07d\\x02\\x02\\u0242\\u0243\\x07{\\x02\" +\n\t\t\"\\x02\\u0243\\u0244\\x07v\\x02\\x02\\u0244\\u0245\\x07g\\x02\\x02\\u0245v\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0246\\u0247\\x07-\\x02\\x02\\u0247\\u0248\\x07-\\x02\\x02\\u0248x\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0249\\u024A\\x07/\\x02\\x02\\u024A\\u024B\\x07/\\x02\\x02\\u024Bz\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u024C\\u024D\\x07p\\x02\\x02\\u024D\\u024E\\x07g\\x02\\x02\\u024E\" +\n\t\t\"\\u024F\\x07y\\x02\\x02\\u024F|\\x03\\x02\\x02\\x02\\u0250\\u0251\\x07<\\x02\\x02\\u0251\" +\n\t\t\"~\\x03\\x02\\x02\\x02\\u0252\\u0253\\x07-\\x02\\x02\\u0253\\x80\\x03\\x02\\x02\\x02\\u0254\" +\n\t\t\"\\u0255\\x07/\\x02\\x02\\u0255\\x82\\x03\\x02\\x02\\x02\\u0256\\u0257\\x07c\\x02\\x02\" +\n\t\t\"\\u0257\\u0258\\x07h\\x02\\x02\\u0258\\u0259\\x07v\\x02\\x02\\u0259\\u025A\\x07g\\x02\" +\n\t\t\"\\x02\\u025A\\u025B\\x07t\\x02\\x02\\u025B\\x84\\x03\\x02\\x02\\x02\\u025C\\u025D\\x07\" +\n\t\t\"f\\x02\\x02\\u025D\\u025E\\x07g\\x02\\x02\\u025E\\u025F\\x07n\\x02\\x02\\u025F\\u0260\" +\n\t\t\"\\x07g\\x02\\x02\\u0260\\u0261\\x07v\\x02\\x02\\u0261\\u0262\\x07g\\x02\\x02\\u0262\" +\n\t\t\"\\x86\\x03\\x02\\x02\\x02\\u0263\\u0264\\x07#\\x02\\x02\\u0264\\x88\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0265\\u0266\\x07,\\x02\\x02\\u0266\\u0267\\x07,\\x02\\x02\\u0267\\x8A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0268\\u0269\\x071\\x02\\x02\\u0269\\x8C\\x03\\x02\\x02\\x02\\u026A\\u026B\\x07\" +\n\t\t\"\\'\\x02\\x02\\u026B\\x8E\\x03\\x02\\x02\\x02\\u026C\\u026D\\x07>\\x02\\x02\\u026D\\u026E\" +\n\t\t\"\\x07>\\x02\\x02\\u026E\\x90\\x03\\x02\\x02\\x02\\u026F\\u0270\\x07@\\x02\\x02\\u0270\" +\n\t\t\"\\u0271\\x07@\\x02\\x02\\u0271\\x92\\x03\\x02\\x02\\x02\\u0272\\u0273\\x07(\\x02\\x02\" +\n\t\t\"\\u0273\\x94\\x03\\x02\\x02\\x02\\u0274\\u0275\\x07~\\x02\\x02\\u0275\\x96\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0276\\u0277\\x07?\\x02\\x02\\u0277\\u0278\\x07?\\x02\\x02\\u0278\\x98\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0279\\u027A\\x07#\\x02\\x02\\u027A\\u027B\\x07?\\x02\\x02\\u027B\\x9A\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u027C\\u027D\\x07(\\x02\\x02\\u027D\\u027E\\x07(\\x02\\x02\\u027E\" +\n\t\t\"\\x9C\\x03\\x02\\x02\\x02\\u027F\\u0280\\x07A\\x02\\x02\\u0280\\x9E\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0281\\u0282\\x07~\\x02\\x02\\u0282\\u0283\\x07?\\x02\\x02\\u0283\\xA0\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0284\\u0285\\x07`\\x02\\x02\\u0285\\u0286\\x07?\\x02\\x02\\u0286\\xA2\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0287\\u0288\\x07(\\x02\\x02\\u0288\\u0289\\x07?\\x02\\x02\\u0289\\xA4\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u028A\\u028B\\x07>\\x02\\x02\\u028B\\u028C\\x07>\\x02\\x02\\u028C\\u028D\" +\n\t\t\"\\x07?\\x02\\x02\\u028D\\xA6\\x03\\x02\\x02\\x02\\u028E\\u028F\\x07@\\x02\\x02\\u028F\" +\n\t\t\"\\u0290\\x07@\\x02\\x02\\u0290\\u0291\\x07?\\x02\\x02\\u0291\\xA8\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0292\\u0293\\x07-\\x02\\x02\\u0293\\u0294\\x07?\\x02\\x02\\u0294\\xAA\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0295\\u0296\\x07/\\x02\\x02\\u0296\\u0297\\x07?\\x02\\x02\\u0297\\xAC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0298\\u0299\\x07,\\x02\\x02\\u0299\\u029A\\x07?\\x02\\x02\\u029A\\xAE\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u029B\\u029C\\x071\\x02\\x02\\u029C\\u029D\\x07?\\x02\\x02\\u029D\\xB0\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u029E\\u029F\\x07\\'\\x02\\x02\\u029F\\u02A0\\x07?\\x02\\x02\\u02A0\" +\n\t\t\"\\xB2\\x03\\x02\\x02\\x02\\u02A1\\u02A2\\x07n\\x02\\x02\\u02A2\\u02A3\\x07g\\x02\\x02\" +\n\t\t\"\\u02A3\\u02A4\\x07v\\x02\\x02\\u02A4\\xB4\\x03\\x02\\x02\\x02\\u02A5\\u02A6\\x07<\\x02\" +\n\t\t\"\\x02\\u02A6\\u02A7\\x07?\\x02\\x02\\u02A7\\xB6\\x03\\x02\\x02\\x02\\u02A8\\u02A9\\x07\" +\n\t\t\"?\\x02\\x02\\u02A9\\u02AA\\x07<\\x02\\x02\\u02AA\\xB8\\x03\\x02\\x02\\x02\\u02AB\\u02AC\" +\n\t\t\"\\x07u\\x02\\x02\\u02AC\\u02AD\\x07y\\x02\\x02\\u02AD\\u02AE\\x07k\\x02\\x02\\u02AE\" +\n\t\t\"\\u02AF\\x07v\\x02\\x02\\u02AF\\u02B0\\x07e\\x02\\x02\\u02B0\\u02B1\\x07j\\x02\\x02\" +\n\t\t\"\\u02B1\\xBA\\x03\\x02\\x02\\x02\\u02B2\\u02B3\\x07e\\x02\\x02\\u02B3\\u02B4\\x07c\\x02\" +\n\t\t\"\\x02\\u02B4\\u02B5\\x07u\\x02\\x02\\u02B5\\u02B6\\x07g\\x02\\x02\\u02B6\\xBC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02B7\\u02B8\\x07f\\x02\\x02\\u02B8\\u02B9\\x07g\\x02\\x02\\u02B9\\u02BA\" +\n\t\t\"\\x07h\\x02\\x02\\u02BA\\u02BB\\x07c\\x02\\x02\\u02BB\\u02BC\\x07w\\x02\\x02\\u02BC\" +\n\t\t\"\\u02BD\\x07n\\x02\\x02\\u02BD\\u02BE\\x07v\\x02\\x02\\u02BE\\xBE\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02BF\\u02C0\\x07/\\x02\\x02\\u02C0\\u02C1\\x07@\\x02\\x02\\u02C1\\xC0\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02C2\\u02C3\\x07e\\x02\\x02\\u02C3\\u02C4\\x07c\\x02\\x02\\u02C4\\u02C5\\x07\" +\n\t\t\"n\\x02\\x02\\u02C5\\u02C6\\x07n\\x02\\x02\\u02C6\\u02C7\\x07d\\x02\\x02\\u02C7\\u02C8\" +\n\t\t\"\\x07c\\x02\\x02\\u02C8\\u02C9\\x07e\\x02\\x02\\u02C9\\u02CA\\x07m\\x02\\x02\\u02CA\" +\n\t\t\"\\xC2\\x03\\x02\\x02\\x02\\u02CB\\u02CC\\x07q\\x02\\x02\\u02CC\\u02CD\\x07x\\x02\\x02\" +\n\t\t\"\\u02CD\\u02CE\\x07g\\x02\\x02\\u02CE\\u02CF\\x07t\\x02\\x02\\u02CF\\u02D0\\x07t\\x02\" +\n\t\t\"\\x02\\u02D0\\u02D1\\x07k\\x02\\x02\\u02D1\\u02D2\\x07f\\x02\\x02\\u02D2\\u02D3\\x07\" +\n\t\t\"g\\x02\\x02\\u02D3\\xC4\\x03\\x02\\x02\\x02\\u02D4\\u02D5\\x07k\\x02\\x02\\u02D5\\u02D6\" +\n\t\t\"\\x07p\\x02\\x02\\u02D6\\u038B\\x07v\\x02\\x02\\u02D7\\u02D8\\x07k\\x02\\x02\\u02D8\" +\n\t\t\"\\u02D9\\x07p\\x02\\x02\\u02D9\\u02DA\\x07v\\x02\\x02\\u02DA\\u038B\\x07:\\x02\\x02\" +\n\t\t\"\\u02DB\\u02DC\\x07k\\x02\\x02\\u02DC\\u02DD\\x07p\\x02\\x02\\u02DD\\u02DE\\x07v\\x02\" +\n\t\t\"\\x02\\u02DE\\u02DF\\x073\\x02\\x02\\u02DF\\u038B\\x078\\x02\\x02\\u02E0\\u02E1\\x07\" +\n\t\t\"k\\x02\\x02\\u02E1\\u02E2\\x07p\\x02\\x02\\u02E2\\u02E3\\x07v\\x02\\x02\\u02E3\\u02E4\" +\n\t\t\"\\x074\\x02\\x02\\u02E4\\u038B\\x076\\x02\\x02\\u02E5\\u02E6\\x07k\\x02\\x02\\u02E6\" +\n\t\t\"\\u02E7\\x07p\\x02\\x02\\u02E7\\u02E8\\x07v\\x02\\x02\\u02E8\\u02E9\\x075\\x02\\x02\" +\n\t\t\"\\u02E9\\u038B\\x074\\x02\\x02\\u02EA\\u02EB\\x07k\\x02\\x02\\u02EB\\u02EC\\x07p\\x02\" +\n\t\t\"\\x02\\u02EC\\u02ED\\x07v\\x02\\x02\\u02ED\\u02EE\\x076\\x02\\x02\\u02EE\\u038B\\x07\" +\n\t\t\"2\\x02\\x02\\u02EF\\u02F0\\x07k\\x02\\x02\\u02F0\\u02F1\\x07p\\x02\\x02\\u02F1\\u02F2\" +\n\t\t\"\\x07v\\x02\\x02\\u02F2\\u02F3\\x076\\x02\\x02\\u02F3\\u038B\\x07:\\x02\\x02\\u02F4\" +\n\t\t\"\\u02F5\\x07k\\x02\\x02\\u02F5\\u02F6\\x07p\\x02\\x02\\u02F6\\u02F7\\x07v\\x02\\x02\" +\n\t\t\"\\u02F7\\u02F8\\x077\\x02\\x02\\u02F8\\u038B\\x078\\x02\\x02\\u02F9\\u02FA\\x07k\\x02\" +\n\t\t\"\\x02\\u02FA\\u02FB\\x07p\\x02\\x02\\u02FB\\u02FC\\x07v\\x02\\x02\\u02FC\\u02FD\\x07\" +\n\t\t\"8\\x02\\x02\\u02FD\\u038B\\x076\\x02\\x02\\u02FE\\u02FF\\x07k\\x02\\x02\\u02FF\\u0300\" +\n\t\t\"\\x07p\\x02\\x02\\u0300\\u0301\\x07v\\x02\\x02\\u0301\\u0302\\x079\\x02\\x02\\u0302\" +\n\t\t\"\\u038B\\x074\\x02\\x02\\u0303\\u0304\\x07k\\x02\\x02\\u0304\\u0305\\x07p\\x02\\x02\" +\n\t\t\"\\u0305\\u0306\\x07v\\x02\\x02\\u0306\\u0307\\x07:\\x02\\x02\\u0307\\u038B\\x072\\x02\" +\n\t\t\"\\x02\\u0308\\u0309\\x07k\\x02\\x02\\u0309\\u030A\\x07p\\x02\\x02\\u030A\\u030B\\x07\" +\n\t\t\"v\\x02\\x02\\u030B\\u030C\\x07:\\x02\\x02\\u030C\\u038B\\x07:\\x02\\x02\\u030D\\u030E\" +\n\t\t\"\\x07k\\x02\\x02\\u030E\\u030F\\x07p\\x02\\x02\\u030F\\u0310\\x07v\\x02\\x02\\u0310\" +\n\t\t\"\\u0311\\x07;\\x02\\x02\\u0311\\u038B\\x078\\x02\\x02\\u0312\\u0313\\x07k\\x02\\x02\" +\n\t\t\"\\u0313\\u0314\\x07p\\x02\\x02\\u0314\\u0315\\x07v\\x02\\x02\\u0315\\u0316\\x073\\x02\" +\n\t\t\"\\x02\\u0316\\u0317\\x072\\x02\\x02\\u0317\\u038B\\x076\\x02\\x02\\u0318\\u0319\\x07\" +\n\t\t\"k\\x02\\x02\\u0319\\u031A\\x07p\\x02\\x02\\u031A\\u031B\\x07v\\x02\\x02\\u031B\\u031C\" +\n\t\t\"\\x073\\x02\\x02\\u031C\\u031D\\x073\\x02\\x02\\u031D\\u038B\\x074\\x02\\x02\\u031E\" +\n\t\t\"\\u031F\\x07k\\x02\\x02\\u031F\\u0320\\x07p\\x02\\x02\\u0320\\u0321\\x07v\\x02\\x02\" +\n\t\t\"\\u0321\\u0322\\x073\\x02\\x02\\u0322\\u0323\\x074\\x02\\x02\\u0323\\u038B\\x072\\x02\" +\n\t\t\"\\x02\\u0324\\u0325\\x07k\\x02\\x02\\u0325\\u0326\\x07p\\x02\\x02\\u0326\\u0327\\x07\" +\n\t\t\"v\\x02\\x02\\u0327\\u0328\\x073\\x02\\x02\\u0328\\u0329\\x074\\x02\\x02\\u0329\\u038B\" +\n\t\t\"\\x07:\\x02\\x02\\u032A\\u032B\\x07k\\x02\\x02\\u032B\\u032C\\x07p\\x02\\x02\\u032C\" +\n\t\t\"\\u032D\\x07v\\x02\\x02\\u032D\\u032E\\x073\\x02\\x02\\u032E\\u032F\\x075\\x02\\x02\" +\n\t\t\"\\u032F\\u038B\\x078\\x02\\x02\\u0330\\u0331\\x07k\\x02\\x02\\u0331\\u0332\\x07p\\x02\" +\n\t\t\"\\x02\\u0332\\u0333\\x07v\\x02\\x02\\u0333\\u0334\\x073\\x02\\x02\\u0334\\u0335\\x07\" +\n\t\t\"6\\x02\\x02\\u0335\\u038B\\x076\\x02\\x02\\u0336\\u0337\\x07k\\x02\\x02\\u0337\\u0338\" +\n\t\t\"\\x07p\\x02\\x02\\u0338\\u0339\\x07v\\x02\\x02\\u0339\\u033A\\x073\\x02\\x02\\u033A\" +\n\t\t\"\\u033B\\x077\\x02\\x02\\u033B\\u038B\\x074\\x02\\x02\\u033C\\u033D\\x07k\\x02\\x02\" +\n\t\t\"\\u033D\\u033E\\x07p\\x02\\x02\\u033E\\u033F\\x07v\\x02\\x02\\u033F\\u0340\\x073\\x02\" +\n\t\t\"\\x02\\u0340\\u0341\\x078\\x02\\x02\\u0341\\u038B\\x072\\x02\\x02\\u0342\\u0343\\x07\" +\n\t\t\"k\\x02\\x02\\u0343\\u0344\\x07p\\x02\\x02\\u0344\\u0345\\x07v\\x02\\x02\\u0345\\u0346\" +\n\t\t\"\\x073\\x02\\x02\\u0346\\u0347\\x078\\x02\\x02\\u0347\\u038B\\x07:\\x02\\x02\\u0348\" +\n\t\t\"\\u0349\\x07k\\x02\\x02\\u0349\\u034A\\x07p\\x02\\x02\\u034A\\u034B\\x07v\\x02\\x02\" +\n\t\t\"\\u034B\\u034C\\x073\\x02\\x02\\u034C\\u034D\\x079\\x02\\x02\\u034D\\u038B\\x078\\x02\" +\n\t\t\"\\x02\\u034E\\u034F\\x07k\\x02\\x02\\u034F\\u0350\\x07p\\x02\\x02\\u0350\\u0351\\x07\" +\n\t\t\"v\\x02\\x02\\u0351\\u0352\\x073\\x02\\x02\\u0352\\u0353\\x07:\\x02\\x02\\u0353\\u038B\" +\n\t\t\"\\x076\\x02\\x02\\u0354\\u0355\\x07k\\x02\\x02\\u0355\\u0356\\x07p\\x02\\x02\\u0356\" +\n\t\t\"\\u0357\\x07v\\x02\\x02\\u0357\\u0358\\x073\\x02\\x02\\u0358\\u0359\\x07;\\x02\\x02\" +\n\t\t\"\\u0359\\u038B\\x074\\x02\\x02\\u035A\\u035B\\x07k\\x02\\x02\\u035B\\u035C\\x07p\\x02\" +\n\t\t\"\\x02\\u035C\\u035D\\x07v\\x02\\x02\\u035D\\u035E\\x074\\x02\\x02\\u035E\\u035F\\x07\" +\n\t\t\"2\\x02\\x02\\u035F\\u038B\\x072\\x02\\x02\\u0360\\u0361\\x07k\\x02\\x02\\u0361\\u0362\" +\n\t\t\"\\x07p\\x02\\x02\\u0362\\u0363\\x07v\\x02\\x02\\u0363\\u0364\\x074\\x02\\x02\\u0364\" +\n\t\t\"\\u0365\\x072\\x02\\x02\\u0365\\u038B\\x07:\\x02\\x02\\u0366\\u0367\\x07k\\x02\\x02\" +\n\t\t\"\\u0367\\u0368\\x07p\\x02\\x02\\u0368\\u0369\\x07v\\x02\\x02\\u0369\\u036A\\x074\\x02\" +\n\t\t\"\\x02\\u036A\\u036B\\x073\\x02\\x02\\u036B\\u038B\\x078\\x02\\x02\\u036C\\u036D\\x07\" +\n\t\t\"k\\x02\\x02\\u036D\\u036E\\x07p\\x02\\x02\\u036E\\u036F\\x07v\\x02\\x02\\u036F\\u0370\" +\n\t\t\"\\x074\\x02\\x02\\u0370\\u0371\\x074\\x02\\x02\\u0371\\u038B\\x076\\x02\\x02\\u0372\" +\n\t\t\"\\u0373\\x07k\\x02\\x02\\u0373\\u0374\\x07p\\x02\\x02\\u0374\\u0375\\x07v\\x02\\x02\" +\n\t\t\"\\u0375\\u0376\\x074\\x02\\x02\\u0376\\u0377\\x075\\x02\\x02\\u0377\\u038B\\x074\\x02\" +\n\t\t\"\\x02\\u0378\\u0379\\x07k\\x02\\x02\\u0379\\u037A\\x07p\\x02\\x02\\u037A\\u037B\\x07\" +\n\t\t\"v\\x02\\x02\\u037B\\u037C\\x074\\x02\\x02\\u037C\\u037D\\x076\\x02\\x02\\u037D\\u038B\" +\n\t\t\"\\x072\\x02\\x02\\u037E\\u037F\\x07k\\x02\\x02\\u037F\\u0380\\x07p\\x02\\x02\\u0380\" +\n\t\t\"\\u0381\\x07v\\x02\\x02\\u0381\\u0382\\x074\\x02\\x02\\u0382\\u0383\\x076\\x02\\x02\" +\n\t\t\"\\u0383\\u038B\\x07:\\x02\\x02\\u0384\\u0385\\x07k\\x02\\x02\\u0385\\u0386\\x07p\\x02\" +\n\t\t\"\\x02\\u0386\\u0387\\x07v\\x02\\x02\\u0387\\u0388\\x074\\x02\\x02\\u0388\\u0389\\x07\" +\n\t\t\"7\\x02\\x02\\u0389\\u038B\\x078\\x02\\x02\\u038A\\u02D4\\x03\\x02\\x02\\x02\\u038A\\u02D7\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u038A\\u02DB\\x03\\x02\\x02\\x02\\u038A\\u02E0\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u038A\\u02E5\\x03\\x02\\x02\\x02\\u038A\\u02EA\\x03\\x02\\x02\\x02\\u038A\\u02EF\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u038A\\u02F4\\x03\\x02\\x02\\x02\\u038A\\u02F9\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u02FE\\x03\\x02\\x02\\x02\\u038A\\u0303\\x03\\x02\\x02\\x02\\u038A\\u0308\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u030D\\x03\\x02\\x02\\x02\\u038A\\u0312\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0318\\x03\\x02\\x02\\x02\\u038A\\u031E\\x03\\x02\\x02\\x02\\u038A\\u0324\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u032A\\x03\\x02\\x02\\x02\\u038A\\u0330\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0336\\x03\\x02\\x02\\x02\\u038A\\u033C\\x03\\x02\\x02\\x02\\u038A\\u0342\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u0348\\x03\\x02\\x02\\x02\\u038A\\u034E\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0354\\x03\\x02\\x02\\x02\\u038A\\u035A\\x03\\x02\\x02\\x02\\u038A\\u0360\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u0366\\x03\\x02\\x02\\x02\\u038A\\u036C\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0372\\x03\\x02\\x02\\x02\\u038A\\u0378\\x03\\x02\\x02\\x02\\u038A\\u037E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u0384\\x03\\x02\\x02\\x02\\u038B\\xC6\\x03\\x02\\x02\\x02\\u038C\\u038D\" +\n\t\t\"\\x07w\\x02\\x02\\u038D\\u038E\\x07k\\x02\\x02\\u038E\\u038F\\x07p\\x02\\x02\\u038F\" +\n\t\t\"\\u0464\\x07v\\x02\\x02\\u0390\\u0391\\x07w\\x02\\x02\\u0391\\u0392\\x07k\\x02\\x02\" +\n\t\t\"\\u0392\\u0393\\x07p\\x02\\x02\\u0393\\u0394\\x07v\\x02\\x02\\u0394\\u0464\\x07:\\x02\" +\n\t\t\"\\x02\\u0395\\u0396\\x07w\\x02\\x02\\u0396\\u0397\\x07k\\x02\\x02\\u0397\\u0398\\x07\" +\n\t\t\"p\\x02\\x02\\u0398\\u0399\\x07v\\x02\\x02\\u0399\\u039A\\x073\\x02\\x02\\u039A\\u0464\" +\n\t\t\"\\x078\\x02\\x02\\u039B\\u039C\";\n\tprivate static readonly _serializedATNSegment2: string =\n\t\t\"\\x07w\\x02\\x02\\u039C\\u039D\\x07k\\x02\\x02\\u039D\\u039E\\x07p\\x02\\x02\\u039E\" +\n\t\t\"\\u039F\\x07v\\x02\\x02\\u039F\\u03A0\\x074\\x02\\x02\\u03A0\\u0464\\x076\\x02\\x02\" +\n\t\t\"\\u03A1\\u03A2\\x07w\\x02\\x02\\u03A2\\u03A3\\x07k\\x02\\x02\\u03A3\\u03A4\\x07p\\x02\" +\n\t\t\"\\x02\\u03A4\\u03A5\\x07v\\x02\\x02\\u03A5\\u03A6\\x075\\x02\\x02\\u03A6\\u0464\\x07\" +\n\t\t\"4\\x02\\x02\\u03A7\\u03A8\\x07w\\x02\\x02\\u03A8\\u03A9\\x07k\\x02\\x02\\u03A9\\u03AA\" +\n\t\t\"\\x07p\\x02\\x02\\u03AA\\u03AB\\x07v\\x02\\x02\\u03AB\\u03AC\\x076\\x02\\x02\\u03AC\" +\n\t\t\"\\u0464\\x072\\x02\\x02\\u03AD\\u03AE\\x07w\\x02\\x02\\u03AE\\u03AF\\x07k\\x02\\x02\" +\n\t\t\"\\u03AF\\u03B0\\x07p\\x02\\x02\\u03B0\\u03B1\\x07v\\x02\\x02\\u03B1\\u03B2\\x076\\x02\" +\n\t\t\"\\x02\\u03B2\\u0464\\x07:\\x02\\x02\\u03B3\\u03B4\\x07w\\x02\\x02\\u03B4\\u03B5\\x07\" +\n\t\t\"k\\x02\\x02\\u03B5\\u03B6\\x07p\\x02\\x02\\u03B6\\u03B7\\x07v\\x02\\x02\\u03B7\\u03B8\" +\n\t\t\"\\x077\\x02\\x02\\u03B8\\u0464\\x078\\x02\\x02\\u03B9\\u03BA\\x07w\\x02\\x02\\u03BA\" +\n\t\t\"\\u03BB\\x07k\\x02\\x02\\u03BB\\u03BC\\x07p\\x02\\x02\\u03BC\\u03BD\\x07v\\x02\\x02\" +\n\t\t\"\\u03BD\\u03BE\\x078\\x02\\x02\\u03BE\\u0464\\x076\\x02\\x02\\u03BF\\u03C0\\x07w\\x02\" +\n\t\t\"\\x02\\u03C0\\u03C1\\x07k\\x02\\x02\\u03C1\\u03C2\\x07p\\x02\\x02\\u03C2\\u03C3\\x07\" +\n\t\t\"v\\x02\\x02\\u03C3\\u03C4\\x079\\x02\\x02\\u03C4\\u0464\\x074\\x02\\x02\\u03C5\\u03C6\" +\n\t\t\"\\x07w\\x02\\x02\\u03C6\\u03C7\\x07k\\x02\\x02\\u03C7\\u03C8\\x07p\\x02\\x02\\u03C8\" +\n\t\t\"\\u03C9\\x07v\\x02\\x02\\u03C9\\u03CA\\x07:\\x02\\x02\\u03CA\\u0464\\x072\\x02\\x02\" +\n\t\t\"\\u03CB\\u03CC\\x07w\\x02\\x02\\u03CC\\u03CD\\x07k\\x02\\x02\\u03CD\\u03CE\\x07p\\x02\" +\n\t\t\"\\x02\\u03CE\\u03CF\\x07v\\x02\\x02\\u03CF\\u03D0\\x07:\\x02\\x02\\u03D0\\u0464\\x07\" +\n\t\t\":\\x02\\x02\\u03D1\\u03D2\\x07w\\x02\\x02\\u03D2\\u03D3\\x07k\\x02\\x02\\u03D3\\u03D4\" +\n\t\t\"\\x07p\\x02\\x02\\u03D4\\u03D5\\x07v\\x02\\x02\\u03D5\\u03D6\\x07;\\x02\\x02\\u03D6\" +\n\t\t\"\\u0464\\x078\\x02\\x02\\u03D7\\u03D8\\x07w\\x02\\x02\\u03D8\\u03D9\\x07k\\x02\\x02\" +\n\t\t\"\\u03D9\\u03DA\\x07p\\x02\\x02\\u03DA\\u03DB\\x07v\\x02\\x02\\u03DB\\u03DC\\x073\\x02\" +\n\t\t\"\\x02\\u03DC\\u03DD\\x072\\x02\\x02\\u03DD\\u0464\\x076\\x02\\x02\\u03DE\\u03DF\\x07\" +\n\t\t\"w\\x02\\x02\\u03DF\\u03E0\\x07k\\x02\\x02\\u03E0\\u03E1\\x07p\\x02\\x02\\u03E1\\u03E2\" +\n\t\t\"\\x07v\\x02\\x02\\u03E2\\u03E3\\x073\\x02\\x02\\u03E3\\u03E4\\x073\\x02\\x02\\u03E4\" +\n\t\t\"\\u0464\\x074\\x02\\x02\\u03E5\\u03E6\\x07w\\x02\\x02\\u03E6\\u03E7\\x07k\\x02\\x02\" +\n\t\t\"\\u03E7\\u03E8\\x07p\\x02\\x02\\u03E8\\u03E9\\x07v\\x02\\x02\\u03E9\\u03EA\\x073\\x02\" +\n\t\t\"\\x02\\u03EA\\u03EB\\x074\\x02\\x02\\u03EB\\u0464\\x072\\x02\\x02\\u03EC\\u03ED\\x07\" +\n\t\t\"w\\x02\\x02\\u03ED\\u03EE\\x07k\\x02\\x02\\u03EE\\u03EF\\x07p\\x02\\x02\\u03EF\\u03F0\" +\n\t\t\"\\x07v\\x02\\x02\\u03F0\\u03F1\\x073\\x02\\x02\\u03F1\\u03F2\\x074\\x02\\x02\\u03F2\" +\n\t\t\"\\u0464\\x07:\\x02\\x02\\u03F3\\u03F4\\x07w\\x02\\x02\\u03F4\\u03F5\\x07k\\x02\\x02\" +\n\t\t\"\\u03F5\\u03F6\\x07p\\x02\\x02\\u03F6\\u03F7\\x07v\\x02\\x02\\u03F7\\u03F8\\x073\\x02\" +\n\t\t\"\\x02\\u03F8\\u03F9\\x075\\x02\\x02\\u03F9\\u0464\\x078\\x02\\x02\\u03FA\\u03FB\\x07\" +\n\t\t\"w\\x02\\x02\\u03FB\\u03FC\\x07k\\x02\\x02\\u03FC\\u03FD\\x07p\\x02\\x02\\u03FD\\u03FE\" +\n\t\t\"\\x07v\\x02\\x02\\u03FE\\u03FF\\x073\\x02\\x02\\u03FF\\u0400\\x076\\x02\\x02\\u0400\" +\n\t\t\"\\u0464\\x076\\x02\\x02\\u0401\\u0402\\x07w\\x02\\x02\\u0402\\u0403\\x07k\\x02\\x02\" +\n\t\t\"\\u0403\\u0404\\x07p\\x02\\x02\\u0404\\u0405\\x07v\\x02\\x02\\u0405\\u0406\\x073\\x02\" +\n\t\t\"\\x02\\u0406\\u0407\\x077\\x02\\x02\\u0407\\u0464\\x074\\x02\\x02\\u0408\\u0409\\x07\" +\n\t\t\"w\\x02\\x02\\u0409\\u040A\\x07k\\x02\\x02\\u040A\\u040B\\x07p\\x02\\x02\\u040B\\u040C\" +\n\t\t\"\\x07v\\x02\\x02\\u040C\\u040D\\x073\\x02\\x02\\u040D\\u040E\\x078\\x02\\x02\\u040E\" +\n\t\t\"\\u0464\\x072\\x02\\x02\\u040F\\u0410\\x07w\\x02\\x02\\u0410\\u0411\\x07k\\x02\\x02\" +\n\t\t\"\\u0411\\u0412\\x07p\\x02\\x02\\u0412\\u0413\\x07v\\x02\\x02\\u0413\\u0414\\x073\\x02\" +\n\t\t\"\\x02\\u0414\\u0415\\x078\\x02\\x02\\u0415\\u0464\\x07:\\x02\\x02\\u0416\\u0417\\x07\" +\n\t\t\"w\\x02\\x02\\u0417\\u0418\\x07k\\x02\\x02\\u0418\\u0419\\x07p\\x02\\x02\\u0419\\u041A\" +\n\t\t\"\\x07v\\x02\\x02\\u041A\\u041B\\x073\\x02\\x02\\u041B\\u041C\\x079\\x02\\x02\\u041C\" +\n\t\t\"\\u0464\\x078\\x02\\x02\\u041D\\u041E\\x07w\\x02\\x02\\u041E\\u041F\\x07k\\x02\\x02\" +\n\t\t\"\\u041F\\u0420\\x07p\\x02\\x02\\u0420\\u0421\\x07v\\x02\\x02\\u0421\\u0422\\x073\\x02\" +\n\t\t\"\\x02\\u0422\\u0423\\x07:\\x02\\x02\\u0423\\u0464\\x076\\x02\\x02\\u0424\\u0425\\x07\" +\n\t\t\"w\\x02\\x02\\u0425\\u0426\\x07k\\x02\\x02\\u0426\\u0427\\x07p\\x02\\x02\\u0427\\u0428\" +\n\t\t\"\\x07v\\x02\\x02\\u0428\\u0429\\x073\\x02\\x02\\u0429\\u042A\\x07;\\x02\\x02\\u042A\" +\n\t\t\"\\u0464\\x074\\x02\\x02\\u042B\\u042C\\x07w\\x02\\x02\\u042C\\u042D\\x07k\\x02\\x02\" +\n\t\t\"\\u042D\\u042E\\x07p\\x02\\x02\\u042E\\u042F\\x07v\\x02\\x02\\u042F\\u0430\\x074\\x02\" +\n\t\t\"\\x02\\u0430\\u0431\\x072\\x02\\x02\\u0431\\u0464\\x072\\x02\\x02\\u0432\\u0433\\x07\" +\n\t\t\"w\\x02\\x02\\u0433\\u0434\\x07k\\x02\\x02\\u0434\\u0435\\x07p\\x02\\x02\\u0435\\u0436\" +\n\t\t\"\\x07v\\x02\\x02\\u0436\\u0437\\x074\\x02\\x02\\u0437\\u0438\\x072\\x02\\x02\\u0438\" +\n\t\t\"\\u0464\\x07:\\x02\\x02\\u0439\\u043A\\x07w\\x02\\x02\\u043A\\u043B\\x07k\\x02\\x02\" +\n\t\t\"\\u043B\\u043C\\x07p\\x02\\x02\\u043C\\u043D\\x07v\\x02\\x02\\u043D\\u043E\\x074\\x02\" +\n\t\t\"\\x02\\u043E\\u043F\\x073\\x02\\x02\\u043F\\u0464\\x078\\x02\\x02\\u0440\\u0441\\x07\" +\n\t\t\"w\\x02\\x02\\u0441\\u0442\\x07k\\x02\\x02\\u0442\\u0443\\x07p\\x02\\x02\\u0443\\u0444\" +\n\t\t\"\\x07v\\x02\\x02\\u0444\\u0445\\x074\\x02\\x02\\u0445\\u0446\\x074\\x02\\x02\\u0446\" +\n\t\t\"\\u0464\\x076\\x02\\x02\\u0447\\u0448\\x07w\\x02\\x02\\u0448\\u0449\\x07k\\x02\\x02\" +\n\t\t\"\\u0449\\u044A\\x07p\\x02\\x02\\u044A\\u044B\\x07v\\x02\\x02\\u044B\\u044C\\x074\\x02\" +\n\t\t\"\\x02\\u044C\\u044D\\x075\\x02\\x02\\u044D\\u0464\\x074\\x02\\x02\\u044E\\u044F\\x07\" +\n\t\t\"w\\x02\\x02\\u044F\\u0450\\x07k\\x02\\x02\\u0450\\u0451\\x07p\\x02\\x02\\u0451\\u0452\" +\n\t\t\"\\x07v\\x02\\x02\\u0452\\u0453\\x074\\x02\\x02\\u0453\\u0454\\x076\\x02\\x02\\u0454\" +\n\t\t\"\\u0464\\x072\\x02\\x02\\u0455\\u0456\\x07w\\x02\\x02\\u0456\\u0457\\x07k\\x02\\x02\" +\n\t\t\"\\u0457\\u0458\\x07p\\x02\\x02\\u0458\\u0459\\x07v\\x02\\x02\\u0459\\u045A\\x074\\x02\" +\n\t\t\"\\x02\\u045A\\u045B\\x076\\x02\\x02\\u045B\\u0464\\x07:\\x02\\x02\\u045C\\u045D\\x07\" +\n\t\t\"w\\x02\\x02\\u045D\\u045E\\x07k\\x02\\x02\\u045E\\u045F\\x07p\\x02\\x02\\u045F\\u0460\" +\n\t\t\"\\x07v\\x02\\x02\\u0460\\u0461\\x074\\x02\\x02\\u0461\\u0462\\x077\\x02\\x02\\u0462\" +\n\t\t\"\\u0464\\x078\\x02\\x02\\u0463\\u038C\\x03\\x02\\x02\\x02\\u0463\\u0390\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0463\\u0395\\x03\\x02\\x02\\x02\\u0463\\u039B\\x03\\x02\\x02\\x02\\u0463\\u03A1\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0463\\u03A7\\x03\\x02\\x02\\x02\\u0463\\u03AD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0463\\u03B3\\x03\\x02\\x02\\x02\\u0463\\u03B9\\x03\\x02\\x02\\x02\\u0463\\u03BF\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0463\\u03C5\\x03\\x02\\x02\\x02\\u0463\\u03CB\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u03D1\\x03\\x02\\x02\\x02\\u0463\\u03D7\\x03\\x02\\x02\\x02\\u0463\\u03DE\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u03E5\\x03\\x02\\x02\\x02\\u0463\\u03EC\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u03F3\\x03\\x02\\x02\\x02\\u0463\\u03FA\\x03\\x02\\x02\\x02\\u0463\\u0401\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u0408\\x03\\x02\\x02\\x02\\u0463\\u040F\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u0416\\x03\\x02\\x02\\x02\\u0463\\u041D\\x03\\x02\\x02\\x02\\u0463\\u0424\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u042B\\x03\\x02\\x02\\x02\\u0463\\u0432\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u0439\\x03\\x02\\x02\\x02\\u0463\\u0440\\x03\\x02\\x02\\x02\\u0463\\u0447\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u044E\\x03\\x02\\x02\\x02\\u0463\\u0455\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u045C\\x03\\x02\\x02\\x02\\u0464\\xC8\\x03\\x02\\x02\\x02\\u0465\\u0466\\x07d\\x02\" +\n\t\t\"\\x02\\u0466\\u0467\\x07{\\x02\\x02\\u0467\\u0468\\x07v\\x02\\x02\\u0468\\u0469\\x07\" +\n\t\t\"g\\x02\\x02\\u0469\\u0542\\x07u\\x02\\x02\\u046A\\u046B\\x07d\\x02\\x02\\u046B\\u046C\" +\n\t\t\"\\x07{\\x02\\x02\\u046C\\u046D\\x07v\\x02\\x02\\u046D\\u046E\\x07g\\x02\\x02\\u046E\" +\n\t\t\"\\u046F\\x07u\\x02\\x02\\u046F\\u0542\\x073\\x02\\x02\\u0470\\u0471\\x07d\\x02\\x02\" +\n\t\t\"\\u0471\\u0472\\x07{\\x02\\x02\\u0472\\u0473\\x07v\\x02\\x02\\u0473\\u0474\\x07g\\x02\" +\n\t\t\"\\x02\\u0474\\u0475\\x07u\\x02\\x02\\u0475\\u0542\\x074\\x02\\x02\\u0476\\u0477\\x07\" +\n\t\t\"d\\x02\\x02\\u0477\\u0478\\x07{\\x02\\x02\\u0478\\u0479\\x07v\\x02\\x02\\u0479\\u047A\" +\n\t\t\"\\x07g\\x02\\x02\\u047A\\u047B\\x07u\\x02\\x02\\u047B\\u0542\\x075\\x02\\x02\\u047C\" +\n\t\t\"\\u047D\\x07d\\x02\\x02\\u047D\\u047E\\x07{\\x02\\x02\\u047E\\u047F\\x07v\\x02\\x02\" +\n\t\t\"\\u047F\\u0480\\x07g\\x02\\x02\\u0480\\u0481\\x07u\\x02\\x02\\u0481\\u0542\\x076\\x02\" +\n\t\t\"\\x02\\u0482\\u0483\\x07d\\x02\\x02\\u0483\\u0484\\x07{\\x02\\x02\\u0484\\u0485\\x07\" +\n\t\t\"v\\x02\\x02\\u0485\\u0486\\x07g\\x02\\x02\\u0486\\u0487\\x07u\\x02\\x02\\u0487\\u0542\" +\n\t\t\"\\x077\\x02\\x02\\u0488\\u0489\\x07d\\x02\\x02\\u0489\\u048A\\x07{\\x02\\x02\\u048A\" +\n\t\t\"\\u048B\\x07v\\x02\\x02\\u048B\\u048C\\x07g\\x02\\x02\\u048C\\u048D\\x07u\\x02\\x02\" +\n\t\t\"\\u048D\\u0542\\x078\\x02\\x02\\u048E\\u048F\\x07d\\x02\\x02\\u048F\\u0490\\x07{\\x02\" +\n\t\t\"\\x02\\u0490\\u0491\\x07v\\x02\\x02\\u0491\\u0492\\x07g\\x02\\x02\\u0492\\u0493\\x07\" +\n\t\t\"u\\x02\\x02\\u0493\\u0542\\x079\\x02\\x02\\u0494\\u0495\\x07d\\x02\\x02\\u0495\\u0496\" +\n\t\t\"\\x07{\\x02\\x02\\u0496\\u0497\\x07v\\x02\\x02\\u0497\\u0498\\x07g\\x02\\x02\\u0498\" +\n\t\t\"\\u0499\\x07u\\x02\\x02\\u0499\\u0542\\x07:\\x02\\x02\\u049A\\u049B\\x07d\\x02\\x02\" +\n\t\t\"\\u049B\\u049C\\x07{\\x02\\x02\\u049C\\u049D\\x07v\\x02\\x02\\u049D\\u049E\\x07g\\x02\" +\n\t\t\"\\x02\\u049E\\u049F\\x07u\\x02\\x02\\u049F\\u0542\\x07;\\x02\\x02\\u04A0\\u04A1\\x07\" +\n\t\t\"d\\x02\\x02\\u04A1\\u04A2\\x07{\\x02\\x02\\u04A2\\u04A3\\x07v\\x02\\x02\\u04A3\\u04A4\" +\n\t\t\"\\x07g\\x02\\x02\\u04A4\\u04A5\\x07u\\x02\\x02\\u04A5\\u04A6\\x073\\x02\\x02\\u04A6\" +\n\t\t\"\\u0542\\x072\\x02\\x02\\u04A7\\u04A8\\x07d\\x02\\x02\\u04A8\\u04A9\\x07{\\x02\\x02\" +\n\t\t\"\\u04A9\\u04AA\\x07v\\x02\\x02\\u04AA\\u04AB\\x07g\\x02\\x02\\u04AB\\u04AC\\x07u\\x02\" +\n\t\t\"\\x02\\u04AC\\u04AD\\x073\\x02\\x02\\u04AD\\u0542\\x073\\x02\\x02\\u04AE\\u04AF\\x07\" +\n\t\t\"d\\x02\\x02\\u04AF\\u04B0\\x07{\\x02\\x02\\u04B0\\u04B1\\x07v\\x02\\x02\\u04B1\\u04B2\" +\n\t\t\"\\x07g\\x02\\x02\\u04B2\\u04B3\\x07u\\x02\\x02\\u04B3\\u04B4\\x073\\x02\\x02\\u04B4\" +\n\t\t\"\\u0542\\x074\\x02\\x02\\u04B5\\u04B6\\x07d\\x02\\x02\\u04B6\\u04B7\\x07{\\x02\\x02\" +\n\t\t\"\\u04B7\\u04B8\\x07v\\x02\\x02\\u04B8\\u04B9\\x07g\\x02\\x02\\u04B9\\u04BA\\x07u\\x02\" +\n\t\t\"\\x02\\u04BA\\u04BB\\x073\\x02\\x02\\u04BB\\u0542\\x075\\x02\\x02\\u04BC\\u04BD\\x07\" +\n\t\t\"d\\x02\\x02\\u04BD\\u04BE\\x07{\\x02\\x02\\u04BE\\u04BF\\x07v\\x02\\x02\\u04BF\\u04C0\" +\n\t\t\"\\x07g\\x02\\x02\\u04C0\\u04C1\\x07u\\x02\\x02\\u04C1\\u04C2\\x073\\x02\\x02\\u04C2\" +\n\t\t\"\\u0542\\x076\\x02\\x02\\u04C3\\u04C4\\x07d\\x02\\x02\\u04C4\\u04C5\\x07{\\x02\\x02\" +\n\t\t\"\\u04C5\\u04C6\\x07v\\x02\\x02\\u04C6\\u04C7\\x07g\\x02\\x02\\u04C7\\u04C8\\x07u\\x02\" +\n\t\t\"\\x02\\u04C8\\u04C9\\x073\\x02\\x02\\u04C9\\u0542\\x077\\x02\\x02\\u04CA\\u04CB\\x07\" +\n\t\t\"d\\x02\\x02\\u04CB\\u04CC\\x07{\\x02\\x02\\u04CC\\u04CD\\x07v\\x02\\x02\\u04CD\\u04CE\" +\n\t\t\"\\x07g\\x02\\x02\\u04CE\\u04CF\\x07u\\x02\\x02\\u04CF\\u04D0\\x073\\x02\\x02\\u04D0\" +\n\t\t\"\\u0542\\x078\\x02\\x02\\u04D1\\u04D2\\x07d\\x02\\x02\\u04D2\\u04D3\\x07{\\x02\\x02\" +\n\t\t\"\\u04D3\\u04D4\\x07v\\x02\\x02\\u04D4\\u04D5\\x07g\\x02\\x02\\u04D5\\u04D6\\x07u\\x02\" +\n\t\t\"\\x02\\u04D6\\u04D7\\x073\\x02\\x02\\u04D7\\u0542\\x079\\x02\\x02\\u04D8\\u04D9\\x07\" +\n\t\t\"d\\x02\\x02\\u04D9\\u04DA\\x07{\\x02\\x02\\u04DA\\u04DB\\x07v\\x02\\x02\\u04DB\\u04DC\" +\n\t\t\"\\x07g\\x02\\x02\\u04DC\\u04DD\\x07u\\x02\\x02\\u04DD\\u04DE\\x073\\x02\\x02\\u04DE\" +\n\t\t\"\\u0542\\x07:\\x02\\x02\\u04DF\\u04E0\\x07d\\x02\\x02\\u04E0\\u04E1\\x07{\\x02\\x02\" +\n\t\t\"\\u04E1\\u04E2\\x07v\\x02\\x02\\u04E2\\u04E3\\x07g\\x02\\x02\\u04E3\\u04E4\\x07u\\x02\" +\n\t\t\"\\x02\\u04E4\\u04E5\\x073\\x02\\x02\\u04E5\\u0542\\x07;\\x02\\x02\\u04E6\\u04E7\\x07\" +\n\t\t\"d\\x02\\x02\\u04E7\\u04E8\\x07{\\x02\\x02\\u04E8\\u04E9\\x07v\\x02\\x02\\u04E9\\u04EA\" +\n\t\t\"\\x07g\\x02\\x02\\u04EA\\u04EB\\x07u\\x02\\x02\\u04EB\\u04EC\\x074\\x02\\x02\\u04EC\" +\n\t\t\"\\u0542\\x072\\x02\\x02\\u04ED\\u04EE\\x07d\\x02\\x02\\u04EE\\u04EF\\x07{\\x02\\x02\" +\n\t\t\"\\u04EF\\u04F0\\x07v\\x02\\x02\\u04F0\\u04F1\\x07g\\x02\\x02\\u04F1\\u04F2\\x07u\\x02\" +\n\t\t\"\\x02\\u04F2\\u04F3\\x074\\x02\\x02\\u04F3\\u0542\\x073\\x02\\x02\\u04F4\\u04F5\\x07\" +\n\t\t\"d\\x02\\x02\\u04F5\\u04F6\\x07{\\x02\\x02\\u04F6\\u04F7\\x07v\\x02\\x02\\u04F7\\u04F8\" +\n\t\t\"\\x07g\\x02\\x02\\u04F8\\u04F9\\x07u\\x02\\x02\\u04F9\\u04FA\\x074\\x02\\x02\\u04FA\" +\n\t\t\"\\u0542\\x074\\x02\\x02\\u04FB\\u04FC\\x07d\\x02\\x02\\u04FC\\u04FD\\x07{\\x02\\x02\" +\n\t\t\"\\u04FD\\u04FE\\x07v\\x02\\x02\\u04FE\\u04FF\\x07g\\x02\\x02\\u04FF\\u0500\\x07u\\x02\" +\n\t\t\"\\x02\\u0500\\u0501\\x074\\x02\\x02\\u0501\\u0542\\x075\\x02\\x02\\u0502\\u0503\\x07\" +\n\t\t\"d\\x02\\x02\\u0503\\u0504\\x07{\\x02\\x02\\u0504\\u0505\\x07v\\x02\\x02\\u0505\\u0506\" +\n\t\t\"\\x07g\\x02\\x02\\u0506\\u0507\\x07u\\x02\\x02\\u0507\\u0508\\x074\\x02\\x02\\u0508\" +\n\t\t\"\\u0542\\x076\\x02\\x02\\u0509\\u050A\\x07d\\x02\\x02\\u050A\\u050B\\x07{\\x02\\x02\" +\n\t\t\"\\u050B\\u050C\\x07v\\x02\\x02\\u050C\\u050D\\x07g\\x02\\x02\\u050D\\u050E\\x07u\\x02\" +\n\t\t\"\\x02\\u050E\\u050F\\x074\\x02\\x02\\u050F\\u0542\\x077\\x02\\x02\\u0510\\u0511\\x07\" +\n\t\t\"d\\x02\\x02\\u0511\\u0512\\x07{\\x02\\x02\\u0512\\u0513\\x07v\\x02\\x02\\u0513\\u0514\" +\n\t\t\"\\x07g\\x02\\x02\\u0514\\u0515\\x07u\\x02\\x02\\u0515\\u0516\\x074\\x02\\x02\\u0516\" +\n\t\t\"\\u0542\\x078\\x02\\x02\\u0517\\u0518\\x07d\\x02\\x02\\u0518\\u0519\\x07{\\x02\\x02\" +\n\t\t\"\\u0519\\u051A\\x07v\\x02\\x02\\u051A\\u051B\\x07g\\x02\\x02\\u051B\\u051C\\x07u\\x02\" +\n\t\t\"\\x02\\u051C\\u051D\\x074\\x02\\x02\\u051D\\u0542\\x079\\x02\\x02\\u051E\\u051F\\x07\" +\n\t\t\"d\\x02\\x02\\u051F\\u0520\\x07{\\x02\\x02\\u0520\\u0521\\x07v\\x02\\x02\\u0521\\u0522\" +\n\t\t\"\\x07g\\x02\\x02\\u0522\\u0523\\x07u\\x02\\x02\\u0523\\u0524\\x074\\x02\\x02\\u0524\" +\n\t\t\"\\u0542\\x07:\\x02\\x02\\u0525\\u0526\\x07d\\x02\\x02\\u0526\\u0527\\x07{\\x02\\x02\" +\n\t\t\"\\u0527\\u0528\\x07v\\x02\\x02\\u0528\\u0529\\x07g\\x02\\x02\\u0529\\u052A\\x07u\\x02\" +\n\t\t\"\\x02\\u052A\\u052B\\x074\\x02\\x02\\u052B\\u0542\\x07;\\x02\\x02\\u052C\\u052D\\x07\" +\n\t\t\"d\\x02\\x02\\u052D\\u052E\\x07{\\x02\\x02\\u052E\\u052F\\x07v\\x02\\x02\\u052F\\u0530\" +\n\t\t\"\\x07g\\x02\\x02\\u0530\\u0531\\x07u\\x02\\x02\\u0531\\u0532\\x075\\x02\\x02\\u0532\" +\n\t\t\"\\u0542\\x072\\x02\\x02\\u0533\\u0534\\x07d\\x02\\x02\\u0534\\u0535\\x07{\\x02\\x02\" +\n\t\t\"\\u0535\\u0536\\x07v\\x02\\x02\\u0536\\u0537\\x07g\\x02\\x02\\u0537\\u0538\\x07u\\x02\" +\n\t\t\"\\x02\\u0538\\u0539\\x075\\x02\\x02\\u0539\\u0542\\x073\\x02\\x02\\u053A\\u053B\\x07\" +\n\t\t\"d\\x02\\x02\\u053B\\u053C\\x07{\\x02\\x02\\u053C\\u053D\\x07v\\x02\\x02\\u053D\\u053E\" +\n\t\t\"\\x07g\\x02\\x02\\u053E\\u053F\\x07u\\x02\\x02\\u053F\\u0540\\x075\\x02\\x02\\u0540\" +\n\t\t\"\\u0542\\x074\\x02\\x02\\u0541\\u0465\\x03\\x02\\x02\\x02\\u0541\\u046A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0541\\u0470\\x03\\x02\\x02\\x02\\u0541\\u0476\\x03\\x02\\x02\\x02\\u0541\\u047C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0541\\u0482\\x03\\x02\\x02\\x02\\u0541\\u0488\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0541\\u048E\\x03\\x02\\x02\\x02\\u0541\\u0494\\x03\\x02\\x02\\x02\\u0541\\u049A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0541\\u04A0\\x03\\x02\\x02\\x02\\u0541\\u04A7\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u04AE\\x03\\x02\\x02\\x02\\u0541\\u04B5\\x03\\x02\\x02\\x02\\u0541\\u04BC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u04C3\\x03\\x02\\x02\\x02\\u0541\\u04CA\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u04D1\\x03\\x02\\x02\\x02\\u0541\\u04D8\\x03\\x02\\x02\\x02\\u0541\\u04DF\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u04E6\\x03\\x02\\x02\\x02\\u0541\\u04ED\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u04F4\\x03\\x02\\x02\\x02\\u0541\\u04FB\\x03\\x02\\x02\\x02\\u0541\\u0502\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u0509\\x03\\x02\\x02\\x02\\u0541\\u0510\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u0517\\x03\\x02\\x02\\x02\\u0541\\u051E\\x03\\x02\\x02\\x02\\u0541\\u0525\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u052C\\x03\\x02\\x02\\x02\\u0541\\u0533\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u053A\\x03\\x02\\x02\\x02\\u0542\\xCA\\x03\\x02\\x02\\x02\\u0543\\u0544\\x07h\\x02\" +\n\t\t\"\\x02\\u0544\\u0545\\x07k\\x02\\x02\\u0545\\u0546\\x07z\\x02\\x02\\u0546\\u0547\\x07\" +\n\t\t\"g\\x02\\x02\\u0547\\u055A\\x07f\\x02\\x02\\u0548\\u0549\\x07h\\x02\\x02\\u0549\\u054A\" +\n\t\t\"\\x07k\\x02\\x02\\u054A\\u054B\\x07z\\x02\\x02\\u054B\\u054C\\x07g\\x02\\x02\\u054C\" +\n\t\t\"\\u054D\\x07f\\x02\\x02\\u054D\\u054F\\x03\\x02\\x02\\x02\\u054E\\u0550\\t\\x02\\x02\" +\n\t\t\"\\x02\\u054F\\u054E\\x03\\x02\\x02\\x02\\u0550\\u0551\\x03\\x02\\x02\\x02\\u0551\\u054F\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0551\\u0552\\x03\\x02\\x02\\x02\\u0552\\u0553\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0553\\u0555\\x07z\\x02\\x02\\u0554\\u0556\\t\\x02\\x02\\x02\\u0555\\u0554\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0556\\u0557\\x03\\x02\\x02\\x02\\u0557\\u0555\\x03\\x02\\x02\\x02\\u0557\" +\n\t\t\"\\u0558\\x03\\x02\\x02\\x02\\u0558\\u055A\\x03\\x02\\x02\\x02\\u0559\\u0543\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0559\\u0548\\x03\\x02\\x02\\x02\\u055A\\xCC\\x03\\x02\\x02\\x02\\u055B\\u055C\" +\n\t\t\"\\x07w\\x02\\x02\\u055C\\u055D\\x07h\\x02\\x02\\u055D\\u055E\\x07k\\x02\\x02\\u055E\" +\n\t\t\"\\u055F\\x07z\\x02\\x02\\u055F\\u0560\\x07g\\x02\\x02\\u0560\\u0574\\x07f\\x02\\x02\" +\n\t\t\"\\u0561\\u0562\\x07w\\x02\\x02\\u0562\\u0563\\x07h\\x02\\x02\\u0563\\u0564\\x07k\\x02\" +\n\t\t\"\\x02\\u0564\\u0565\\x07z\\x02\\x02\\u0565\\u0566\\x07g\\x02\\x02\\u0566\\u0567\\x07\" +\n\t\t\"f\\x02\\x02\\u0567\\u0569\\x03\\x02\\x02\\x02\\u0568\\u056A\\t\\x02\\x02\\x02\\u0569\" +\n\t\t\"\\u0568\\x03\\x02\\x02\\x02\\u056A\\u056B\\x03\\x02\\x02\\x02\\u056B\\u0569\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u056B\\u056C\\x03\\x02\\x02\\x02\\u056C\\u056D\\x03\\x02\\x02\\x02\\u056D\" +\n\t\t\"\\u056F\\x07z\\x02\\x02\\u056E\\u0570\\t\\x02\\x02\\x02\\u056F\\u056E\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0570\\u0571\\x03\\x02\\x02\\x02\\u0571\\u056F\\x03\\x02\\x02\\x02\\u0571\\u0572\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0572\\u0574\\x03\\x02\\x02\\x02\\u0573\\u055B\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0573\\u0561\\x03\\x02\\x02\\x02\\u0574\\xCE\\x03\\x02\\x02\\x02\\u0575\\u0576\\x07\" +\n\t\t\"v\\x02\\x02\\u0576\\u0577\\x07t\\x02\\x02\\u0577\\u0578\\x07w\\x02\\x02\\u0578\\u057F\" +\n\t\t\"\\x07g\\x02\\x02\\u0579\\u057A\\x07h\\x02\\x02\\u057A\\u057B\\x07c\\x02\\x02\\u057B\" +\n\t\t\"\\u057C\\x07n\\x02\\x02\\u057C\\u057D\\x07u\\x02\\x02\\u057D\\u057F\\x07g\\x02\\x02\" +\n\t\t\"\\u057E\\u0575\\x03\\x02\\x02\\x02\\u057E\\u0579\\x03\\x02\\x02\\x02\\u057F\\xD0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0580\\u0587\\x05\\xD3j\\x02\\u0581\\u0583\\x05\\xD3j\\x02\\u0582\\u0581\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0582\\u0583\\x03\\x02\\x02\\x02\\u0583\\u0584\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0584\\u0585\\x070\\x02\\x02\\u0585\\u0587\\x05\\xD3j\\x02\\u0586\\u0580\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0586\\u0582\\x03\\x02\\x02\\x02\\u0587\\u058A\\x03\\x02\\x02\\x02\\u0588\" +\n\t\t\"\\u0589\\t\\x03\\x02\\x02\\u0589\\u058B\\x05\\xD3j\\x02\\u058A\\u0588\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u058A\\u058B\\x03\\x02\\x02\\x02\\u058B\\xD2\\x03\\x02\\x02\\x02\\u058C\\u0593\" +\n\t\t\"\\t\\x02\\x02\\x02\\u058D\\u058F\\x07a\\x02\\x02\\u058E\\u058D\\x03\\x02\\x02\\x02\\u058E\" +\n\t\t\"\\u058F\\x03\\x02\\x02\\x02\\u058F\\u0590\\x03\\x02\\x02\\x02\\u0590\\u0592\\t\\x02\\x02\" +\n\t\t\"\\x02\\u0591\\u058E\\x03\\x02\\x02\\x02\\u0592\\u0595\\x03\\x02\\x02\\x02\\u0593\\u0591\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0593\\u0594\\x03\\x02\\x02\\x02\\u0594\\xD4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0595\\u0593\\x03\\x02\\x02\\x02\\u0596\\u0597\\x072\\x02\\x02\\u0597\\u0598\\t\\x04\" +\n\t\t\"\\x02\\x02\\u0598\\u0599\\x05\\xD7l\\x02\\u0599\\xD6\\x03\\x02\\x02\\x02\\u059A\\u05A1\" +\n\t\t\"\\x05\\xDFp\\x02\\u059B\\u059D\\x07a\\x02\\x02\\u059C\\u059B\\x03\\x02\\x02\\x02\\u059C\" +\n\t\t\"\\u059D\\x03\\x02\\x02\\x02\\u059D\\u059E\\x03\\x02\\x02\\x02\\u059E\\u05A0\\x05\\xDF\" +\n\t\t\"p\\x02\\u059F\\u059C\\x03\\x02\\x02\\x02\\u05A0\\u05A3\\x03\\x02\\x02\\x02\\u05A1\\u059F\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05A1\\u05A2\\x03\\x02\\x02\\x02\\u05A2\\xD8\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u05A3\\u05A1\\x03\\x02\\x02\\x02\\u05A4\\u05A5\\x07y\\x02\\x02\\u05A5\\u05A6\\x07\" +\n\t\t\"g\\x02\\x02\\u05A6\\u05DD\\x07k\\x02\\x02\\u05A7\\u05A8\\x07i\\x02\\x02\\u05A8\\u05A9\" +\n\t\t\"\\x07y\\x02\\x02\\u05A9\\u05AA\\x07g\\x02\\x02\\u05AA\\u05DD\\x07k\\x02\\x02\\u05AB\" +\n\t\t\"\\u05AC\\x07u\\x02\\x02\\u05AC\\u05AD\\x07|\\x02\\x02\\u05AD\\u05AE\\x07c\\x02\\x02\" +\n\t\t\"\\u05AE\\u05AF\\x07d\\x02\\x02\\u05AF\\u05DD\\x07q\\x02\\x02\\u05B0\\u05B1\\x07h\\x02\" +\n\t\t\"\\x02\\u05B1\\u05B2\\x07k\\x02\\x02\\u05B2\\u05B3\\x07p\\x02\\x02\\u05B3\\u05B4\\x07\" +\n\t\t\"p\\x02\\x02\\u05B4\\u05B5\\x07g\\x02\\x02\\u05B5\\u05DD\\x07{\\x02\\x02\\u05B6\\u05B7\" +\n\t\t\"\\x07g\\x02\\x02\\u05B7\\u05B8\\x07v\\x02\\x02\\u05B8\\u05B9\\x07j\\x02\\x02\\u05B9\" +\n\t\t\"\\u05BA\\x07g\\x02\\x02\\u05BA\\u05DD\\x07t\\x02\\x02\\u05BB\\u05BC\\x07u\\x02\\x02\" +\n\t\t\"\\u05BC\\u05BD\\x07g\\x02\\x02\\u05BD\\u05BE\\x07e\\x02\\x02\\u05BE\\u05BF\\x07q\\x02\" +\n\t\t\"\\x02\\u05BF\\u05C0\\x07p\\x02\\x02\\u05C0\\u05C1\\x07f\\x02\\x02\\u05C1\\u05DD\\x07\" +\n\t\t\"u\\x02\\x02\\u05C2\\u05C3\\x07o\\x02\\x02\\u05C3\\u05C4\\x07k\\x02\\x02\\u05C4\\u05C5\" +\n\t\t\"\\x07p\\x02\\x02\\u05C5\\u05C6\\x07w\\x02\\x02\\u05C6\\u05C7\\x07v\\x02\\x02\\u05C7\" +\n\t\t\"\\u05C8\\x07g\\x02\\x02\\u05C8\\u05DD\\x07u\\x02\\x02\\u05C9\\u05CA\\x07j\\x02\\x02\" +\n\t\t\"\\u05CA\\u05CB\\x07q\\x02\\x02\\u05CB\\u05CC\\x07w\\x02\\x02\\u05CC\\u05CD\\x07t\\x02\" +\n\t\t\"\\x02\\u05CD\\u05DD\\x07u\\x02\\x02\\u05CE\\u05CF\\x07f\\x02\\x02\\u05CF\\u05D0\\x07\" +\n\t\t\"c\\x02\\x02\\u05D0\\u05D1\\x07{\\x02\\x02\\u05D1\\u05DD\\x07u\\x02\\x02\\u05D2\\u05D3\" +\n\t\t\"\\x07y\\x02\\x02\\u05D3\\u05D4\\x07g\\x02\\x02\\u05D4\\u05D5\\x07g\\x02\\x02\\u05D5\" +\n\t\t\"\\u05D6\\x07m\\x02\\x02\\u05D6\\u05DD\\x07u\\x02\\x02\\u05D7\\u05D8\\x07{\\x02\\x02\" +\n\t\t\"\\u05D8\\u05D9\\x07g\\x02\\x02\\u05D9\\u05DA\\x07c\\x02\\x02\\u05DA\\u05DB\\x07t\\x02\" +\n\t\t\"\\x02\\u05DB\\u05DD\\x07u\\x02\\x02\\u05DC\\u05A4\\x03\\x02\\x02\\x02\\u05DC\\u05A7\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05DC\\u05AB\\x03\\x02\\x02\\x02\\u05DC\\u05B0\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u05DC\\u05B6\\x03\\x02\\x02\\x02\\u05DC\\u05BB\\x03\\x02\\x02\\x02\\u05DC\\u05C2\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u05DC\\u05C9\\x03\\x02\\x02\\x02\\u05DC\\u05CE\\x03\\x02\\x02\\x02\\u05DC\" +\n\t\t\"\\u05D2\\x03\\x02\\x02\\x02\\u05DC\\u05D7\\x03\\x02\\x02\\x02\\u05DD\\xDA\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u05DE\\u05DF\\x07j\\x02\\x02\\u05DF\\u05E0\\x07g\\x02\\x02\\u05E0\\u05E1\\x07\" +\n\t\t\"z\\x02\\x02\\u05E1\\u05EC\\x03\\x02\\x02\\x02\\u05E2\\u05E4\\x07$\\x02\\x02\\u05E3\\u05E5\" +\n\t\t\"\\x05\\xD7l\\x02\\u05E4\\u05E3\\x03\\x02\\x02\\x02\\u05E4\\u05E5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u05E5\\u05E6\\x03\\x02\\x02\\x02\\u05E6\\u05ED\\x07$\\x02\\x02\\u05E7\\u05E9\\x07\" +\n\t\t\")\\x02\\x02\\u05E8\\u05EA\\x05\\xD7l\\x02\\u05E9\\u05E8\\x03\\x02\\x02\\x02\\u05E9\\u05EA\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05EA\\u05EB\\x03\\x02\\x02\\x02\\u05EB\\u05ED\\x07)\\x02\\x02\" +\n\t\t\"\\u05EC\\u05E2\\x03\\x02\\x02\\x02\\u05EC\\u05E7\\x03\\x02\\x02\\x02\\u05ED\\xDC\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u05EE\\u05EF\\x05\\xDFp\\x02\\u05EF\\u05F0\\x05\\xDFp\\x02\\u05F0\\xDE\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05F1\\u05F2\\t\\x05\\x02\\x02\\u05F2\\xE0\\x03\\x02\\x02\\x02\\u05F3\" +\n\t\t\"\\u05F4\\x07c\\x02\\x02\\u05F4\\u05F5\\x07d\\x02\\x02\\u05F5\\u05F6\\x07u\\x02\\x02\" +\n\t\t\"\\u05F6\\u05F7\\x07v\\x02\\x02\\u05F7\\u05F8\\x07t\\x02\\x02\\u05F8\\u05F9\\x07c\\x02\" +\n\t\t\"\\x02\\u05F9\\u05FA\\x07e\\x02\\x02\\u05FA\\u064C\\x07v\\x02\\x02\\u05FB\\u05FC\\x07\" +\n\t\t\"c\\x02\\x02\\u05FC\\u05FD\\x07h\\x02\\x02\\u05FD\\u05FE\\x07v\\x02\\x02\\u05FE\\u05FF\" +\n\t\t\"\\x07g\\x02\\x02\\u05FF\\u064C\\x07t\\x02\\x02\\u0600\\u0601\\x07e\\x02\\x02\\u0601\" +\n\t\t\"\\u0602\\x07c\\x02\\x02\\u0602\\u0603\\x07u\\x02\\x02\\u0603\\u064C\\x07g\\x02\\x02\" +\n\t\t\"\\u0604\\u0605\\x07e\\x02\\x02\\u0605\\u0606\\x07c\\x02\\x02\\u0606\\u0607\\x07v\\x02\" +\n\t\t\"\\x02\\u0607\\u0608\\x07e\\x02\\x02\\u0608\\u064C\\x07j\\x02\\x02\\u0609\\u060A\\x07\" +\n\t\t\"f\\x02\\x02\\u060A\\u060B\\x07g\\x02\\x02\\u060B\\u060C\\x07h\\x02\\x02\\u060C\\u060D\" +\n\t\t\"\\x07c\\x02\\x02\\u060D\\u060E\\x07w\\x02\\x02\\u060E\\u060F\\x07n\\x02\\x02\\u060F\" +\n\t\t\"\\u064C\\x07v\\x02\\x02\\u0610\\u0611\\x07h\\x02\\x02\\u0611\\u0612\\x07k\\x02\\x02\" +\n\t\t\"\\u0612\\u0613\\x07p\\x02\\x02\\u0613\\u0614\\x07c\\x02\\x02\\u0614\\u064C\\x07n\\x02\" +\n\t\t\"\\x02\\u0615\\u0616\\x07k\\x02\\x02\\u0616\\u064C\\x07p\\x02\\x02\\u0617\\u0618\\x07\" +\n\t\t\"k\\x02\\x02\\u0618\\u0619\\x07p\\x02\\x02\\u0619\\u061A\\x07n\\x02\\x02\\u061A\\u061B\" +\n\t\t\"\\x07k\\x02\\x02\\u061B\\u061C\\x07p\\x02\\x02\\u061C\\u064C\\x07g\\x02\\x02\\u061D\" +\n\t\t\"\\u061E\\x07n\\x02\\x02\\u061E\\u061F\\x07g\\x02\\x02\\u061F\\u064C\\x07v\\x02\\x02\" +\n\t\t\"\\u0620\\u0621\\x07o\\x02\\x02\\u0621\\u0622\\x07c\\x02\\x02\\u0622\\u0623\\x07v\\x02\" +\n\t\t\"\\x02\\u0623\\u0624\\x07e\\x02\\x02\\u0624\\u064C\\x07j\\x02\\x02\\u0625\\u0626\\x07\" +\n\t\t\"p\\x02\\x02\\u0626\\u0627\\x07w\\x02\\x02\\u0627\\u0628\\x07n\\x02\\x02\\u0628\\u064C\" +\n\t\t\"\\x07n\\x02\\x02\\u0629\\u062A\\x07q\\x02\\x02\\u062A\\u064C\\x07h\\x02\\x02\\u062B\" +\n\t\t\"\\u062C\\x07t\\x02\\x02\\u062C\\u062D\\x07g\\x02\\x02\\u062D\\u062E\\x07n\\x02\\x02\" +\n\t\t\"\\u062E\\u062F\\x07q\\x02\\x02\\u062F\\u0630\\x07e\\x02\\x02\\u0630\\u0631\\x07c\\x02\" +\n\t\t\"\\x02\\u0631\\u0632\\x07v\\x02\\x02\\u0632\\u0633\\x07c\\x02\\x02\\u0633\\u0634\\x07\" +\n\t\t\"d\\x02\\x02\\u0634\\u0635\\x07n\\x02\\x02\\u0635\\u064C\\x07g\\x02\\x02\\u0636\\u0637\" +\n\t\t\"\\x07u\\x02\\x02\\u0637\\u0638\\x07v\\x02\\x02\\u0638\\u0639\\x07c\\x02\\x02\\u0639\" +\n\t\t\"\\u063A\\x07v\\x02\\x02\\u063A\\u063B\\x07k\\x02\\x02\\u063B\\u064C\\x07e\\x02\\x02\" +\n\t\t\"\\u063C\\u063D\\x07u\\x02\\x02\\u063D\\u063E\\x07y\\x02\\x02\\u063E\\u063F\\x07k\\x02\" +\n\t\t\"\\x02\\u063F\\u0640\\x07v\\x02\\x02\\u0640\\u0641\\x07e\\x02\\x02\\u0641\\u064C\\x07\" +\n\t\t\"j\\x02\\x02\\u0642\\u0643\\x07v\\x02\\x02\\u0643\\u0644\\x07t\\x02\\x02\\u0644\\u064C\" +\n\t\t\"\\x07{\\x02\\x02\\u0645\\u0646\\x07v\\x02\\x02\\u0646\\u0647\\x07{\\x02\\x02\\u0647\" +\n\t\t\"\\u0648\\x07r\\x02\\x02\\u0648\\u0649\\x07g\\x02\\x02\\u0649\\u064A\\x07q\\x02\\x02\" +\n\t\t\"\\u064A\\u064C\\x07h\\x02\\x02\\u064B\\u05F3\\x03\\x02\\x02\\x02\\u064B\\u05FB\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u064B\\u0600\\x03\\x02\\x02\\x02\\u064B\\u0604\\x03\\x02\\x02\\x02\\u064B\" +\n\t\t\"\\u0609\\x03\\x02\\x02\\x02\\u064B\\u0610\\x03\\x02\\x02\\x02\\u064B\\u0615\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u064B\\u0617\\x03\\x02\\x02\\x02\\u064B\\u061D\\x03\\x02\\x02\\x02\\u064B\" +\n\t\t\"\\u0620\\x03\\x02\\x02\\x02\\u064B\\u0625\\x03\\x02\\x02\\x02\\u064B\\u0629\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u064B\\u062B\\x03\\x02\\x02\\x02\\u064B\\u0636\\x03\\x02\\x02\\x02\\u064B\" +\n\t\t\"\\u063C\\x03\\x02\\x02\\x02\\u064B\\u0642\\x03\\x02\\x02\\x02\\u064B\\u0645\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u064C\\xE2\\x03\\x02\\x02\\x02\\u064D\\u064E\\x07c\\x02\\x02\\u064E\\u064F\" +\n\t\t\"\\x07p\\x02\\x02\\u064F\\u0650\\x07q\\x02\\x02\\u0650\\u0651\\x07p\\x02\\x02\\u0651\" +\n\t\t\"\\u0652\\x07{\\x02\\x02\\u0652\\u0653\\x07o\\x02\\x02\\u0653\\u0654\\x07q\\x02\\x02\" +\n\t\t\"\\u0654\\u0655\\x07w\\x02\\x02\\u0655\\u0656\\x07u\\x02\\x02\\u0656\\xE4\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0657\\u0658\\x07d\\x02\\x02\\u0658\\u0659\\x07t\\x02\\x02\\u0659\\u065A\\x07\" +\n\t\t\"g\\x02\\x02\\u065A\\u065B\\x07c\\x02\\x02\\u065B\\u065C\\x07m\\x02\\x02\\u065C\\xE6\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u065D\\u065E\\x07e\\x02\\x02\\u065E\\u065F\\x07q\\x02\\x02\\u065F\" +\n\t\t\"\\u0660\\x07p\\x02\\x02\\u0660\\u0661\\x07u\\x02\\x02\\u0661\\u0662\\x07v\\x02\\x02\" +\n\t\t\"\\u0662\\u0663\\x07c\\x02\\x02\\u0663\\u0664\\x07p\\x02\\x02\\u0664\\u0665\\x07v\\x02\" +\n\t\t\"\\x02\\u0665\\xE8\\x03\\x02\\x02\\x02\\u0666\\u0667\\x07k\\x02\\x02\\u0667\\u0668\\x07\" +\n\t\t\"o\\x02\\x02\\u0668\\u0669\\x07o\\x02\\x02\\u0669\\u066A\\x07w\\x02\\x02\\u066A\\u066B\" +\n\t\t\"\\x07v\\x02\\x02\\u066B\\u066C\\x07c\\x02\\x02\\u066C\\u066D\\x07d\\x02\\x02\\u066D\" +\n\t\t\"\\u066E\\x07n\\x02\\x02\\u066E\\u066F\\x07g\\x02\\x02\\u066F\\xEA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0670\\u0671\\x07e\\x02\\x02\\u0671\\u0672\\x07q\";\n\tprivate static readonly _serializedATNSegment3: string =\n\t\t\"\\x02\\x02\\u0672\\u0673\\x07p\\x02\\x02\\u0673\\u0674\\x07v\\x02\\x02\\u0674\\u0675\" +\n\t\t\"\\x07k\\x02\\x02\\u0675\\u0676\\x07p\\x02\\x02\\u0676\\u0677\\x07w\\x02\\x02\\u0677\" +\n\t\t\"\\u0678\\x07g\\x02\\x02\\u0678\\xEC\\x03\\x02\\x02\\x02\\u0679\\u067A\\x07n\\x02\\x02\" +\n\t\t\"\\u067A\\u067B\\x07g\\x02\\x02\\u067B\\u067C\\x07c\\x02\\x02\\u067C\\u067D\\x07x\\x02\" +\n\t\t\"\\x02\\u067D\\u067E\\x07g\\x02\\x02\\u067E\\xEE\\x03\\x02\\x02\\x02\\u067F\\u0680\\x07\" +\n\t\t\"g\\x02\\x02\\u0680\\u0681\\x07z\\x02\\x02\\u0681\\u0682\\x07v\\x02\\x02\\u0682\\u0683\" +\n\t\t\"\\x07g\\x02\\x02\\u0683\\u0684\\x07t\\x02\\x02\\u0684\\u0685\\x07p\\x02\\x02\\u0685\" +\n\t\t\"\\u0686\\x07c\\x02\\x02\\u0686\\u0687\\x07n\\x02\\x02\\u0687\\xF0\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0688\\u0689\\x07k\\x02\\x02\\u0689\\u068A\\x07p\\x02\\x02\\u068A\\u068B\\x07f\\x02\" +\n\t\t\"\\x02\\u068B\\u068C\\x07g\\x02\\x02\\u068C\\u068D\\x07z\\x02\\x02\\u068D\\u068E\\x07\" +\n\t\t\"g\\x02\\x02\\u068E\\u068F\\x07f\\x02\\x02\\u068F\\xF2\\x03\\x02\\x02\\x02\\u0690\\u0691\" +\n\t\t\"\\x07k\\x02\\x02\\u0691\\u0692\\x07p\\x02\\x02\\u0692\\u0693\\x07v\\x02\\x02\\u0693\" +\n\t\t\"\\u0694\\x07g\\x02\\x02\\u0694\\u0695\\x07t\\x02\\x02\\u0695\\u0696\\x07p\\x02\\x02\" +\n\t\t\"\\u0696\\u0697\\x07c\\x02\\x02\\u0697\\u0698\\x07n\\x02\\x02\\u0698\\xF4\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0699\\u069A\\x07r\\x02\\x02\\u069A\\u069B\\x07c\\x02\\x02\\u069B\\u069C\\x07\" +\n\t\t\"{\\x02\\x02\\u069C\\u069D\\x07c\\x02\\x02\\u069D\\u069E\\x07d\\x02\\x02\\u069E\\u069F\" +\n\t\t\"\\x07n\\x02\\x02\\u069F\\u06A0\\x07g\\x02\\x02\\u06A0\\xF6\\x03\\x02\\x02\\x02\\u06A1\" +\n\t\t\"\\u06A2\\x07r\\x02\\x02\\u06A2\\u06A3\\x07t\\x02\\x02\\u06A3\\u06A4\\x07k\\x02\\x02\" +\n\t\t\"\\u06A4\\u06A5\\x07x\\x02\\x02\\u06A5\\u06A6\\x07c\\x02\\x02\\u06A6\\u06A7\\x07v\\x02\" +\n\t\t\"\\x02\\u06A7\\u06A8\\x07g\\x02\\x02\\u06A8\\xF8\\x03\\x02\\x02\\x02\\u06A9\\u06AA\\x07\" +\n\t\t\"r\\x02\\x02\\u06AA\\u06AB\\x07w\\x02\\x02\\u06AB\\u06AC\\x07d\\x02\\x02\\u06AC\\u06AD\" +\n\t\t\"\\x07n\\x02\\x02\\u06AD\\u06AE\\x07k\\x02\\x02\\u06AE\\u06AF\\x07e\\x02\\x02\\u06AF\" +\n\t\t\"\\xFA\\x03\\x02\\x02\\x02\\u06B0\\u06B1\\x07x\\x02\\x02\\u06B1\\u06B2\\x07k\\x02\\x02\" +\n\t\t\"\\u06B2\\u06B3\\x07t\\x02\\x02\\u06B3\\u06B4\\x07v\\x02\\x02\\u06B4\\u06B5\\x07w\\x02\" +\n\t\t\"\\x02\\u06B5\\u06B6\\x07c\\x02\\x02\\u06B6\\u06B7\\x07n\\x02\\x02\\u06B7\\xFC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u06B8\\u06B9\\x07r\\x02\\x02\\u06B9\\u06BA\\x07w\\x02\\x02\\u06BA\\u06BB\" +\n\t\t\"\\x07t\\x02\\x02\\u06BB\\u06BC\\x07g\\x02\\x02\\u06BC\\xFE\\x03\\x02\\x02\\x02\\u06BD\" +\n\t\t\"\\u06BE\\x07v\\x02\\x02\\u06BE\\u06BF\\x07{\\x02\\x02\\u06BF\\u06C0\\x07r\\x02\\x02\" +\n\t\t\"\\u06C0\\u06C1\\x07g\\x02\\x02\\u06C1\\u0100\\x03\\x02\\x02\\x02\\u06C2\\u06C3\\x07\" +\n\t\t\"x\\x02\\x02\\u06C3\\u06C4\\x07k\\x02\\x02\\u06C4\\u06C5\\x07g\\x02\\x02\\u06C5\\u06C6\" +\n\t\t\"\\x07y\\x02\\x02\\u06C6\\u0102\\x03\\x02\\x02\\x02\\u06C7\\u06C8\\x07i\\x02\\x02\\u06C8\" +\n\t\t\"\\u06C9\\x07n\\x02\\x02\\u06C9\\u06CA\\x07q\\x02\\x02\\u06CA\\u06CB\\x07d\\x02\\x02\" +\n\t\t\"\\u06CB\\u06CC\\x07c\\x02\\x02\\u06CC\\u06CD\\x07n\\x02\\x02\\u06CD\\u0104\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u06CE\\u06CF\\x07e\\x02\\x02\\u06CF\\u06D0\\x07q\\x02\\x02\\u06D0\\u06D1\" +\n\t\t\"\\x07p\\x02\\x02\\u06D1\\u06D2\\x07u\\x02\\x02\\u06D2\\u06D3\\x07v\\x02\\x02\\u06D3\" +\n\t\t\"\\u06D4\\x07t\\x02\\x02\\u06D4\\u06D5\\x07w\\x02\\x02\\u06D5\\u06D6\\x07e\\x02\\x02\" +\n\t\t\"\\u06D6\\u06D7\\x07v\\x02\\x02\\u06D7\\u06D8\\x07q\\x02\\x02\\u06D8\\u06D9\\x07t\\x02\" +\n\t\t\"\\x02\\u06D9\\u0106\\x03\\x02\\x02\\x02\\u06DA\\u06DB\\x07h\\x02\\x02\\u06DB\\u06DC\" +\n\t\t\"\\x07c\\x02\\x02\\u06DC\\u06DD\\x07n\\x02\\x02\\u06DD\\u06DE\\x07n\\x02\\x02\\u06DE\" +\n\t\t\"\\u06DF\\x07d\\x02\\x02\\u06DF\\u06E0\\x07c\\x02\\x02\\u06E0\\u06E1\\x07e\\x02\\x02\" +\n\t\t\"\\u06E1\\u06E2\\x07m\\x02\\x02\\u06E2\\u0108\\x03\\x02\\x02\\x02\\u06E3\\u06E4\\x07\" +\n\t\t\"t\\x02\\x02\\u06E4\\u06E5\\x07g\\x02\\x02\\u06E5\\u06E6\\x07e\\x02\\x02\\u06E6\\u06E7\" +\n\t\t\"\\x07g\\x02\\x02\\u06E7\\u06E8\\x07k\\x02\\x02\\u06E8\\u06E9\\x07x\\x02\\x02\\u06E9\" +\n\t\t\"\\u06EA\\x07g\\x02\\x02\\u06EA\\u010A\\x03\\x02\\x02\\x02\\u06EB\\u06EF\\x05\\u010D\" +\n\t\t\"\\x87\\x02\\u06EC\\u06EE\\x05\\u010F\\x88\\x02\\u06ED\\u06EC\\x03\\x02\\x02\\x02\\u06EE\" +\n\t\t\"\\u06F1\\x03\\x02\\x02\\x02\\u06EF\\u06ED\\x03\\x02\\x02\\x02\\u06EF\\u06F0\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u06F0\\u010C\\x03\\x02\\x02\\x02\\u06F1\\u06EF\\x03\\x02\\x02\\x02\\u06F2\" +\n\t\t\"\\u06F3\\t\\x06\\x02\\x02\\u06F3\\u010E\\x03\\x02\\x02\\x02\\u06F4\\u06F5\\t\\x07\\x02\" +\n\t\t\"\\x02\\u06F5\\u0110\\x03\\x02\\x02\\x02\\u06F6\\u06F7\\x07w\\x02\\x02\\u06F7\\u06F8\" +\n\t\t\"\\x07p\\x02\\x02\\u06F8\\u06F9\\x07k\\x02\\x02\\u06F9\\u06FA\\x07e\\x02\\x02\\u06FA\" +\n\t\t\"\\u06FB\\x07q\\x02\\x02\\u06FB\\u06FC\\x07f\\x02\\x02\\u06FC\\u06FE\\x07g\\x02\\x02\" +\n\t\t\"\\u06FD\\u06F6\\x03\\x02\\x02\\x02\\u06FD\\u06FE\\x03\\x02\\x02\\x02\\u06FE\\u06FF\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u06FF\\u0703\\x07$\\x02\\x02\\u0700\\u0702\\x05\\u0113\\x8A\\x02\\u0701\" +\n\t\t\"\\u0700\\x03\\x02\\x02\\x02\\u0702\\u0705\\x03\\x02\\x02\\x02\\u0703\\u0701\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0703\\u0704\\x03\\x02\\x02\\x02\\u0704\\u0706\\x03\\x02\\x02\\x02\\u0705\" +\n\t\t\"\\u0703\\x03\\x02\\x02\\x02\\u0706\\u0719\\x07$\\x02\\x02\\u0707\\u0708\\x07w\\x02\\x02\" +\n\t\t\"\\u0708\\u0709\\x07p\\x02\\x02\\u0709\\u070A\\x07k\\x02\\x02\\u070A\\u070B\\x07e\\x02\" +\n\t\t\"\\x02\\u070B\\u070C\\x07q\\x02\\x02\\u070C\\u070D\\x07f\\x02\\x02\\u070D\\u070F\\x07\" +\n\t\t\"g\\x02\\x02\\u070E\\u0707\\x03\\x02\\x02\\x02\\u070E\\u070F\\x03\\x02\\x02\\x02\\u070F\" +\n\t\t\"\\u0710\\x03\\x02\\x02\\x02\\u0710\\u0714\\x07)\\x02\\x02\\u0711\\u0713\\x05\\u0115\" +\n\t\t\"\\x8B\\x02\\u0712\\u0711\\x03\\x02\\x02\\x02\\u0713\\u0716\\x03\\x02\\x02\\x02\\u0714\" +\n\t\t\"\\u0712\\x03\\x02\\x02\\x02\\u0714\\u0715\\x03\\x02\\x02\\x02\\u0715\\u0717\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0716\\u0714\\x03\\x02\\x02\\x02\\u0717\\u0719\\x07)\\x02\\x02\\u0718\\u06FD\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0718\\u070E\\x03\\x02\\x02\\x02\\u0719\\u0112\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u071A\\u071E\\n\\b\\x02\\x02\\u071B\\u071C\\x07^\\x02\\x02\\u071C\\u071E\\v\\x02\\x02\" +\n\t\t\"\\x02\\u071D\\u071A\\x03\\x02\\x02\\x02\\u071D\\u071B\\x03\\x02\\x02\\x02\\u071E\\u0114\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u071F\\u0723\\n\\t\\x02\\x02\\u0720\\u0721\\x07^\\x02\\x02\\u0721\" +\n\t\t\"\\u0723\\v\\x02\\x02\\x02\\u0722\\u071F\\x03\\x02\\x02\\x02\\u0722\\u0720\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0723\\u0116\\x03\\x02\\x02\\x02\\u0724\\u0726\\t\\x02\\x02\\x02\\u0725\\u0724\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0726\\u0727\\x03\\x02\\x02\\x02\\u0727\\u0725\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0727\\u0728\\x03\\x02\\x02\\x02\\u0728\\u0729\\x03\\x02\\x02\\x02\\u0729\\u072B\\x07\" +\n\t\t\"0\\x02\\x02\\u072A\\u072C\\t\\x02\\x02\\x02\\u072B\\u072A\\x03\\x02\\x02\\x02\\u072C\" +\n\t\t\"\\u072D\\x03\\x02\\x02\\x02\\u072D\\u072B\\x03\\x02\\x02\\x02\\u072D\\u072E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u072E\\u0735\\x03\\x02\\x02\\x02\\u072F\\u0731\\x070\\x02\\x02\\u0730\\u0732\" +\n\t\t\"\\t\\x02\\x02\\x02\\u0731\\u0730\\x03\\x02\\x02\\x02\\u0732\\u0733\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0733\\u0731\\x03\\x02\\x02\\x02\\u0733\\u0734\\x03\\x02\\x02\\x02\\u0734\\u0736\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0735\\u072F\\x03\\x02\\x02\\x02\\u0735\\u0736\\x03\\x02\\x02\\x02\\u0736\" +\n\t\t\"\\u0118\\x03\\x02\\x02\\x02\\u0737\\u0739\\t\\n\\x02\\x02\\u0738\\u0737\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0739\\u073A\\x03\\x02\\x02\\x02\\u073A\\u0738\\x03\\x02\\x02\\x02\\u073A\\u073B\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u073B\\u073C\\x03\\x02\\x02\\x02\\u073C\\u073D\\b\\x8D\\x02\\x02\" +\n\t\t\"\\u073D\\u011A\\x03\\x02\\x02\\x02\\u073E\\u073F\\x071\\x02\\x02\\u073F\\u0740\\x07\" +\n\t\t\",\\x02\\x02\\u0740\\u0744\\x03\\x02\\x02\\x02\\u0741\\u0743\\v\\x02\\x02\\x02\\u0742\" +\n\t\t\"\\u0741\\x03\\x02\\x02\\x02\\u0743\\u0746\\x03\\x02\\x02\\x02\\u0744\\u0745\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0744\\u0742\\x03\\x02\\x02\\x02\\u0745\\u0747\\x03\\x02\\x02\\x02\\u0746\" +\n\t\t\"\\u0744\\x03\\x02\\x02\\x02\\u0747\\u0748\\x07,\\x02\\x02\\u0748\\u0749\\x071\\x02\\x02\" +\n\t\t\"\\u0749\\u074A\\x03\\x02\\x02\\x02\\u074A\\u074B\\b\\x8E\\x03\\x02\\u074B\\u011C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u074C\\u074D\\x071\\x02\\x02\\u074D\\u074E\\x071\\x02\\x02\\u074E\\u0752\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u074F\\u0751\\n\\v\\x02\\x02\\u0750\\u074F\\x03\\x02\\x02\\x02\\u0751\" +\n\t\t\"\\u0754\\x03\\x02\\x02\\x02\\u0752\\u0750\\x03\\x02\\x02\\x02\\u0752\\u0753\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0753\\u0755\\x03\\x02\\x02\\x02\\u0754\\u0752\\x03\\x02\\x02\\x02\\u0755\" +\n\t\t\"\\u0756\\b\\x8F\\x03\\x02\\u0756\\u011E\\x03\\x02\\x02\\x02(\\x02\\u038A\\u0463\\u0541\" +\n\t\t\"\\u0551\\u0557\\u0559\\u056B\\u0571\\u0573\\u057E\\u0582\\u0586\\u058A\\u058E\\u0593\" +\n\t\t\"\\u059C\\u05A1\\u05DC\\u05E4\\u05E9\\u05EC\\u064B\\u06EF\\u06FD\\u0703\\u070E\\u0714\" +\n\t\t\"\\u0718\\u071D\\u0722\\u0727\\u072D\\u0733\\u0735\\u073A\\u0744\\u0752\\x04\\b\\x02\" +\n\t\t\"\\x02\\x02\\x03\\x02\";\n\tpublic static readonly _serializedATN: string = Utils.join(\n\t\t[\n\t\t\tSolidityLexer._serializedATNSegment0,\n\t\t\tSolidityLexer._serializedATNSegment1,\n\t\t\tSolidityLexer._serializedATNSegment2,\n\t\t\tSolidityLexer._serializedATNSegment3,\n\t\t],\n\t\t\"\",\n\t);\n\tpublic static __ATN: ATN;\n\tpublic static get _ATN(): ATN {\n\t\tif (!SolidityLexer.__ATN) {\n\t\t\tSolidityLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(SolidityLexer._serializedATN));\n\t\t}\n\n\t\treturn SolidityLexer.__ATN;\n\t}\n\n}\n\n", "// Generated from antlr/Solidity.g4 by ANTLR 4.9.0-SNAPSHOT\n\n\nimport { ATN } from \"antlr4ts/atn/ATN\";\nimport { ATNDeserializer } from \"antlr4ts/atn/ATNDeserializer\";\nimport { FailedPredicateException } from \"antlr4ts/FailedPredicateException\";\nimport { NotNull } from \"antlr4ts/Decorators\";\nimport { NoViableAltException } from \"antlr4ts/NoViableAltException\";\nimport { Override } from \"antlr4ts/Decorators\";\nimport { Parser } from \"antlr4ts/Parser\";\nimport { ParserRuleContext } from \"antlr4ts/ParserRuleContext\";\nimport { ParserATNSimulator } from \"antlr4ts/atn/ParserATNSimulator\";\nimport { ParseTreeListener } from \"antlr4ts/tree/ParseTreeListener\";\nimport { ParseTreeVisitor } from \"antlr4ts/tree/ParseTreeVisitor\";\nimport { RecognitionException } from \"antlr4ts/RecognitionException\";\nimport { RuleContext } from \"antlr4ts/RuleContext\";\n//import { RuleVersion } from \"antlr4ts/RuleVersion\";\nimport { TerminalNode } from \"antlr4ts/tree/TerminalNode\";\nimport { Token } from \"antlr4ts/Token\";\nimport { TokenStream } from \"antlr4ts/TokenStream\";\nimport { Vocabulary } from \"antlr4ts/Vocabulary\";\nimport { VocabularyImpl } from \"antlr4ts/VocabularyImpl\";\n\nimport * as Utils from \"antlr4ts/misc/Utils\";\n\nimport { SolidityListener } from \"./SolidityListener\";\nimport { SolidityVisitor } from \"./SolidityVisitor\";\n\n\nexport class SolidityParser extends Parser {\n\tpublic static readonly T__0 = 1;\n\tpublic static readonly T__1 = 2;\n\tpublic static readonly T__2 = 3;\n\tpublic static readonly T__3 = 4;\n\tpublic static readonly T__4 = 5;\n\tpublic static readonly T__5 = 6;\n\tpublic static readonly T__6 = 7;\n\tpublic static readonly T__7 = 8;\n\tpublic static readonly T__8 = 9;\n\tpublic static readonly T__9 = 10;\n\tpublic static readonly T__10 = 11;\n\tpublic static readonly T__11 = 12;\n\tpublic static readonly T__12 = 13;\n\tpublic static readonly T__13 = 14;\n\tpublic static readonly T__14 = 15;\n\tpublic static readonly T__15 = 16;\n\tpublic static readonly T__16 = 17;\n\tpublic static readonly T__17 = 18;\n\tpublic static readonly T__18 = 19;\n\tpublic static readonly T__19 = 20;\n\tpublic static readonly T__20 = 21;\n\tpublic static readonly T__21 = 22;\n\tpublic static readonly T__22 = 23;\n\tpublic static readonly T__23 = 24;\n\tpublic static readonly T__24 = 25;\n\tpublic static readonly T__25 = 26;\n\tpublic static readonly T__26 = 27;\n\tpublic static readonly T__27 = 28;\n\tpublic static readonly T__28 = 29;\n\tpublic static readonly T__29 = 30;\n\tpublic static readonly T__30 = 31;\n\tpublic static readonly T__31 = 32;\n\tpublic static readonly T__32 = 33;\n\tpublic static readonly T__33 = 34;\n\tpublic static readonly T__34 = 35;\n\tpublic static readonly T__35 = 36;\n\tpublic static readonly T__36 = 37;\n\tpublic static readonly T__37 = 38;\n\tpublic static readonly T__38 = 39;\n\tpublic static readonly T__39 = 40;\n\tpublic static readonly T__40 = 41;\n\tpublic static readonly T__41 = 42;\n\tpublic static readonly T__42 = 43;\n\tpublic static readonly T__43 = 44;\n\tpublic static readonly T__44 = 45;\n\tpublic static readonly T__45 = 46;\n\tpublic static readonly T__46 = 47;\n\tpublic static readonly T__47 = 48;\n\tpublic static readonly T__48 = 49;\n\tpublic static readonly T__49 = 50;\n\tpublic static readonly T__50 = 51;\n\tpublic static readonly T__51 = 52;\n\tpublic static readonly T__52 = 53;\n\tpublic static readonly T__53 = 54;\n\tpublic static readonly T__54 = 55;\n\tpublic static readonly T__55 = 56;\n\tpublic static readonly T__56 = 57;\n\tpublic static readonly T__57 = 58;\n\tpublic static readonly T__58 = 59;\n\tpublic static readonly T__59 = 60;\n\tpublic static readonly T__60 = 61;\n\tpublic static readonly T__61 = 62;\n\tpublic static readonly T__62 = 63;\n\tpublic static readonly T__63 = 64;\n\tpublic static readonly T__64 = 65;\n\tpublic static readonly T__65 = 66;\n\tpublic static readonly T__66 = 67;\n\tpublic static readonly T__67 = 68;\n\tpublic static readonly T__68 = 69;\n\tpublic static readonly T__69 = 70;\n\tpublic static readonly T__70 = 71;\n\tpublic static readonly T__71 = 72;\n\tpublic static readonly T__72 = 73;\n\tpublic static readonly T__73 = 74;\n\tpublic static readonly T__74 = 75;\n\tpublic static readonly T__75 = 76;\n\tpublic static readonly T__76 = 77;\n\tpublic static readonly T__77 = 78;\n\tpublic static readonly T__78 = 79;\n\tpublic static readonly T__79 = 80;\n\tpublic static readonly T__80 = 81;\n\tpublic static readonly T__81 = 82;\n\tpublic static readonly T__82 = 83;\n\tpublic static readonly T__83 = 84;\n\tpublic static readonly T__84 = 85;\n\tpublic static readonly T__85 = 86;\n\tpublic static readonly T__86 = 87;\n\tpublic static readonly T__87 = 88;\n\tpublic static readonly T__88 = 89;\n\tpublic static readonly T__89 = 90;\n\tpublic static readonly T__90 = 91;\n\tpublic static readonly T__91 = 92;\n\tpublic static readonly T__92 = 93;\n\tpublic static readonly T__93 = 94;\n\tpublic static readonly T__94 = 95;\n\tpublic static readonly T__95 = 96;\n\tpublic static readonly T__96 = 97;\n\tpublic static readonly Int = 98;\n\tpublic static readonly Uint = 99;\n\tpublic static readonly Byte = 100;\n\tpublic static readonly Fixed = 101;\n\tpublic static readonly Ufixed = 102;\n\tpublic static readonly BooleanLiteral = 103;\n\tpublic static readonly DecimalNumber = 104;\n\tpublic static readonly HexNumber = 105;\n\tpublic static readonly NumberUnit = 106;\n\tpublic static readonly HexLiteralFragment = 107;\n\tpublic static readonly ReservedKeyword = 108;\n\tpublic static readonly AnonymousKeyword = 109;\n\tpublic static readonly BreakKeyword = 110;\n\tpublic static readonly ConstantKeyword = 111;\n\tpublic static readonly ImmutableKeyword = 112;\n\tpublic static readonly ContinueKeyword = 113;\n\tpublic static readonly LeaveKeyword = 114;\n\tpublic static readonly ExternalKeyword = 115;\n\tpublic static readonly IndexedKeyword = 116;\n\tpublic static readonly InternalKeyword = 117;\n\tpublic static readonly PayableKeyword = 118;\n\tpublic static readonly PrivateKeyword = 119;\n\tpublic static readonly PublicKeyword = 120;\n\tpublic static readonly VirtualKeyword = 121;\n\tpublic static readonly PureKeyword = 122;\n\tpublic static readonly TypeKeyword = 123;\n\tpublic static readonly ViewKeyword = 124;\n\tpublic static readonly GlobalKeyword = 125;\n\tpublic static readonly ConstructorKeyword = 126;\n\tpublic static readonly FallbackKeyword = 127;\n\tpublic static readonly ReceiveKeyword = 128;\n\tpublic static readonly Identifier = 129;\n\tpublic static readonly StringLiteralFragment = 130;\n\tpublic static readonly VersionLiteral = 131;\n\tpublic static readonly WS = 132;\n\tpublic static readonly COMMENT = 133;\n\tpublic static readonly LINE_COMMENT = 134;\n\tpublic static readonly RULE_sourceUnit = 0;\n\tpublic static readonly RULE_pragmaDirective = 1;\n\tpublic static readonly RULE_pragmaName = 2;\n\tpublic static readonly RULE_pragmaValue = 3;\n\tpublic static readonly RULE_version = 4;\n\tpublic static readonly RULE_versionOperator = 5;\n\tpublic static readonly RULE_versionConstraint = 6;\n\tpublic static readonly RULE_importDeclaration = 7;\n\tpublic static readonly RULE_importDirective = 8;\n\tpublic static readonly RULE_importPath = 9;\n\tpublic static readonly RULE_contractDefinition = 10;\n\tpublic static readonly RULE_inheritanceSpecifier = 11;\n\tpublic static readonly RULE_contractPart = 12;\n\tpublic static readonly RULE_stateVariableDeclaration = 13;\n\tpublic static readonly RULE_fileLevelConstant = 14;\n\tpublic static readonly RULE_customErrorDefinition = 15;\n\tpublic static readonly RULE_typeDefinition = 16;\n\tpublic static readonly RULE_usingForDeclaration = 17;\n\tpublic static readonly RULE_usingForObject = 18;\n\tpublic static readonly RULE_structDefinition = 19;\n\tpublic static readonly RULE_modifierDefinition = 20;\n\tpublic static readonly RULE_modifierInvocation = 21;\n\tpublic static readonly RULE_functionDefinition = 22;\n\tpublic static readonly RULE_functionDescriptor = 23;\n\tpublic static readonly RULE_returnParameters = 24;\n\tpublic static readonly RULE_modifierList = 25;\n\tpublic static readonly RULE_eventDefinition = 26;\n\tpublic static readonly RULE_enumValue = 27;\n\tpublic static readonly RULE_enumDefinition = 28;\n\tpublic static readonly RULE_parameterList = 29;\n\tpublic static readonly RULE_parameter = 30;\n\tpublic static readonly RULE_eventParameterList = 31;\n\tpublic static readonly RULE_eventParameter = 32;\n\tpublic static readonly RULE_functionTypeParameterList = 33;\n\tpublic static readonly RULE_functionTypeParameter = 34;\n\tpublic static readonly RULE_variableDeclaration = 35;\n\tpublic static readonly RULE_typeName = 36;\n\tpublic static readonly RULE_userDefinedTypeName = 37;\n\tpublic static readonly RULE_mappingKey = 38;\n\tpublic static readonly RULE_mapping = 39;\n\tpublic static readonly RULE_functionTypeName = 40;\n\tpublic static readonly RULE_storageLocation = 41;\n\tpublic static readonly RULE_stateMutability = 42;\n\tpublic static readonly RULE_block = 43;\n\tpublic static readonly RULE_statement = 44;\n\tpublic static readonly RULE_expressionStatement = 45;\n\tpublic static readonly RULE_ifStatement = 46;\n\tpublic static readonly RULE_tryStatement = 47;\n\tpublic static readonly RULE_catchClause = 48;\n\tpublic static readonly RULE_whileStatement = 49;\n\tpublic static readonly RULE_simpleStatement = 50;\n\tpublic static readonly RULE_uncheckedStatement = 51;\n\tpublic static readonly RULE_forStatement = 52;\n\tpublic static readonly RULE_inlineAssemblyStatement = 53;\n\tpublic static readonly RULE_inlineAssemblyStatementFlag = 54;\n\tpublic static readonly RULE_doWhileStatement = 55;\n\tpublic static readonly RULE_continueStatement = 56;\n\tpublic static readonly RULE_breakStatement = 57;\n\tpublic static readonly RULE_returnStatement = 58;\n\tpublic static readonly RULE_throwStatement = 59;\n\tpublic static readonly RULE_emitStatement = 60;\n\tpublic static readonly RULE_revertStatement = 61;\n\tpublic static readonly RULE_variableDeclarationStatement = 62;\n\tpublic static readonly RULE_variableDeclarationList = 63;\n\tpublic static readonly RULE_identifierList = 64;\n\tpublic static readonly RULE_elementaryTypeName = 65;\n\tpublic static readonly RULE_expression = 66;\n\tpublic static readonly RULE_primaryExpression = 67;\n\tpublic static readonly RULE_expressionList = 68;\n\tpublic static readonly RULE_nameValueList = 69;\n\tpublic static readonly RULE_nameValue = 70;\n\tpublic static readonly RULE_functionCallArguments = 71;\n\tpublic static readonly RULE_functionCall = 72;\n\tpublic static readonly RULE_assemblyBlock = 73;\n\tpublic static readonly RULE_assemblyItem = 74;\n\tpublic static readonly RULE_assemblyExpression = 75;\n\tpublic static readonly RULE_assemblyMember = 76;\n\tpublic static readonly RULE_assemblyCall = 77;\n\tpublic static readonly RULE_assemblyLocalDefinition = 78;\n\tpublic static readonly RULE_assemblyAssignment = 79;\n\tpublic static readonly RULE_assemblyIdentifierOrList = 80;\n\tpublic static readonly RULE_assemblyIdentifierList = 81;\n\tpublic static readonly RULE_assemblyStackAssignment = 82;\n\tpublic static readonly RULE_labelDefinition = 83;\n\tpublic static readonly RULE_assemblySwitch = 84;\n\tpublic static readonly RULE_assemblyCase = 85;\n\tpublic static readonly RULE_assemblyFunctionDefinition = 86;\n\tpublic static readonly RULE_assemblyFunctionReturns = 87;\n\tpublic static readonly RULE_assemblyFor = 88;\n\tpublic static readonly RULE_assemblyIf = 89;\n\tpublic static readonly RULE_assemblyLiteral = 90;\n\tpublic static readonly RULE_subAssembly = 91;\n\tpublic static readonly RULE_tupleExpression = 92;\n\tpublic static readonly RULE_numberLiteral = 93;\n\tpublic static readonly RULE_identifier = 94;\n\tpublic static readonly RULE_hexLiteral = 95;\n\tpublic static readonly RULE_overrideSpecifier = 96;\n\tpublic static readonly RULE_stringLiteral = 97;\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly ruleNames: string[] = [\n\t\t\"sourceUnit\", \"pragmaDirective\", \"pragmaName\", \"pragmaValue\", \"version\", \n\t\t\"versionOperator\", \"versionConstraint\", \"importDeclaration\", \"importDirective\", \n\t\t\"importPath\", \"contractDefinition\", \"inheritanceSpecifier\", \"contractPart\", \n\t\t\"stateVariableDeclaration\", \"fileLevelConstant\", \"customErrorDefinition\", \n\t\t\"typeDefinition\", \"usingForDeclaration\", \"usingForObject\", \"structDefinition\", \n\t\t\"modifierDefinition\", \"modifierInvocation\", \"functionDefinition\", \"functionDescriptor\", \n\t\t\"returnParameters\", \"modifierList\", \"eventDefinition\", \"enumValue\", \"enumDefinition\", \n\t\t\"parameterList\", \"parameter\", \"eventParameterList\", \"eventParameter\", \n\t\t\"functionTypeParameterList\", \"functionTypeParameter\", \"variableDeclaration\", \n\t\t\"typeName\", \"userDefinedTypeName\", \"mappingKey\", \"mapping\", \"functionTypeName\", \n\t\t\"storageLocation\", \"stateMutability\", \"block\", \"statement\", \"expressionStatement\", \n\t\t\"ifStatement\", \"tryStatement\", \"catchClause\", \"whileStatement\", \"simpleStatement\", \n\t\t\"uncheckedStatement\", \"forStatement\", \"inlineAssemblyStatement\", \"inlineAssemblyStatementFlag\", \n\t\t\"doWhileStatement\", \"continueStatement\", \"breakStatement\", \"returnStatement\", \n\t\t\"throwStatement\", \"emitStatement\", \"revertStatement\", \"variableDeclarationStatement\", \n\t\t\"variableDeclarationList\", \"identifierList\", \"elementaryTypeName\", \"expression\", \n\t\t\"primaryExpression\", \"expressionList\", \"nameValueList\", \"nameValue\", \"functionCallArguments\", \n\t\t\"functionCall\", \"assemblyBlock\", \"assemblyItem\", \"assemblyExpression\", \n\t\t\"assemblyMember\", \"assemblyCall\", \"assemblyLocalDefinition\", \"assemblyAssignment\", \n\t\t\"assemblyIdentifierOrList\", \"assemblyIdentifierList\", \"assemblyStackAssignment\", \n\t\t\"labelDefinition\", \"assemblySwitch\", \"assemblyCase\", \"assemblyFunctionDefinition\", \n\t\t\"assemblyFunctionReturns\", \"assemblyFor\", \"assemblyIf\", \"assemblyLiteral\", \n\t\t\"subAssembly\", \"tupleExpression\", \"numberLiteral\", \"identifier\", \"hexLiteral\", \n\t\t\"overrideSpecifier\", \"stringLiteral\",\n\t];\n\n\tprivate static readonly _LITERAL_NAMES: Array = [\n\t\tundefined, \"'pragma'\", \"';'\", \"'*'\", \"'||'\", \"'^'\", \"'~'\", \"'>='\", \"'>'\", \n\t\t\"'<'\", \"'<='\", \"'='\", \"'as'\", \"'import'\", \"'from'\", \"'{'\", \"','\", \"'}'\", \n\t\t\"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'is'\", \"'('\", \n\t\t\"')'\", \"'error'\", \"'using'\", \"'for'\", \"'struct'\", \"'modifier'\", \"'function'\", \n\t\t\"'returns'\", \"'event'\", \"'enum'\", \"'['\", \"']'\", \"'address'\", \"'.'\", \"'mapping'\", \n\t\t\"'=>'\", \"'memory'\", \"'storage'\", \"'calldata'\", \"'if'\", \"'else'\", \"'try'\", \n\t\t\"'catch'\", \"'while'\", \"'unchecked'\", \"'assembly'\", \"'do'\", \"'return'\", \n\t\t\"'throw'\", \"'emit'\", \"'revert'\", \"'var'\", \"'bool'\", \"'string'\", \"'byte'\", \n\t\t\"'++'\", \"'--'\", \"'new'\", \"':'\", \"'+'\", \"'-'\", \"'after'\", \"'delete'\", \"'!'\", \n\t\t\"'**'\", \"'/'\", \"'%'\", \"'<<'\", \"'>>'\", \"'&'\", \"'|'\", \"'=='\", \"'!='\", \"'&&'\", \n\t\t\"'?'\", \"'|='\", \"'^='\", \"'&='\", \"'<<='\", \"'>>='\", \"'+='\", \"'-='\", \"'*='\", \n\t\t\"'/='\", \"'%='\", \"'let'\", \"':='\", \"'=:'\", \"'switch'\", \"'case'\", \"'default'\", \n\t\t\"'->'\", \"'callback'\", \"'override'\", undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"'anonymous'\", \"'break'\", \"'constant'\", \"'immutable'\", \"'continue'\", \"'leave'\", \n\t\t\"'external'\", \"'indexed'\", \"'internal'\", \"'payable'\", \"'private'\", \"'public'\", \n\t\t\"'virtual'\", \"'pure'\", \"'type'\", \"'view'\", \"'global'\", \"'constructor'\", \n\t\t\"'fallback'\", \"'receive'\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"Int\", \"Uint\", \"Byte\", \"Fixed\", \"Ufixed\", \"BooleanLiteral\", \"DecimalNumber\", \n\t\t\"HexNumber\", \"NumberUnit\", \"HexLiteralFragment\", \"ReservedKeyword\", \"AnonymousKeyword\", \n\t\t\"BreakKeyword\", \"ConstantKeyword\", \"ImmutableKeyword\", \"ContinueKeyword\", \n\t\t\"LeaveKeyword\", \"ExternalKeyword\", \"IndexedKeyword\", \"InternalKeyword\", \n\t\t\"PayableKeyword\", \"PrivateKeyword\", \"PublicKeyword\", \"VirtualKeyword\", \n\t\t\"PureKeyword\", \"TypeKeyword\", \"ViewKeyword\", \"GlobalKeyword\", \"ConstructorKeyword\", \n\t\t\"FallbackKeyword\", \"ReceiveKeyword\", \"Identifier\", \"StringLiteralFragment\", \n\t\t\"VersionLiteral\", \"WS\", \"COMMENT\", \"LINE_COMMENT\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityParser._LITERAL_NAMES, SolidityParser._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityParser.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"Solidity.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityParser.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityParser._serializedATN; }\n\n\tprotected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {\n\t\treturn new FailedPredicateException(this, predicate, message);\n\t}\n\n\tconstructor(input: TokenStream) {\n\t\tsuper(input);\n\t\tthis._interp = new ParserATNSimulator(SolidityParser._ATN, this);\n\t}\n\t// @RuleVersion(0)\n\tpublic sourceUnit(): SourceUnitContext {\n\t\tlet _localctx: SourceUnitContext = new SourceUnitContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 0, SolidityParser.RULE_sourceUnit);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 208;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__0) | (1 << SolidityParser.T__12) | (1 << SolidityParser.T__13) | (1 << SolidityParser.T__17) | (1 << SolidityParser.T__18) | (1 << SolidityParser.T__19) | (1 << SolidityParser.T__20) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__25) | (1 << SolidityParser.T__27) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (SolidityParser.T__32 - 33)) | (1 << (SolidityParser.T__35 - 33)) | (1 << (SolidityParser.T__37 - 33)) | (1 << (SolidityParser.T__41 - 33)) | (1 << (SolidityParser.T__53 - 33)) | (1 << (SolidityParser.T__54 - 33)) | (1 << (SolidityParser.T__55 - 33)) | (1 << (SolidityParser.T__56 - 33)) | (1 << (SolidityParser.T__57 - 33)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)) | (1 << (SolidityParser.FallbackKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 206;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 0, this._ctx) ) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 196;\n\t\t\t\t\tthis.pragmaDirective();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 197;\n\t\t\t\t\tthis.importDirective();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 198;\n\t\t\t\t\tthis.contractDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 199;\n\t\t\t\t\tthis.enumDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 200;\n\t\t\t\t\tthis.structDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 201;\n\t\t\t\t\tthis.functionDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 7:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 202;\n\t\t\t\t\tthis.fileLevelConstant();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 203;\n\t\t\t\t\tthis.customErrorDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 9:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 204;\n\t\t\t\t\tthis.typeDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 10:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 205;\n\t\t\t\t\tthis.usingForDeclaration();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 210;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 211;\n\t\t\tthis.match(SolidityParser.EOF);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic pragmaDirective(): PragmaDirectiveContext {\n\t\tlet _localctx: PragmaDirectiveContext = new PragmaDirectiveContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 2, SolidityParser.RULE_pragmaDirective);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 213;\n\t\t\tthis.match(SolidityParser.T__0);\n\t\t\tthis.state = 214;\n\t\t\tthis.pragmaName();\n\t\t\tthis.state = 215;\n\t\t\tthis.pragmaValue();\n\t\t\tthis.state = 216;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic pragmaName(): PragmaNameContext {\n\t\tlet _localctx: PragmaNameContext = new PragmaNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 4, SolidityParser.RULE_pragmaName);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 218;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic pragmaValue(): PragmaValueContext {\n\t\tlet _localctx: PragmaValueContext = new PragmaValueContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 6, SolidityParser.RULE_pragmaValue);\n\t\ttry {\n\t\t\tthis.state = 223;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 2, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 220;\n\t\t\t\tthis.match(SolidityParser.T__2);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 221;\n\t\t\t\tthis.version();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 222;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic version(): VersionContext {\n\t\tlet _localctx: VersionContext = new VersionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 8, SolidityParser.RULE_version);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 225;\n\t\t\tthis.versionConstraint();\n\t\t\tthis.state = 232;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__3) | (1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0) || _la === SolidityParser.DecimalNumber || _la === SolidityParser.VersionLiteral) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 227;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__3) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 226;\n\t\t\t\t\tthis.match(SolidityParser.T__3);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 229;\n\t\t\t\tthis.versionConstraint();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 234;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic versionOperator(): VersionOperatorContext {\n\t\tlet _localctx: VersionOperatorContext = new VersionOperatorContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 10, SolidityParser.RULE_versionOperator);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 235;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic versionConstraint(): VersionConstraintContext {\n\t\tlet _localctx: VersionConstraintContext = new VersionConstraintContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 12, SolidityParser.RULE_versionConstraint);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 245;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 7, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 238;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 237;\n\t\t\t\t\tthis.versionOperator();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 240;\n\t\t\t\tthis.match(SolidityParser.VersionLiteral);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 242;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 241;\n\t\t\t\t\tthis.versionOperator();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 244;\n\t\t\t\tthis.match(SolidityParser.DecimalNumber);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic importDeclaration(): ImportDeclarationContext {\n\t\tlet _localctx: ImportDeclarationContext = new ImportDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 14, SolidityParser.RULE_importDeclaration);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 247;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 250;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__11) {\n\t\t\t\t{\n\t\t\t\tthis.state = 248;\n\t\t\t\tthis.match(SolidityParser.T__11);\n\t\t\t\tthis.state = 249;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic importDirective(): ImportDirectiveContext {\n\t\tlet _localctx: ImportDirectiveContext = new ImportDirectiveContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 16, SolidityParser.RULE_importDirective);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 288;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 13, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 252;\n\t\t\t\tthis.match(SolidityParser.T__12);\n\t\t\t\tthis.state = 253;\n\t\t\t\tthis.importPath();\n\t\t\t\tthis.state = 256;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__11) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 254;\n\t\t\t\t\tthis.match(SolidityParser.T__11);\n\t\t\t\t\tthis.state = 255;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 258;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 260;\n\t\t\t\tthis.match(SolidityParser.T__12);\n\t\t\t\tthis.state = 263;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\tcase SolidityParser.T__2:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 261;\n\t\t\t\t\tthis.match(SolidityParser.T__2);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.T__13:\n\t\t\t\tcase SolidityParser.T__24:\n\t\t\t\tcase SolidityParser.T__41:\n\t\t\t\tcase SolidityParser.T__53:\n\t\t\t\tcase SolidityParser.T__95:\n\t\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\t\tcase SolidityParser.Identifier:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 262;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\tthis.state = 267;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__11) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 265;\n\t\t\t\t\tthis.match(SolidityParser.T__11);\n\t\t\t\t\tthis.state = 266;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 269;\n\t\t\t\tthis.match(SolidityParser.T__13);\n\t\t\t\tthis.state = 270;\n\t\t\t\tthis.importPath();\n\t\t\t\tthis.state = 271;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 273;\n\t\t\t\tthis.match(SolidityParser.T__12);\n\t\t\t\tthis.state = 274;\n\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\tthis.state = 275;\n\t\t\t\tthis.importDeclaration();\n\t\t\t\tthis.state = 280;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 276;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 277;\n\t\t\t\t\tthis.importDeclaration();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 282;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 283;\n\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\tthis.state = 284;\n\t\t\t\tthis.match(SolidityParser.T__13);\n\t\t\t\tthis.state = 285;\n\t\t\t\tthis.importPath();\n\t\t\t\tthis.state = 286;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic importPath(): ImportPathContext {\n\t\tlet _localctx: ImportPathContext = new ImportPathContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 18, SolidityParser.RULE_importPath);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 290;\n\t\t\tthis.match(SolidityParser.StringLiteralFragment);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic contractDefinition(): ContractDefinitionContext {\n\t\tlet _localctx: ContractDefinitionContext = new ContractDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 20, SolidityParser.RULE_contractDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 293;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__17) {\n\t\t\t\t{\n\t\t\t\tthis.state = 292;\n\t\t\t\tthis.match(SolidityParser.T__17);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 295;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__18) | (1 << SolidityParser.T__19) | (1 << SolidityParser.T__20))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\tthis.state = 296;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 306;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__21) {\n\t\t\t\t{\n\t\t\t\tthis.state = 297;\n\t\t\t\tthis.match(SolidityParser.T__21);\n\t\t\t\tthis.state = 298;\n\t\t\t\tthis.inheritanceSpecifier();\n\t\t\t\tthis.state = 303;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 299;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 300;\n\t\t\t\t\tthis.inheritanceSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 305;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 308;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 312;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__25) | (1 << SolidityParser.T__27) | (1 << SolidityParser.T__28) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (SolidityParser.T__31 - 32)) | (1 << (SolidityParser.T__32 - 32)) | (1 << (SolidityParser.T__35 - 32)) | (1 << (SolidityParser.T__37 - 32)) | (1 << (SolidityParser.T__41 - 32)) | (1 << (SolidityParser.T__53 - 32)) | (1 << (SolidityParser.T__54 - 32)) | (1 << (SolidityParser.T__55 - 32)) | (1 << (SolidityParser.T__56 - 32)) | (1 << (SolidityParser.T__57 - 32)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)) | (1 << (SolidityParser.FallbackKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 309;\n\t\t\t\tthis.contractPart();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 314;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 315;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic inheritanceSpecifier(): InheritanceSpecifierContext {\n\t\tlet _localctx: InheritanceSpecifierContext = new InheritanceSpecifierContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 22, SolidityParser.RULE_inheritanceSpecifier);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 317;\n\t\t\tthis.userDefinedTypeName();\n\t\t\tthis.state = 323;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 318;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 320;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 319;\n\t\t\t\t\tthis.expressionList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 322;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic contractPart(): ContractPartContext {\n\t\tlet _localctx: ContractPartContext = new ContractPartContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 24, SolidityParser.RULE_contractPart);\n\t\ttry {\n\t\t\tthis.state = 334;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 20, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 325;\n\t\t\t\tthis.stateVariableDeclaration();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 326;\n\t\t\t\tthis.usingForDeclaration();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 327;\n\t\t\t\tthis.structDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 328;\n\t\t\t\tthis.modifierDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 329;\n\t\t\t\tthis.functionDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 330;\n\t\t\t\tthis.eventDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 331;\n\t\t\t\tthis.enumDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 332;\n\t\t\t\tthis.customErrorDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 333;\n\t\t\t\tthis.typeDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic stateVariableDeclaration(): StateVariableDeclarationContext {\n\t\tlet _localctx: StateVariableDeclarationContext = new StateVariableDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 26, SolidityParser.RULE_stateVariableDeclaration);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 336;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 345;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (SolidityParser.T__96 - 97)) | (1 << (SolidityParser.ConstantKeyword - 97)) | (1 << (SolidityParser.ImmutableKeyword - 97)) | (1 << (SolidityParser.InternalKeyword - 97)) | (1 << (SolidityParser.PrivateKeyword - 97)) | (1 << (SolidityParser.PublicKeyword - 97)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 343;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\tcase SolidityParser.PublicKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 337;\n\t\t\t\t\tthis.match(SolidityParser.PublicKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.InternalKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 338;\n\t\t\t\t\tthis.match(SolidityParser.InternalKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.PrivateKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 339;\n\t\t\t\t\tthis.match(SolidityParser.PrivateKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.ConstantKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 340;\n\t\t\t\t\tthis.match(SolidityParser.ConstantKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.ImmutableKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 341;\n\t\t\t\t\tthis.match(SolidityParser.ImmutableKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.T__96:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 342;\n\t\t\t\t\tthis.overrideSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 347;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 348;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 351;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__10) {\n\t\t\t\t{\n\t\t\t\tthis.state = 349;\n\t\t\t\tthis.match(SolidityParser.T__10);\n\t\t\t\tthis.state = 350;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 353;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic fileLevelConstant(): FileLevelConstantContext {\n\t\tlet _localctx: FileLevelConstantContext = new FileLevelConstantContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 28, SolidityParser.RULE_fileLevelConstant);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 355;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 356;\n\t\t\tthis.match(SolidityParser.ConstantKeyword);\n\t\t\tthis.state = 357;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 358;\n\t\t\tthis.match(SolidityParser.T__10);\n\t\t\tthis.state = 359;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 360;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic customErrorDefinition(): CustomErrorDefinitionContext {\n\t\tlet _localctx: CustomErrorDefinitionContext = new CustomErrorDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 30, SolidityParser.RULE_customErrorDefinition);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 362;\n\t\t\tthis.match(SolidityParser.T__24);\n\t\t\tthis.state = 363;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 364;\n\t\t\tthis.parameterList();\n\t\t\tthis.state = 365;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic typeDefinition(): TypeDefinitionContext {\n\t\tlet _localctx: TypeDefinitionContext = new TypeDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 32, SolidityParser.RULE_typeDefinition);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 367;\n\t\t\tthis.match(SolidityParser.TypeKeyword);\n\t\t\tthis.state = 368;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 369;\n\t\t\tthis.match(SolidityParser.T__21);\n\t\t\tthis.state = 370;\n\t\t\tthis.elementaryTypeName();\n\t\t\tthis.state = 371;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic usingForDeclaration(): UsingForDeclarationContext {\n\t\tlet _localctx: UsingForDeclarationContext = new UsingForDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 34, SolidityParser.RULE_usingForDeclaration);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 373;\n\t\t\tthis.match(SolidityParser.T__25);\n\t\t\tthis.state = 374;\n\t\t\tthis.usingForObject();\n\t\t\tthis.state = 375;\n\t\t\tthis.match(SolidityParser.T__26);\n\t\t\tthis.state = 378;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__2:\n\t\t\t\t{\n\t\t\t\tthis.state = 376;\n\t\t\t\tthis.match(SolidityParser.T__2);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\t{\n\t\t\t\tthis.state = 377;\n\t\t\t\tthis.typeName(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 381;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.GlobalKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 380;\n\t\t\t\tthis.match(SolidityParser.GlobalKeyword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 383;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic usingForObject(): UsingForObjectContext {\n\t\tlet _localctx: UsingForObjectContext = new UsingForObjectContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 36, SolidityParser.RULE_usingForObject);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 397;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 385;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 386;\n\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\tthis.state = 387;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\tthis.state = 392;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 388;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 389;\n\t\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 394;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 395;\n\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic structDefinition(): StructDefinitionContext {\n\t\tlet _localctx: StructDefinitionContext = new StructDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 38, SolidityParser.RULE_structDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 399;\n\t\t\tthis.match(SolidityParser.T__27);\n\t\t\tthis.state = 400;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 401;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 412;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 402;\n\t\t\t\tthis.variableDeclaration();\n\t\t\t\tthis.state = 403;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\tthis.state = 409;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 404;\n\t\t\t\t\tthis.variableDeclaration();\n\t\t\t\t\tthis.state = 405;\n\t\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 411;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 414;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic modifierDefinition(): ModifierDefinitionContext {\n\t\tlet _localctx: ModifierDefinitionContext = new ModifierDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 40, SolidityParser.RULE_modifierDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 416;\n\t\t\tthis.match(SolidityParser.T__28);\n\t\t\tthis.state = 417;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 419;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 418;\n\t\t\t\tthis.parameterList();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 425;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__96 || _la === SolidityParser.VirtualKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 423;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\tcase SolidityParser.VirtualKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 421;\n\t\t\t\t\tthis.match(SolidityParser.VirtualKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.T__96:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 422;\n\t\t\t\t\tthis.overrideSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 427;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 430;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 428;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 429;\n\t\t\t\tthis.block();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic modifierInvocation(): ModifierInvocationContext {\n\t\tlet _localctx: ModifierInvocationContext = new ModifierInvocationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 42, SolidityParser.RULE_modifierInvocation);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 432;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 438;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 433;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 435;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 434;\n\t\t\t\t\tthis.expressionList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 437;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionDefinition(): FunctionDefinitionContext {\n\t\tlet _localctx: FunctionDefinitionContext = new FunctionDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 44, SolidityParser.RULE_functionDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 440;\n\t\t\tthis.functionDescriptor();\n\t\t\tthis.state = 441;\n\t\t\tthis.parameterList();\n\t\t\tthis.state = 442;\n\t\t\tthis.modifierList();\n\t\t\tthis.state = 444;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__30) {\n\t\t\t\t{\n\t\t\t\tthis.state = 443;\n\t\t\t\tthis.returnParameters();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 448;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 446;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 447;\n\t\t\t\tthis.block();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionDescriptor(): FunctionDescriptorContext {\n\t\tlet _localctx: FunctionDescriptorContext = new FunctionDescriptorContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 46, SolidityParser.RULE_functionDescriptor);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 457;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__29:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 450;\n\t\t\t\tthis.match(SolidityParser.T__29);\n\t\t\t\tthis.state = 452;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 451;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 454;\n\t\t\t\tthis.match(SolidityParser.ConstructorKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.FallbackKeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 455;\n\t\t\t\tthis.match(SolidityParser.FallbackKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 456;\n\t\t\t\tthis.match(SolidityParser.ReceiveKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic returnParameters(): ReturnParametersContext {\n\t\tlet _localctx: ReturnParametersContext = new ReturnParametersContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 48, SolidityParser.RULE_returnParameters);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 459;\n\t\t\tthis.match(SolidityParser.T__30);\n\t\t\tthis.state = 460;\n\t\t\tthis.parameterList();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic modifierList(): ModifierListContext {\n\t\tlet _localctx: ModifierListContext = new ModifierListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 50, SolidityParser.RULE_modifierList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 472;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.T__96 - 96)) | (1 << (SolidityParser.ConstantKeyword - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.ExternalKeyword - 96)) | (1 << (SolidityParser.InternalKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.PrivateKeyword - 96)) | (1 << (SolidityParser.PublicKeyword - 96)) | (1 << (SolidityParser.VirtualKeyword - 96)) | (1 << (SolidityParser.PureKeyword - 96)) | (1 << (SolidityParser.ViewKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 470;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 40, this._ctx) ) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 462;\n\t\t\t\t\tthis.match(SolidityParser.ExternalKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 463;\n\t\t\t\t\tthis.match(SolidityParser.PublicKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 464;\n\t\t\t\t\tthis.match(SolidityParser.InternalKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 465;\n\t\t\t\t\tthis.match(SolidityParser.PrivateKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 466;\n\t\t\t\t\tthis.match(SolidityParser.VirtualKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 467;\n\t\t\t\t\tthis.stateMutability();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 7:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 468;\n\t\t\t\t\tthis.modifierInvocation();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 469;\n\t\t\t\t\tthis.overrideSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 474;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic eventDefinition(): EventDefinitionContext {\n\t\tlet _localctx: EventDefinitionContext = new EventDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 52, SolidityParser.RULE_eventDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 475;\n\t\t\tthis.match(SolidityParser.T__31);\n\t\t\tthis.state = 476;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 477;\n\t\t\tthis.eventParameterList();\n\t\t\tthis.state = 479;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.AnonymousKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 478;\n\t\t\t\tthis.match(SolidityParser.AnonymousKeyword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 481;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic enumValue(): EnumValueContext {\n\t\tlet _localctx: EnumValueContext = new EnumValueContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 54, SolidityParser.RULE_enumValue);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 483;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic enumDefinition(): EnumDefinitionContext {\n\t\tlet _localctx: EnumDefinitionContext = new EnumDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 56, SolidityParser.RULE_enumDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 485;\n\t\t\tthis.match(SolidityParser.T__32);\n\t\t\tthis.state = 486;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 487;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 489;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 488;\n\t\t\t\tthis.enumValue();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 495;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 491;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 492;\n\t\t\t\tthis.enumValue();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 497;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 498;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic parameterList(): ParameterListContext {\n\t\tlet _localctx: ParameterListContext = new ParameterListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 58, SolidityParser.RULE_parameterList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 500;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 509;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 501;\n\t\t\t\tthis.parameter();\n\t\t\t\tthis.state = 506;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 502;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 503;\n\t\t\t\t\tthis.parameter();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 508;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 511;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic parameter(): ParameterContext {\n\t\tlet _localctx: ParameterContext = new ParameterContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 60, SolidityParser.RULE_parameter);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 513;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 515;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 47, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 514;\n\t\t\t\tthis.storageLocation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.state = 518;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 517;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic eventParameterList(): EventParameterListContext {\n\t\tlet _localctx: EventParameterListContext = new EventParameterListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 62, SolidityParser.RULE_eventParameterList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 520;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 529;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 521;\n\t\t\t\tthis.eventParameter();\n\t\t\t\tthis.state = 526;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 522;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 523;\n\t\t\t\t\tthis.eventParameter();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 528;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 531;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic eventParameter(): EventParameterContext {\n\t\tlet _localctx: EventParameterContext = new EventParameterContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 64, SolidityParser.RULE_eventParameter);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 533;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 535;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.IndexedKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 534;\n\t\t\t\tthis.match(SolidityParser.IndexedKeyword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 538;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 537;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionTypeParameterList(): FunctionTypeParameterListContext {\n\t\tlet _localctx: FunctionTypeParameterListContext = new FunctionTypeParameterListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 66, SolidityParser.RULE_functionTypeParameterList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 540;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 549;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 541;\n\t\t\t\tthis.functionTypeParameter();\n\t\t\t\tthis.state = 546;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 542;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 543;\n\t\t\t\t\tthis.functionTypeParameter();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 548;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 551;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionTypeParameter(): FunctionTypeParameterContext {\n\t\tlet _localctx: FunctionTypeParameterContext = new FunctionTypeParameterContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 68, SolidityParser.RULE_functionTypeParameter);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 553;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 555;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (((((_la - 40)) & ~0x1F) === 0 && ((1 << (_la - 40)) & ((1 << (SolidityParser.T__39 - 40)) | (1 << (SolidityParser.T__40 - 40)) | (1 << (SolidityParser.T__41 - 40)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 554;\n\t\t\t\tthis.storageLocation();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic variableDeclaration(): VariableDeclarationContext {\n\t\tlet _localctx: VariableDeclarationContext = new VariableDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 70, SolidityParser.RULE_variableDeclaration);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 557;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 559;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 56, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 558;\n\t\t\t\tthis.storageLocation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.state = 561;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic typeName(): TypeNameContext;\n\tpublic typeName(_p: number): TypeNameContext;\n\t// @RuleVersion(0)\n\tpublic typeName(_p?: number): TypeNameContext {\n\t\tif (_p === undefined) {\n\t\t\t_p = 0;\n\t\t}\n\n\t\tlet _parentctx: ParserRuleContext = this._ctx;\n\t\tlet _parentState: number = this.state;\n\t\tlet _localctx: TypeNameContext = new TypeNameContext(this._ctx, _parentState);\n\t\tlet _prevctx: TypeNameContext = _localctx;\n\t\tlet _startState: number = 72;\n\t\tthis.enterRecursionRule(_localctx, 72, SolidityParser.RULE_typeName, _p);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 570;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 57, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 564;\n\t\t\t\tthis.elementaryTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 565;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t{\n\t\t\t\tthis.state = 566;\n\t\t\t\tthis.mapping();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\t{\n\t\t\t\tthis.state = 567;\n\t\t\t\tthis.functionTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\t{\n\t\t\t\tthis.state = 568;\n\t\t\t\tthis.match(SolidityParser.T__35);\n\t\t\t\tthis.state = 569;\n\t\t\t\tthis.match(SolidityParser.PayableKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis._ctx._stop = this._input.tryLT(-1);\n\t\t\tthis.state = 580;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 59, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\tif (this._parseListeners != null) {\n\t\t\t\t\t\tthis.triggerExitRuleEvent();\n\t\t\t\t\t}\n\t\t\t\t\t_prevctx = _localctx;\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\t_localctx = new TypeNameContext(_parentctx, _parentState);\n\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_typeName);\n\t\t\t\t\tthis.state = 572;\n\t\t\t\t\tif (!(this.precpred(this._ctx, 3))) {\n\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 3)\");\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 573;\n\t\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\t\tthis.state = 575;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 574;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.state = 577;\n\t\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 582;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 59, this._ctx);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.unrollRecursionContexts(_parentctx);\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext {\n\t\tlet _localctx: UserDefinedTypeNameContext = new UserDefinedTypeNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 74, SolidityParser.RULE_userDefinedTypeName);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 583;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 588;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 60, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 584;\n\t\t\t\t\tthis.match(SolidityParser.T__36);\n\t\t\t\t\tthis.state = 585;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 590;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 60, this._ctx);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic mappingKey(): MappingKeyContext {\n\t\tlet _localctx: MappingKeyContext = new MappingKeyContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 76, SolidityParser.RULE_mappingKey);\n\t\ttry {\n\t\t\tthis.state = 593;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 591;\n\t\t\t\tthis.elementaryTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 592;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic mapping(): MappingContext {\n\t\tlet _localctx: MappingContext = new MappingContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 78, SolidityParser.RULE_mapping);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 595;\n\t\t\tthis.match(SolidityParser.T__37);\n\t\t\tthis.state = 596;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 597;\n\t\t\tthis.mappingKey();\n\t\t\tthis.state = 598;\n\t\t\tthis.match(SolidityParser.T__38);\n\t\t\tthis.state = 599;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 600;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionTypeName(): FunctionTypeNameContext {\n\t\tlet _localctx: FunctionTypeNameContext = new FunctionTypeNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 80, SolidityParser.RULE_functionTypeName);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 602;\n\t\t\tthis.match(SolidityParser.T__29);\n\t\t\tthis.state = 603;\n\t\t\tthis.functionTypeParameterList();\n\t\t\tthis.state = 609;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 63, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 607;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\t\tcase SolidityParser.InternalKeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 604;\n\t\t\t\t\t\tthis.match(SolidityParser.InternalKeyword);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SolidityParser.ExternalKeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 605;\n\t\t\t\t\t\tthis.match(SolidityParser.ExternalKeyword);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SolidityParser.ConstantKeyword:\n\t\t\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\t\t\tcase SolidityParser.PureKeyword:\n\t\t\t\t\tcase SolidityParser.ViewKeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 606;\n\t\t\t\t\t\tthis.stateMutability();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 611;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 63, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 614;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 64, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 612;\n\t\t\t\tthis.match(SolidityParser.T__30);\n\t\t\t\tthis.state = 613;\n\t\t\t\tthis.functionTypeParameterList();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic storageLocation(): StorageLocationContext {\n\t\tlet _localctx: StorageLocationContext = new StorageLocationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 82, SolidityParser.RULE_storageLocation);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 616;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 40)) & ~0x1F) === 0 && ((1 << (_la - 40)) & ((1 << (SolidityParser.T__39 - 40)) | (1 << (SolidityParser.T__40 - 40)) | (1 << (SolidityParser.T__41 - 40)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic stateMutability(): StateMutabilityContext {\n\t\tlet _localctx: StateMutabilityContext = new StateMutabilityContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 84, SolidityParser.RULE_stateMutability);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 618;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 111)) & ~0x1F) === 0 && ((1 << (_la - 111)) & ((1 << (SolidityParser.ConstantKeyword - 111)) | (1 << (SolidityParser.PayableKeyword - 111)) | (1 << (SolidityParser.PureKeyword - 111)) | (1 << (SolidityParser.ViewKeyword - 111)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic block(): BlockContext {\n\t\tlet _localctx: BlockContext = new BlockContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 86, SolidityParser.RULE_block);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 620;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 624;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__14 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__26 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__42 - 38)) | (1 << (SolidityParser.T__44 - 38)) | (1 << (SolidityParser.T__46 - 38)) | (1 << (SolidityParser.T__47 - 38)) | (1 << (SolidityParser.T__48 - 38)) | (1 << (SolidityParser.T__49 - 38)) | (1 << (SolidityParser.T__50 - 38)) | (1 << (SolidityParser.T__51 - 38)) | (1 << (SolidityParser.T__52 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.BreakKeyword - 96)) | (1 << (SolidityParser.ContinueKeyword - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 621;\n\t\t\t\tthis.statement();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 626;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 627;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic statement(): StatementContext {\n\t\tlet _localctx: StatementContext = new StatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 88, SolidityParser.RULE_statement);\n\t\ttry {\n\t\t\tthis.state = 644;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 66, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 629;\n\t\t\t\tthis.ifStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 630;\n\t\t\t\tthis.tryStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 631;\n\t\t\t\tthis.whileStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 632;\n\t\t\t\tthis.forStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 633;\n\t\t\t\tthis.block();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 634;\n\t\t\t\tthis.inlineAssemblyStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 635;\n\t\t\t\tthis.doWhileStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 636;\n\t\t\t\tthis.continueStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 637;\n\t\t\t\tthis.breakStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 10:\n\t\t\t\tthis.enterOuterAlt(_localctx, 10);\n\t\t\t\t{\n\t\t\t\tthis.state = 638;\n\t\t\t\tthis.returnStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 11:\n\t\t\t\tthis.enterOuterAlt(_localctx, 11);\n\t\t\t\t{\n\t\t\t\tthis.state = 639;\n\t\t\t\tthis.throwStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 12:\n\t\t\t\tthis.enterOuterAlt(_localctx, 12);\n\t\t\t\t{\n\t\t\t\tthis.state = 640;\n\t\t\t\tthis.emitStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 13:\n\t\t\t\tthis.enterOuterAlt(_localctx, 13);\n\t\t\t\t{\n\t\t\t\tthis.state = 641;\n\t\t\t\tthis.simpleStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 14);\n\t\t\t\t{\n\t\t\t\tthis.state = 642;\n\t\t\t\tthis.uncheckedStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 15:\n\t\t\t\tthis.enterOuterAlt(_localctx, 15);\n\t\t\t\t{\n\t\t\t\tthis.state = 643;\n\t\t\t\tthis.revertStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic expressionStatement(): ExpressionStatementContext {\n\t\tlet _localctx: ExpressionStatementContext = new ExpressionStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 90, SolidityParser.RULE_expressionStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 646;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 647;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic ifStatement(): IfStatementContext {\n\t\tlet _localctx: IfStatementContext = new IfStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 92, SolidityParser.RULE_ifStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 649;\n\t\t\tthis.match(SolidityParser.T__42);\n\t\t\tthis.state = 650;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 651;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 652;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 653;\n\t\t\tthis.statement();\n\t\t\tthis.state = 656;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 67, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 654;\n\t\t\t\tthis.match(SolidityParser.T__43);\n\t\t\t\tthis.state = 655;\n\t\t\t\tthis.statement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic tryStatement(): TryStatementContext {\n\t\tlet _localctx: TryStatementContext = new TryStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 94, SolidityParser.RULE_tryStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 658;\n\t\t\tthis.match(SolidityParser.T__44);\n\t\t\tthis.state = 659;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 661;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__30) {\n\t\t\t\t{\n\t\t\t\tthis.state = 660;\n\t\t\t\tthis.returnParameters();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 663;\n\t\t\tthis.block();\n\t\t\tthis.state = 665;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tdo {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 664;\n\t\t\t\tthis.catchClause();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 667;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t} while (_la === SolidityParser.T__45);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic catchClause(): CatchClauseContext {\n\t\tlet _localctx: CatchClauseContext = new CatchClauseContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 96, SolidityParser.RULE_catchClause);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 669;\n\t\t\tthis.match(SolidityParser.T__45);\n\t\t\tthis.state = 674;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__22) | (1 << SolidityParser.T__24))) !== 0) || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 671;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 670;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 673;\n\t\t\t\tthis.parameterList();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 676;\n\t\t\tthis.block();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic whileStatement(): WhileStatementContext {\n\t\tlet _localctx: WhileStatementContext = new WhileStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 98, SolidityParser.RULE_whileStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 678;\n\t\t\tthis.match(SolidityParser.T__46);\n\t\t\tthis.state = 679;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 680;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 681;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 682;\n\t\t\tthis.statement();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic simpleStatement(): SimpleStatementContext {\n\t\tlet _localctx: SimpleStatementContext = new SimpleStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 100, SolidityParser.RULE_simpleStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 686;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 72, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 684;\n\t\t\t\tthis.variableDeclarationStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 685;\n\t\t\t\tthis.expressionStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic uncheckedStatement(): UncheckedStatementContext {\n\t\tlet _localctx: UncheckedStatementContext = new UncheckedStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 102, SolidityParser.RULE_uncheckedStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 688;\n\t\t\tthis.match(SolidityParser.T__47);\n\t\t\tthis.state = 689;\n\t\t\tthis.block();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic forStatement(): ForStatementContext {\n\t\tlet _localctx: ForStatementContext = new ForStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 104, SolidityParser.RULE_forStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 691;\n\t\t\tthis.match(SolidityParser.T__26);\n\t\t\tthis.state = 692;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 695;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__5:\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__22:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__33:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__58:\n\t\t\tcase SolidityParser.T__59:\n\t\t\tcase SolidityParser.T__60:\n\t\t\tcase SolidityParser.T__62:\n\t\t\tcase SolidityParser.T__63:\n\t\t\tcase SolidityParser.T__64:\n\t\t\tcase SolidityParser.T__65:\n\t\t\tcase SolidityParser.T__66:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.BooleanLiteral:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.TypeKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 693;\n\t\t\t\tthis.simpleStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 694;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 699;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__5:\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__22:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__33:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__58:\n\t\t\tcase SolidityParser.T__59:\n\t\t\tcase SolidityParser.T__60:\n\t\t\tcase SolidityParser.T__62:\n\t\t\tcase SolidityParser.T__63:\n\t\t\tcase SolidityParser.T__64:\n\t\t\tcase SolidityParser.T__65:\n\t\t\tcase SolidityParser.T__66:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.BooleanLiteral:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.TypeKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 697;\n\t\t\t\tthis.expressionStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 698;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 702;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 701;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 704;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 705;\n\t\t\tthis.statement();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic inlineAssemblyStatement(): InlineAssemblyStatementContext {\n\t\tlet _localctx: InlineAssemblyStatementContext = new InlineAssemblyStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 106, SolidityParser.RULE_inlineAssemblyStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 707;\n\t\t\tthis.match(SolidityParser.T__48);\n\t\t\tthis.state = 709;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.StringLiteralFragment) {\n\t\t\t\t{\n\t\t\t\tthis.state = 708;\n\t\t\t\tthis.match(SolidityParser.StringLiteralFragment);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 715;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 711;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 712;\n\t\t\t\tthis.inlineAssemblyStatementFlag();\n\t\t\t\tthis.state = 713;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 717;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic inlineAssemblyStatementFlag(): InlineAssemblyStatementFlagContext {\n\t\tlet _localctx: InlineAssemblyStatementFlagContext = new InlineAssemblyStatementFlagContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 108, SolidityParser.RULE_inlineAssemblyStatementFlag);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 719;\n\t\t\tthis.stringLiteral();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic doWhileStatement(): DoWhileStatementContext {\n\t\tlet _localctx: DoWhileStatementContext = new DoWhileStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 110, SolidityParser.RULE_doWhileStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 721;\n\t\t\tthis.match(SolidityParser.T__49);\n\t\t\tthis.state = 722;\n\t\t\tthis.statement();\n\t\t\tthis.state = 723;\n\t\t\tthis.match(SolidityParser.T__46);\n\t\t\tthis.state = 724;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 725;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 726;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 727;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic continueStatement(): ContinueStatementContext {\n\t\tlet _localctx: ContinueStatementContext = new ContinueStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 112, SolidityParser.RULE_continueStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 729;\n\t\t\tthis.match(SolidityParser.ContinueKeyword);\n\t\t\tthis.state = 730;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic breakStatement(): BreakStatementContext {\n\t\tlet _localctx: BreakStatementContext = new BreakStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 114, SolidityParser.RULE_breakStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 732;\n\t\t\tthis.match(SolidityParser.BreakKeyword);\n\t\t\tthis.state = 733;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic returnStatement(): ReturnStatementContext {\n\t\tlet _localctx: ReturnStatementContext = new ReturnStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 116, SolidityParser.RULE_returnStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 735;\n\t\t\tthis.match(SolidityParser.T__50);\n\t\t\tthis.state = 737;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 736;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 739;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic throwStatement(): ThrowStatementContext {\n\t\tlet _localctx: ThrowStatementContext = new ThrowStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 118, SolidityParser.RULE_throwStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 741;\n\t\t\tthis.match(SolidityParser.T__51);\n\t\t\tthis.state = 742;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic emitStatement(): EmitStatementContext {\n\t\tlet _localctx: EmitStatementContext = new EmitStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 120, SolidityParser.RULE_emitStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 744;\n\t\t\tthis.match(SolidityParser.T__52);\n\t\t\tthis.state = 745;\n\t\t\tthis.functionCall();\n\t\t\tthis.state = 746;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic revertStatement(): RevertStatementContext {\n\t\tlet _localctx: RevertStatementContext = new RevertStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 122, SolidityParser.RULE_revertStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 748;\n\t\t\tthis.match(SolidityParser.T__53);\n\t\t\tthis.state = 749;\n\t\t\tthis.functionCall();\n\t\t\tthis.state = 750;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic variableDeclarationStatement(): VariableDeclarationStatementContext {\n\t\tlet _localctx: VariableDeclarationStatementContext = new VariableDeclarationStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 124, SolidityParser.RULE_variableDeclarationStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 759;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 79, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 752;\n\t\t\t\tthis.match(SolidityParser.T__54);\n\t\t\t\tthis.state = 753;\n\t\t\t\tthis.identifierList();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 754;\n\t\t\t\tthis.variableDeclaration();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t{\n\t\t\t\tthis.state = 755;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 756;\n\t\t\t\tthis.variableDeclarationList();\n\t\t\t\tthis.state = 757;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.state = 763;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__10) {\n\t\t\t\t{\n\t\t\t\tthis.state = 761;\n\t\t\t\tthis.match(SolidityParser.T__10);\n\t\t\t\tthis.state = 762;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 765;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic variableDeclarationList(): VariableDeclarationListContext {\n\t\tlet _localctx: VariableDeclarationListContext = new VariableDeclarationListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 126, SolidityParser.RULE_variableDeclarationList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 768;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 767;\n\t\t\t\tthis.variableDeclaration();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 776;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 770;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 772;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 771;\n\t\t\t\t\tthis.variableDeclaration();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 778;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic identifierList(): IdentifierListContext {\n\t\tlet _localctx: IdentifierListContext = new IdentifierListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 128, SolidityParser.RULE_identifierList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 779;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 786;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 85, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 781;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 780;\n\t\t\t\t\t\tthis.identifier();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.state = 783;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 788;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 85, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 790;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 789;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 792;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic elementaryTypeName(): ElementaryTypeNameContext {\n\t\tlet _localctx: ElementaryTypeNameContext = new ElementaryTypeNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 130, SolidityParser.RULE_elementaryTypeName);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 794;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 98)) & ~0x1F) === 0 && ((1 << (_la - 98)) & ((1 << (SolidityParser.Int - 98)) | (1 << (SolidityParser.Uint - 98)) | (1 << (SolidityParser.Byte - 98)) | (1 << (SolidityParser.Fixed - 98)) | (1 << (SolidityParser.Ufixed - 98)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic expression(): ExpressionContext;\n\tpublic expression(_p: number): ExpressionContext;\n\t// @RuleVersion(0)\n\tpublic expression(_p?: number): ExpressionContext {\n\t\tif (_p === undefined) {\n\t\t\t_p = 0;\n\t\t}\n\n\t\tlet _parentctx: ParserRuleContext = this._ctx;\n\t\tlet _parentState: number = this.state;\n\t\tlet _localctx: ExpressionContext = new ExpressionContext(this._ctx, _parentState);\n\t\tlet _prevctx: ExpressionContext = _localctx;\n\t\tlet _startState: number = 132;\n\t\tthis.enterRecursionRule(_localctx, 132, SolidityParser.RULE_expression, _p);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 814;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 87, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 797;\n\t\t\t\tthis.match(SolidityParser.T__60);\n\t\t\t\tthis.state = 798;\n\t\t\t\tthis.typeName(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 799;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 800;\n\t\t\t\tthis.expression(0);\n\t\t\t\tthis.state = 801;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t{\n\t\t\t\tthis.state = 803;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(_la === SolidityParser.T__58 || _la === SolidityParser.T__59)) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\tthis.state = 804;\n\t\t\t\tthis.expression(19);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\t{\n\t\t\t\tthis.state = 805;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(_la === SolidityParser.T__62 || _la === SolidityParser.T__63)) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\tthis.state = 806;\n\t\t\t\tthis.expression(18);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\t{\n\t\t\t\tthis.state = 807;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(_la === SolidityParser.T__64 || _la === SolidityParser.T__65)) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\tthis.state = 808;\n\t\t\t\tthis.expression(17);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\t{\n\t\t\t\tthis.state = 809;\n\t\t\t\tthis.match(SolidityParser.T__66);\n\t\t\t\tthis.state = 810;\n\t\t\t\tthis.expression(16);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\t{\n\t\t\t\tthis.state = 811;\n\t\t\t\tthis.match(SolidityParser.T__5);\n\t\t\t\tthis.state = 812;\n\t\t\t\tthis.expression(15);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\t{\n\t\t\t\tthis.state = 813;\n\t\t\t\tthis.primaryExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis._ctx._stop = this._input.tryLT(-1);\n\t\t\tthis.state = 890;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 91, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\tif (this._parseListeners != null) {\n\t\t\t\t\t\tthis.triggerExitRuleEvent();\n\t\t\t\t\t}\n\t\t\t\t\t_prevctx = _localctx;\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 888;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 90, this._ctx) ) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 816;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 14))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 14)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 817;\n\t\t\t\t\t\tthis.match(SolidityParser.T__67);\n\t\t\t\t\t\tthis.state = 818;\n\t\t\t\t\t\tthis.expression(15);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 819;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 13))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 13)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 820;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__2 || _la === SolidityParser.T__68 || _la === SolidityParser.T__69)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 821;\n\t\t\t\t\t\tthis.expression(14);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 822;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 12))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 12)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 823;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__62 || _la === SolidityParser.T__63)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 824;\n\t\t\t\t\t\tthis.expression(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 825;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 11))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 11)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 826;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__70 || _la === SolidityParser.T__71)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 827;\n\t\t\t\t\t\tthis.expression(12);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 828;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 10))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 10)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 829;\n\t\t\t\t\t\tthis.match(SolidityParser.T__72);\n\t\t\t\t\t\tthis.state = 830;\n\t\t\t\t\t\tthis.expression(11);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 831;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 9))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 9)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 832;\n\t\t\t\t\t\tthis.match(SolidityParser.T__4);\n\t\t\t\t\t\tthis.state = 833;\n\t\t\t\t\t\tthis.expression(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 834;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 8))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 8)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 835;\n\t\t\t\t\t\tthis.match(SolidityParser.T__73);\n\t\t\t\t\t\tthis.state = 836;\n\t\t\t\t\t\tthis.expression(9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 837;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 7))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 7)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 838;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9))) !== 0))) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 839;\n\t\t\t\t\t\tthis.expression(8);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 9:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 840;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 6))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 6)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 841;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__74 || _la === SolidityParser.T__75)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 842;\n\t\t\t\t\t\tthis.expression(7);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 843;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 5))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 5)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 844;\n\t\t\t\t\t\tthis.match(SolidityParser.T__76);\n\t\t\t\t\t\tthis.state = 845;\n\t\t\t\t\t\tthis.expression(6);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 846;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 4))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 4)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 847;\n\t\t\t\t\t\tthis.match(SolidityParser.T__3);\n\t\t\t\t\t\tthis.state = 848;\n\t\t\t\t\t\tthis.expression(5);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 849;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 3))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 3)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 850;\n\t\t\t\t\t\tthis.match(SolidityParser.T__77);\n\t\t\t\t\t\tthis.state = 851;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\tthis.state = 852;\n\t\t\t\t\t\tthis.match(SolidityParser.T__61);\n\t\t\t\t\t\tthis.state = 853;\n\t\t\t\t\t\tthis.expression(4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 13:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 855;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 2))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 2)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 856;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__10 || ((((_la - 79)) & ~0x1F) === 0 && ((1 << (_la - 79)) & ((1 << (SolidityParser.T__78 - 79)) | (1 << (SolidityParser.T__79 - 79)) | (1 << (SolidityParser.T__80 - 79)) | (1 << (SolidityParser.T__81 - 79)) | (1 << (SolidityParser.T__82 - 79)) | (1 << (SolidityParser.T__83 - 79)) | (1 << (SolidityParser.T__84 - 79)) | (1 << (SolidityParser.T__85 - 79)) | (1 << (SolidityParser.T__86 - 79)) | (1 << (SolidityParser.T__87 - 79)))) !== 0))) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 857;\n\t\t\t\t\t\tthis.expression(3);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 858;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 27))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 27)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 859;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__58 || _la === SolidityParser.T__59)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 15:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 860;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 25))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 25)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 861;\n\t\t\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\t\t\tthis.state = 862;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\tthis.state = 863;\n\t\t\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 865;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 24))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 24)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 866;\n\t\t\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\t\t\tthis.state = 868;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.state = 867;\n\t\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.state = 870;\n\t\t\t\t\t\tthis.match(SolidityParser.T__61);\n\t\t\t\t\t\tthis.state = 872;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.state = 871;\n\t\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.state = 874;\n\t\t\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 17:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 875;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 23))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 23)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 876;\n\t\t\t\t\t\tthis.match(SolidityParser.T__36);\n\t\t\t\t\t\tthis.state = 877;\n\t\t\t\t\t\tthis.identifier();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 878;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 22))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 22)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 879;\n\t\t\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\t\t\tthis.state = 880;\n\t\t\t\t\t\tthis.nameValueList();\n\t\t\t\t\t\tthis.state = 881;\n\t\t\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 19:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 883;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 21))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 21)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 884;\n\t\t\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\t\t\tthis.state = 885;\n\t\t\t\t\t\tthis.functionCallArguments();\n\t\t\t\t\t\tthis.state = 886;\n\t\t\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 892;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 91, this._ctx);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.unrollRecursionContexts(_parentctx);\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic primaryExpression(): PrimaryExpressionContext {\n\t\tlet _localctx: PrimaryExpressionContext = new PrimaryExpressionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 134, SolidityParser.RULE_primaryExpression);\n\t\ttry {\n\t\t\tthis.state = 902;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 92, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 893;\n\t\t\t\tthis.match(SolidityParser.BooleanLiteral);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 894;\n\t\t\t\tthis.numberLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 895;\n\t\t\t\tthis.hexLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 896;\n\t\t\t\tthis.stringLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 897;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 898;\n\t\t\t\tthis.match(SolidityParser.TypeKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 899;\n\t\t\t\tthis.match(SolidityParser.PayableKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 900;\n\t\t\t\tthis.tupleExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 901;\n\t\t\t\tthis.typeName(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic expressionList(): ExpressionListContext {\n\t\tlet _localctx: ExpressionListContext = new ExpressionListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 136, SolidityParser.RULE_expressionList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 904;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 909;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 905;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 906;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 911;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic nameValueList(): NameValueListContext {\n\t\tlet _localctx: NameValueListContext = new NameValueListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 138, SolidityParser.RULE_nameValueList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 912;\n\t\t\tthis.nameValue();\n\t\t\tthis.state = 917;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 94, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 913;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 914;\n\t\t\t\t\tthis.nameValue();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 919;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 94, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 921;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\tthis.state = 920;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic nameValue(): NameValueContext {\n\t\tlet _localctx: NameValueContext = new NameValueContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 140, SolidityParser.RULE_nameValue);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 923;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 924;\n\t\t\tthis.match(SolidityParser.T__61);\n\t\t\tthis.state = 925;\n\t\t\tthis.expression(0);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionCallArguments(): FunctionCallArgumentsContext {\n\t\tlet _localctx: FunctionCallArgumentsContext = new FunctionCallArgumentsContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 142, SolidityParser.RULE_functionCallArguments);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 935;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 927;\n\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\tthis.state = 929;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 928;\n\t\t\t\t\tthis.nameValueList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 931;\n\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__5:\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__22:\n\t\t\tcase SolidityParser.T__23:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__33:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__58:\n\t\t\tcase SolidityParser.T__59:\n\t\t\tcase SolidityParser.T__60:\n\t\t\tcase SolidityParser.T__62:\n\t\t\tcase SolidityParser.T__63:\n\t\t\tcase SolidityParser.T__64:\n\t\t\tcase SolidityParser.T__65:\n\t\t\tcase SolidityParser.T__66:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.BooleanLiteral:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.TypeKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 933;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 932;\n\t\t\t\t\tthis.expressionList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionCall(): FunctionCallContext {\n\t\tlet _localctx: FunctionCallContext = new FunctionCallContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 144, SolidityParser.RULE_functionCall);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 937;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 938;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 939;\n\t\t\tthis.functionCallArguments();\n\t\t\tthis.state = 940;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\tlet _localctx: AssemblyBlockContext = new AssemblyBlockContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 146, SolidityParser.RULE_assemblyBlock);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 942;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 946;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__14) | (1 << SolidityParser.T__22) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__26) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__42 - 36)) | (1 << (SolidityParser.T__48 - 36)) | (1 << (SolidityParser.T__50 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 89)) & ~0x1F) === 0 && ((1 << (_la - 89)) & ((1 << (SolidityParser.T__88 - 89)) | (1 << (SolidityParser.T__91 - 89)) | (1 << (SolidityParser.T__95 - 89)) | (1 << (SolidityParser.DecimalNumber - 89)) | (1 << (SolidityParser.HexNumber - 89)) | (1 << (SolidityParser.HexLiteralFragment - 89)) | (1 << (SolidityParser.BreakKeyword - 89)) | (1 << (SolidityParser.ContinueKeyword - 89)) | (1 << (SolidityParser.LeaveKeyword - 89)) | (1 << (SolidityParser.PayableKeyword - 89)))) !== 0) || ((((_la - 126)) & ~0x1F) === 0 && ((1 << (_la - 126)) & ((1 << (SolidityParser.ConstructorKeyword - 126)) | (1 << (SolidityParser.ReceiveKeyword - 126)) | (1 << (SolidityParser.Identifier - 126)) | (1 << (SolidityParser.StringLiteralFragment - 126)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 943;\n\t\t\t\tthis.assemblyItem();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 948;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 949;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyItem(): AssemblyItemContext {\n\t\tlet _localctx: AssemblyItemContext = new AssemblyItemContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 148, SolidityParser.RULE_assemblyItem);\n\t\ttry {\n\t\t\tthis.state = 969;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 100, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 951;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 952;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 953;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 954;\n\t\t\t\tthis.assemblyLocalDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 955;\n\t\t\t\tthis.assemblyAssignment();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 956;\n\t\t\t\tthis.assemblyStackAssignment();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 957;\n\t\t\t\tthis.labelDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 958;\n\t\t\t\tthis.assemblySwitch();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 959;\n\t\t\t\tthis.assemblyFunctionDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 10:\n\t\t\t\tthis.enterOuterAlt(_localctx, 10);\n\t\t\t\t{\n\t\t\t\tthis.state = 960;\n\t\t\t\tthis.assemblyFor();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 11:\n\t\t\t\tthis.enterOuterAlt(_localctx, 11);\n\t\t\t\t{\n\t\t\t\tthis.state = 961;\n\t\t\t\tthis.assemblyIf();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 12:\n\t\t\t\tthis.enterOuterAlt(_localctx, 12);\n\t\t\t\t{\n\t\t\t\tthis.state = 962;\n\t\t\t\tthis.match(SolidityParser.BreakKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 13:\n\t\t\t\tthis.enterOuterAlt(_localctx, 13);\n\t\t\t\t{\n\t\t\t\tthis.state = 963;\n\t\t\t\tthis.match(SolidityParser.ContinueKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 14);\n\t\t\t\t{\n\t\t\t\tthis.state = 964;\n\t\t\t\tthis.match(SolidityParser.LeaveKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 15:\n\t\t\t\tthis.enterOuterAlt(_localctx, 15);\n\t\t\t\t{\n\t\t\t\tthis.state = 965;\n\t\t\t\tthis.subAssembly();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 16:\n\t\t\t\tthis.enterOuterAlt(_localctx, 16);\n\t\t\t\t{\n\t\t\t\tthis.state = 966;\n\t\t\t\tthis.numberLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 17:\n\t\t\t\tthis.enterOuterAlt(_localctx, 17);\n\t\t\t\t{\n\t\t\t\tthis.state = 967;\n\t\t\t\tthis.stringLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 18:\n\t\t\t\tthis.enterOuterAlt(_localctx, 18);\n\t\t\t\t{\n\t\t\t\tthis.state = 968;\n\t\t\t\tthis.hexLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\tlet _localctx: AssemblyExpressionContext = new AssemblyExpressionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 150, SolidityParser.RULE_assemblyExpression);\n\t\ttry {\n\t\t\tthis.state = 974;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 101, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 971;\n\t\t\t\tthis.assemblyCall();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 972;\n\t\t\t\tthis.assemblyLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 973;\n\t\t\t\tthis.assemblyMember();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyMember(): AssemblyMemberContext {\n\t\tlet _localctx: AssemblyMemberContext = new AssemblyMemberContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 152, SolidityParser.RULE_assemblyMember);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 976;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 977;\n\t\t\tthis.match(SolidityParser.T__36);\n\t\t\tthis.state = 978;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyCall(): AssemblyCallContext {\n\t\tlet _localctx: AssemblyCallContext = new AssemblyCallContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 154, SolidityParser.RULE_assemblyCall);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 984;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__50:\n\t\t\t\t{\n\t\t\t\tthis.state = 980;\n\t\t\t\tthis.match(SolidityParser.T__50);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__35:\n\t\t\t\t{\n\t\t\t\tthis.state = 981;\n\t\t\t\tthis.match(SolidityParser.T__35);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__57:\n\t\t\t\t{\n\t\t\t\tthis.state = 982;\n\t\t\t\tthis.match(SolidityParser.T__57);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\t{\n\t\t\t\tthis.state = 983;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 998;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 105, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 986;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 988;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__50 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 987;\n\t\t\t\t\tthis.assemblyExpression();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 994;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 990;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 991;\n\t\t\t\t\tthis.assemblyExpression();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 996;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 997;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyLocalDefinition(): AssemblyLocalDefinitionContext {\n\t\tlet _localctx: AssemblyLocalDefinitionContext = new AssemblyLocalDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 156, SolidityParser.RULE_assemblyLocalDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1000;\n\t\t\tthis.match(SolidityParser.T__88);\n\t\t\tthis.state = 1001;\n\t\t\tthis.assemblyIdentifierOrList();\n\t\t\tthis.state = 1004;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__89) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1002;\n\t\t\t\tthis.match(SolidityParser.T__89);\n\t\t\t\tthis.state = 1003;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyAssignment(): AssemblyAssignmentContext {\n\t\tlet _localctx: AssemblyAssignmentContext = new AssemblyAssignmentContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 158, SolidityParser.RULE_assemblyAssignment);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1006;\n\t\t\tthis.assemblyIdentifierOrList();\n\t\t\tthis.state = 1007;\n\t\t\tthis.match(SolidityParser.T__89);\n\t\t\tthis.state = 1008;\n\t\t\tthis.assemblyExpression();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyIdentifierOrList(): AssemblyIdentifierOrListContext {\n\t\tlet _localctx: AssemblyIdentifierOrListContext = new AssemblyIdentifierOrListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 160, SolidityParser.RULE_assemblyIdentifierOrList);\n\t\ttry {\n\t\t\tthis.state = 1016;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 107, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1010;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1011;\n\t\t\t\tthis.assemblyMember();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 1012;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 1013;\n\t\t\t\tthis.assemblyIdentifierList();\n\t\t\t\tthis.state = 1014;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext {\n\t\tlet _localctx: AssemblyIdentifierListContext = new AssemblyIdentifierListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 162, SolidityParser.RULE_assemblyIdentifierList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1018;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1023;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 1019;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 1020;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 1025;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyStackAssignment(): AssemblyStackAssignmentContext {\n\t\tlet _localctx: AssemblyStackAssignmentContext = new AssemblyStackAssignmentContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 164, SolidityParser.RULE_assemblyStackAssignment);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1026;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1027;\n\t\t\tthis.match(SolidityParser.T__90);\n\t\t\tthis.state = 1028;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic labelDefinition(): LabelDefinitionContext {\n\t\tlet _localctx: LabelDefinitionContext = new LabelDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 166, SolidityParser.RULE_labelDefinition);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1030;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1031;\n\t\t\tthis.match(SolidityParser.T__61);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblySwitch(): AssemblySwitchContext {\n\t\tlet _localctx: AssemblySwitchContext = new AssemblySwitchContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 168, SolidityParser.RULE_assemblySwitch);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1033;\n\t\t\tthis.match(SolidityParser.T__91);\n\t\t\tthis.state = 1034;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1038;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__92 || _la === SolidityParser.T__93) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 1035;\n\t\t\t\tthis.assemblyCase();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 1040;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyCase(): AssemblyCaseContext {\n\t\tlet _localctx: AssemblyCaseContext = new AssemblyCaseContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 170, SolidityParser.RULE_assemblyCase);\n\t\ttry {\n\t\t\tthis.state = 1047;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__92:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1041;\n\t\t\t\tthis.match(SolidityParser.T__92);\n\t\t\t\tthis.state = 1042;\n\t\t\t\tthis.assemblyLiteral();\n\t\t\t\tthis.state = 1043;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__93:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1045;\n\t\t\t\tthis.match(SolidityParser.T__93);\n\t\t\t\tthis.state = 1046;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyFunctionDefinition(): AssemblyFunctionDefinitionContext {\n\t\tlet _localctx: AssemblyFunctionDefinitionContext = new AssemblyFunctionDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 172, SolidityParser.RULE_assemblyFunctionDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1049;\n\t\t\tthis.match(SolidityParser.T__29);\n\t\t\tthis.state = 1050;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1051;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 1053;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1052;\n\t\t\t\tthis.assemblyIdentifierList();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 1055;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 1057;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__94) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1056;\n\t\t\t\tthis.assemblyFunctionReturns();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 1059;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyFunctionReturns(): AssemblyFunctionReturnsContext {\n\t\tlet _localctx: AssemblyFunctionReturnsContext = new AssemblyFunctionReturnsContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 174, SolidityParser.RULE_assemblyFunctionReturns);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\t{\n\t\t\tthis.state = 1061;\n\t\t\tthis.match(SolidityParser.T__94);\n\t\t\tthis.state = 1062;\n\t\t\tthis.assemblyIdentifierList();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyFor(): AssemblyForContext {\n\t\tlet _localctx: AssemblyForContext = new AssemblyForContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 176, SolidityParser.RULE_assemblyFor);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1064;\n\t\t\tthis.match(SolidityParser.T__26);\n\t\t\tthis.state = 1067;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 1065;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__50:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 1066;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 1069;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1072;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 1070;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__50:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 1071;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 1074;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyIf(): AssemblyIfContext {\n\t\tlet _localctx: AssemblyIfContext = new AssemblyIfContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 178, SolidityParser.RULE_assemblyIf);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1076;\n\t\t\tthis.match(SolidityParser.T__42);\n\t\t\tthis.state = 1077;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1078;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyLiteral(): AssemblyLiteralContext {\n\t\tlet _localctx: AssemblyLiteralContext = new AssemblyLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 180, SolidityParser.RULE_assemblyLiteral);\n\t\ttry {\n\t\t\tthis.state = 1084;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1080;\n\t\t\t\tthis.stringLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1081;\n\t\t\t\tthis.match(SolidityParser.DecimalNumber);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 1082;\n\t\t\t\tthis.match(SolidityParser.HexNumber);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 1083;\n\t\t\t\tthis.hexLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic subAssembly(): SubAssemblyContext {\n\t\tlet _localctx: SubAssemblyContext = new SubAssemblyContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 182, SolidityParser.RULE_subAssembly);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1086;\n\t\t\tthis.match(SolidityParser.T__48);\n\t\t\tthis.state = 1087;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1088;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic tupleExpression(): TupleExpressionContext {\n\t\tlet _localctx: TupleExpressionContext = new TupleExpressionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 184, SolidityParser.RULE_tupleExpression);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 1116;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__22:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1090;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\t{\n\t\t\t\tthis.state = 1092;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1091;\n\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 1100;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1094;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 1096;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 1095;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 1102;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 1103;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__33:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1104;\n\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\tthis.state = 1113;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1105;\n\t\t\t\t\tthis.expression(0);\n\t\t\t\t\tthis.state = 1110;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 1106;\n\t\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\t\tthis.state = 1107;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 1112;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 1115;\n\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic numberLiteral(): NumberLiteralContext {\n\t\tlet _localctx: NumberLiteralContext = new NumberLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 186, SolidityParser.RULE_numberLiteral);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1118;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(_la === SolidityParser.DecimalNumber || _la === SolidityParser.HexNumber)) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\tthis.state = 1120;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 122, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 1119;\n\t\t\t\tthis.match(SolidityParser.NumberUnit);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic identifier(): IdentifierContext {\n\t\tlet _localctx: IdentifierContext = new IdentifierContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 188, SolidityParser.RULE_identifier);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1122;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier)) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic hexLiteral(): HexLiteralContext {\n\t\tlet _localctx: HexLiteralContext = new HexLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 190, SolidityParser.RULE_hexLiteral);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1125;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = 1;\n\t\t\tdo {\n\t\t\t\tswitch (_alt) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1124;\n\t\t\t\t\tthis.match(SolidityParser.HexLiteralFragment);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\tthis.state = 1127;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 123, this._ctx);\n\t\t\t} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic overrideSpecifier(): OverrideSpecifierContext {\n\t\tlet _localctx: OverrideSpecifierContext = new OverrideSpecifierContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 192, SolidityParser.RULE_overrideSpecifier);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1129;\n\t\t\tthis.match(SolidityParser.T__96);\n\t\t\tthis.state = 1141;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1130;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 1131;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\tthis.state = 1136;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1132;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 1133;\n\t\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 1138;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 1139;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic stringLiteral(): StringLiteralContext {\n\t\tlet _localctx: StringLiteralContext = new StringLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 194, SolidityParser.RULE_stringLiteral);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1144;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = 1;\n\t\t\tdo {\n\t\t\t\tswitch (_alt) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1143;\n\t\t\t\t\tthis.match(SolidityParser.StringLiteralFragment);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\tthis.state = 1146;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 126, this._ctx);\n\t\t\t} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean {\n\t\tswitch (ruleIndex) {\n\t\tcase 36:\n\t\t\treturn this.typeName_sempred(_localctx as TypeNameContext, predIndex);\n\n\t\tcase 66:\n\t\t\treturn this.expression_sempred(_localctx as ExpressionContext, predIndex);\n\t\t}\n\t\treturn true;\n\t}\n\tprivate typeName_sempred(_localctx: TypeNameContext, predIndex: number): boolean {\n\t\tswitch (predIndex) {\n\t\tcase 0:\n\t\t\treturn this.precpred(this._ctx, 3);\n\t\t}\n\t\treturn true;\n\t}\n\tprivate expression_sempred(_localctx: ExpressionContext, predIndex: number): boolean {\n\t\tswitch (predIndex) {\n\t\tcase 1:\n\t\t\treturn this.precpred(this._ctx, 14);\n\n\t\tcase 2:\n\t\t\treturn this.precpred(this._ctx, 13);\n\n\t\tcase 3:\n\t\t\treturn this.precpred(this._ctx, 12);\n\n\t\tcase 4:\n\t\t\treturn this.precpred(this._ctx, 11);\n\n\t\tcase 5:\n\t\t\treturn this.precpred(this._ctx, 10);\n\n\t\tcase 6:\n\t\t\treturn this.precpred(this._ctx, 9);\n\n\t\tcase 7:\n\t\t\treturn this.precpred(this._ctx, 8);\n\n\t\tcase 8:\n\t\t\treturn this.precpred(this._ctx, 7);\n\n\t\tcase 9:\n\t\t\treturn this.precpred(this._ctx, 6);\n\n\t\tcase 10:\n\t\t\treturn this.precpred(this._ctx, 5);\n\n\t\tcase 11:\n\t\t\treturn this.precpred(this._ctx, 4);\n\n\t\tcase 12:\n\t\t\treturn this.precpred(this._ctx, 3);\n\n\t\tcase 13:\n\t\t\treturn this.precpred(this._ctx, 2);\n\n\t\tcase 14:\n\t\t\treturn this.precpred(this._ctx, 27);\n\n\t\tcase 15:\n\t\t\treturn this.precpred(this._ctx, 25);\n\n\t\tcase 16:\n\t\t\treturn this.precpred(this._ctx, 24);\n\n\t\tcase 17:\n\t\t\treturn this.precpred(this._ctx, 23);\n\n\t\tcase 18:\n\t\t\treturn this.precpred(this._ctx, 22);\n\n\t\tcase 19:\n\t\t\treturn this.precpred(this._ctx, 21);\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate static readonly _serializedATNSegments: number = 3;\n\tprivate static readonly _serializedATNSegment0: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x03\\x88\\u047F\\x04\" +\n\t\t\"\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\\x04\" +\n\t\t\"\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x04\\n\\t\\n\\x04\\v\\t\\v\\x04\\f\\t\\f\\x04\\r\\t\\r\" +\n\t\t\"\\x04\\x0E\\t\\x0E\\x04\\x0F\\t\\x0F\\x04\\x10\\t\\x10\\x04\\x11\\t\\x11\\x04\\x12\\t\\x12\" +\n\t\t\"\\x04\\x13\\t\\x13\\x04\\x14\\t\\x14\\x04\\x15\\t\\x15\\x04\\x16\\t\\x16\\x04\\x17\\t\\x17\" +\n\t\t\"\\x04\\x18\\t\\x18\\x04\\x19\\t\\x19\\x04\\x1A\\t\\x1A\\x04\\x1B\\t\\x1B\\x04\\x1C\\t\\x1C\" +\n\t\t\"\\x04\\x1D\\t\\x1D\\x04\\x1E\\t\\x1E\\x04\\x1F\\t\\x1F\\x04 \\t \\x04!\\t!\\x04\\\"\\t\\\"\\x04\" +\n\t\t\"#\\t#\\x04$\\t$\\x04%\\t%\\x04&\\t&\\x04\\'\\t\\'\\x04(\\t(\\x04)\\t)\\x04*\\t*\\x04+\\t\" +\n\t\t\"+\\x04,\\t,\\x04-\\t-\\x04.\\t.\\x04/\\t/\\x040\\t0\\x041\\t1\\x042\\t2\\x043\\t3\\x04\" +\n\t\t\"4\\t4\\x045\\t5\\x046\\t6\\x047\\t7\\x048\\t8\\x049\\t9\\x04:\\t:\\x04;\\t;\\x04<\\t<\\x04\" +\n\t\t\"=\\t=\\x04>\\t>\\x04?\\t?\\x04@\\t@\\x04A\\tA\\x04B\\tB\\x04C\\tC\\x04D\\tD\\x04E\\tE\\x04\" +\n\t\t\"F\\tF\\x04G\\tG\\x04H\\tH\\x04I\\tI\\x04J\\tJ\\x04K\\tK\\x04L\\tL\\x04M\\tM\\x04N\\tN\\x04\" +\n\t\t\"O\\tO\\x04P\\tP\\x04Q\\tQ\\x04R\\tR\\x04S\\tS\\x04T\\tT\\x04U\\tU\\x04V\\tV\\x04W\\tW\\x04\" +\n\t\t\"X\\tX\\x04Y\\tY\\x04Z\\tZ\\x04[\\t[\\x04\\\\\\t\\\\\\x04]\\t]\\x04^\\t^\\x04_\\t_\\x04`\\t\" +\n\t\t\"`\\x04a\\ta\\x04b\\tb\\x04c\\tc\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\" +\n\t\t\"\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x07\\x02\\xD1\\n\\x02\\f\\x02\\x0E\\x02\\xD4\" +\n\t\t\"\\v\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x04\" +\n\t\t\"\\x03\\x04\\x03\\x05\\x03\\x05\\x03\\x05\\x05\\x05\\xE2\\n\\x05\\x03\\x06\\x03\\x06\\x05\" +\n\t\t\"\\x06\\xE6\\n\\x06\\x03\\x06\\x07\\x06\\xE9\\n\\x06\\f\\x06\\x0E\\x06\\xEC\\v\\x06\\x03\\x07\" +\n\t\t\"\\x03\\x07\\x03\\b\\x05\\b\\xF1\\n\\b\\x03\\b\\x03\\b\\x05\\b\\xF5\\n\\b\\x03\\b\\x05\\b\\xF8\" +\n\t\t\"\\n\\b\\x03\\t\\x03\\t\\x03\\t\\x05\\t\\xFD\\n\\t\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x05\\n\\u0103\" +\n\t\t\"\\n\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x05\\n\\u010A\\n\\n\\x03\\n\\x03\\n\\x05\\n\\u010E\" +\n\t\t\"\\n\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x07\\n\\u0119\" +\n\t\t\"\\n\\n\\f\\n\\x0E\\n\\u011C\\v\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x05\\n\\u0123\\n\\n\" +\n\t\t\"\\x03\\v\\x03\\v\\x03\\f\\x05\\f\\u0128\\n\\f\\x03\\f\\x03\\f\\x03\\f\\x03\\f\\x03\\f\\x03\\f\" +\n\t\t\"\\x07\\f\\u0130\\n\\f\\f\\f\\x0E\\f\\u0133\\v\\f\\x05\\f\\u0135\\n\\f\\x03\\f\\x03\\f\\x07\\f\" +\n\t\t\"\\u0139\\n\\f\\f\\f\\x0E\\f\\u013C\\v\\f\\x03\\f\\x03\\f\\x03\\r\\x03\\r\\x03\\r\\x05\\r\\u0143\" +\n\t\t\"\\n\\r\\x03\\r\\x05\\r\\u0146\\n\\r\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\" +\n\t\t\"\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x05\\x0E\\u0151\\n\\x0E\\x03\\x0F\\x03\\x0F\\x03\\x0F\" +\n\t\t\"\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x07\\x0F\\u015A\\n\\x0F\\f\\x0F\\x0E\\x0F\\u015D\" +\n\t\t\"\\v\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x05\\x0F\\u0162\\n\\x0F\\x03\\x0F\\x03\\x0F\\x03\" +\n\t\t\"\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x11\\x03\\x11\\x03\" +\n\t\t\"\\x11\\x03\\x11\\x03\\x11\\x03\\x12\\x03\\x12\\x03\\x12\\x03\\x12\\x03\\x12\\x03\\x12\\x03\" +\n\t\t\"\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x05\\x13\\u017D\\n\\x13\\x03\\x13\\x05\\x13\" +\n\t\t\"\\u0180\\n\\x13\\x03\\x13\\x03\\x13\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x07\" +\n\t\t\"\\x14\\u0189\\n\\x14\\f\\x14\\x0E\\x14\\u018C\\v\\x14\\x03\\x14\\x03\\x14\\x05\\x14\\u0190\" +\n\t\t\"\\n\\x14\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\" +\n\t\t\"\\x07\\x15\\u019A\\n\\x15\\f\\x15\\x0E\\x15\\u019D\\v\\x15\\x05\\x15\\u019F\\n\\x15\\x03\" +\n\t\t\"\\x15\\x03\\x15\\x03\\x16\\x03\\x16\\x03\\x16\\x05\\x16\\u01A6\\n\\x16\\x03\\x16\\x03\\x16\" +\n\t\t\"\\x07\\x16\\u01AA\\n\\x16\\f\\x16\\x0E\\x16\\u01AD\\v\\x16\\x03\\x16\\x03\\x16\\x05\\x16\" +\n\t\t\"\\u01B1\\n\\x16\\x03\\x17\\x03\\x17\\x03\\x17\\x05\\x17\\u01B6\\n\\x17\\x03\\x17\\x05\\x17\" +\n\t\t\"\\u01B9\\n\\x17\\x03\\x18\\x03\\x18\\x03\\x18\\x03\\x18\\x05\\x18\\u01BF\\n\\x18\\x03\\x18\" +\n\t\t\"\\x03\\x18\\x05\\x18\\u01C3\\n\\x18\\x03\\x19\\x03\\x19\\x05\\x19\\u01C7\\n\\x19\\x03\\x19\" +\n\t\t\"\\x03\\x19\\x03\\x19\\x05\\x19\\u01CC\\n\\x19\\x03\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1B\\x03\" +\n\t\t\"\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x07\\x1B\\u01D9\\n\\x1B\" +\n\t\t\"\\f\\x1B\\x0E\\x1B\\u01DC\\v\\x1B\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x05\\x1C\\u01E2\" +\n\t\t\"\\n\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1D\\x03\\x1D\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\" +\n\t\t\"\\x05\\x1E\\u01EC\\n\\x1E\\x03\\x1E\\x03\\x1E\\x07\\x1E\\u01F0\\n\\x1E\\f\\x1E\\x0E\\x1E\" +\n\t\t\"\\u01F3\\v\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x07\\x1F\\u01FB\" +\n\t\t\"\\n\\x1F\\f\\x1F\\x0E\\x1F\\u01FE\\v\\x1F\\x05\\x1F\\u0200\\n\\x1F\\x03\\x1F\\x03\\x1F\\x03\" +\n\t\t\" \\x03 \\x05 \\u0206\\n \\x03 \\x05 \\u0209\\n \\x03!\\x03!\\x03!\\x03!\\x07!\\u020F\" +\n\t\t\"\\n!\\f!\\x0E!\\u0212\\v!\\x05!\\u0214\\n!\\x03!\\x03!\\x03\\\"\\x03\\\"\\x05\\\"\\u021A\\n\" +\n\t\t\"\\\"\\x03\\\"\\x05\\\"\\u021D\\n\\\"\\x03#\\x03#\\x03#\\x03#\\x07#\\u0223\\n#\\f#\\x0E#\\u0226\" +\n\t\t\"\\v#\\x05#\\u0228\\n#\\x03#\\x03#\\x03$\\x03$\\x05$\\u022E\\n$\\x03%\\x03%\\x05%\\u0232\" +\n\t\t\"\\n%\\x03%\\x03%\\x03&\\x03&\\x03&\\x03&\\x03&\\x03&\\x03&\\x05&\\u023D\\n&\\x03&\\x03\" +\n\t\t\"&\\x03&\\x05&\\u0242\\n&\\x03&\\x07&\\u0245\\n&\\f&\\x0E&\\u0248\\v&\\x03\\'\\x03\\'\\x03\" +\n\t\t\"\\'\\x07\\'\\u024D\\n\\'\\f\\'\\x0E\\'\\u0250\\v\\'\\x03(\\x03(\\x05(\\u0254\\n(\\x03)\\x03\" +\n\t\t\")\\x03)\\x03)\\x03)\\x03)\\x03)\\x03*\\x03*\\x03*\\x03*\\x03*\\x07*\\u0262\\n*\\f*\\x0E\" +\n\t\t\"*\\u0265\\v*\\x03*\\x03*\\x05*\\u0269\\n*\\x03+\\x03+\\x03,\\x03,\\x03-\\x03-\\x07-\" +\n\t\t\"\\u0271\\n-\\f-\\x0E-\\u0274\\v-\\x03-\\x03-\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x03\" +\n\t\t\".\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x05.\\u0287\\n.\\x03/\\x03/\\x03\" +\n\t\t\"/\\x030\\x030\\x030\\x030\\x030\\x030\\x030\\x050\\u0293\\n0\\x031\\x031\\x031\\x05\" +\n\t\t\"1\\u0298\\n1\\x031\\x031\\x061\\u029C\\n1\\r1\\x0E1\\u029D\\x032\\x032\\x052\\u02A2\" +\n\t\t\"\\n2\\x032\\x052\\u02A5\\n2\\x032\\x032\\x033\\x033\\x033\\x033\\x033\\x033\\x034\\x03\" +\n\t\t\"4\\x054\\u02B1\\n4\\x035\\x035\\x035\\x036\\x036\\x036\\x036\\x056\\u02BA\\n6\\x036\" +\n\t\t\"\\x036\\x056\\u02BE\\n6\\x036\\x056\\u02C1\\n6\\x036\\x036\\x036\\x037\\x037\\x057\\u02C8\" +\n\t\t\"\\n7\\x037\\x037\\x037\\x037\\x057\\u02CE\\n7\\x037\\x037\\x038\\x038\\x039\\x039\\x03\" +\n\t\t\"9\\x039\\x039\\x039\\x039\\x039\\x03:\\x03:\\x03:\\x03;\\x03;\\x03;\\x03<\\x03<\\x05\" +\n\t\t\"<\\u02E4\\n<\\x03<\\x03<\\x03=\\x03=\\x03=\\x03>\\x03>\\x03>\\x03>\\x03?\\x03?\\x03\" +\n\t\t\"?\\x03?\\x03@\\x03@\\x03@\\x03@\\x03@\\x03@\\x03@\\x05@\\u02FA\\n@\\x03@\\x03@\\x05\" +\n\t\t\"@\\u02FE\\n@\\x03@\\x03@\\x03A\\x05A\\u0303\\nA\\x03A\\x03A\\x05A\\u0307\\nA\\x07A\\u0309\" +\n\t\t\"\\nA\\fA\\x0EA\\u030C\\vA\\x03B\\x03B\\x05B\\u0310\\nB\\x03B\\x07B\\u0313\\nB\\fB\\x0E\" +\n\t\t\"B\\u0316\\vB\\x03B\\x05B\\u0319\\nB\\x03B\\x03B\\x03C\\x03C\\x03D\\x03D\\x03D\\x03D\" +\n\t\t\"\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x05D\\u0331\\nD\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x05\" +\n\t\t\"D\\u0367\\nD\\x03D\\x03D\\x05D\\u036B\\nD\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\" +\n\t\t\"\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x07D\\u037B\\nD\\fD\\x0ED\\u037E\\vD\\x03\" +\n\t\t\"E\\x03E\\x03E\\x03E\\x03E\\x03E\\x03E\\x03E\\x03E\\x05E\\u0389\\nE\\x03F\\x03F\\x03\" +\n\t\t\"F\\x07F\\u038E\\nF\\fF\\x0EF\\u0391\\vF\\x03G\\x03G\\x03G\\x07G\\u0396\\nG\\fG\\x0EG\" +\n\t\t\"\\u0399\\vG\\x03G\\x05G\\u039C\\nG\\x03H\\x03H\\x03H\\x03H\\x03I\\x03I\\x05I\\u03A4\" +\n\t\t\"\\nI\\x03I\\x03I\\x05I\\u03A8\\nI\\x05I\\u03AA\\nI\\x03J\\x03J\\x03J\\x03J\\x03J\\x03\" +\n\t\t\"K\\x03K\\x07K\\u03B3\\nK\\fK\\x0EK\\u03B6\\vK\\x03K\\x03K\\x03L\\x03L\\x03L\\x03L\\x03\" +\n\t\t\"L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x05\" +\n\t\t\"L\\u03CC\\nL\\x03M\\x03M\\x03M\\x05M\\u03D1\\nM\\x03N\\x03N\\x03N\\x03N\\x03O\\x03O\" +\n\t\t\"\\x03O\\x03O\\x05O\\u03DB\\nO\\x03O\\x03O\\x05O\\u03DF\\nO\\x03O\\x03O\\x07O\\u03E3\" +\n\t\t\"\\nO\\fO\\x0EO\\u03E6\\vO\\x03O\\x05O\\u03E9\\nO\\x03P\\x03P\\x03P\\x03P\\x05P\\u03EF\" +\n\t\t\"\\nP\\x03Q\\x03Q\\x03Q\\x03Q\\x03R\\x03R\\x03R\\x03R\\x03R\\x03R\\x05R\\u03FB\\nR\\x03\" +\n\t\t\"S\\x03S\\x03S\\x07S\\u0400\\nS\\fS\\x0ES\\u0403\\vS\\x03T\\x03T\\x03T\\x03T\\x03U\\x03\" +\n\t\t\"U\\x03U\\x03V\\x03V\\x03V\\x07V\\u040F\\nV\\fV\\x0EV\\u0412\\vV\\x03W\\x03W\\x03W\\x03\" +\n\t\t\"W\\x03W\\x03W\\x05W\\u041A\\nW\\x03X\\x03X\\x03X\\x03X\\x05X\\u0420\\nX\\x03X\\x03X\" +\n\t\t\"\\x05X\\u0424\\nX\\x03X\\x03X\\x03Y\\x03Y\\x03Y\\x03Z\\x03Z\\x03Z\\x05Z\\u042E\\nZ\\x03\" +\n\t\t\"Z\\x03Z\\x03Z\\x05Z\\u0433\\nZ\\x03Z\\x03Z\\x03[\\x03[\\x03[\\x03[\\x03\\\\\\x03\\\\\\x03\" +\n\t\t\"\\\\\\x03\\\\\\x05\\\\\\u043F\\n\\\\\\x03]\\x03]\\x03]\\x03]\\x03^\\x03^\\x05^\\u0447\\n^\\x03\" +\n\t\t\"^\\x03^\\x05^\\u044B\\n^\\x07^\\u044D\\n^\\f^\\x0E^\\u0450\\v^\\x03^\\x03^\\x03^\\x03\" +\n\t\t\"^\\x03^\\x07^\\u0457\\n^\\f^\\x0E^\\u045A\\v^\\x05^\\u045C\\n^\\x03^\\x05^\\u045F\\n\" +\n\t\t\"^\\x03_\\x03_\\x05_\\u0463\\n_\\x03`\\x03`\\x03a\\x06a\\u0468\\na\\ra\\x0Ea\\u0469\\x03\" +\n\t\t\"b\\x03b\\x03b\\x03b\\x03b\\x07b\\u0471\\nb\\fb\\x0Eb\\u0474\\vb\\x03b\\x03b\\x05b\\u0478\" +\n\t\t\"\\nb\\x03c\\x06c\\u047B\\nc\\rc\\x0Ec\\u047C\\x03c\\x02\\x02\\x04J\\x86d\\x02\\x02\\x04\" +\n\t\t\"\\x02\\x06\\x02\\b\\x02\\n\\x02\\f\\x02\\x0E\\x02\\x10\\x02\\x12\\x02\\x14\\x02\\x16\\x02\" +\n\t\t\"\\x18\\x02\\x1A\\x02\\x1C\\x02\\x1E\\x02 \\x02\\\"\\x02$\\x02&\\x02(\\x02*\\x02,\\x02.\" +\n\t\t\"\\x020\\x022\\x024\\x026\\x028\\x02:\\x02<\\x02>\\x02@\\x02B\\x02D\\x02F\\x02H\\x02\" +\n\t\t\"J\\x02L\\x02N\\x02P\\x02R\\x02T\\x02V\\x02X\\x02Z\\x02\\\\\\x02^\\x02`\\x02b\\x02d\\x02\" +\n\t\t\"f\\x02h\\x02j\\x02l\\x02n\\x02p\\x02r\\x02t\\x02v\\x02x\\x02z\\x02|\\x02~\\x02\\x80\" +\n\t\t\"\\x02\\x82\\x02\\x84\\x02\\x86\\x02\\x88\\x02\\x8A\\x02\\x8C\\x02\\x8E\\x02\\x90\\x02\\x92\" +\n\t\t\"\\x02\\x94\\x02\\x96\\x02\\x98\\x02\\x9A\\x02\\x9C\\x02\\x9E\\x02\\xA0\\x02\\xA2\\x02\\xA4\" +\n\t\t\"\\x02\\xA6\\x02\\xA8\\x02\\xAA\\x02\\xAC\\x02\\xAE\\x02\\xB0\\x02\\xB2\\x02\\xB4\\x02\\xB6\" +\n\t\t\"\\x02\\xB8\\x02\\xBA\\x02\\xBC\\x02\\xBE\\x02\\xC0\\x02\\xC2\\x02\\xC4\\x02\\x02\\x11\\x03\" +\n\t\t\"\\x02\\x07\\r\\x03\\x02\\x15\\x17\\x03\\x02*,\\x06\\x02qqxx||~~\\x05\\x02&&9\\x03\\x02AB\\x03\\x02CD\\x04\\x02\\x05\\x05GH\\x03\\x02IJ\\x03\\x02\\t\\f\\x03\" +\n\t\t\"\\x02MN\\x04\\x02\\r\\rQZ\\x03\\x02jk\\v\\x02\\x10\\x10\\x1B\\x1B,,88bbttxx\\x80\\x80\" +\n\t\t\"\\x82\\x83\\x02\\u04FE\\x02\\xD2\\x03\\x02\\x02\\x02\\x04\\xD7\\x03\\x02\\x02\\x02\\x06\" +\n\t\t\"\\xDC\\x03\\x02\\x02\\x02\\b\\xE1\\x03\\x02\\x02\\x02\\n\\xE3\\x03\\x02\\x02\\x02\\f\\xED\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x0E\\xF7\\x03\\x02\\x02\\x02\\x10\\xF9\\x03\\x02\\x02\\x02\\x12\\u0122\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x14\\u0124\\x03\\x02\\x02\\x02\\x16\\u0127\\x03\\x02\\x02\\x02\\x18\" +\n\t\t\"\\u013F\\x03\\x02\\x02\\x02\\x1A\\u0150\\x03\\x02\\x02\\x02\\x1C\\u0152\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x1E\\u0165\\x03\\x02\\x02\\x02 \\u016C\\x03\\x02\\x02\\x02\\\"\\u0171\\x03\\x02\" +\n\t\t\"\\x02\\x02$\\u0177\\x03\\x02\\x02\\x02&\\u018F\\x03\\x02\\x02\\x02(\\u0191\\x03\\x02\" +\n\t\t\"\\x02\\x02*\\u01A2\\x03\\x02\\x02\\x02,\\u01B2\\x03\\x02\\x02\\x02.\\u01BA\\x03\\x02\" +\n\t\t\"\\x02\\x020\\u01CB\\x03\\x02\\x02\\x022\\u01CD\\x03\\x02\\x02\\x024\\u01DA\\x03\\x02\" +\n\t\t\"\\x02\\x026\\u01DD\\x03\\x02\\x02\\x028\\u01E5\\x03\\x02\\x02\\x02:\\u01E7\\x03\\x02\" +\n\t\t\"\\x02\\x02<\\u01F6\\x03\\x02\\x02\\x02>\\u0203\\x03\\x02\\x02\\x02@\\u020A\\x03\\x02\" +\n\t\t\"\\x02\\x02B\\u0217\\x03\\x02\\x02\\x02D\\u021E\\x03\\x02\\x02\\x02F\\u022B\\x03\\x02\" +\n\t\t\"\\x02\\x02H\\u022F\\x03\\x02\\x02\\x02J\\u023C\\x03\\x02\\x02\\x02L\\u0249\\x03\\x02\" +\n\t\t\"\\x02\\x02N\\u0253\\x03\\x02\\x02\\x02P\\u0255\\x03\\x02\\x02\\x02R\\u025C\\x03\\x02\" +\n\t\t\"\\x02\\x02T\\u026A\\x03\\x02\\x02\\x02V\\u026C\\x03\\x02\\x02\\x02X\\u026E\\x03\\x02\" +\n\t\t\"\\x02\\x02Z\\u0286\\x03\\x02\\x02\\x02\\\\\\u0288\\x03\\x02\\x02\\x02^\\u028B\\x03\\x02\" +\n\t\t\"\\x02\\x02`\\u0294\\x03\\x02\\x02\\x02b\\u029F\\x03\\x02\\x02\\x02d\\u02A8\\x03\\x02\" +\n\t\t\"\\x02\\x02f\\u02B0\\x03\\x02\\x02\\x02h\\u02B2\\x03\\x02\\x02\\x02j\\u02B5\\x03\\x02\" +\n\t\t\"\\x02\\x02l\\u02C5\\x03\\x02\\x02\\x02n\\u02D1\\x03\\x02\\x02\\x02p\\u02D3\\x03\\x02\" +\n\t\t\"\\x02\\x02r\\u02DB\\x03\\x02\\x02\\x02t\\u02DE\\x03\\x02\\x02\\x02v\\u02E1\\x03\\x02\" +\n\t\t\"\\x02\\x02x\\u02E7\\x03\\x02\\x02\\x02z\\u02EA\\x03\\x02\\x02\\x02|\\u02EE\\x03\\x02\" +\n\t\t\"\\x02\\x02~\\u02F9\\x03\\x02\\x02\\x02\\x80\\u0302\\x03\\x02\\x02\\x02\\x82\\u030D\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x84\\u031C\\x03\\x02\\x02\\x02\\x86\\u0330\\x03\\x02\\x02\\x02\\x88\\u0388\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x8A\\u038A\\x03\\x02\\x02\\x02\\x8C\\u0392\\x03\\x02\\x02\\x02\\x8E\" +\n\t\t\"\\u039D\\x03\\x02\\x02\\x02\\x90\\u03A9\\x03\\x02\\x02\\x02\\x92\\u03AB\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x94\\u03B0\\x03\\x02\\x02\\x02\\x96\\u03CB\\x03\\x02\\x02\\x02\\x98\\u03D0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x9A\\u03D2\\x03\\x02\\x02\\x02\\x9C\\u03DA\\x03\\x02\\x02\\x02\\x9E\\u03EA\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA0\\u03F0\\x03\\x02\\x02\\x02\\xA2\\u03FA\\x03\\x02\\x02\\x02\\xA4\" +\n\t\t\"\\u03FC\\x03\\x02\\x02\\x02\\xA6\\u0404\\x03\\x02\\x02\\x02\\xA8\\u0408\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xAA\\u040B\\x03\\x02\\x02\\x02\\xAC\\u0419\\x03\\x02\\x02\\x02\\xAE\\u041B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xB0\\u0427\\x03\\x02\\x02\\x02\\xB2\\u042A\\x03\\x02\\x02\\x02\\xB4\\u0436\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xB6\\u043E\\x03\\x02\\x02\\x02\\xB8\\u0440\\x03\\x02\\x02\\x02\\xBA\" +\n\t\t\"\\u045E\\x03\\x02\\x02\\x02\\xBC\\u0460\\x03\\x02\\x02\\x02\\xBE\\u0464\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xC0\\u0467\\x03\\x02\\x02\\x02\\xC2\\u046B\\x03\\x02\\x02\\x02\\xC4\\u047A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xC6\\xD1\\x05\\x04\\x03\\x02\\xC7\\xD1\\x05\\x12\\n\\x02\\xC8\\xD1\\x05\" +\n\t\t\"\\x16\\f\\x02\\xC9\\xD1\\x05:\\x1E\\x02\\xCA\\xD1\\x05(\\x15\\x02\\xCB\\xD1\\x05.\\x18\" +\n\t\t\"\\x02\\xCC\\xD1\\x05\\x1E\\x10\\x02\\xCD\\xD1\\x05 \\x11\\x02\\xCE\\xD1\\x05\\\"\\x12\\x02\" +\n\t\t\"\\xCF\\xD1\\x05$\\x13\\x02\\xD0\\xC6\\x03\\x02\\x02\\x02\\xD0\\xC7\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD0\\xC8\\x03\\x02\\x02\\x02\\xD0\\xC9\\x03\\x02\\x02\\x02\\xD0\\xCA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD0\\xCB\\x03\\x02\\x02\\x02\\xD0\\xCC\\x03\\x02\\x02\\x02\\xD0\\xCD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD0\\xCE\\x03\\x02\\x02\\x02\\xD0\\xCF\\x03\\x02\\x02\\x02\\xD1\\xD4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD2\\xD0\\x03\\x02\\x02\\x02\\xD2\\xD3\\x03\\x02\\x02\\x02\\xD3\\xD5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD4\\xD2\\x03\\x02\\x02\\x02\\xD5\\xD6\\x07\\x02\\x02\\x03\\xD6\\x03\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD7\\xD8\\x07\\x03\\x02\\x02\\xD8\\xD9\\x05\\x06\\x04\\x02\\xD9\\xDA\\x05\\b\\x05\\x02\" +\n\t\t\"\\xDA\\xDB\\x07\\x04\\x02\\x02\\xDB\\x05\\x03\\x02\\x02\\x02\\xDC\\xDD\\x05\\xBE`\\x02\" +\n\t\t\"\\xDD\\x07\\x03\\x02\\x02\\x02\\xDE\\xE2\\x07\\x05\\x02\\x02\\xDF\\xE2\\x05\\n\\x06\\x02\" +\n\t\t\"\\xE0\\xE2\\x05\\x86D\\x02\\xE1\\xDE\\x03\\x02\\x02\\x02\\xE1\\xDF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xE1\\xE0\\x03\\x02\\x02\\x02\\xE2\\t\\x03\\x02\\x02\\x02\\xE3\\xEA\\x05\\x0E\\b\\x02\\xE4\" +\n\t\t\"\\xE6\\x07\\x06\\x02\\x02\\xE5\\xE4\\x03\\x02\\x02\\x02\\xE5\\xE6\\x03\\x02\\x02\\x02\\xE6\" +\n\t\t\"\\xE7\\x03\\x02\\x02\\x02\\xE7\\xE9\\x05\\x0E\\b\\x02\\xE8\\xE5\\x03\\x02\\x02\\x02\\xE9\" +\n\t\t\"\\xEC\\x03\\x02\\x02\\x02\\xEA\\xE8\\x03\\x02\\x02\\x02\\xEA\\xEB\\x03\\x02\\x02\\x02\\xEB\" +\n\t\t\"\\v\\x03\\x02\\x02\\x02\\xEC\\xEA\\x03\\x02\\x02\\x02\\xED\\xEE\\t\\x02\\x02\\x02\\xEE\\r\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xEF\\xF1\\x05\\f\\x07\\x02\\xF0\\xEF\\x03\\x02\\x02\\x02\\xF0\\xF1\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF1\\xF2\\x03\\x02\\x02\\x02\\xF2\\xF8\\x07\\x85\\x02\\x02\\xF3\\xF5\" +\n\t\t\"\\x05\\f\\x07\\x02\\xF4\\xF3\\x03\\x02\\x02\\x02\\xF4\\xF5\\x03\\x02\\x02\\x02\\xF5\\xF6\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF6\\xF8\\x07j\\x02\\x02\\xF7\\xF0\\x03\\x02\\x02\\x02\\xF7\\xF4\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF8\\x0F\\x03\\x02\\x02\\x02\\xF9\\xFC\\x05\\xBE`\\x02\\xFA\\xFB\" +\n\t\t\"\\x07\\x0E\\x02\\x02\\xFB\\xFD\\x05\\xBE`\\x02\\xFC\\xFA\\x03\\x02\\x02\\x02\\xFC\\xFD\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xFD\\x11\\x03\\x02\\x02\\x02\\xFE\\xFF\\x07\\x0F\\x02\\x02\\xFF\\u0102\" +\n\t\t\"\\x05\\x14\\v\\x02\\u0100\\u0101\\x07\\x0E\\x02\\x02\\u0101\\u0103\\x05\\xBE`\\x02\\u0102\" +\n\t\t\"\\u0100\\x03\\x02\\x02\\x02\\u0102\\u0103\\x03\\x02\\x02\\x02\\u0103\\u0104\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0104\\u0105\\x07\\x04\\x02\\x02\\u0105\\u0123\\x03\\x02\\x02\\x02\\u0106\" +\n\t\t\"\\u0109\\x07\\x0F\\x02\\x02\\u0107\\u010A\\x07\\x05\\x02\\x02\\u0108\\u010A\\x05\\xBE\" +\n\t\t\"`\\x02\\u0109\\u0107\\x03\\x02\\x02\\x02\\u0109\\u0108\\x03\\x02\\x02\\x02\\u010A\\u010D\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u010B\\u010C\\x07\\x0E\\x02\\x02\\u010C\\u010E\\x05\\xBE`\\x02\" +\n\t\t\"\\u010D\\u010B\\x03\\x02\\x02\\x02\\u010D\\u010E\\x03\\x02\\x02\\x02\\u010E\\u010F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u010F\\u0110\\x07\\x10\\x02\\x02\\u0110\\u0111\\x05\\x14\\v\\x02\\u0111\" +\n\t\t\"\\u0112\\x07\\x04\\x02\\x02\\u0112\\u0123\\x03\\x02\\x02\\x02\\u0113\\u0114\\x07\\x0F\" +\n\t\t\"\\x02\\x02\\u0114\\u0115\\x07\\x11\\x02\\x02\\u0115\\u011A\\x05\\x10\\t\\x02\\u0116\\u0117\" +\n\t\t\"\\x07\\x12\\x02\\x02\\u0117\\u0119\\x05\\x10\\t\\x02\\u0118\\u0116\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0119\\u011C\\x03\\x02\\x02\\x02\\u011A\\u0118\\x03\\x02\\x02\\x02\\u011A\\u011B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u011B\\u011D\\x03\\x02\\x02\\x02\\u011C\\u011A\\x03\\x02\\x02\\x02\\u011D\" +\n\t\t\"\\u011E\\x07\\x13\\x02\\x02\\u011E\\u011F\\x07\\x10\\x02\\x02\\u011F\\u0120\\x05\\x14\" +\n\t\t\"\\v\\x02\\u0120\\u0121\\x07\\x04\\x02\\x02\\u0121\\u0123\\x03\\x02\\x02\\x02\\u0122\\xFE\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0122\\u0106\\x03\\x02\\x02\\x02\\u0122\\u0113\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0123\\x13\\x03\\x02\\x02\\x02\\u0124\\u0125\\x07\\x84\\x02\\x02\\u0125\\x15\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0126\\u0128\\x07\\x14\\x02\\x02\\u0127\\u0126\\x03\\x02\\x02\\x02\\u0127\" +\n\t\t\"\\u0128\\x03\\x02\\x02\\x02\\u0128\\u0129\\x03\\x02\\x02\\x02\\u0129\\u012A\\t\\x03\\x02\" +\n\t\t\"\\x02\\u012A\\u0134\\x05\\xBE`\\x02\\u012B\\u012C\\x07\\x18\\x02\\x02\\u012C\\u0131\" +\n\t\t\"\\x05\\x18\\r\\x02\\u012D\\u012E\\x07\\x12\\x02\\x02\\u012E\\u0130\\x05\\x18\\r\\x02\\u012F\" +\n\t\t\"\\u012D\\x03\\x02\\x02\\x02\\u0130\\u0133\\x03\\x02\\x02\\x02\\u0131\\u012F\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0131\\u0132\\x03\\x02\\x02\\x02\\u0132\\u0135\\x03\\x02\\x02\\x02\\u0133\" +\n\t\t\"\\u0131\\x03\\x02\\x02\\x02\\u0134\\u012B\\x03\\x02\\x02\\x02\\u0134\\u0135\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0135\\u0136\\x03\\x02\\x02\\x02\\u0136\\u013A\\x07\\x11\\x02\\x02\\u0137\" +\n\t\t\"\\u0139\\x05\\x1A\\x0E\\x02\\u0138\\u0137\\x03\\x02\\x02\\x02\\u0139\\u013C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u013A\\u0138\\x03\\x02\\x02\\x02\\u013A\\u013B\\x03\\x02\\x02\\x02\\u013B\" +\n\t\t\"\\u013D\\x03\\x02\\x02\\x02\\u013C\\u013A\\x03\\x02\\x02\\x02\\u013D\\u013E\\x07\\x13\" +\n\t\t\"\\x02\\x02\\u013E\\x17\\x03\\x02\\x02\\x02\\u013F\\u0145\\x05L\\'\\x02\\u0140\\u0142\" +\n\t\t\"\\x07\\x19\\x02\\x02\\u0141\\u0143\\x05\\x8AF\\x02\\u0142\\u0141\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0142\\u0143\\x03\\x02\\x02\\x02\\u0143\\u0144\\x03\\x02\\x02\\x02\\u0144\\u0146\\x07\" +\n\t\t\"\\x1A\\x02\\x02\\u0145\\u0140\\x03\\x02\\x02\\x02\\u0145\\u0146\\x03\\x02\\x02\\x02\\u0146\" +\n\t\t\"\\x19\\x03\\x02\\x02\\x02\\u0147\\u0151\\x05\\x1C\\x0F\\x02\\u0148\\u0151\\x05$\\x13\" +\n\t\t\"\\x02\\u0149\\u0151\\x05(\\x15\\x02\\u014A\\u0151\\x05*\\x16\\x02\\u014B\\u0151\\x05\" +\n\t\t\".\\x18\\x02\\u014C\\u0151\\x056\\x1C\\x02\\u014D\\u0151\\x05:\\x1E\\x02\\u014E\\u0151\" +\n\t\t\"\\x05 \\x11\\x02\\u014F\\u0151\\x05\\\"\\x12\\x02\\u0150\\u0147\\x03\\x02\\x02\\x02\\u0150\" +\n\t\t\"\\u0148\\x03\\x02\\x02\\x02\\u0150\\u0149\\x03\\x02\\x02\\x02\\u0150\\u014A\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0150\\u014B\\x03\\x02\\x02\\x02\\u0150\\u014C\\x03\\x02\\x02\\x02\\u0150\" +\n\t\t\"\\u014D\\x03\\x02\\x02\\x02\\u0150\\u014E\\x03\\x02\\x02\\x02\\u0150\\u014F\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0151\\x1B\\x03\\x02\\x02\\x02\\u0152\\u015B\\x05J&\\x02\\u0153\\u015A\\x07\" +\n\t\t\"z\\x02\\x02\\u0154\\u015A\\x07w\\x02\\x02\\u0155\\u015A\\x07y\\x02\\x02\\u0156\\u015A\" +\n\t\t\"\\x07q\\x02\\x02\\u0157\\u015A\\x07r\\x02\\x02\\u0158\\u015A\\x05\\xC2b\\x02\\u0159\" +\n\t\t\"\\u0153\\x03\\x02\\x02\\x02\\u0159\\u0154\\x03\\x02\\x02\\x02\\u0159\\u0155\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0159\\u0156\\x03\\x02\\x02\\x02\\u0159\\u0157\\x03\\x02\\x02\\x02\\u0159\" +\n\t\t\"\\u0158\\x03\\x02\\x02\\x02\\u015A\\u015D\\x03\\x02\\x02\\x02\\u015B\\u0159\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u015B\\u015C\\x03\\x02\\x02\\x02\\u015C\\u015E\\x03\\x02\\x02\\x02\\u015D\" +\n\t\t\"\\u015B\\x03\\x02\\x02\\x02\\u015E\\u0161\\x05\\xBE`\\x02\\u015F\\u0160\\x07\\r\\x02\" +\n\t\t\"\\x02\\u0160\\u0162\\x05\\x86D\\x02\\u0161\\u015F\\x03\\x02\\x02\\x02\\u0161\\u0162\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0162\\u0163\\x03\\x02\\x02\\x02\\u0163\\u0164\\x07\\x04\\x02\\x02\" +\n\t\t\"\\u0164\\x1D\\x03\\x02\\x02\\x02\\u0165\\u0166\\x05J&\\x02\\u0166\\u0167\\x07q\\x02\" +\n\t\t\"\\x02\\u0167\\u0168\\x05\\xBE`\\x02\\u0168\\u0169\\x07\\r\\x02\\x02\\u0169\\u016A\\x05\" +\n\t\t\"\\x86D\\x02\\u016A\\u016B\\x07\\x04\\x02\\x02\\u016B\\x1F\\x03\\x02\\x02\\x02\\u016C\" +\n\t\t\"\\u016D\\x07\\x1B\\x02\\x02\\u016D\\u016E\\x05\\xBE`\\x02\\u016E\\u016F\\x05<\\x1F\\x02\" +\n\t\t\"\\u016F\\u0170\\x07\\x04\\x02\\x02\\u0170!\\x03\\x02\\x02\\x02\\u0171\\u0172\\x07}\\x02\" +\n\t\t\"\\x02\\u0172\\u0173\\x05\\xBE`\\x02\\u0173\\u0174\\x07\\x18\\x02\\x02\\u0174\\u0175\" +\n\t\t\"\\x05\\x84C\\x02\\u0175\\u0176\\x07\\x04\\x02\\x02\\u0176#\\x03\\x02\\x02\\x02\\u0177\" +\n\t\t\"\\u0178\\x07\\x1C\\x02\\x02\\u0178\\u0179\\x05&\\x14\\x02\\u0179\\u017C\\x07\\x1D\\x02\" +\n\t\t\"\\x02\\u017A\\u017D\\x07\\x05\\x02\\x02\\u017B\\u017D\\x05J&\\x02\\u017C\\u017A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u017C\\u017B\\x03\\x02\\x02\\x02\\u017D\\u017F\\x03\\x02\\x02\\x02\\u017E\" +\n\t\t\"\\u0180\\x07\\x7F\\x02\\x02\\u017F\\u017E\\x03\\x02\\x02\\x02\\u017F\\u0180\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0180\\u0181\\x03\\x02\\x02\\x02\\u0181\\u0182\\x07\\x04\\x02\\x02\\u0182\" +\n\t\t\"%\\x03\\x02\\x02\\x02\\u0183\\u0190\\x05L\\'\\x02\\u0184\\u0185\\x07\\x11\\x02\\x02\\u0185\" +\n\t\t\"\\u018A\\x05L\\'\\x02\\u0186\\u0187\\x07\\x12\\x02\\x02\\u0187\\u0189\\x05L\\'\\x02\\u0188\" +\n\t\t\"\\u0186\\x03\\x02\\x02\\x02\\u0189\\u018C\\x03\\x02\\x02\\x02\\u018A\\u0188\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u018A\\u018B\\x03\\x02\\x02\\x02\\u018B\\u018D\\x03\\x02\\x02\\x02\\u018C\" +\n\t\t\"\\u018A\\x03\\x02\\x02\\x02\\u018D\\u018E\\x07\\x13\\x02\\x02\\u018E\\u0190\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u018F\\u0183\\x03\\x02\\x02\\x02\\u018F\\u0184\\x03\\x02\\x02\\x02\\u0190\" +\n\t\t\"\\'\\x03\\x02\\x02\\x02\\u0191\\u0192\\x07\\x1E\\x02\\x02\\u0192\\u0193\\x05\\xBE`\\x02\" +\n\t\t\"\\u0193\\u019E\\x07\\x11\\x02\\x02\\u0194\\u0195\\x05H%\\x02\\u0195\\u019B\\x07\\x04\" +\n\t\t\"\\x02\\x02\\u0196\\u0197\\x05H%\\x02\\u0197\\u0198\\x07\\x04\\x02\\x02\\u0198\\u019A\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0199\\u0196\\x03\\x02\\x02\\x02\\u019A\\u019D\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u019B\\u0199\\x03\\x02\\x02\\x02\\u019B\\u019C\\x03\\x02\\x02\\x02\\u019C\\u019F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u019D\\u019B\\x03\\x02\\x02\\x02\\u019E\\u0194\\x03\\x02\\x02\\x02\\u019E\" +\n\t\t\"\\u019F\\x03\\x02\\x02\\x02\\u019F\\u01A0\\x03\\x02\\x02\\x02\\u01A0\\u01A1\\x07\\x13\" +\n\t\t\"\\x02\\x02\\u01A1)\\x03\\x02\\x02\\x02\\u01A2\\u01A3\\x07\\x1F\\x02\\x02\\u01A3\\u01A5\" +\n\t\t\"\\x05\\xBE`\\x02\\u01A4\\u01A6\\x05<\\x1F\\x02\\u01A5\\u01A4\\x03\\x02\\x02\\x02\\u01A5\" +\n\t\t\"\\u01A6\";\n\tprivate static readonly _serializedATNSegment1: string =\n\t\t\"\\x03\\x02\\x02\\x02\\u01A6\\u01AB\\x03\\x02\\x02\\x02\\u01A7\\u01AA\\x07{\\x02\\x02\" +\n\t\t\"\\u01A8\\u01AA\\x05\\xC2b\\x02\\u01A9\\u01A7\\x03\\x02\\x02\\x02\\u01A9\\u01A8\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01AA\\u01AD\\x03\\x02\\x02\\x02\\u01AB\\u01A9\\x03\\x02\\x02\\x02\\u01AB\" +\n\t\t\"\\u01AC\\x03\\x02\\x02\\x02\\u01AC\\u01B0\\x03\\x02\\x02\\x02\\u01AD\\u01AB\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01AE\\u01B1\\x07\\x04\\x02\\x02\\u01AF\\u01B1\\x05X-\\x02\\u01B0\\u01AE\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01B0\\u01AF\\x03\\x02\\x02\\x02\\u01B1+\\x03\\x02\\x02\\x02\\u01B2\" +\n\t\t\"\\u01B8\\x05\\xBE`\\x02\\u01B3\\u01B5\\x07\\x19\\x02\\x02\\u01B4\\u01B6\\x05\\x8AF\\x02\" +\n\t\t\"\\u01B5\\u01B4\\x03\\x02\\x02\\x02\\u01B5\\u01B6\\x03\\x02\\x02\\x02\\u01B6\\u01B7\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01B7\\u01B9\\x07\\x1A\\x02\\x02\\u01B8\\u01B3\\x03\\x02\\x02\\x02\\u01B8\" +\n\t\t\"\\u01B9\\x03\\x02\\x02\\x02\\u01B9-\\x03\\x02\\x02\\x02\\u01BA\\u01BB\\x050\\x19\\x02\" +\n\t\t\"\\u01BB\\u01BC\\x05<\\x1F\\x02\\u01BC\\u01BE\\x054\\x1B\\x02\\u01BD\\u01BF\\x052\\x1A\" +\n\t\t\"\\x02\\u01BE\\u01BD\\x03\\x02\\x02\\x02\\u01BE\\u01BF\\x03\\x02\\x02\\x02\\u01BF\\u01C2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01C0\\u01C3\\x07\\x04\\x02\\x02\\u01C1\\u01C3\\x05X-\\x02\\u01C2\" +\n\t\t\"\\u01C0\\x03\\x02\\x02\\x02\\u01C2\\u01C1\\x03\\x02\\x02\\x02\\u01C3/\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01C4\\u01C6\\x07 \\x02\\x02\\u01C5\\u01C7\\x05\\xBE`\\x02\\u01C6\\u01C5\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01C6\\u01C7\\x03\\x02\\x02\\x02\\u01C7\\u01CC\\x03\\x02\\x02\\x02\\u01C8\" +\n\t\t\"\\u01CC\\x07\\x80\\x02\\x02\\u01C9\\u01CC\\x07\\x81\\x02\\x02\\u01CA\\u01CC\\x07\\x82\" +\n\t\t\"\\x02\\x02\\u01CB\\u01C4\\x03\\x02\\x02\\x02\\u01CB\\u01C8\\x03\\x02\\x02\\x02\\u01CB\" +\n\t\t\"\\u01C9\\x03\\x02\\x02\\x02\\u01CB\\u01CA\\x03\\x02\\x02\\x02\\u01CC1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01CD\\u01CE\\x07!\\x02\\x02\\u01CE\\u01CF\\x05<\\x1F\\x02\\u01CF3\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01D0\\u01D9\\x07u\\x02\\x02\\u01D1\\u01D9\\x07z\\x02\\x02\\u01D2\\u01D9\" +\n\t\t\"\\x07w\\x02\\x02\\u01D3\\u01D9\\x07y\\x02\\x02\\u01D4\\u01D9\\x07{\\x02\\x02\\u01D5\" +\n\t\t\"\\u01D9\\x05V,\\x02\\u01D6\\u01D9\\x05,\\x17\\x02\\u01D7\\u01D9\\x05\\xC2b\\x02\\u01D8\" +\n\t\t\"\\u01D0\\x03\\x02\\x02\\x02\\u01D8\\u01D1\\x03\\x02\\x02\\x02\\u01D8\\u01D2\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01D8\\u01D3\\x03\\x02\\x02\\x02\\u01D8\\u01D4\\x03\\x02\\x02\\x02\\u01D8\" +\n\t\t\"\\u01D5\\x03\\x02\\x02\\x02\\u01D8\\u01D6\\x03\\x02\\x02\\x02\\u01D8\\u01D7\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01D9\\u01DC\\x03\\x02\\x02\\x02\\u01DA\\u01D8\\x03\\x02\\x02\\x02\\u01DA\" +\n\t\t\"\\u01DB\\x03\\x02\\x02\\x02\\u01DB5\\x03\\x02\\x02\\x02\\u01DC\\u01DA\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01DD\\u01DE\\x07\\\"\\x02\\x02\\u01DE\\u01DF\\x05\\xBE`\\x02\\u01DF\\u01E1\\x05\" +\n\t\t\"@!\\x02\\u01E0\\u01E2\\x07o\\x02\\x02\\u01E1\\u01E0\\x03\\x02\\x02\\x02\\u01E1\\u01E2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01E2\\u01E3\\x03\\x02\\x02\\x02\\u01E3\\u01E4\\x07\\x04\\x02\\x02\" +\n\t\t\"\\u01E47\\x03\\x02\\x02\\x02\\u01E5\\u01E6\\x05\\xBE`\\x02\\u01E69\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u01E7\\u01E8\\x07#\\x02\\x02\\u01E8\\u01E9\\x05\\xBE`\\x02\\u01E9\\u01EB\\x07\\x11\" +\n\t\t\"\\x02\\x02\\u01EA\\u01EC\\x058\\x1D\\x02\\u01EB\\u01EA\\x03\\x02\\x02\\x02\\u01EB\\u01EC\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01EC\\u01F1\\x03\\x02\\x02\\x02\\u01ED\\u01EE\\x07\\x12\\x02\\x02\" +\n\t\t\"\\u01EE\\u01F0\\x058\\x1D\\x02\\u01EF\\u01ED\\x03\\x02\\x02\\x02\\u01F0\\u01F3\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01F1\\u01EF\\x03\\x02\\x02\\x02\\u01F1\\u01F2\\x03\\x02\\x02\\x02\\u01F2\" +\n\t\t\"\\u01F4\\x03\\x02\\x02\\x02\\u01F3\\u01F1\\x03\\x02\\x02\\x02\\u01F4\\u01F5\\x07\\x13\" +\n\t\t\"\\x02\\x02\\u01F5;\\x03\\x02\\x02\\x02\\u01F6\\u01FF\\x07\\x19\\x02\\x02\\u01F7\\u01FC\" +\n\t\t\"\\x05> \\x02\\u01F8\\u01F9\\x07\\x12\\x02\\x02\\u01F9\\u01FB\\x05> \\x02\\u01FA\\u01F8\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01FB\\u01FE\\x03\\x02\\x02\\x02\\u01FC\\u01FA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u01FC\\u01FD\\x03\\x02\\x02\\x02\\u01FD\\u0200\\x03\\x02\\x02\\x02\\u01FE\\u01FC\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01FF\\u01F7\\x03\\x02\\x02\\x02\\u01FF\\u0200\\x03\\x02\\x02\\x02\\u0200\" +\n\t\t\"\\u0201\\x03\\x02\\x02\\x02\\u0201\\u0202\\x07\\x1A\\x02\\x02\\u0202=\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0203\\u0205\\x05J&\\x02\\u0204\\u0206\\x05T+\\x02\\u0205\\u0204\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0205\\u0206\\x03\\x02\\x02\\x02\\u0206\\u0208\\x03\\x02\\x02\\x02\\u0207\\u0209\" +\n\t\t\"\\x05\\xBE`\\x02\\u0208\\u0207\\x03\\x02\\x02\\x02\\u0208\\u0209\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0209?\\x03\\x02\\x02\\x02\\u020A\\u0213\\x07\\x19\\x02\\x02\\u020B\\u0210\\x05B\\\"\" +\n\t\t\"\\x02\\u020C\\u020D\\x07\\x12\\x02\\x02\\u020D\\u020F\\x05B\\\"\\x02\\u020E\\u020C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u020F\\u0212\\x03\\x02\\x02\\x02\\u0210\\u020E\\x03\\x02\\x02\\x02\\u0210\" +\n\t\t\"\\u0211\\x03\\x02\\x02\\x02\\u0211\\u0214\\x03\\x02\\x02\\x02\\u0212\\u0210\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0213\\u020B\\x03\\x02\\x02\\x02\\u0213\\u0214\\x03\\x02\\x02\\x02\\u0214\" +\n\t\t\"\\u0215\\x03\\x02\\x02\\x02\\u0215\\u0216\\x07\\x1A\\x02\\x02\\u0216A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0217\\u0219\\x05J&\\x02\\u0218\\u021A\\x07v\\x02\\x02\\u0219\\u0218\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0219\\u021A\\x03\\x02\\x02\\x02\\u021A\\u021C\\x03\\x02\\x02\\x02\\u021B\" +\n\t\t\"\\u021D\\x05\\xBE`\\x02\\u021C\\u021B\\x03\\x02\\x02\\x02\\u021C\\u021D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u021DC\\x03\\x02\\x02\\x02\\u021E\\u0227\\x07\\x19\\x02\\x02\\u021F\\u0224\\x05\" +\n\t\t\"F$\\x02\\u0220\\u0221\\x07\\x12\\x02\\x02\\u0221\\u0223\\x05F$\\x02\\u0222\\u0220\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0223\\u0226\\x03\\x02\\x02\\x02\\u0224\\u0222\\x03\\x02\\x02\\x02\\u0224\" +\n\t\t\"\\u0225\\x03\\x02\\x02\\x02\\u0225\\u0228\\x03\\x02\\x02\\x02\\u0226\\u0224\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0227\\u021F\\x03\\x02\\x02\\x02\\u0227\\u0228\\x03\\x02\\x02\\x02\\u0228\" +\n\t\t\"\\u0229\\x03\\x02\\x02\\x02\\u0229\\u022A\\x07\\x1A\\x02\\x02\\u022AE\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u022B\\u022D\\x05J&\\x02\\u022C\\u022E\\x05T+\\x02\\u022D\\u022C\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u022D\\u022E\\x03\\x02\\x02\\x02\\u022EG\\x03\\x02\\x02\\x02\\u022F\\u0231\\x05\" +\n\t\t\"J&\\x02\\u0230\\u0232\\x05T+\\x02\\u0231\\u0230\\x03\\x02\\x02\\x02\\u0231\\u0232\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0232\\u0233\\x03\\x02\\x02\\x02\\u0233\\u0234\\x05\\xBE`\\x02\\u0234\" +\n\t\t\"I\\x03\\x02\\x02\\x02\\u0235\\u0236\\b&\\x01\\x02\\u0236\\u023D\\x05\\x84C\\x02\\u0237\" +\n\t\t\"\\u023D\\x05L\\'\\x02\\u0238\\u023D\\x05P)\\x02\\u0239\\u023D\\x05R*\\x02\\u023A\\u023B\" +\n\t\t\"\\x07&\\x02\\x02\\u023B\\u023D\\x07x\\x02\\x02\\u023C\\u0235\\x03\\x02\\x02\\x02\\u023C\" +\n\t\t\"\\u0237\\x03\\x02\\x02\\x02\\u023C\\u0238\\x03\\x02\\x02\\x02\\u023C\\u0239\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u023C\\u023A\\x03\\x02\\x02\\x02\\u023D\\u0246\\x03\\x02\\x02\\x02\\u023E\" +\n\t\t\"\\u023F\\f\\x05\\x02\\x02\\u023F\\u0241\\x07$\\x02\\x02\\u0240\\u0242\\x05\\x86D\\x02\" +\n\t\t\"\\u0241\\u0240\\x03\\x02\\x02\\x02\\u0241\\u0242\\x03\\x02\\x02\\x02\\u0242\\u0243\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0243\\u0245\\x07%\\x02\\x02\\u0244\\u023E\\x03\\x02\\x02\\x02\\u0245\" +\n\t\t\"\\u0248\\x03\\x02\\x02\\x02\\u0246\\u0244\\x03\\x02\\x02\\x02\\u0246\\u0247\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0247K\\x03\\x02\\x02\\x02\\u0248\\u0246\\x03\\x02\\x02\\x02\\u0249\\u024E\" +\n\t\t\"\\x05\\xBE`\\x02\\u024A\\u024B\\x07\\'\\x02\\x02\\u024B\\u024D\\x05\\xBE`\\x02\\u024C\" +\n\t\t\"\\u024A\\x03\\x02\\x02\\x02\\u024D\\u0250\\x03\\x02\\x02\\x02\\u024E\\u024C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u024E\\u024F\\x03\\x02\\x02\\x02\\u024FM\\x03\\x02\\x02\\x02\\u0250\\u024E\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0251\\u0254\\x05\\x84C\\x02\\u0252\\u0254\\x05L\\'\\x02\\u0253\" +\n\t\t\"\\u0251\\x03\\x02\\x02\\x02\\u0253\\u0252\\x03\\x02\\x02\\x02\\u0254O\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0255\\u0256\\x07(\\x02\\x02\\u0256\\u0257\\x07\\x19\\x02\\x02\\u0257\\u0258\" +\n\t\t\"\\x05N(\\x02\\u0258\\u0259\\x07)\\x02\\x02\\u0259\\u025A\\x05J&\\x02\\u025A\\u025B\" +\n\t\t\"\\x07\\x1A\\x02\\x02\\u025BQ\\x03\\x02\\x02\\x02\\u025C\\u025D\\x07 \\x02\\x02\\u025D\" +\n\t\t\"\\u0263\\x05D#\\x02\\u025E\\u0262\\x07w\\x02\\x02\\u025F\\u0262\\x07u\\x02\\x02\\u0260\" +\n\t\t\"\\u0262\\x05V,\\x02\\u0261\\u025E\\x03\\x02\\x02\\x02\\u0261\\u025F\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0261\\u0260\\x03\\x02\\x02\\x02\\u0262\\u0265\\x03\\x02\\x02\\x02\\u0263\\u0261\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0263\\u0264\\x03\\x02\\x02\\x02\\u0264\\u0268\\x03\\x02\\x02\\x02\\u0265\" +\n\t\t\"\\u0263\\x03\\x02\\x02\\x02\\u0266\\u0267\\x07!\\x02\\x02\\u0267\\u0269\\x05D#\\x02\" +\n\t\t\"\\u0268\\u0266\\x03\\x02\\x02\\x02\\u0268\\u0269\\x03\\x02\\x02\\x02\\u0269S\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u026A\\u026B\\t\\x04\\x02\\x02\\u026BU\\x03\\x02\\x02\\x02\\u026C\\u026D\" +\n\t\t\"\\t\\x05\\x02\\x02\\u026DW\\x03\\x02\\x02\\x02\\u026E\\u0272\\x07\\x11\\x02\\x02\\u026F\" +\n\t\t\"\\u0271\\x05Z.\\x02\\u0270\\u026F\\x03\\x02\\x02\\x02\\u0271\\u0274\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0272\\u0270\\x03\\x02\\x02\\x02\\u0272\\u0273\\x03\\x02\\x02\\x02\\u0273\\u0275\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0274\\u0272\\x03\\x02\\x02\\x02\\u0275\\u0276\\x07\\x13\\x02\\x02\\u0276\" +\n\t\t\"Y\\x03\\x02\\x02\\x02\\u0277\\u0287\\x05^0\\x02\\u0278\\u0287\\x05`1\\x02\\u0279\\u0287\" +\n\t\t\"\\x05d3\\x02\\u027A\\u0287\\x05j6\\x02\\u027B\\u0287\\x05X-\\x02\\u027C\\u0287\\x05\" +\n\t\t\"l7\\x02\\u027D\\u0287\\x05p9\\x02\\u027E\\u0287\\x05r:\\x02\\u027F\\u0287\\x05t;\\x02\" +\n\t\t\"\\u0280\\u0287\\x05v<\\x02\\u0281\\u0287\\x05x=\\x02\\u0282\\u0287\\x05z>\\x02\\u0283\" +\n\t\t\"\\u0287\\x05f4\\x02\\u0284\\u0287\\x05h5\\x02\\u0285\\u0287\\x05|?\\x02\\u0286\\u0277\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0286\\u0278\\x03\\x02\\x02\\x02\\u0286\\u0279\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0286\\u027A\\x03\\x02\\x02\\x02\\u0286\\u027B\\x03\\x02\\x02\\x02\\u0286\\u027C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0286\\u027D\\x03\\x02\\x02\\x02\\u0286\\u027E\\x03\\x02\\x02\\x02\\u0286\" +\n\t\t\"\\u027F\\x03\\x02\\x02\\x02\\u0286\\u0280\\x03\\x02\\x02\\x02\\u0286\\u0281\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0286\\u0282\\x03\\x02\\x02\\x02\\u0286\\u0283\\x03\\x02\\x02\\x02\\u0286\" +\n\t\t\"\\u0284\\x03\\x02\\x02\\x02\\u0286\\u0285\\x03\\x02\\x02\\x02\\u0287[\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0288\\u0289\\x05\\x86D\\x02\\u0289\\u028A\\x07\\x04\\x02\\x02\\u028A]\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u028B\\u028C\\x07-\\x02\\x02\\u028C\\u028D\\x07\\x19\\x02\\x02\\u028D\\u028E\" +\n\t\t\"\\x05\\x86D\\x02\\u028E\\u028F\\x07\\x1A\\x02\\x02\\u028F\\u0292\\x05Z.\\x02\\u0290\" +\n\t\t\"\\u0291\\x07.\\x02\\x02\\u0291\\u0293\\x05Z.\\x02\\u0292\\u0290\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0292\\u0293\\x03\\x02\\x02\\x02\\u0293_\\x03\\x02\\x02\\x02\\u0294\\u0295\\x07/\\x02\" +\n\t\t\"\\x02\\u0295\\u0297\\x05\\x86D\\x02\\u0296\\u0298\\x052\\x1A\\x02\\u0297\\u0296\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0297\\u0298\\x03\\x02\\x02\\x02\\u0298\\u0299\\x03\\x02\\x02\\x02\\u0299\" +\n\t\t\"\\u029B\\x05X-\\x02\\u029A\\u029C\\x05b2\\x02\\u029B\\u029A\\x03\\x02\\x02\\x02\\u029C\" +\n\t\t\"\\u029D\\x03\\x02\\x02\\x02\\u029D\\u029B\\x03\\x02\\x02\\x02\\u029D\\u029E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u029Ea\\x03\\x02\\x02\\x02\\u029F\\u02A4\\x070\\x02\\x02\\u02A0\\u02A2\\x05\" +\n\t\t\"\\xBE`\\x02\\u02A1\\u02A0\\x03\\x02\\x02\\x02\\u02A1\\u02A2\\x03\\x02\\x02\\x02\\u02A2\" +\n\t\t\"\\u02A3\\x03\\x02\\x02\\x02\\u02A3\\u02A5\\x05<\\x1F\\x02\\u02A4\\u02A1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02A4\\u02A5\\x03\\x02\\x02\\x02\\u02A5\\u02A6\\x03\\x02\\x02\\x02\\u02A6\\u02A7\" +\n\t\t\"\\x05X-\\x02\\u02A7c\\x03\\x02\\x02\\x02\\u02A8\\u02A9\\x071\\x02\\x02\\u02A9\\u02AA\" +\n\t\t\"\\x07\\x19\\x02\\x02\\u02AA\\u02AB\\x05\\x86D\\x02\\u02AB\\u02AC\\x07\\x1A\\x02\\x02\" +\n\t\t\"\\u02AC\\u02AD\\x05Z.\\x02\\u02ADe\\x03\\x02\\x02\\x02\\u02AE\\u02B1\\x05~@\\x02\\u02AF\" +\n\t\t\"\\u02B1\\x05\\\\/\\x02\\u02B0\\u02AE\\x03\\x02\\x02\\x02\\u02B0\\u02AF\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02B1g\\x03\\x02\\x02\\x02\\u02B2\\u02B3\\x072\\x02\\x02\\u02B3\\u02B4\\x05X\" +\n\t\t\"-\\x02\\u02B4i\\x03\\x02\\x02\\x02\\u02B5\\u02B6\\x07\\x1D\\x02\\x02\\u02B6\\u02B9\\x07\" +\n\t\t\"\\x19\\x02\\x02\\u02B7\\u02BA\\x05f4\\x02\\u02B8\\u02BA\\x07\\x04\\x02\\x02\\u02B9\\u02B7\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u02B9\\u02B8\\x03\\x02\\x02\\x02\\u02BA\\u02BD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02BB\\u02BE\\x05\\\\/\\x02\\u02BC\\u02BE\\x07\\x04\\x02\\x02\\u02BD\\u02BB\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02BD\\u02BC\\x03\\x02\\x02\\x02\\u02BE\\u02C0\\x03\\x02\\x02\\x02\\u02BF\" +\n\t\t\"\\u02C1\\x05\\x86D\\x02\\u02C0\\u02BF\\x03\\x02\\x02\\x02\\u02C0\\u02C1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02C1\\u02C2\\x03\\x02\\x02\\x02\\u02C2\\u02C3\\x07\\x1A\\x02\\x02\\u02C3\\u02C4\" +\n\t\t\"\\x05Z.\\x02\\u02C4k\\x03\\x02\\x02\\x02\\u02C5\\u02C7\\x073\\x02\\x02\\u02C6\\u02C8\" +\n\t\t\"\\x07\\x84\\x02\\x02\\u02C7\\u02C6\\x03\\x02\\x02\\x02\\u02C7\\u02C8\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02C8\\u02CD\\x03\\x02\\x02\\x02\\u02C9\\u02CA\\x07\\x19\\x02\\x02\\u02CA\\u02CB\\x05\" +\n\t\t\"n8\\x02\\u02CB\\u02CC\\x07\\x1A\\x02\\x02\\u02CC\\u02CE\\x03\\x02\\x02\\x02\\u02CD\\u02C9\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u02CD\\u02CE\\x03\\x02\\x02\\x02\\u02CE\\u02CF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02CF\\u02D0\\x05\\x94K\\x02\\u02D0m\\x03\\x02\\x02\\x02\\u02D1\\u02D2\\x05\\xC4c\" +\n\t\t\"\\x02\\u02D2o\\x03\\x02\\x02\\x02\\u02D3\\u02D4\\x074\\x02\\x02\\u02D4\\u02D5\\x05Z\" +\n\t\t\".\\x02\\u02D5\\u02D6\\x071\\x02\\x02\\u02D6\\u02D7\\x07\\x19\\x02\\x02\\u02D7\\u02D8\" +\n\t\t\"\\x05\\x86D\\x02\\u02D8\\u02D9\\x07\\x1A\\x02\\x02\\u02D9\\u02DA\\x07\\x04\\x02\\x02\" +\n\t\t\"\\u02DAq\\x03\\x02\\x02\\x02\\u02DB\\u02DC\\x07s\\x02\\x02\\u02DC\\u02DD\\x07\\x04\\x02\" +\n\t\t\"\\x02\\u02DDs\\x03\\x02\\x02\\x02\\u02DE\\u02DF\\x07p\\x02\\x02\\u02DF\\u02E0\\x07\\x04\" +\n\t\t\"\\x02\\x02\\u02E0u\\x03\\x02\\x02\\x02\\u02E1\\u02E3\\x075\\x02\\x02\\u02E2\\u02E4\\x05\" +\n\t\t\"\\x86D\\x02\\u02E3\\u02E2\\x03\\x02\\x02\\x02\\u02E3\\u02E4\\x03\\x02\\x02\\x02\\u02E4\" +\n\t\t\"\\u02E5\\x03\\x02\\x02\\x02\\u02E5\\u02E6\\x07\\x04\\x02\\x02\\u02E6w\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02E7\\u02E8\\x076\\x02\\x02\\u02E8\\u02E9\\x07\\x04\\x02\\x02\\u02E9y\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02EA\\u02EB\\x077\\x02\\x02\\u02EB\\u02EC\\x05\\x92J\\x02\\u02EC\\u02ED\" +\n\t\t\"\\x07\\x04\\x02\\x02\\u02ED{\\x03\\x02\\x02\\x02\\u02EE\\u02EF\\x078\\x02\\x02\\u02EF\" +\n\t\t\"\\u02F0\\x05\\x92J\\x02\\u02F0\\u02F1\\x07\\x04\\x02\\x02\\u02F1}\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02F2\\u02F3\\x079\\x02\\x02\\u02F3\\u02FA\\x05\\x82B\\x02\\u02F4\\u02FA\\x05H%\\x02\" +\n\t\t\"\\u02F5\\u02F6\\x07\\x19\\x02\\x02\\u02F6\\u02F7\\x05\\x80A\\x02\\u02F7\\u02F8\\x07\" +\n\t\t\"\\x1A\\x02\\x02\\u02F8\\u02FA\\x03\\x02\\x02\\x02\\u02F9\\u02F2\\x03\\x02\\x02\\x02\\u02F9\" +\n\t\t\"\\u02F4\\x03\\x02\\x02\\x02\\u02F9\\u02F5\\x03\\x02\\x02\\x02\\u02FA\\u02FD\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02FB\\u02FC\\x07\\r\\x02\\x02\\u02FC\\u02FE\\x05\\x86D\\x02\\u02FD\\u02FB\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u02FD\\u02FE\\x03\\x02\\x02\\x02\\u02FE\\u02FF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02FF\\u0300\\x07\\x04\\x02\\x02\\u0300\\x7F\\x03\\x02\\x02\\x02\\u0301\\u0303\\x05\" +\n\t\t\"H%\\x02\\u0302\\u0301\\x03\\x02\\x02\\x02\\u0302\\u0303\\x03\\x02\\x02\\x02\\u0303\\u030A\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0304\\u0306\\x07\\x12\\x02\\x02\\u0305\\u0307\\x05H%\\x02\\u0306\" +\n\t\t\"\\u0305\\x03\\x02\\x02\\x02\\u0306\\u0307\\x03\\x02\\x02\\x02\\u0307\\u0309\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0308\\u0304\\x03\\x02\\x02\\x02\\u0309\\u030C\\x03\\x02\\x02\\x02\\u030A\" +\n\t\t\"\\u0308\\x03\\x02\\x02\\x02\\u030A\\u030B\\x03\\x02\\x02\\x02\\u030B\\x81\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u030C\\u030A\\x03\\x02\\x02\\x02\\u030D\\u0314\\x07\\x19\\x02\\x02\\u030E\\u0310\" +\n\t\t\"\\x05\\xBE`\\x02\\u030F\\u030E\\x03\\x02\\x02\\x02\\u030F\\u0310\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0310\\u0311\\x03\\x02\\x02\\x02\\u0311\\u0313\\x07\\x12\\x02\\x02\\u0312\\u030F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0313\\u0316\\x03\\x02\\x02\\x02\\u0314\\u0312\\x03\\x02\\x02\\x02\\u0314\" +\n\t\t\"\\u0315\\x03\\x02\\x02\\x02\\u0315\\u0318\\x03\\x02\\x02\\x02\\u0316\\u0314\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0317\\u0319\\x05\\xBE`\\x02\\u0318\\u0317\\x03\\x02\\x02\\x02\\u0318\\u0319\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0319\\u031A\\x03\\x02\\x02\\x02\\u031A\\u031B\\x07\\x1A\\x02\\x02\" +\n\t\t\"\\u031B\\x83\\x03\\x02\\x02\\x02\\u031C\\u031D\\t\\x06\\x02\\x02\\u031D\\x85\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u031E\\u031F\\bD\\x01\\x02\\u031F\\u0320\\x07?\\x02\\x02\\u0320\\u0331\\x05\" +\n\t\t\"J&\\x02\\u0321\\u0322\\x07\\x19\\x02\\x02\\u0322\\u0323\\x05\\x86D\\x02\\u0323\\u0324\" +\n\t\t\"\\x07\\x1A\\x02\\x02\\u0324\\u0331\\x03\\x02\\x02\\x02\\u0325\\u0326\\t\\x07\\x02\\x02\" +\n\t\t\"\\u0326\\u0331\\x05\\x86D\\x15\\u0327\\u0328\\t\\b\\x02\\x02\\u0328\\u0331\\x05\\x86\" +\n\t\t\"D\\x14\\u0329\\u032A\\t\\t\\x02\\x02\\u032A\\u0331\\x05\\x86D\\x13\\u032B\\u032C\\x07\" +\n\t\t\"E\\x02\\x02\\u032C\\u0331\\x05\\x86D\\x12\\u032D\\u032E\\x07\\b\\x02\\x02\\u032E\\u0331\" +\n\t\t\"\\x05\\x86D\\x11\\u032F\\u0331\\x05\\x88E\\x02\\u0330\\u031E\\x03\\x02\\x02\\x02\\u0330\" +\n\t\t\"\\u0321\\x03\\x02\\x02\\x02\\u0330\\u0325\\x03\\x02\\x02\\x02\\u0330\\u0327\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0330\\u0329\\x03\\x02\\x02\\x02\\u0330\\u032B\\x03\\x02\\x02\\x02\\u0330\" +\n\t\t\"\\u032D\\x03\\x02\\x02\\x02\\u0330\\u032F\\x03\\x02\\x02\\x02\\u0331\\u037C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0332\\u0333\\f\\x10\\x02\\x02\\u0333\\u0334\\x07F\\x02\\x02\\u0334\\u037B\" +\n\t\t\"\\x05\\x86D\\x11\\u0335\\u0336\\f\\x0F\\x02\\x02\\u0336\\u0337\\t\\n\\x02\\x02\\u0337\" +\n\t\t\"\\u037B\\x05\\x86D\\x10\\u0338\\u0339\\f\\x0E\\x02\\x02\\u0339\\u033A\\t\\b\\x02\\x02\" +\n\t\t\"\\u033A\\u037B\\x05\\x86D\\x0F\\u033B\\u033C\\f\\r\\x02\\x02\\u033C\\u033D\\t\\v\\x02\" +\n\t\t\"\\x02\\u033D\\u037B\\x05\\x86D\\x0E\\u033E\\u033F\\f\\f\\x02\\x02\\u033F\\u0340\\x07\" +\n\t\t\"K\\x02\\x02\\u0340\\u037B\\x05\\x86D\\r\\u0341\\u0342\\f\\v\\x02\\x02\\u0342\\u0343\\x07\" +\n\t\t\"\\x07\\x02\\x02\\u0343\\u037B\\x05\\x86D\\f\\u0344\\u0345\\f\\n\\x02\\x02\\u0345\\u0346\" +\n\t\t\"\\x07L\\x02\\x02\\u0346\\u037B\\x05\\x86D\\v\\u0347\\u0348\\f\\t\\x02\\x02\\u0348\\u0349\" +\n\t\t\"\\t\\f\\x02\\x02\\u0349\\u037B\\x05\\x86D\\n\\u034A\\u034B\\f\\b\\x02\\x02\\u034B\\u034C\" +\n\t\t\"\\t\\r\\x02\\x02\\u034C\\u037B\\x05\\x86D\\t\\u034D\\u034E\\f\\x07\\x02\\x02\\u034E\\u034F\" +\n\t\t\"\\x07O\\x02\\x02\\u034F\\u037B\\x05\\x86D\\b\\u0350\\u0351\\f\\x06\\x02\\x02\\u0351\\u0352\" +\n\t\t\"\\x07\\x06\\x02\\x02\\u0352\\u037B\\x05\\x86D\\x07\\u0353\\u0354\\f\\x05\\x02\\x02\\u0354\" +\n\t\t\"\\u0355\\x07P\\x02\\x02\\u0355\\u0356\\x05\\x86D\\x02\\u0356\\u0357\\x07@\\x02\\x02\" +\n\t\t\"\\u0357\\u0358\\x05\\x86D\\x06\\u0358\\u037B\\x03\\x02\\x02\\x02\\u0359\\u035A\\f\\x04\" +\n\t\t\"\\x02\\x02\\u035A\\u035B\\t\\x0E\\x02\\x02\\u035B\\u037B\\x05\\x86D\\x05\\u035C\\u035D\" +\n\t\t\"\\f\\x1D\\x02\\x02\\u035D\\u037B\\t\\x07\\x02\\x02\\u035E\\u035F\\f\\x1B\\x02\\x02\\u035F\" +\n\t\t\"\\u0360\\x07$\\x02\\x02\\u0360\\u0361\\x05\\x86D\\x02\\u0361\\u0362\\x07%\\x02\\x02\" +\n\t\t\"\\u0362\\u037B\\x03\\x02\\x02\\x02\\u0363\\u0364\\f\\x1A\\x02\\x02\\u0364\\u0366\\x07\" +\n\t\t\"$\\x02\\x02\\u0365\\u0367\\x05\\x86D\\x02\\u0366\\u0365\\x03\\x02\\x02\\x02\\u0366\\u0367\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0367\\u0368\\x03\\x02\\x02\\x02\\u0368\\u036A\\x07@\\x02\\x02\" +\n\t\t\"\\u0369\\u036B\\x05\\x86D\\x02\\u036A\\u0369\\x03\\x02\\x02\\x02\\u036A\\u036B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u036B\\u036C\\x03\\x02\\x02\\x02\\u036C\\u037B\\x07%\\x02\\x02\\u036D\" +\n\t\t\"\\u036E\\f\\x19\\x02\\x02\\u036E\\u036F\\x07\\'\\x02\\x02\\u036F\\u037B\\x05\\xBE`\\x02\" +\n\t\t\"\\u0370\\u0371\\f\\x18\\x02\\x02\\u0371\\u0372\\x07\\x11\\x02\\x02\\u0372\\u0373\\x05\" +\n\t\t\"\\x8CG\\x02\\u0373\\u0374\\x07\\x13\\x02\\x02\\u0374\\u037B\\x03\\x02\\x02\\x02\\u0375\" +\n\t\t\"\\u0376\\f\\x17\\x02\\x02\\u0376\\u0377\\x07\\x19\\x02\\x02\\u0377\\u0378\\x05\\x90I\" +\n\t\t\"\\x02\\u0378\\u0379\\x07\\x1A\\x02\\x02\\u0379\\u037B\\x03\\x02\\x02\\x02\\u037A\\u0332\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u037A\\u0335\\x03\\x02\\x02\\x02\\u037A\\u0338\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u037A\\u033B\\x03\\x02\\x02\\x02\\u037A\\u033E\\x03\\x02\\x02\\x02\\u037A\\u0341\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u037A\\u0344\\x03\\x02\\x02\\x02\\u037A\\u0347\\x03\\x02\\x02\\x02\\u037A\" +\n\t\t\"\\u034A\\x03\\x02\\x02\\x02\\u037A\\u034D\\x03\\x02\\x02\\x02\\u037A\\u0350\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u037A\\u0353\\x03\\x02\\x02\\x02\\u037A\\u0359\\x03\\x02\\x02\\x02\\u037A\" +\n\t\t\"\\u035C\\x03\\x02\\x02\\x02\\u037A\\u035E\\x03\\x02\\x02\\x02\\u037A\\u0363\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u037A\\u036D\\x03\\x02\\x02\\x02\\u037A\\u0370\\x03\\x02\\x02\\x02\\u037A\" +\n\t\t\"\\u0375\\x03\\x02\\x02\\x02\\u037B\\u037E\\x03\\x02\\x02\\x02\\u037C\\u037A\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u037C\\u037D\\x03\\x02\\x02\\x02\\u037D\\x87\\x03\\x02\\x02\\x02\\u037E\\u037C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u037F\\u0389\\x07i\\x02\\x02\\u0380\\u0389\\x05\\xBC_\\x02\\u0381\" +\n\t\t\"\\u0389\\x05\\xC0a\\x02\\u0382\\u0389\\x05\\xC4c\\x02\\u0383\\u0389\\x05\\xBE`\\x02\" +\n\t\t\"\\u0384\\u0389\\x07}\\x02\\x02\\u0385\\u0389\\x07x\\x02\\x02\\u0386\\u0389\\x05\\xBA\" +\n\t\t\"^\\x02\\u0387\\u0389\\x05J&\\x02\\u0388\\u037F\\x03\\x02\\x02\\x02\\u0388\\u0380\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0388\\u0381\\x03\\x02\\x02\\x02\\u0388\\u0382\\x03\\x02\\x02\\x02\\u0388\" +\n\t\t\"\\u0383\\x03\\x02\\x02\\x02\\u0388\\u0384\\x03\\x02\\x02\\x02\\u0388\\u0385\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0388\\u0386\\x03\\x02\\x02\\x02\\u0388\\u0387\\x03\\x02\\x02\\x02\\u0389\" +\n\t\t\"\\x89\\x03\\x02\\x02\\x02\\u038A\\u038F\\x05\\x86D\\x02\\u038B\\u038C\\x07\\x12\\x02\" +\n\t\t\"\\x02\\u038C\\u038E\\x05\\x86D\\x02\\u038D\\u038B\\x03\\x02\\x02\\x02\\u038E\\u0391\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u038F\\u038D\\x03\\x02\\x02\\x02\\u038F\\u0390\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0390\\x8B\\x03\\x02\\x02\\x02\\u0391\\u038F\\x03\\x02\\x02\\x02\\u0392\\u0397\\x05\" +\n\t\t\"\\x8EH\\x02\\u0393\\u0394\\x07\\x12\\x02\\x02\\u0394\\u0396\\x05\\x8EH\\x02\\u0395\\u0393\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0396\\u0399\\x03\\x02\\x02\\x02\\u0397\\u0395\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0397\\u0398\\x03\\x02\\x02\\x02\\u0398\\u039B\\x03\\x02\\x02\\x02\\u0399\\u0397\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u039A\\u039C\\x07\\x12\\x02\\x02\\u039B\\u039A\\x03\\x02\\x02\\x02\\u039B\" +\n\t\t\"\\u039C\\x03\\x02\\x02\\x02\\u039C\\x8D\\x03\\x02\\x02\\x02\\u039D\\u039E\\x05\\xBE`\" +\n\t\t\"\\x02\\u039E\\u039F\\x07@\\x02\\x02\\u039F\\u03A0\\x05\\x86D\\x02\\u03A0\\x8F\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03A1\\u03A3\\x07\\x11\\x02\\x02\\u03A2\\u03A4\\x05\\x8CG\\x02\\u03A3\\u03A2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u03A3\\u03A4\\x03\\x02\\x02\\x02\\u03A4\\u03A5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03A5\\u03AA\\x07\\x13\\x02\\x02\\u03A6\\u03A8\\x05\\x8AF\\x02\\u03A7\\u03A6\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03A7\\u03A8\\x03\\x02\\x02\\x02\\u03A8\\u03AA\\x03\\x02\\x02\\x02\\u03A9\" +\n\t\t\"\\u03A1\\x03\\x02\\x02\\x02\\u03A9\\u03A7\\x03\\x02\\x02\\x02\\u03AA\\x91\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u03AB\\u03AC\\x05\\x86D\\x02\\u03AC\\u03AD\\x07\\x19\\x02\\x02\\u03AD\\u03AE\" +\n\t\t\"\\x05\\x90I\\x02\\u03AE\\u03AF\\x07\\x1A\\x02\\x02\\u03AF\\x93\\x03\\x02\\x02\\x02\\u03B0\" +\n\t\t\"\\u03B4\\x07\\x11\\x02\\x02\\u03B1\\u03B3\\x05\\x96L\\x02\\u03B2\\u03B1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u03B3\\u03B6\\x03\\x02\\x02\\x02\\u03B4\\u03B2\\x03\\x02\\x02\\x02\\u03B4\\u03B5\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u03B5\\u03B7\\x03\\x02\\x02\\x02\\u03B6\\u03B4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03B7\\u03B8\\x07\\x13\\x02\\x02\\u03B8\\x95\\x03\\x02\\x02\\x02\\u03B9\\u03CC\\x05\" +\n\t\t\"\\xBE`\\x02\\u03BA\\u03CC\\x05\\x94K\\x02\\u03BB\\u03CC\\x05\\x98M\\x02\\u03BC\\u03CC\" +\n\t\t\"\\x05\\x9EP\\x02\\u03BD\\u03CC\\x05\\xA0Q\\x02\\u03BE\\u03CC\\x05\\xA6T\\x02\\u03BF\" +\n\t\t\"\\u03CC\\x05\\xA8U\\x02\\u03C0\\u03CC\\x05\\xAAV\\x02\\u03C1\\u03CC\\x05\\xAEX\\x02\" +\n\t\t\"\\u03C2\\u03CC\\x05\\xB2Z\\x02\\u03C3\\u03CC\\x05\\xB4[\\x02\\u03C4\\u03CC\\x07p\\x02\" +\n\t\t\"\\x02\\u03C5\\u03CC\\x07s\\x02\\x02\\u03C6\\u03CC\\x07t\\x02\\x02\\u03C7\\u03CC\\x05\" +\n\t\t\"\\xB8]\\x02\\u03C8\\u03CC\\x05\\xBC_\\x02\\u03C9\\u03CC\\x05\\xC4c\\x02\\u03CA\\u03CC\" +\n\t\t\"\\x05\\xC0a\\x02\\u03CB\\u03B9\\x03\\x02\\x02\\x02\\u03CB\\u03BA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03CB\\u03BB\\x03\\x02\\x02\\x02\\u03CB\\u03BC\\x03\\x02\\x02\\x02\\u03CB\\u03BD\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03CB\\u03BE\\x03\\x02\\x02\\x02\\u03CB\\u03BF\\x03\\x02\\x02\\x02\\u03CB\" +\n\t\t\"\\u03C0\\x03\\x02\\x02\\x02\\u03CB\\u03C1\\x03\\x02\\x02\\x02\\u03CB\\u03C2\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03CB\\u03C3\\x03\\x02\\x02\\x02\\u03CB\\u03C4\\x03\\x02\\x02\\x02\\u03CB\" +\n\t\t\"\\u03C5\\x03\\x02\\x02\\x02\\u03CB\\u03C6\\x03\\x02\\x02\\x02\\u03CB\\u03C7\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03CB\\u03C8\\x03\\x02\\x02\\x02\\u03CB\\u03C9\\x03\\x02\\x02\\x02\\u03CB\" +\n\t\t\"\\u03CA\\x03\\x02\\x02\\x02\\u03CC\\x97\\x03\\x02\\x02\\x02\\u03CD\\u03D1\\x05\\x9CO\" +\n\t\t\"\\x02\\u03CE\\u03D1\\x05\\xB6\\\\\\x02\\u03CF\\u03D1\\x05\\x9AN\\x02\\u03D0\\u03CD\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03D0\\u03CE\\x03\\x02\\x02\\x02\\u03D0\\u03CF\\x03\\x02\\x02\\x02\\u03D1\" +\n\t\t\"\\x99\\x03\\x02\\x02\\x02\\u03D2\\u03D3\\x05\\xBE`\\x02\\u03D3\\u03D4\\x07\\'\\x02\\x02\" +\n\t\t\"\\u03D4\\u03D5\\x05\\xBE`\\x02\\u03D5\\x9B\\x03\\x02\\x02\\x02\\u03D6\\u03DB\\x075\\x02\" +\n\t\t\"\\x02\\u03D7\\u03DB\\x07&\\x02\\x02\\u03D8\\u03DB\\x07<\\x02\\x02\\u03D9\\u03DB\\x05\" +\n\t\t\"\\xBE`\\x02\\u03DA\\u03D6\\x03\\x02\\x02\\x02\\u03DA\\u03D7\\x03\\x02\\x02\\x02\\u03DA\" +\n\t\t\"\\u03D8\\x03\\x02\\x02\\x02\\u03DA\\u03D9\\x03\\x02\\x02\\x02\\u03DB\\u03E8\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03DC\\u03DE\\x07\\x19\\x02\\x02\\u03DD\\u03DF\\x05\\x98M\\x02\\u03DE\\u03DD\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u03DE\\u03DF\\x03\\x02\\x02\\x02\\u03DF\\u03E4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03E0\\u03E1\\x07\\x12\\x02\\x02\\u03E1\\u03E3\\x05\\x98M\\x02\\u03E2\\u03E0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03E3\\u03E6\\x03\\x02\\x02\\x02\\u03E4\\u03E2\\x03\\x02\\x02\\x02\\u03E4\" +\n\t\t\"\\u03E5\\x03\\x02\\x02\\x02\\u03E5\\u03E7\\x03\\x02\\x02\\x02\\u03E6\\u03E4\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03E7\\u03E9\\x07\\x1A\\x02\\x02\\u03E8\\u03DC\\x03\\x02\\x02\\x02\\u03E8\" +\n\t\t\"\\u03E9\\x03\\x02\\x02\\x02\\u03E9\\x9D\\x03\\x02\\x02\\x02\\u03EA\\u03EB\\x07[\\x02\" +\n\t\t\"\\x02\\u03EB\\u03EE\\x05\\xA2R\\x02\\u03EC\\u03ED\\x07\\\\\\x02\\x02\\u03ED\\u03EF\\x05\" +\n\t\t\"\\x98M\\x02\\u03EE\\u03EC\\x03\\x02\\x02\\x02\\u03EE\\u03EF\\x03\\x02\\x02\\x02\\u03EF\" +\n\t\t\"\\x9F\\x03\\x02\\x02\\x02\\u03F0\\u03F1\\x05\\xA2R\\x02\\u03F1\\u03F2\\x07\\\\\\x02\\x02\" +\n\t\t\"\\u03F2\\u03F3\\x05\\x98M\\x02\\u03F3\\xA1\\x03\\x02\\x02\\x02\\u03F4\\u03FB\\x05\\xBE\" +\n\t\t\"`\\x02\\u03F5\\u03FB\\x05\\x9AN\\x02\\u03F6\\u03F7\\x07\\x19\\x02\\x02\\u03F7\\u03F8\" +\n\t\t\"\\x05\\xA4S\\x02\\u03F8\\u03F9\\x07\\x1A\\x02\\x02\\u03F9\\u03FB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03FA\\u03F4\\x03\\x02\\x02\\x02\\u03FA\\u03F5\\x03\\x02\\x02\\x02\\u03FA\\u03F6\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03FB\\xA3\\x03\\x02\\x02\\x02\\u03FC\\u0401\\x05\\xBE`\\x02\\u03FD\" +\n\t\t\"\\u03FE\\x07\\x12\\x02\\x02\\u03FE\\u0400\\x05\\xBE`\\x02\\u03FF\\u03FD\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0400\\u0403\\x03\\x02\\x02\\x02\\u0401\\u03FF\\x03\\x02\\x02\\x02\\u0401\\u0402\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0402\\xA5\\x03\\x02\\x02\\x02\\u0403\\u0401\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0404\\u0405\\x05\\x98M\\x02\\u0405\\u0406\\x07]\\x02\\x02\\u0406\\u0407\\x05\\xBE\" +\n\t\t\"`\\x02\\u0407\\xA7\\x03\\x02\\x02\\x02\\u0408\\u0409\\x05\\xBE`\\x02\\u0409\\u040A\\x07\" +\n\t\t\"@\\x02\\x02\\u040A\\xA9\\x03\\x02\\x02\\x02\\u040B\\u040C\\x07^\\x02\\x02\\u040C\\u0410\" +\n\t\t\"\\x05\\x98M\\x02\\u040D\\u040F\\x05\\xACW\\x02\\u040E\\u040D\\x03\\x02\\x02\\x02\\u040F\" +\n\t\t\"\\u0412\\x03\\x02\\x02\\x02\\u0410\\u040E\\x03\\x02\\x02\\x02\\u0410\\u0411\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0411\\xAB\\x03\\x02\\x02\\x02\\u0412\\u0410\\x03\\x02\\x02\\x02\\u0413\\u0414\" +\n\t\t\"\\x07_\\x02\\x02\\u0414\\u0415\\x05\\xB6\\\\\\x02\\u0415\\u0416\\x05\\x94K\\x02\\u0416\" +\n\t\t\"\\u041A\\x03\\x02\\x02\\x02\\u0417\\u0418\\x07`\\x02\\x02\\u0418\\u041A\\x05\\x94K\\x02\" +\n\t\t\"\\u0419\\u0413\\x03\\x02\\x02\\x02\\u0419\\u0417\\x03\\x02\\x02\\x02\\u041A\\xAD\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u041B\\u041C\\x07 \\x02\\x02\\u041C\\u041D\\x05\\xBE`\\x02\\u041D\\u041F\" +\n\t\t\"\\x07\\x19\\x02\\x02\\u041E\\u0420\\x05\\xA4S\\x02\\u041F\\u041E\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u041F\\u0420\\x03\\x02\\x02\\x02\\u0420\\u0421\\x03\\x02\\x02\\x02\\u0421\\u0423\\x07\" +\n\t\t\"\\x1A\\x02\\x02\\u0422\\u0424\\x05\\xB0Y\\x02\\u0423\\u0422\\x03\\x02\\x02\\x02\\u0423\" +\n\t\t\"\\u0424\\x03\\x02\\x02\\x02\\u0424\\u0425\\x03\\x02\\x02\\x02\\u0425\\u0426\\x05\\x94\" +\n\t\t\"K\\x02\\u0426\\xAF\\x03\\x02\\x02\\x02\\u0427\\u0428\\x07a\\x02\\x02\\u0428\\u0429\\x05\" +\n\t\t\"\\xA4S\\x02\\u0429\\xB1\\x03\\x02\\x02\\x02\\u042A\\u042D\\x07\\x1D\\x02\\x02\\u042B\" +\n\t\t\"\\u042E\\x05\\x94K\\x02\\u042C\\u042E\\x05\\x98M\\x02\\u042D\\u042B\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u042D\\u042C\\x03\\x02\\x02\\x02\\u042E\\u042F\\x03\\x02\\x02\\x02\\u042F\\u0432\\x05\" +\n\t\t\"\\x98M\\x02\\u0430\\u0433\\x05\\x94K\\x02\\u0431\\u0433\\x05\\x98M\\x02\\u0432\\u0430\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0432\\u0431\\x03\\x02\\x02\\x02\\u0433\\u0434\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0434\\u0435\\x05\\x94K\\x02\\u0435\\xB3\\x03\\x02\\x02\\x02\\u0436\\u0437\\x07-\\x02\" +\n\t\t\"\\x02\\u0437\\u0438\\x05\\x98M\\x02\\u0438\\u0439\\x05\\x94K\\x02\\u0439\\xB5\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u043A\\u043F\\x05\\xC4c\\x02\\u043B\\u043F\\x07j\\x02\\x02\\u043C\\u043F\" +\n\t\t\"\\x07k\\x02\\x02\\u043D\\u043F\\x05\\xC0a\\x02\\u043E\\u043A\\x03\\x02\\x02\\x02\\u043E\" +\n\t\t\"\\u043B\\x03\\x02\\x02\\x02\\u043E\\u043C\\x03\\x02\\x02\\x02\\u043E\\u043D\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u043F\\xB7\\x03\\x02\\x02\\x02\\u0440\\u0441\\x073\\x02\\x02\\u0441\\u0442\" +\n\t\t\"\\x05\\xBE`\\x02\\u0442\\u0443\\x05\\x94K\\x02\\u0443\\xB9\\x03\\x02\";\n\tprivate static readonly _serializedATNSegment2: string =\n\t\t\"\\x02\\x02\\u0444\\u0446\\x07\\x19\\x02\\x02\\u0445\\u0447\\x05\\x86D\\x02\\u0446\\u0445\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0446\\u0447\\x03\\x02\\x02\\x02\\u0447\\u044E\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0448\\u044A\\x07\\x12\\x02\\x02\\u0449\\u044B\\x05\\x86D\\x02\\u044A\\u0449\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u044A\\u044B\\x03\\x02\\x02\\x02\\u044B\\u044D\\x03\\x02\\x02\\x02\\u044C\" +\n\t\t\"\\u0448\\x03\\x02\\x02\\x02\\u044D\\u0450\\x03\\x02\\x02\\x02\\u044E\\u044C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u044E\\u044F\\x03\\x02\\x02\\x02\\u044F\\u0451\\x03\\x02\\x02\\x02\\u0450\" +\n\t\t\"\\u044E\\x03\\x02\\x02\\x02\\u0451\\u045F\\x07\\x1A\\x02\\x02\\u0452\\u045B\\x07$\\x02\" +\n\t\t\"\\x02\\u0453\\u0458\\x05\\x86D\\x02\\u0454\\u0455\\x07\\x12\\x02\\x02\\u0455\\u0457\" +\n\t\t\"\\x05\\x86D\\x02\\u0456\\u0454\\x03\\x02\\x02\\x02\\u0457\\u045A\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0458\\u0456\\x03\\x02\\x02\\x02\\u0458\\u0459\\x03\\x02\\x02\\x02\\u0459\\u045C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u045A\\u0458\\x03\\x02\\x02\\x02\\u045B\\u0453\\x03\\x02\\x02\\x02\\u045B\" +\n\t\t\"\\u045C\\x03\\x02\\x02\\x02\\u045C\\u045D\\x03\\x02\\x02\\x02\\u045D\\u045F\\x07%\\x02\" +\n\t\t\"\\x02\\u045E\\u0444\\x03\\x02\\x02\\x02\\u045E\\u0452\\x03\\x02\\x02\\x02\\u045F\\xBB\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0460\\u0462\\t\\x0F\\x02\\x02\\u0461\\u0463\\x07l\\x02\\x02\\u0462\" +\n\t\t\"\\u0461\\x03\\x02\\x02\\x02\\u0462\\u0463\\x03\\x02\\x02\\x02\\u0463\\xBD\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0464\\u0465\\t\\x10\\x02\\x02\\u0465\\xBF\\x03\\x02\\x02\\x02\\u0466\\u0468\\x07\" +\n\t\t\"m\\x02\\x02\\u0467\\u0466\\x03\\x02\\x02\\x02\\u0468\\u0469\\x03\\x02\\x02\\x02\\u0469\" +\n\t\t\"\\u0467\\x03\\x02\\x02\\x02\\u0469\\u046A\\x03\\x02\\x02\\x02\\u046A\\xC1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u046B\\u0477\\x07c\\x02\\x02\\u046C\\u046D\\x07\\x19\\x02\\x02\\u046D\\u0472\" +\n\t\t\"\\x05L\\'\\x02\\u046E\\u046F\\x07\\x12\\x02\\x02\\u046F\\u0471\\x05L\\'\\x02\\u0470\\u046E\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0471\\u0474\\x03\\x02\\x02\\x02\\u0472\\u0470\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0472\\u0473\\x03\\x02\\x02\\x02\\u0473\\u0475\\x03\\x02\\x02\\x02\\u0474\\u0472\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0475\\u0476\\x07\\x1A\\x02\\x02\\u0476\\u0478\\x03\\x02\\x02\\x02\\u0477\" +\n\t\t\"\\u046C\\x03\\x02\\x02\\x02\\u0477\\u0478\\x03\\x02\\x02\\x02\\u0478\\xC3\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0479\\u047B\\x07\\x84\\x02\\x02\\u047A\\u0479\\x03\\x02\\x02\\x02\\u047B\\u047C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u047C\\u047A\\x03\\x02\\x02\\x02\\u047C\\u047D\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u047D\\xC5\\x03\\x02\\x02\\x02\\x81\\xD0\\xD2\\xE1\\xE5\\xEA\\xF0\\xF4\\xF7\\xFC\\u0102\" +\n\t\t\"\\u0109\\u010D\\u011A\\u0122\\u0127\\u0131\\u0134\\u013A\\u0142\\u0145\\u0150\\u0159\" +\n\t\t\"\\u015B\\u0161\\u017C\\u017F\\u018A\\u018F\\u019B\\u019E\\u01A5\\u01A9\\u01AB\\u01B0\" +\n\t\t\"\\u01B5\\u01B8\\u01BE\\u01C2\\u01C6\\u01CB\\u01D8\\u01DA\\u01E1\\u01EB\\u01F1\\u01FC\" +\n\t\t\"\\u01FF\\u0205\\u0208\\u0210\\u0213\\u0219\\u021C\\u0224\\u0227\\u022D\\u0231\\u023C\" +\n\t\t\"\\u0241\\u0246\\u024E\\u0253\\u0261\\u0263\\u0268\\u0272\\u0286\\u0292\\u0297\\u029D\" +\n\t\t\"\\u02A1\\u02A4\\u02B0\\u02B9\\u02BD\\u02C0\\u02C7\\u02CD\\u02E3\\u02F9\\u02FD\\u0302\" +\n\t\t\"\\u0306\\u030A\\u030F\\u0314\\u0318\\u0330\\u0366\\u036A\\u037A\\u037C\\u0388\\u038F\" +\n\t\t\"\\u0397\\u039B\\u03A3\\u03A7\\u03A9\\u03B4\\u03CB\\u03D0\\u03DA\\u03DE\\u03E4\\u03E8\" +\n\t\t\"\\u03EE\\u03FA\\u0401\\u0410\\u0419\\u041F\\u0423\\u042D\\u0432\\u043E\\u0446\\u044A\" +\n\t\t\"\\u044E\\u0458\\u045B\\u045E\\u0462\\u0469\\u0472\\u0477\\u047C\";\n\tpublic static readonly _serializedATN: string = Utils.join(\n\t\t[\n\t\t\tSolidityParser._serializedATNSegment0,\n\t\t\tSolidityParser._serializedATNSegment1,\n\t\t\tSolidityParser._serializedATNSegment2,\n\t\t],\n\t\t\"\",\n\t);\n\tpublic static __ATN: ATN;\n\tpublic static get _ATN(): ATN {\n\t\tif (!SolidityParser.__ATN) {\n\t\t\tSolidityParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(SolidityParser._serializedATN));\n\t\t}\n\n\t\treturn SolidityParser.__ATN;\n\t}\n\n}\n\nexport class SourceUnitContext extends ParserRuleContext {\n\tpublic EOF(): TerminalNode { return this.getToken(SolidityParser.EOF, 0); }\n\tpublic pragmaDirective(): PragmaDirectiveContext[];\n\tpublic pragmaDirective(i: number): PragmaDirectiveContext;\n\tpublic pragmaDirective(i?: number): PragmaDirectiveContext | PragmaDirectiveContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(PragmaDirectiveContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, PragmaDirectiveContext);\n\t\t}\n\t}\n\tpublic importDirective(): ImportDirectiveContext[];\n\tpublic importDirective(i: number): ImportDirectiveContext;\n\tpublic importDirective(i?: number): ImportDirectiveContext | ImportDirectiveContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ImportDirectiveContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ImportDirectiveContext);\n\t\t}\n\t}\n\tpublic contractDefinition(): ContractDefinitionContext[];\n\tpublic contractDefinition(i: number): ContractDefinitionContext;\n\tpublic contractDefinition(i?: number): ContractDefinitionContext | ContractDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ContractDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ContractDefinitionContext);\n\t\t}\n\t}\n\tpublic enumDefinition(): EnumDefinitionContext[];\n\tpublic enumDefinition(i: number): EnumDefinitionContext;\n\tpublic enumDefinition(i?: number): EnumDefinitionContext | EnumDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(EnumDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, EnumDefinitionContext);\n\t\t}\n\t}\n\tpublic structDefinition(): StructDefinitionContext[];\n\tpublic structDefinition(i: number): StructDefinitionContext;\n\tpublic structDefinition(i?: number): StructDefinitionContext | StructDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StructDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StructDefinitionContext);\n\t\t}\n\t}\n\tpublic functionDefinition(): FunctionDefinitionContext[];\n\tpublic functionDefinition(i: number): FunctionDefinitionContext;\n\tpublic functionDefinition(i?: number): FunctionDefinitionContext | FunctionDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FunctionDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FunctionDefinitionContext);\n\t\t}\n\t}\n\tpublic fileLevelConstant(): FileLevelConstantContext[];\n\tpublic fileLevelConstant(i: number): FileLevelConstantContext;\n\tpublic fileLevelConstant(i?: number): FileLevelConstantContext | FileLevelConstantContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FileLevelConstantContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FileLevelConstantContext);\n\t\t}\n\t}\n\tpublic customErrorDefinition(): CustomErrorDefinitionContext[];\n\tpublic customErrorDefinition(i: number): CustomErrorDefinitionContext;\n\tpublic customErrorDefinition(i?: number): CustomErrorDefinitionContext | CustomErrorDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(CustomErrorDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, CustomErrorDefinitionContext);\n\t\t}\n\t}\n\tpublic typeDefinition(): TypeDefinitionContext[];\n\tpublic typeDefinition(i: number): TypeDefinitionContext;\n\tpublic typeDefinition(i?: number): TypeDefinitionContext | TypeDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(TypeDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, TypeDefinitionContext);\n\t\t}\n\t}\n\tpublic usingForDeclaration(): UsingForDeclarationContext[];\n\tpublic usingForDeclaration(i: number): UsingForDeclarationContext;\n\tpublic usingForDeclaration(i?: number): UsingForDeclarationContext | UsingForDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(UsingForDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, UsingForDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_sourceUnit; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterSourceUnit) {\n\t\t\tlistener.enterSourceUnit(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitSourceUnit) {\n\t\t\tlistener.exitSourceUnit(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitSourceUnit) {\n\t\t\treturn visitor.visitSourceUnit(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PragmaDirectiveContext extends ParserRuleContext {\n\tpublic pragmaName(): PragmaNameContext {\n\t\treturn this.getRuleContext(0, PragmaNameContext);\n\t}\n\tpublic pragmaValue(): PragmaValueContext {\n\t\treturn this.getRuleContext(0, PragmaValueContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_pragmaDirective; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPragmaDirective) {\n\t\t\tlistener.enterPragmaDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPragmaDirective) {\n\t\t\tlistener.exitPragmaDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPragmaDirective) {\n\t\t\treturn visitor.visitPragmaDirective(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PragmaNameContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_pragmaName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPragmaName) {\n\t\t\tlistener.enterPragmaName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPragmaName) {\n\t\t\tlistener.exitPragmaName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPragmaName) {\n\t\t\treturn visitor.visitPragmaName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PragmaValueContext extends ParserRuleContext {\n\tpublic version(): VersionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VersionContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_pragmaValue; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPragmaValue) {\n\t\t\tlistener.enterPragmaValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPragmaValue) {\n\t\t\tlistener.exitPragmaValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPragmaValue) {\n\t\t\treturn visitor.visitPragmaValue(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VersionContext extends ParserRuleContext {\n\tpublic versionConstraint(): VersionConstraintContext[];\n\tpublic versionConstraint(i: number): VersionConstraintContext;\n\tpublic versionConstraint(i?: number): VersionConstraintContext | VersionConstraintContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(VersionConstraintContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, VersionConstraintContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_version; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVersion) {\n\t\t\tlistener.enterVersion(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVersion) {\n\t\t\tlistener.exitVersion(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVersion) {\n\t\t\treturn visitor.visitVersion(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VersionOperatorContext extends ParserRuleContext {\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_versionOperator; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVersionOperator) {\n\t\t\tlistener.enterVersionOperator(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVersionOperator) {\n\t\t\tlistener.exitVersionOperator(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVersionOperator) {\n\t\t\treturn visitor.visitVersionOperator(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VersionConstraintContext extends ParserRuleContext {\n\tpublic VersionLiteral(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.VersionLiteral, 0); }\n\tpublic versionOperator(): VersionOperatorContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VersionOperatorContext);\n\t}\n\tpublic DecimalNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.DecimalNumber, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_versionConstraint; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVersionConstraint) {\n\t\t\tlistener.enterVersionConstraint(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVersionConstraint) {\n\t\t\tlistener.exitVersionConstraint(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVersionConstraint) {\n\t\t\treturn visitor.visitVersionConstraint(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ImportDeclarationContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_importDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterImportDeclaration) {\n\t\t\tlistener.enterImportDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitImportDeclaration) {\n\t\t\tlistener.exitImportDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitImportDeclaration) {\n\t\t\treturn visitor.visitImportDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ImportDirectiveContext extends ParserRuleContext {\n\tpublic importPath(): ImportPathContext {\n\t\treturn this.getRuleContext(0, ImportPathContext);\n\t}\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tpublic importDeclaration(): ImportDeclarationContext[];\n\tpublic importDeclaration(i: number): ImportDeclarationContext;\n\tpublic importDeclaration(i?: number): ImportDeclarationContext | ImportDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ImportDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ImportDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_importDirective; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterImportDirective) {\n\t\t\tlistener.enterImportDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitImportDirective) {\n\t\t\tlistener.exitImportDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitImportDirective) {\n\t\t\treturn visitor.visitImportDirective(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ImportPathContext extends ParserRuleContext {\n\tpublic StringLiteralFragment(): TerminalNode { return this.getToken(SolidityParser.StringLiteralFragment, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_importPath; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterImportPath) {\n\t\t\tlistener.enterImportPath(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitImportPath) {\n\t\t\tlistener.exitImportPath(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitImportPath) {\n\t\t\treturn visitor.visitImportPath(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ContractDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic inheritanceSpecifier(): InheritanceSpecifierContext[];\n\tpublic inheritanceSpecifier(i: number): InheritanceSpecifierContext;\n\tpublic inheritanceSpecifier(i?: number): InheritanceSpecifierContext | InheritanceSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(InheritanceSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, InheritanceSpecifierContext);\n\t\t}\n\t}\n\tpublic contractPart(): ContractPartContext[];\n\tpublic contractPart(i: number): ContractPartContext;\n\tpublic contractPart(i?: number): ContractPartContext | ContractPartContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ContractPartContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ContractPartContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_contractDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterContractDefinition) {\n\t\t\tlistener.enterContractDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitContractDefinition) {\n\t\t\tlistener.exitContractDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitContractDefinition) {\n\t\t\treturn visitor.visitContractDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class InheritanceSpecifierContext extends ParserRuleContext {\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext {\n\t\treturn this.getRuleContext(0, UserDefinedTypeNameContext);\n\t}\n\tpublic expressionList(): ExpressionListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_inheritanceSpecifier; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterInheritanceSpecifier) {\n\t\t\tlistener.enterInheritanceSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitInheritanceSpecifier) {\n\t\t\tlistener.exitInheritanceSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitInheritanceSpecifier) {\n\t\t\treturn visitor.visitInheritanceSpecifier(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ContractPartContext extends ParserRuleContext {\n\tpublic stateVariableDeclaration(): StateVariableDeclarationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StateVariableDeclarationContext);\n\t}\n\tpublic usingForDeclaration(): UsingForDeclarationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UsingForDeclarationContext);\n\t}\n\tpublic structDefinition(): StructDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StructDefinitionContext);\n\t}\n\tpublic modifierDefinition(): ModifierDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ModifierDefinitionContext);\n\t}\n\tpublic functionDefinition(): FunctionDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, FunctionDefinitionContext);\n\t}\n\tpublic eventDefinition(): EventDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, EventDefinitionContext);\n\t}\n\tpublic enumDefinition(): EnumDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, EnumDefinitionContext);\n\t}\n\tpublic customErrorDefinition(): CustomErrorDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, CustomErrorDefinitionContext);\n\t}\n\tpublic typeDefinition(): TypeDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeDefinitionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_contractPart; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterContractPart) {\n\t\t\tlistener.enterContractPart(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitContractPart) {\n\t\t\tlistener.exitContractPart(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitContractPart) {\n\t\t\treturn visitor.visitContractPart(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StateVariableDeclarationContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic PublicKeyword(): TerminalNode[];\n\tpublic PublicKeyword(i: number): TerminalNode;\n\tpublic PublicKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PublicKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PublicKeyword, i);\n\t\t}\n\t}\n\tpublic InternalKeyword(): TerminalNode[];\n\tpublic InternalKeyword(i: number): TerminalNode;\n\tpublic InternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.InternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.InternalKeyword, i);\n\t\t}\n\t}\n\tpublic PrivateKeyword(): TerminalNode[];\n\tpublic PrivateKeyword(i: number): TerminalNode;\n\tpublic PrivateKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PrivateKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PrivateKeyword, i);\n\t\t}\n\t}\n\tpublic ConstantKeyword(): TerminalNode[];\n\tpublic ConstantKeyword(i: number): TerminalNode;\n\tpublic ConstantKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ConstantKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ConstantKeyword, i);\n\t\t}\n\t}\n\tpublic ImmutableKeyword(): TerminalNode[];\n\tpublic ImmutableKeyword(i: number): TerminalNode;\n\tpublic ImmutableKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ImmutableKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ImmutableKeyword, i);\n\t\t}\n\t}\n\tpublic overrideSpecifier(): OverrideSpecifierContext[];\n\tpublic overrideSpecifier(i: number): OverrideSpecifierContext;\n\tpublic overrideSpecifier(i?: number): OverrideSpecifierContext | OverrideSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(OverrideSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, OverrideSpecifierContext);\n\t\t}\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_stateVariableDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStateVariableDeclaration) {\n\t\t\tlistener.enterStateVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStateVariableDeclaration) {\n\t\t\tlistener.exitStateVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStateVariableDeclaration) {\n\t\t\treturn visitor.visitStateVariableDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FileLevelConstantContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic ConstantKeyword(): TerminalNode { return this.getToken(SolidityParser.ConstantKeyword, 0); }\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_fileLevelConstant; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFileLevelConstant) {\n\t\t\tlistener.enterFileLevelConstant(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFileLevelConstant) {\n\t\t\tlistener.exitFileLevelConstant(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFileLevelConstant) {\n\t\t\treturn visitor.visitFileLevelConstant(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class CustomErrorDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic parameterList(): ParameterListContext {\n\t\treturn this.getRuleContext(0, ParameterListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_customErrorDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterCustomErrorDefinition) {\n\t\t\tlistener.enterCustomErrorDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitCustomErrorDefinition) {\n\t\t\tlistener.exitCustomErrorDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitCustomErrorDefinition) {\n\t\t\treturn visitor.visitCustomErrorDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TypeDefinitionContext extends ParserRuleContext {\n\tpublic TypeKeyword(): TerminalNode { return this.getToken(SolidityParser.TypeKeyword, 0); }\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic elementaryTypeName(): ElementaryTypeNameContext {\n\t\treturn this.getRuleContext(0, ElementaryTypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_typeDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTypeDefinition) {\n\t\t\tlistener.enterTypeDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTypeDefinition) {\n\t\t\tlistener.exitTypeDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTypeDefinition) {\n\t\t\treturn visitor.visitTypeDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UsingForDeclarationContext extends ParserRuleContext {\n\tpublic usingForObject(): UsingForObjectContext {\n\t\treturn this.getRuleContext(0, UsingForObjectContext);\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tpublic GlobalKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.GlobalKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_usingForDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUsingForDeclaration) {\n\t\t\tlistener.enterUsingForDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUsingForDeclaration) {\n\t\t\tlistener.exitUsingForDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUsingForDeclaration) {\n\t\t\treturn visitor.visitUsingForDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UsingForObjectContext extends ParserRuleContext {\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext[];\n\tpublic userDefinedTypeName(i: number): UserDefinedTypeNameContext;\n\tpublic userDefinedTypeName(i?: number): UserDefinedTypeNameContext | UserDefinedTypeNameContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(UserDefinedTypeNameContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, UserDefinedTypeNameContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_usingForObject; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUsingForObject) {\n\t\t\tlistener.enterUsingForObject(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUsingForObject) {\n\t\t\tlistener.exitUsingForObject(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUsingForObject) {\n\t\t\treturn visitor.visitUsingForObject(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StructDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic variableDeclaration(): VariableDeclarationContext[];\n\tpublic variableDeclaration(i: number): VariableDeclarationContext;\n\tpublic variableDeclaration(i?: number): VariableDeclarationContext | VariableDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(VariableDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, VariableDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_structDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStructDefinition) {\n\t\t\tlistener.enterStructDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStructDefinition) {\n\t\t\tlistener.exitStructDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStructDefinition) {\n\t\t\treturn visitor.visitStructDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ModifierDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic block(): BlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BlockContext);\n\t}\n\tpublic parameterList(): ParameterListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ParameterListContext);\n\t}\n\tpublic VirtualKeyword(): TerminalNode[];\n\tpublic VirtualKeyword(i: number): TerminalNode;\n\tpublic VirtualKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.VirtualKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.VirtualKeyword, i);\n\t\t}\n\t}\n\tpublic overrideSpecifier(): OverrideSpecifierContext[];\n\tpublic overrideSpecifier(i: number): OverrideSpecifierContext;\n\tpublic overrideSpecifier(i?: number): OverrideSpecifierContext | OverrideSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(OverrideSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, OverrideSpecifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_modifierDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterModifierDefinition) {\n\t\t\tlistener.enterModifierDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitModifierDefinition) {\n\t\t\tlistener.exitModifierDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitModifierDefinition) {\n\t\t\treturn visitor.visitModifierDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ModifierInvocationContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic expressionList(): ExpressionListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_modifierInvocation; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterModifierInvocation) {\n\t\t\tlistener.enterModifierInvocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitModifierInvocation) {\n\t\t\tlistener.exitModifierInvocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitModifierInvocation) {\n\t\t\treturn visitor.visitModifierInvocation(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionDefinitionContext extends ParserRuleContext {\n\tpublic functionDescriptor(): FunctionDescriptorContext {\n\t\treturn this.getRuleContext(0, FunctionDescriptorContext);\n\t}\n\tpublic parameterList(): ParameterListContext {\n\t\treturn this.getRuleContext(0, ParameterListContext);\n\t}\n\tpublic modifierList(): ModifierListContext {\n\t\treturn this.getRuleContext(0, ModifierListContext);\n\t}\n\tpublic block(): BlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BlockContext);\n\t}\n\tpublic returnParameters(): ReturnParametersContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ReturnParametersContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionDefinition) {\n\t\t\tlistener.enterFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionDefinition) {\n\t\t\tlistener.exitFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionDefinition) {\n\t\t\treturn visitor.visitFunctionDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionDescriptorContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic ConstructorKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ConstructorKeyword, 0); }\n\tpublic FallbackKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.FallbackKeyword, 0); }\n\tpublic ReceiveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ReceiveKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionDescriptor; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionDescriptor) {\n\t\t\tlistener.enterFunctionDescriptor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionDescriptor) {\n\t\t\tlistener.exitFunctionDescriptor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionDescriptor) {\n\t\t\treturn visitor.visitFunctionDescriptor(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ReturnParametersContext extends ParserRuleContext {\n\tpublic parameterList(): ParameterListContext {\n\t\treturn this.getRuleContext(0, ParameterListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_returnParameters; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterReturnParameters) {\n\t\t\tlistener.enterReturnParameters(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitReturnParameters) {\n\t\t\tlistener.exitReturnParameters(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitReturnParameters) {\n\t\t\treturn visitor.visitReturnParameters(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ModifierListContext extends ParserRuleContext {\n\tpublic ExternalKeyword(): TerminalNode[];\n\tpublic ExternalKeyword(i: number): TerminalNode;\n\tpublic ExternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ExternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ExternalKeyword, i);\n\t\t}\n\t}\n\tpublic PublicKeyword(): TerminalNode[];\n\tpublic PublicKeyword(i: number): TerminalNode;\n\tpublic PublicKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PublicKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PublicKeyword, i);\n\t\t}\n\t}\n\tpublic InternalKeyword(): TerminalNode[];\n\tpublic InternalKeyword(i: number): TerminalNode;\n\tpublic InternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.InternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.InternalKeyword, i);\n\t\t}\n\t}\n\tpublic PrivateKeyword(): TerminalNode[];\n\tpublic PrivateKeyword(i: number): TerminalNode;\n\tpublic PrivateKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PrivateKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PrivateKeyword, i);\n\t\t}\n\t}\n\tpublic VirtualKeyword(): TerminalNode[];\n\tpublic VirtualKeyword(i: number): TerminalNode;\n\tpublic VirtualKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.VirtualKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.VirtualKeyword, i);\n\t\t}\n\t}\n\tpublic stateMutability(): StateMutabilityContext[];\n\tpublic stateMutability(i: number): StateMutabilityContext;\n\tpublic stateMutability(i?: number): StateMutabilityContext | StateMutabilityContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StateMutabilityContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StateMutabilityContext);\n\t\t}\n\t}\n\tpublic modifierInvocation(): ModifierInvocationContext[];\n\tpublic modifierInvocation(i: number): ModifierInvocationContext;\n\tpublic modifierInvocation(i?: number): ModifierInvocationContext | ModifierInvocationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ModifierInvocationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ModifierInvocationContext);\n\t\t}\n\t}\n\tpublic overrideSpecifier(): OverrideSpecifierContext[];\n\tpublic overrideSpecifier(i: number): OverrideSpecifierContext;\n\tpublic overrideSpecifier(i?: number): OverrideSpecifierContext | OverrideSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(OverrideSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, OverrideSpecifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_modifierList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterModifierList) {\n\t\t\tlistener.enterModifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitModifierList) {\n\t\t\tlistener.exitModifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitModifierList) {\n\t\t\treturn visitor.visitModifierList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EventDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic eventParameterList(): EventParameterListContext {\n\t\treturn this.getRuleContext(0, EventParameterListContext);\n\t}\n\tpublic AnonymousKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.AnonymousKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_eventDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEventDefinition) {\n\t\t\tlistener.enterEventDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEventDefinition) {\n\t\t\tlistener.exitEventDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEventDefinition) {\n\t\t\treturn visitor.visitEventDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EnumValueContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_enumValue; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEnumValue) {\n\t\t\tlistener.enterEnumValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEnumValue) {\n\t\t\tlistener.exitEnumValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEnumValue) {\n\t\t\treturn visitor.visitEnumValue(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EnumDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic enumValue(): EnumValueContext[];\n\tpublic enumValue(i: number): EnumValueContext;\n\tpublic enumValue(i?: number): EnumValueContext | EnumValueContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(EnumValueContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, EnumValueContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_enumDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEnumDefinition) {\n\t\t\tlistener.enterEnumDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEnumDefinition) {\n\t\t\tlistener.exitEnumDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEnumDefinition) {\n\t\t\treturn visitor.visitEnumDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ParameterListContext extends ParserRuleContext {\n\tpublic parameter(): ParameterContext[];\n\tpublic parameter(i: number): ParameterContext;\n\tpublic parameter(i?: number): ParameterContext | ParameterContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ParameterContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ParameterContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_parameterList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterParameterList) {\n\t\t\tlistener.enterParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitParameterList) {\n\t\t\tlistener.exitParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitParameterList) {\n\t\t\treturn visitor.visitParameterList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ParameterContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic storageLocation(): StorageLocationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StorageLocationContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_parameter; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterParameter) {\n\t\t\tlistener.enterParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitParameter) {\n\t\t\tlistener.exitParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitParameter) {\n\t\t\treturn visitor.visitParameter(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EventParameterListContext extends ParserRuleContext {\n\tpublic eventParameter(): EventParameterContext[];\n\tpublic eventParameter(i: number): EventParameterContext;\n\tpublic eventParameter(i?: number): EventParameterContext | EventParameterContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(EventParameterContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, EventParameterContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_eventParameterList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEventParameterList) {\n\t\t\tlistener.enterEventParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEventParameterList) {\n\t\t\tlistener.exitEventParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEventParameterList) {\n\t\t\treturn visitor.visitEventParameterList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EventParameterContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic IndexedKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.IndexedKeyword, 0); }\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_eventParameter; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEventParameter) {\n\t\t\tlistener.enterEventParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEventParameter) {\n\t\t\tlistener.exitEventParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEventParameter) {\n\t\t\treturn visitor.visitEventParameter(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionTypeParameterListContext extends ParserRuleContext {\n\tpublic functionTypeParameter(): FunctionTypeParameterContext[];\n\tpublic functionTypeParameter(i: number): FunctionTypeParameterContext;\n\tpublic functionTypeParameter(i?: number): FunctionTypeParameterContext | FunctionTypeParameterContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FunctionTypeParameterContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FunctionTypeParameterContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionTypeParameterList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionTypeParameterList) {\n\t\t\tlistener.enterFunctionTypeParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionTypeParameterList) {\n\t\t\tlistener.exitFunctionTypeParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionTypeParameterList) {\n\t\t\treturn visitor.visitFunctionTypeParameterList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionTypeParameterContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic storageLocation(): StorageLocationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StorageLocationContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionTypeParameter; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionTypeParameter) {\n\t\t\tlistener.enterFunctionTypeParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionTypeParameter) {\n\t\t\tlistener.exitFunctionTypeParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionTypeParameter) {\n\t\t\treturn visitor.visitFunctionTypeParameter(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VariableDeclarationContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic storageLocation(): StorageLocationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StorageLocationContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_variableDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVariableDeclaration) {\n\t\t\tlistener.enterVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVariableDeclaration) {\n\t\t\tlistener.exitVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVariableDeclaration) {\n\t\t\treturn visitor.visitVariableDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TypeNameContext extends ParserRuleContext {\n\tpublic elementaryTypeName(): ElementaryTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ElementaryTypeNameContext);\n\t}\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UserDefinedTypeNameContext);\n\t}\n\tpublic mapping(): MappingContext | undefined {\n\t\treturn this.tryGetRuleContext(0, MappingContext);\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tpublic functionTypeName(): FunctionTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, FunctionTypeNameContext);\n\t}\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_typeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTypeName) {\n\t\t\tlistener.enterTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTypeName) {\n\t\t\tlistener.exitTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTypeName) {\n\t\t\treturn visitor.visitTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UserDefinedTypeNameContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_userDefinedTypeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUserDefinedTypeName) {\n\t\t\tlistener.enterUserDefinedTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUserDefinedTypeName) {\n\t\t\tlistener.exitUserDefinedTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUserDefinedTypeName) {\n\t\t\treturn visitor.visitUserDefinedTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class MappingKeyContext extends ParserRuleContext {\n\tpublic elementaryTypeName(): ElementaryTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ElementaryTypeNameContext);\n\t}\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UserDefinedTypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_mappingKey; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterMappingKey) {\n\t\t\tlistener.enterMappingKey(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitMappingKey) {\n\t\t\tlistener.exitMappingKey(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitMappingKey) {\n\t\t\treturn visitor.visitMappingKey(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class MappingContext extends ParserRuleContext {\n\tpublic mappingKey(): MappingKeyContext {\n\t\treturn this.getRuleContext(0, MappingKeyContext);\n\t}\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_mapping; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterMapping) {\n\t\t\tlistener.enterMapping(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitMapping) {\n\t\t\tlistener.exitMapping(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitMapping) {\n\t\t\treturn visitor.visitMapping(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionTypeNameContext extends ParserRuleContext {\n\tpublic functionTypeParameterList(): FunctionTypeParameterListContext[];\n\tpublic functionTypeParameterList(i: number): FunctionTypeParameterListContext;\n\tpublic functionTypeParameterList(i?: number): FunctionTypeParameterListContext | FunctionTypeParameterListContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FunctionTypeParameterListContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FunctionTypeParameterListContext);\n\t\t}\n\t}\n\tpublic InternalKeyword(): TerminalNode[];\n\tpublic InternalKeyword(i: number): TerminalNode;\n\tpublic InternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.InternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.InternalKeyword, i);\n\t\t}\n\t}\n\tpublic ExternalKeyword(): TerminalNode[];\n\tpublic ExternalKeyword(i: number): TerminalNode;\n\tpublic ExternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ExternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ExternalKeyword, i);\n\t\t}\n\t}\n\tpublic stateMutability(): StateMutabilityContext[];\n\tpublic stateMutability(i: number): StateMutabilityContext;\n\tpublic stateMutability(i?: number): StateMutabilityContext | StateMutabilityContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StateMutabilityContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StateMutabilityContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionTypeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionTypeName) {\n\t\t\tlistener.enterFunctionTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionTypeName) {\n\t\t\tlistener.exitFunctionTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionTypeName) {\n\t\t\treturn visitor.visitFunctionTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StorageLocationContext extends ParserRuleContext {\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_storageLocation; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStorageLocation) {\n\t\t\tlistener.enterStorageLocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStorageLocation) {\n\t\t\tlistener.exitStorageLocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStorageLocation) {\n\t\t\treturn visitor.visitStorageLocation(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StateMutabilityContext extends ParserRuleContext {\n\tpublic PureKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PureKeyword, 0); }\n\tpublic ConstantKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ConstantKeyword, 0); }\n\tpublic ViewKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ViewKeyword, 0); }\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_stateMutability; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStateMutability) {\n\t\t\tlistener.enterStateMutability(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStateMutability) {\n\t\t\tlistener.exitStateMutability(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStateMutability) {\n\t\t\treturn visitor.visitStateMutability(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class BlockContext extends ParserRuleContext {\n\tpublic statement(): StatementContext[];\n\tpublic statement(i: number): StatementContext;\n\tpublic statement(i?: number): StatementContext | StatementContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StatementContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StatementContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_block; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterBlock) {\n\t\t\tlistener.enterBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitBlock) {\n\t\t\tlistener.exitBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitBlock) {\n\t\t\treturn visitor.visitBlock(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StatementContext extends ParserRuleContext {\n\tpublic ifStatement(): IfStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IfStatementContext);\n\t}\n\tpublic tryStatement(): TryStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TryStatementContext);\n\t}\n\tpublic whileStatement(): WhileStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, WhileStatementContext);\n\t}\n\tpublic forStatement(): ForStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ForStatementContext);\n\t}\n\tpublic block(): BlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BlockContext);\n\t}\n\tpublic inlineAssemblyStatement(): InlineAssemblyStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, InlineAssemblyStatementContext);\n\t}\n\tpublic doWhileStatement(): DoWhileStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, DoWhileStatementContext);\n\t}\n\tpublic continueStatement(): ContinueStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ContinueStatementContext);\n\t}\n\tpublic breakStatement(): BreakStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BreakStatementContext);\n\t}\n\tpublic returnStatement(): ReturnStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ReturnStatementContext);\n\t}\n\tpublic throwStatement(): ThrowStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ThrowStatementContext);\n\t}\n\tpublic emitStatement(): EmitStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, EmitStatementContext);\n\t}\n\tpublic simpleStatement(): SimpleStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, SimpleStatementContext);\n\t}\n\tpublic uncheckedStatement(): UncheckedStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UncheckedStatementContext);\n\t}\n\tpublic revertStatement(): RevertStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, RevertStatementContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_statement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStatement) {\n\t\t\tlistener.enterStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStatement) {\n\t\t\tlistener.exitStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStatement) {\n\t\t\treturn visitor.visitStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ExpressionStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_expressionStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterExpressionStatement) {\n\t\t\tlistener.enterExpressionStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitExpressionStatement) {\n\t\t\tlistener.exitExpressionStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitExpressionStatement) {\n\t\t\treturn visitor.visitExpressionStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class IfStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic statement(): StatementContext[];\n\tpublic statement(i: number): StatementContext;\n\tpublic statement(i?: number): StatementContext | StatementContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StatementContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StatementContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_ifStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterIfStatement) {\n\t\t\tlistener.enterIfStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitIfStatement) {\n\t\t\tlistener.exitIfStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitIfStatement) {\n\t\t\treturn visitor.visitIfStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TryStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic block(): BlockContext {\n\t\treturn this.getRuleContext(0, BlockContext);\n\t}\n\tpublic returnParameters(): ReturnParametersContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ReturnParametersContext);\n\t}\n\tpublic catchClause(): CatchClauseContext[];\n\tpublic catchClause(i: number): CatchClauseContext;\n\tpublic catchClause(i?: number): CatchClauseContext | CatchClauseContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(CatchClauseContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, CatchClauseContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_tryStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTryStatement) {\n\t\t\tlistener.enterTryStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTryStatement) {\n\t\t\tlistener.exitTryStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTryStatement) {\n\t\t\treturn visitor.visitTryStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class CatchClauseContext extends ParserRuleContext {\n\tpublic block(): BlockContext {\n\t\treturn this.getRuleContext(0, BlockContext);\n\t}\n\tpublic parameterList(): ParameterListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ParameterListContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_catchClause; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterCatchClause) {\n\t\t\tlistener.enterCatchClause(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitCatchClause) {\n\t\t\tlistener.exitCatchClause(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitCatchClause) {\n\t\t\treturn visitor.visitCatchClause(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class WhileStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic statement(): StatementContext {\n\t\treturn this.getRuleContext(0, StatementContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_whileStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterWhileStatement) {\n\t\t\tlistener.enterWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitWhileStatement) {\n\t\t\tlistener.exitWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitWhileStatement) {\n\t\t\treturn visitor.visitWhileStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class SimpleStatementContext extends ParserRuleContext {\n\tpublic variableDeclarationStatement(): VariableDeclarationStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VariableDeclarationStatementContext);\n\t}\n\tpublic expressionStatement(): ExpressionStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionStatementContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_simpleStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterSimpleStatement) {\n\t\t\tlistener.enterSimpleStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitSimpleStatement) {\n\t\t\tlistener.exitSimpleStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitSimpleStatement) {\n\t\t\treturn visitor.visitSimpleStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UncheckedStatementContext extends ParserRuleContext {\n\tpublic block(): BlockContext {\n\t\treturn this.getRuleContext(0, BlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_uncheckedStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUncheckedStatement) {\n\t\t\tlistener.enterUncheckedStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUncheckedStatement) {\n\t\t\tlistener.exitUncheckedStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUncheckedStatement) {\n\t\t\treturn visitor.visitUncheckedStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ForStatementContext extends ParserRuleContext {\n\tpublic statement(): StatementContext {\n\t\treturn this.getRuleContext(0, StatementContext);\n\t}\n\tpublic simpleStatement(): SimpleStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, SimpleStatementContext);\n\t}\n\tpublic expressionStatement(): ExpressionStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionStatementContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_forStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterForStatement) {\n\t\t\tlistener.enterForStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitForStatement) {\n\t\t\tlistener.exitForStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitForStatement) {\n\t\t\treturn visitor.visitForStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class InlineAssemblyStatementContext extends ParserRuleContext {\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tpublic StringLiteralFragment(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.StringLiteralFragment, 0); }\n\tpublic inlineAssemblyStatementFlag(): InlineAssemblyStatementFlagContext | undefined {\n\t\treturn this.tryGetRuleContext(0, InlineAssemblyStatementFlagContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_inlineAssemblyStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterInlineAssemblyStatement) {\n\t\t\tlistener.enterInlineAssemblyStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitInlineAssemblyStatement) {\n\t\t\tlistener.exitInlineAssemblyStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitInlineAssemblyStatement) {\n\t\t\treturn visitor.visitInlineAssemblyStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class InlineAssemblyStatementFlagContext extends ParserRuleContext {\n\tpublic stringLiteral(): StringLiteralContext {\n\t\treturn this.getRuleContext(0, StringLiteralContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_inlineAssemblyStatementFlag; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterInlineAssemblyStatementFlag) {\n\t\t\tlistener.enterInlineAssemblyStatementFlag(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitInlineAssemblyStatementFlag) {\n\t\t\tlistener.exitInlineAssemblyStatementFlag(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitInlineAssemblyStatementFlag) {\n\t\t\treturn visitor.visitInlineAssemblyStatementFlag(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class DoWhileStatementContext extends ParserRuleContext {\n\tpublic statement(): StatementContext {\n\t\treturn this.getRuleContext(0, StatementContext);\n\t}\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_doWhileStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterDoWhileStatement) {\n\t\t\tlistener.enterDoWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitDoWhileStatement) {\n\t\t\tlistener.exitDoWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitDoWhileStatement) {\n\t\t\treturn visitor.visitDoWhileStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ContinueStatementContext extends ParserRuleContext {\n\tpublic ContinueKeyword(): TerminalNode { return this.getToken(SolidityParser.ContinueKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_continueStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterContinueStatement) {\n\t\t\tlistener.enterContinueStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitContinueStatement) {\n\t\t\tlistener.exitContinueStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitContinueStatement) {\n\t\t\treturn visitor.visitContinueStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class BreakStatementContext extends ParserRuleContext {\n\tpublic BreakKeyword(): TerminalNode { return this.getToken(SolidityParser.BreakKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_breakStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterBreakStatement) {\n\t\t\tlistener.enterBreakStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitBreakStatement) {\n\t\t\tlistener.exitBreakStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitBreakStatement) {\n\t\t\treturn visitor.visitBreakStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ReturnStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_returnStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterReturnStatement) {\n\t\t\tlistener.enterReturnStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitReturnStatement) {\n\t\t\tlistener.exitReturnStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitReturnStatement) {\n\t\t\treturn visitor.visitReturnStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ThrowStatementContext extends ParserRuleContext {\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_throwStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterThrowStatement) {\n\t\t\tlistener.enterThrowStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitThrowStatement) {\n\t\t\tlistener.exitThrowStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitThrowStatement) {\n\t\t\treturn visitor.visitThrowStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EmitStatementContext extends ParserRuleContext {\n\tpublic functionCall(): FunctionCallContext {\n\t\treturn this.getRuleContext(0, FunctionCallContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_emitStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEmitStatement) {\n\t\t\tlistener.enterEmitStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEmitStatement) {\n\t\t\tlistener.exitEmitStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEmitStatement) {\n\t\t\treturn visitor.visitEmitStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class RevertStatementContext extends ParserRuleContext {\n\tpublic functionCall(): FunctionCallContext {\n\t\treturn this.getRuleContext(0, FunctionCallContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_revertStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterRevertStatement) {\n\t\t\tlistener.enterRevertStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitRevertStatement) {\n\t\t\tlistener.exitRevertStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitRevertStatement) {\n\t\t\treturn visitor.visitRevertStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VariableDeclarationStatementContext extends ParserRuleContext {\n\tpublic identifierList(): IdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierListContext);\n\t}\n\tpublic variableDeclaration(): VariableDeclarationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VariableDeclarationContext);\n\t}\n\tpublic variableDeclarationList(): VariableDeclarationListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VariableDeclarationListContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_variableDeclarationStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVariableDeclarationStatement) {\n\t\t\tlistener.enterVariableDeclarationStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVariableDeclarationStatement) {\n\t\t\tlistener.exitVariableDeclarationStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVariableDeclarationStatement) {\n\t\t\treturn visitor.visitVariableDeclarationStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VariableDeclarationListContext extends ParserRuleContext {\n\tpublic variableDeclaration(): VariableDeclarationContext[];\n\tpublic variableDeclaration(i: number): VariableDeclarationContext;\n\tpublic variableDeclaration(i?: number): VariableDeclarationContext | VariableDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(VariableDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, VariableDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_variableDeclarationList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVariableDeclarationList) {\n\t\t\tlistener.enterVariableDeclarationList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVariableDeclarationList) {\n\t\t\tlistener.exitVariableDeclarationList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVariableDeclarationList) {\n\t\t\treturn visitor.visitVariableDeclarationList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class IdentifierListContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_identifierList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterIdentifierList) {\n\t\t\tlistener.enterIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitIdentifierList) {\n\t\t\tlistener.exitIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitIdentifierList) {\n\t\t\treturn visitor.visitIdentifierList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ElementaryTypeNameContext extends ParserRuleContext {\n\tpublic Int(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Int, 0); }\n\tpublic Uint(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Uint, 0); }\n\tpublic Byte(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Byte, 0); }\n\tpublic Fixed(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Fixed, 0); }\n\tpublic Ufixed(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Ufixed, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_elementaryTypeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterElementaryTypeName) {\n\t\t\tlistener.enterElementaryTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitElementaryTypeName) {\n\t\t\tlistener.exitElementaryTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitElementaryTypeName) {\n\t\t\treturn visitor.visitElementaryTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ExpressionContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext[];\n\tpublic expression(i: number): ExpressionContext;\n\tpublic expression(i?: number): ExpressionContext | ExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ExpressionContext);\n\t\t}\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic nameValueList(): NameValueListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NameValueListContext);\n\t}\n\tpublic functionCallArguments(): FunctionCallArgumentsContext | undefined {\n\t\treturn this.tryGetRuleContext(0, FunctionCallArgumentsContext);\n\t}\n\tpublic primaryExpression(): PrimaryExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, PrimaryExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_expression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterExpression) {\n\t\t\tlistener.enterExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitExpression) {\n\t\t\tlistener.exitExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitExpression) {\n\t\t\treturn visitor.visitExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PrimaryExpressionContext extends ParserRuleContext {\n\tpublic BooleanLiteral(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.BooleanLiteral, 0); }\n\tpublic numberLiteral(): NumberLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NumberLiteralContext);\n\t}\n\tpublic hexLiteral(): HexLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, HexLiteralContext);\n\t}\n\tpublic stringLiteral(): StringLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StringLiteralContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic TypeKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.TypeKeyword, 0); }\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tpublic tupleExpression(): TupleExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TupleExpressionContext);\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_primaryExpression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPrimaryExpression) {\n\t\t\tlistener.enterPrimaryExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPrimaryExpression) {\n\t\t\tlistener.exitPrimaryExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPrimaryExpression) {\n\t\t\treturn visitor.visitPrimaryExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ExpressionListContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext[];\n\tpublic expression(i: number): ExpressionContext;\n\tpublic expression(i?: number): ExpressionContext | ExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ExpressionContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_expressionList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterExpressionList) {\n\t\t\tlistener.enterExpressionList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitExpressionList) {\n\t\t\tlistener.exitExpressionList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitExpressionList) {\n\t\t\treturn visitor.visitExpressionList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class NameValueListContext extends ParserRuleContext {\n\tpublic nameValue(): NameValueContext[];\n\tpublic nameValue(i: number): NameValueContext;\n\tpublic nameValue(i?: number): NameValueContext | NameValueContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(NameValueContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, NameValueContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_nameValueList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterNameValueList) {\n\t\t\tlistener.enterNameValueList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitNameValueList) {\n\t\t\tlistener.exitNameValueList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitNameValueList) {\n\t\t\treturn visitor.visitNameValueList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class NameValueContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_nameValue; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterNameValue) {\n\t\t\tlistener.enterNameValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitNameValue) {\n\t\t\tlistener.exitNameValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitNameValue) {\n\t\t\treturn visitor.visitNameValue(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionCallArgumentsContext extends ParserRuleContext {\n\tpublic nameValueList(): NameValueListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NameValueListContext);\n\t}\n\tpublic expressionList(): ExpressionListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionCallArguments; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionCallArguments) {\n\t\t\tlistener.enterFunctionCallArguments(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionCallArguments) {\n\t\t\tlistener.exitFunctionCallArguments(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionCallArguments) {\n\t\t\treturn visitor.visitFunctionCallArguments(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionCallContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic functionCallArguments(): FunctionCallArgumentsContext {\n\t\treturn this.getRuleContext(0, FunctionCallArgumentsContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionCall; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionCall) {\n\t\t\tlistener.enterFunctionCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionCall) {\n\t\t\tlistener.exitFunctionCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionCall) {\n\t\t\treturn visitor.visitFunctionCall(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyBlockContext extends ParserRuleContext {\n\tpublic assemblyItem(): AssemblyItemContext[];\n\tpublic assemblyItem(i: number): AssemblyItemContext;\n\tpublic assemblyItem(i?: number): AssemblyItemContext | AssemblyItemContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyItemContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyItemContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyBlock; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyBlock) {\n\t\t\tlistener.enterAssemblyBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyBlock) {\n\t\t\tlistener.exitAssemblyBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyBlock) {\n\t\t\treturn visitor.visitAssemblyBlock(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyItemContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyBlockContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic assemblyLocalDefinition(): AssemblyLocalDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyLocalDefinitionContext);\n\t}\n\tpublic assemblyAssignment(): AssemblyAssignmentContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyAssignmentContext);\n\t}\n\tpublic assemblyStackAssignment(): AssemblyStackAssignmentContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyStackAssignmentContext);\n\t}\n\tpublic labelDefinition(): LabelDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, LabelDefinitionContext);\n\t}\n\tpublic assemblySwitch(): AssemblySwitchContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblySwitchContext);\n\t}\n\tpublic assemblyFunctionDefinition(): AssemblyFunctionDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyFunctionDefinitionContext);\n\t}\n\tpublic assemblyFor(): AssemblyForContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyForContext);\n\t}\n\tpublic assemblyIf(): AssemblyIfContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIfContext);\n\t}\n\tpublic BreakKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.BreakKeyword, 0); }\n\tpublic ContinueKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ContinueKeyword, 0); }\n\tpublic LeaveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.LeaveKeyword, 0); }\n\tpublic subAssembly(): SubAssemblyContext | undefined {\n\t\treturn this.tryGetRuleContext(0, SubAssemblyContext);\n\t}\n\tpublic numberLiteral(): NumberLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NumberLiteralContext);\n\t}\n\tpublic stringLiteral(): StringLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StringLiteralContext);\n\t}\n\tpublic hexLiteral(): HexLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, HexLiteralContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyItem; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyItem) {\n\t\t\tlistener.enterAssemblyItem(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyItem) {\n\t\t\tlistener.exitAssemblyItem(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyItem) {\n\t\t\treturn visitor.visitAssemblyItem(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyExpressionContext extends ParserRuleContext {\n\tpublic assemblyCall(): AssemblyCallContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyCallContext);\n\t}\n\tpublic assemblyLiteral(): AssemblyLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyLiteralContext);\n\t}\n\tpublic assemblyMember(): AssemblyMemberContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyMemberContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyExpression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyExpression) {\n\t\t\tlistener.enterAssemblyExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyExpression) {\n\t\t\tlistener.exitAssemblyExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyExpression) {\n\t\t\treturn visitor.visitAssemblyExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyMemberContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyMember; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyMember) {\n\t\t\tlistener.enterAssemblyMember(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyMember) {\n\t\t\tlistener.exitAssemblyMember(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyMember) {\n\t\t\treturn visitor.visitAssemblyMember(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyCallContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext[];\n\tpublic assemblyExpression(i: number): AssemblyExpressionContext;\n\tpublic assemblyExpression(i?: number): AssemblyExpressionContext | AssemblyExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyExpressionContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyCall; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyCall) {\n\t\t\tlistener.enterAssemblyCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyCall) {\n\t\t\tlistener.exitAssemblyCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyCall) {\n\t\t\treturn visitor.visitAssemblyCall(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyLocalDefinitionContext extends ParserRuleContext {\n\tpublic assemblyIdentifierOrList(): AssemblyIdentifierOrListContext {\n\t\treturn this.getRuleContext(0, AssemblyIdentifierOrListContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyLocalDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyLocalDefinition) {\n\t\t\tlistener.enterAssemblyLocalDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyLocalDefinition) {\n\t\t\tlistener.exitAssemblyLocalDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyLocalDefinition) {\n\t\t\treturn visitor.visitAssemblyLocalDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyAssignmentContext extends ParserRuleContext {\n\tpublic assemblyIdentifierOrList(): AssemblyIdentifierOrListContext {\n\t\treturn this.getRuleContext(0, AssemblyIdentifierOrListContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyAssignment; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyAssignment) {\n\t\t\tlistener.enterAssemblyAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyAssignment) {\n\t\t\tlistener.exitAssemblyAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyAssignment) {\n\t\t\treturn visitor.visitAssemblyAssignment(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyIdentifierOrListContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyMember(): AssemblyMemberContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyMemberContext);\n\t}\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIdentifierListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyIdentifierOrList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyIdentifierOrList) {\n\t\t\tlistener.enterAssemblyIdentifierOrList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyIdentifierOrList) {\n\t\t\tlistener.exitAssemblyIdentifierOrList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyIdentifierOrList) {\n\t\t\treturn visitor.visitAssemblyIdentifierOrList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyIdentifierListContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyIdentifierList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyIdentifierList) {\n\t\t\tlistener.enterAssemblyIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyIdentifierList) {\n\t\t\tlistener.exitAssemblyIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyIdentifierList) {\n\t\t\treturn visitor.visitAssemblyIdentifierList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyStackAssignmentContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyStackAssignment; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyStackAssignment) {\n\t\t\tlistener.enterAssemblyStackAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyStackAssignment) {\n\t\t\tlistener.exitAssemblyStackAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyStackAssignment) {\n\t\t\treturn visitor.visitAssemblyStackAssignment(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class LabelDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_labelDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterLabelDefinition) {\n\t\t\tlistener.enterLabelDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitLabelDefinition) {\n\t\t\tlistener.exitLabelDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitLabelDefinition) {\n\t\t\treturn visitor.visitLabelDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblySwitchContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic assemblyCase(): AssemblyCaseContext[];\n\tpublic assemblyCase(i: number): AssemblyCaseContext;\n\tpublic assemblyCase(i?: number): AssemblyCaseContext | AssemblyCaseContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyCaseContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyCaseContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblySwitch; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblySwitch) {\n\t\t\tlistener.enterAssemblySwitch(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblySwitch) {\n\t\t\tlistener.exitAssemblySwitch(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblySwitch) {\n\t\t\treturn visitor.visitAssemblySwitch(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyCaseContext extends ParserRuleContext {\n\tpublic assemblyLiteral(): AssemblyLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyLiteralContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyCase; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyCase) {\n\t\t\tlistener.enterAssemblyCase(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyCase) {\n\t\t\tlistener.exitAssemblyCase(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyCase) {\n\t\t\treturn visitor.visitAssemblyCase(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyFunctionDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIdentifierListContext);\n\t}\n\tpublic assemblyFunctionReturns(): AssemblyFunctionReturnsContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyFunctionReturnsContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyFunctionDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyFunctionDefinition) {\n\t\t\tlistener.enterAssemblyFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyFunctionDefinition) {\n\t\t\tlistener.exitAssemblyFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyFunctionDefinition) {\n\t\t\treturn visitor.visitAssemblyFunctionDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyFunctionReturnsContext extends ParserRuleContext {\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIdentifierListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyFunctionReturns; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyFunctionReturns) {\n\t\t\tlistener.enterAssemblyFunctionReturns(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyFunctionReturns) {\n\t\t\tlistener.exitAssemblyFunctionReturns(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyFunctionReturns) {\n\t\t\treturn visitor.visitAssemblyFunctionReturns(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyForContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext[];\n\tpublic assemblyExpression(i: number): AssemblyExpressionContext;\n\tpublic assemblyExpression(i?: number): AssemblyExpressionContext | AssemblyExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyExpressionContext);\n\t\t}\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext[];\n\tpublic assemblyBlock(i: number): AssemblyBlockContext;\n\tpublic assemblyBlock(i?: number): AssemblyBlockContext | AssemblyBlockContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyBlockContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyBlockContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyFor; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyFor) {\n\t\t\tlistener.enterAssemblyFor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyFor) {\n\t\t\tlistener.exitAssemblyFor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyFor) {\n\t\t\treturn visitor.visitAssemblyFor(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyIfContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyIf; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyIf) {\n\t\t\tlistener.enterAssemblyIf(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyIf) {\n\t\t\tlistener.exitAssemblyIf(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyIf) {\n\t\t\treturn visitor.visitAssemblyIf(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyLiteralContext extends ParserRuleContext {\n\tpublic stringLiteral(): StringLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StringLiteralContext);\n\t}\n\tpublic DecimalNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.DecimalNumber, 0); }\n\tpublic HexNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.HexNumber, 0); }\n\tpublic hexLiteral(): HexLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, HexLiteralContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyLiteral) {\n\t\t\tlistener.enterAssemblyLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyLiteral) {\n\t\t\tlistener.exitAssemblyLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyLiteral) {\n\t\t\treturn visitor.visitAssemblyLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class SubAssemblyContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_subAssembly; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterSubAssembly) {\n\t\t\tlistener.enterSubAssembly(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitSubAssembly) {\n\t\t\tlistener.exitSubAssembly(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitSubAssembly) {\n\t\t\treturn visitor.visitSubAssembly(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TupleExpressionContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext[];\n\tpublic expression(i: number): ExpressionContext;\n\tpublic expression(i?: number): ExpressionContext | ExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ExpressionContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_tupleExpression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTupleExpression) {\n\t\t\tlistener.enterTupleExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTupleExpression) {\n\t\t\tlistener.exitTupleExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTupleExpression) {\n\t\t\treturn visitor.visitTupleExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class NumberLiteralContext extends ParserRuleContext {\n\tpublic DecimalNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.DecimalNumber, 0); }\n\tpublic HexNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.HexNumber, 0); }\n\tpublic NumberUnit(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.NumberUnit, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_numberLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterNumberLiteral) {\n\t\t\tlistener.enterNumberLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitNumberLiteral) {\n\t\t\tlistener.exitNumberLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitNumberLiteral) {\n\t\t\treturn visitor.visitNumberLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class IdentifierContext extends ParserRuleContext {\n\tpublic ReceiveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ReceiveKeyword, 0); }\n\tpublic ConstructorKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ConstructorKeyword, 0); }\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tpublic LeaveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.LeaveKeyword, 0); }\n\tpublic Identifier(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Identifier, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_identifier; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterIdentifier) {\n\t\t\tlistener.enterIdentifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitIdentifier) {\n\t\t\tlistener.exitIdentifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitIdentifier) {\n\t\t\treturn visitor.visitIdentifier(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class HexLiteralContext extends ParserRuleContext {\n\tpublic HexLiteralFragment(): TerminalNode[];\n\tpublic HexLiteralFragment(i: number): TerminalNode;\n\tpublic HexLiteralFragment(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.HexLiteralFragment);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.HexLiteralFragment, i);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_hexLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterHexLiteral) {\n\t\t\tlistener.enterHexLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitHexLiteral) {\n\t\t\tlistener.exitHexLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitHexLiteral) {\n\t\t\treturn visitor.visitHexLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class OverrideSpecifierContext extends ParserRuleContext {\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext[];\n\tpublic userDefinedTypeName(i: number): UserDefinedTypeNameContext;\n\tpublic userDefinedTypeName(i?: number): UserDefinedTypeNameContext | UserDefinedTypeNameContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(UserDefinedTypeNameContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, UserDefinedTypeNameContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_overrideSpecifier; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterOverrideSpecifier) {\n\t\t\tlistener.enterOverrideSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitOverrideSpecifier) {\n\t\t\tlistener.exitOverrideSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitOverrideSpecifier) {\n\t\t\treturn visitor.visitOverrideSpecifier(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StringLiteralContext extends ParserRuleContext {\n\tpublic StringLiteralFragment(): TerminalNode[];\n\tpublic StringLiteralFragment(i: number): TerminalNode;\n\tpublic StringLiteralFragment(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.StringLiteralFragment);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.StringLiteralFragment, i);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_stringLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStringLiteral) {\n\t\t\tlistener.enterStringLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStringLiteral) {\n\t\t\tlistener.exitStringLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStringLiteral) {\n\t\t\treturn visitor.visitStringLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\n", "// Base on the original type definitions for solidity-parser-antlr 0.2\n// by Leonid Logvinov \n// Alex Browne \n// Xiao Liang \n\ninterface Location {\n start: {\n line: number\n column: number\n }\n end: {\n line: number\n column: number\n }\n}\n\nexport interface BaseASTNode {\n type: ASTNodeTypeString\n range?: [number, number]\n loc?: Location\n}\n\nexport interface SourceUnit extends BaseASTNode {\n type: 'SourceUnit'\n children: ASTNode[]\n}\n\nexport interface ContractDefinition extends BaseASTNode {\n type: 'ContractDefinition'\n name: string\n baseContracts: InheritanceSpecifier[]\n kind: string\n subNodes: BaseASTNode[]\n}\n\nexport interface InheritanceSpecifier extends BaseASTNode {\n type: 'InheritanceSpecifier'\n baseName: UserDefinedTypeName\n arguments: Expression[]\n}\n\nexport interface UserDefinedTypeName extends BaseASTNode {\n type: 'UserDefinedTypeName'\n namePath: string\n}\n\nexport const astNodeTypes = [\n 'SourceUnit',\n 'PragmaDirective',\n 'ImportDirective',\n 'ContractDefinition',\n 'InheritanceSpecifier',\n 'StateVariableDeclaration',\n 'UsingForDeclaration',\n 'StructDefinition',\n 'ModifierDefinition',\n 'ModifierInvocation',\n 'FunctionDefinition',\n 'EventDefinition',\n 'CustomErrorDefinition',\n 'RevertStatement',\n 'EnumValue',\n 'EnumDefinition',\n 'VariableDeclaration',\n 'UserDefinedTypeName',\n 'Mapping',\n 'ArrayTypeName',\n 'FunctionTypeName',\n 'Block',\n 'ExpressionStatement',\n 'IfStatement',\n 'WhileStatement',\n 'ForStatement',\n 'InlineAssemblyStatement',\n 'DoWhileStatement',\n 'ContinueStatement',\n 'Break',\n 'Continue',\n 'BreakStatement',\n 'ReturnStatement',\n 'EmitStatement',\n 'ThrowStatement',\n 'VariableDeclarationStatement',\n 'ElementaryTypeName',\n 'FunctionCall',\n 'AssemblyBlock',\n 'AssemblyCall',\n 'AssemblyLocalDefinition',\n 'AssemblyAssignment',\n 'AssemblyStackAssignment',\n 'LabelDefinition',\n 'AssemblySwitch',\n 'AssemblyCase',\n 'AssemblyFunctionDefinition',\n 'AssemblyFunctionReturns',\n 'AssemblyFor',\n 'AssemblyIf',\n 'SubAssembly',\n 'TupleExpression',\n 'NameValueExpression',\n 'BooleanLiteral',\n 'NumberLiteral',\n 'Identifier',\n 'BinaryOperation',\n 'UnaryOperation',\n 'NewExpression',\n 'Conditional',\n 'StringLiteral',\n 'HexLiteral',\n 'HexNumber',\n 'DecimalNumber',\n 'MemberAccess',\n 'IndexAccess',\n 'IndexRangeAccess',\n 'NameValueList',\n 'UncheckedStatement',\n 'TryStatement',\n 'CatchClause',\n 'FileLevelConstant',\n 'AssemblyMemberAccess',\n 'TypeDefinition',\n 'InvalidNode'\n] as const\n\nexport type ASTNodeTypeString = typeof astNodeTypes[number]\nexport interface InvalidNode extends BaseASTNode {\n type: 'InvalidNode'\n name?: string\n value?: string\n}\nexport interface PragmaDirective extends BaseASTNode {\n type: 'PragmaDirective'\n name: string\n value: string\n}\nexport interface ImportDirective extends BaseASTNode {\n type: 'ImportDirective'\n path: string\n pathLiteral: StringLiteral\n unitAlias: string | null\n unitAliasIdentifier: Identifier | null\n symbolAliases: Array<[string, string | null]> | null\n symbolAliasesIdentifiers: Array<[Identifier, Identifier | null]> | null\n}\nexport interface StateVariableDeclaration extends BaseASTNode {\n type: 'StateVariableDeclaration'\n variables: StateVariableDeclarationVariable[]\n initialValue: Expression | null\n}\nexport interface FileLevelConstant extends BaseASTNode {\n type: 'FileLevelConstant'\n typeName: TypeName\n name: string\n initialValue: Expression\n isDeclaredConst: boolean\n isImmutable: boolean\n}\nexport interface UsingForDeclaration extends BaseASTNode {\n type: 'UsingForDeclaration'\n typeName: TypeName | null\n functions: string[]\n libraryName: string | null\n isGlobal: boolean;\n}\nexport interface StructDefinition extends BaseASTNode {\n type: 'StructDefinition'\n name: string\n members: VariableDeclaration[]\n}\nexport interface ModifierDefinition extends BaseASTNode {\n type: 'ModifierDefinition'\n name: string\n parameters: null | VariableDeclaration[]\n isVirtual: boolean\n override: null | UserDefinedTypeName[]\n body: Block | null\n}\nexport interface ModifierInvocation extends BaseASTNode {\n type: 'ModifierInvocation'\n name: string\n arguments: Expression[] | null\n}\nexport interface FunctionDefinition extends BaseASTNode {\n type: 'FunctionDefinition'\n name: string | null\n parameters: VariableDeclaration[]\n modifiers: ModifierInvocation[]\n stateMutability: 'pure' | 'constant' | 'payable' | 'view' | null\n visibility: 'default' | 'external' | 'internal' | 'public' | 'private'\n returnParameters: VariableDeclaration[] | null\n body: Block | null\n override: UserDefinedTypeName[] | null\n isConstructor: boolean\n isReceiveEther: boolean\n isFallback: boolean\n isVirtual: boolean\n}\n\nexport interface CustomErrorDefinition extends BaseASTNode {\n type: 'CustomErrorDefinition'\n name: string\n parameters: VariableDeclaration[]\n}\n\nexport interface TypeDefinition extends BaseASTNode {\n type: 'TypeDefinition'\n name: string\n definition: ElementaryTypeName\n}\n\nexport interface RevertStatement extends BaseASTNode {\n type: 'RevertStatement'\n revertCall: FunctionCall\n}\nexport interface EventDefinition extends BaseASTNode {\n type: 'EventDefinition'\n name: string\n parameters: VariableDeclaration[]\n isAnonymous: boolean\n}\nexport interface EnumValue extends BaseASTNode {\n type: 'EnumValue'\n name: string\n}\nexport interface EnumDefinition extends BaseASTNode {\n type: 'EnumDefinition'\n name: string\n members: EnumValue[]\n}\nexport interface VariableDeclaration extends BaseASTNode {\n type: 'VariableDeclaration'\n isIndexed: boolean\n isStateVar: boolean\n typeName: TypeName | null\n name: string | null\n identifier: Identifier | null\n isDeclaredConst?: boolean\n storageLocation: string | null\n expression: Expression | null\n visibility?: 'public' | 'private' | 'internal' | 'default'\n}\nexport interface StateVariableDeclarationVariable extends VariableDeclaration {\n override: null | UserDefinedTypeName[]\n isImmutable: boolean\n}\nexport interface ArrayTypeName extends BaseASTNode {\n type: 'ArrayTypeName'\n baseTypeName: TypeName\n length: Expression | null\n}\nexport interface Mapping extends BaseASTNode {\n type: 'Mapping'\n keyType: ElementaryTypeName | UserDefinedTypeName\n valueType: TypeName\n}\nexport interface FunctionTypeName extends BaseASTNode {\n type: 'FunctionTypeName'\n parameterTypes: VariableDeclaration[]\n returnTypes: VariableDeclaration[]\n visibility: string\n stateMutability: string | null\n}\n\nexport interface Block extends BaseASTNode {\n type: 'Block'\n statements: BaseASTNode[]\n}\nexport interface ExpressionStatement extends BaseASTNode {\n type: 'ExpressionStatement'\n expression: Expression | null\n}\nexport interface IfStatement extends BaseASTNode {\n type: 'IfStatement'\n condition: Expression\n trueBody: Statement\n falseBody: Statement | null\n}\nexport interface UncheckedStatement extends BaseASTNode {\n type: 'UncheckedStatement'\n block: Block\n}\nexport interface TryStatement extends BaseASTNode {\n type: 'TryStatement'\n expression: Expression\n returnParameters: VariableDeclaration[] | null\n body: Block\n catchClauses: CatchClause[]\n}\nexport interface CatchClause extends BaseASTNode {\n type: 'CatchClause'\n isReasonStringType: boolean\n kind: string | null\n parameters: VariableDeclaration[] | null\n body: Block\n}\nexport interface WhileStatement extends BaseASTNode {\n type: 'WhileStatement'\n condition: Expression\n body: Statement\n}\nexport interface ForStatement extends BaseASTNode {\n type: 'ForStatement'\n initExpression: SimpleStatement | null\n conditionExpression?: Expression\n loopExpression: ExpressionStatement\n body: Statement\n}\nexport interface InlineAssemblyStatement extends BaseASTNode {\n type: 'InlineAssemblyStatement'\n language: string | null\n flags: string[]\n body: AssemblyBlock\n}\nexport interface DoWhileStatement extends BaseASTNode {\n type: 'DoWhileStatement'\n condition: Expression\n body: Statement\n}\nexport interface ContinueStatement extends BaseASTNode {\n type: 'ContinueStatement'\n}\nexport interface Break extends BaseASTNode {\n type: 'Break'\n}\nexport interface Continue extends BaseASTNode {\n type: 'Continue'\n}\nexport interface BreakStatement extends BaseASTNode {\n type: 'BreakStatement'\n}\nexport interface ReturnStatement extends BaseASTNode {\n type: 'ReturnStatement'\n expression: Expression | null\n}\nexport interface EmitStatement extends BaseASTNode {\n type: 'EmitStatement'\n eventCall: FunctionCall\n}\nexport interface ThrowStatement extends BaseASTNode {\n type: 'ThrowStatement'\n}\nexport interface VariableDeclarationStatement extends BaseASTNode {\n type: 'VariableDeclarationStatement'\n variables: Array\n initialValue: Expression | null\n}\nexport interface ElementaryTypeName extends BaseASTNode {\n type: 'ElementaryTypeName'\n name: string\n stateMutability: string | null\n}\nexport interface FunctionCall extends BaseASTNode {\n type: 'FunctionCall'\n expression: Expression\n arguments: Expression[]\n names: string[]\n identifiers: Identifier[]\n}\nexport interface AssemblyBlock extends BaseASTNode {\n type: 'AssemblyBlock'\n operations: AssemblyItem[]\n}\nexport interface AssemblyCall extends BaseASTNode {\n type: 'AssemblyCall'\n functionName: string\n arguments: AssemblyExpression[]\n}\nexport interface AssemblyLocalDefinition extends BaseASTNode {\n type: 'AssemblyLocalDefinition'\n names: Identifier[] | AssemblyMemberAccess[]\n expression: AssemblyExpression | null\n}\nexport interface AssemblyAssignment extends BaseASTNode {\n type: 'AssemblyAssignment'\n names: Identifier[] | AssemblyMemberAccess[]\n expression: AssemblyExpression\n}\nexport interface AssemblyStackAssignment extends BaseASTNode {\n type: 'AssemblyStackAssignment'\n name: string\n expression: AssemblyExpression\n}\nexport interface LabelDefinition extends BaseASTNode {\n type: 'LabelDefinition'\n name: string\n}\nexport interface AssemblySwitch extends BaseASTNode {\n type: 'AssemblySwitch'\n expression: AssemblyExpression\n cases: AssemblyCase[]\n}\nexport interface AssemblyCase extends BaseASTNode {\n type: 'AssemblyCase'\n value: AssemblyLiteral | null\n block: AssemblyBlock\n default: boolean\n}\nexport interface AssemblyFunctionDefinition extends BaseASTNode {\n type: 'AssemblyFunctionDefinition'\n name: string\n arguments: Identifier[]\n returnArguments: Identifier[]\n body: AssemblyBlock\n}\nexport interface AssemblyFunctionReturns extends BaseASTNode {\n type: 'AssemblyFunctionReturns'\n}\nexport interface AssemblyFor extends BaseASTNode {\n type: 'AssemblyFor'\n pre: AssemblyBlock | AssemblyExpression\n condition: AssemblyExpression\n post: AssemblyBlock | AssemblyExpression\n body: AssemblyBlock\n}\nexport interface AssemblyIf extends BaseASTNode {\n type: 'AssemblyIf'\n condition: AssemblyExpression\n body: AssemblyBlock\n}\nexport type AssemblyLiteral =\n | StringLiteral\n | DecimalNumber\n | HexNumber\n | HexLiteral\nexport interface SubAssembly extends BaseASTNode {\n type: 'SubAssembly'\n}\nexport interface AssemblyMemberAccess extends BaseASTNode {\n type: 'AssemblyMemberAccess'\n expression: Identifier\n memberName: Identifier\n}\nexport interface NewExpression extends BaseASTNode {\n type: 'NewExpression'\n typeName: TypeName\n}\nexport interface TupleExpression extends BaseASTNode {\n type: 'TupleExpression'\n components: Array\n isArray: boolean\n}\nexport interface NameValueExpression extends BaseASTNode {\n type: 'NameValueExpression'\n expression: Expression\n arguments: NameValueList\n}\nexport interface NumberLiteral extends BaseASTNode {\n type: 'NumberLiteral'\n number: string\n subdenomination:\n | null\n | 'wei'\n | 'szabo'\n | 'finney'\n | 'ether'\n | 'seconds'\n | 'minutes'\n | 'hours'\n | 'days'\n | 'weeks'\n | 'years'\n}\nexport interface BooleanLiteral extends BaseASTNode {\n type: 'BooleanLiteral'\n value: boolean\n}\nexport interface HexLiteral extends BaseASTNode {\n type: 'HexLiteral'\n value: string\n parts: string[]\n}\nexport interface StringLiteral extends BaseASTNode {\n type: 'StringLiteral'\n value: string\n parts: string[]\n isUnicode: boolean[]\n}\nexport interface Identifier extends BaseASTNode {\n type: 'Identifier'\n name: string\n}\n\nexport const binaryOpValues = [\n '+',\n '-',\n '*',\n '/',\n '**',\n '%',\n '<<',\n '>>',\n '&&',\n '||',\n ',,',\n '&',\n ',',\n '^',\n '<',\n '>',\n '<=',\n '>=',\n '==',\n '!=',\n '=',\n ',=',\n '^=',\n '&=',\n '<<=',\n '>>=',\n '+=',\n '-=',\n '*=',\n '/=',\n '%=',\n '|',\n '|=',\n] as const\nexport type BinOp = typeof binaryOpValues[number]\n\nexport const unaryOpValues = [\n '-',\n '+',\n '++',\n '--',\n '~',\n 'after',\n 'delete',\n '!',\n] as const\nexport type UnaryOp = typeof unaryOpValues[number]\n\nexport interface BinaryOperation extends BaseASTNode {\n type: 'BinaryOperation'\n left: Expression\n right: Expression\n operator: BinOp\n}\nexport interface UnaryOperation extends BaseASTNode {\n type: 'UnaryOperation'\n operator: UnaryOp\n subExpression: Expression\n isPrefix: boolean\n}\nexport interface Conditional extends BaseASTNode {\n type: 'Conditional'\n condition: Expression\n trueExpression: Expression\n falseExpression: Expression\n}\nexport interface IndexAccess extends BaseASTNode {\n type: 'IndexAccess'\n base: Expression\n index: Expression\n}\nexport interface IndexRangeAccess extends BaseASTNode {\n type: 'IndexRangeAccess'\n base: Expression\n indexStart?: Expression\n indexEnd?: Expression\n}\nexport interface MemberAccess extends BaseASTNode {\n type: 'MemberAccess'\n expression: Expression\n memberName: string\n}\nexport interface HexNumber extends BaseASTNode {\n type: 'HexNumber'\n value: string\n}\nexport interface DecimalNumber extends BaseASTNode {\n type: 'DecimalNumber'\n value: string\n}\nexport interface NameValueList extends BaseASTNode {\n type: 'NameValueList'\n names: string[]\n identifiers: Identifier[]\n arguments: Expression[]\n}\nexport type ASTNode =\n | SourceUnit\n | PragmaDirective\n | ImportDirective\n | ContractDefinition\n | InheritanceSpecifier\n | StateVariableDeclaration\n | UsingForDeclaration\n | StructDefinition\n | ModifierDefinition\n | ModifierInvocation\n | FunctionDefinition\n | EventDefinition\n | CustomErrorDefinition\n | EnumValue\n | EnumDefinition\n | VariableDeclaration\n | TypeName\n | UserDefinedTypeName\n | Mapping\n | FunctionTypeName\n | Block\n | Statement\n | ElementaryTypeName\n | AssemblyBlock\n | AssemblyCall\n | AssemblyLocalDefinition\n | AssemblyAssignment\n | AssemblyStackAssignment\n | LabelDefinition\n | AssemblySwitch\n | AssemblyCase\n | AssemblyFunctionDefinition\n | AssemblyFunctionReturns\n | AssemblyFor\n | AssemblyIf\n | AssemblyLiteral\n | SubAssembly\n | TupleExpression\n | BinaryOperation\n | Conditional\n | IndexAccess\n | IndexRangeAccess\n | AssemblyItem\n | Expression\n | NameValueList\n | AssemblyMemberAccess\n | CatchClause\n | FileLevelConstant\n | TypeDefinition\n | InvalidNode\n\nexport type AssemblyItem =\n | Identifier\n | AssemblyBlock\n | AssemblyExpression\n | AssemblyLocalDefinition\n | AssemblyAssignment\n | AssemblyStackAssignment\n | LabelDefinition\n | AssemblySwitch\n | AssemblyFunctionDefinition\n | AssemblyFor\n | AssemblyIf\n | Break\n | Continue\n | SubAssembly\n | NumberLiteral\n | StringLiteral\n | HexNumber\n | HexLiteral\n | DecimalNumber\nexport type AssemblyExpression = AssemblyCall | AssemblyLiteral\nexport type Expression =\n | IndexAccess\n | IndexRangeAccess\n | TupleExpression\n | BinaryOperation\n | Conditional\n | MemberAccess\n | FunctionCall\n | UnaryOperation\n | NewExpression\n | PrimaryExpression\n | NameValueExpression\nexport type PrimaryExpression =\n | BooleanLiteral\n | HexLiteral\n | StringLiteral\n | NumberLiteral\n | Identifier\n | TupleExpression\n | TypeName\nexport type SimpleStatement = VariableDeclarationStatement | ExpressionStatement\nexport type TypeName =\n | ElementaryTypeName\n | UserDefinedTypeName\n | Mapping\n | ArrayTypeName\n | FunctionTypeName\nexport type Statement =\n | IfStatement\n | WhileStatement\n | ForStatement\n | Block\n | InlineAssemblyStatement\n | DoWhileStatement\n | ContinueStatement\n | BreakStatement\n | ReturnStatement\n | EmitStatement\n | ThrowStatement\n | SimpleStatement\n | VariableDeclarationStatement\n | UncheckedStatement\n | TryStatement\n | RevertStatement\n\ntype ASTMap = { [K in ASTNodeTypeString]: U extends { type: K } ? U : never }\ntype ASTTypeMap = ASTMap\ntype ASTVisitorEnter = {\n [K in keyof ASTTypeMap]?: (ast: ASTTypeMap[K], parent?: ASTNode) => any\n}\ntype ASTVisitorExit = {\n [K in keyof ASTTypeMap as `${K}:exit`]?: (\n ast: ASTTypeMap[K],\n parent?: ASTNode\n ) => any\n}\n\nexport type ASTVisitor = ASTVisitorEnter & ASTVisitorExit\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n * This monstrosity is here to check that there are no ASTNodeTypeString without\n * a corresponding ASTNode, no ASTNode without a corresponding ASTNodeTypeString,\n * no ASTVisitorEnter callback without a corresponding ASTNode,\n * no ASTVisitorExit callback without a corresponding ASTVisitorEnter callback,\n * and so on, and so on.\n *\n * There are probably some ways to simplify this by deriving some types\n * from others.\n */\nfunction checkTypes() {\n const astNodeType: ASTNode['type'] = '' as any\n const astNodeTypeString: ASTNodeTypeString = '' as any\n const astVisitorEnterKey: keyof ASTVisitorEnter = '' as any\n\n let assignAstNodeType: ASTNode['type'] = astNodeTypeString\n assignAstNodeType = astVisitorEnterKey\n\n let assignAstNodeTyeString: ASTNodeTypeString = astNodeType\n assignAstNodeTyeString = astVisitorEnterKey\n\n let assignAstVisitorEnterKey: keyof ASTVisitorEnter = astNodeType\n assignAstVisitorEnterKey = astNodeTypeString\n\n const astNodeTypeExit: `${ASTNode['type']}:exit` = '' as any\n const astNodeTypeStringExit: `${ASTNodeTypeString}:exit` = '' as any\n const astVisitorEnterKeyExit: `${keyof ASTVisitorEnter}:exit` = '' as any\n const astVisitorExitKey: keyof ASTVisitorExit = '' as any\n\n let letAstNodeTypeExit: `${ASTNode['type']}:exit` = astNodeTypeStringExit\n letAstNodeTypeExit = astVisitorEnterKeyExit\n letAstNodeTypeExit = astVisitorExitKey\n\n let assignAstNodeTypeStringExit: `${ASTNodeTypeString}:exit` = astNodeTypeExit\n assignAstNodeTypeStringExit = astVisitorEnterKeyExit\n assignAstNodeTypeStringExit = astVisitorExitKey\n\n let assignAstVisitorEnterKeyExit: `${keyof ASTVisitorEnter}:exit` = astNodeTypeExit\n assignAstVisitorEnterKeyExit = astNodeTypeStringExit\n assignAstVisitorEnterKeyExit = astVisitorExitKey\n\n let assignAstVisitorExitKey: keyof ASTVisitorExit = astNodeTypeExit\n assignAstVisitorExitKey = astNodeTypeStringExit\n assignAstVisitorExitKey = astVisitorEnterKeyExit\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n", "import { ParserRuleContext } from 'antlr4ts'\nimport { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor'\nimport { ParseTree } from 'antlr4ts/tree/ParseTree'\nimport * as SP from './antlr/SolidityParser'\n\nimport { SolidityVisitor } from './antlr/SolidityVisitor'\nimport { ParseOptions } from './types'\nimport * as AST from './ast-types'\nimport { ErrorNode } from 'antlr4ts/tree/ErrorNode'\n\ninterface SourceLocation {\n start: {\n line: number\n column: number\n }\n end: {\n line: number\n column: number\n }\n}\n\ninterface WithMeta {\n __withMeta: never\n}\n\ntype ASTBuilderNode = AST.ASTNode & WithMeta\n\nexport class ASTBuilder\n extends AbstractParseTreeVisitor\n implements SolidityVisitor {\n public result: AST.SourceUnit | null = null\n private _currentContract?: string\n\n constructor(public options: ParseOptions) {\n super()\n }\n\n defaultResult(): AST.ASTNode & WithMeta {\n throw new Error('Unknown node')\n }\n\n aggregateResult() {\n return ({ type: '' } as unknown) as AST.ASTNode & WithMeta\n }\n\n public visitSourceUnit(ctx: SP.SourceUnitContext): AST.SourceUnit & WithMeta {\n const children = (ctx.children ?? []).filter(\n (x) => !(x instanceof ErrorNode)\n )\n\n const node: AST.SourceUnit = {\n type: 'SourceUnit',\n children: children.slice(0, -1).map((child) => this.visit(child)),\n }\n const result = this._addMeta(node, ctx)\n this.result = result\n\n return result\n }\n\n public visitContractPart(ctx: SP.ContractPartContext) {\n return this.visit(ctx.getChild(0))\n }\n\n public visitContractDefinition(\n ctx: SP.ContractDefinitionContext\n ): AST.ContractDefinition & WithMeta {\n const name = this._toText(ctx.identifier())\n const kind = this._toText(ctx.getChild(0))\n\n this._currentContract = name\n\n const node: AST.ContractDefinition = {\n type: 'ContractDefinition',\n name,\n baseContracts: ctx\n .inheritanceSpecifier()\n .map((x) => this.visitInheritanceSpecifier(x)),\n subNodes: ctx.contractPart().map((x) => this.visit(x)),\n kind,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitStateVariableDeclaration(\n ctx: SP.StateVariableDeclarationContext\n ) {\n const type = this.visitTypeName(ctx.typeName())\n const iden = ctx.identifier()\n const name = this._toText(iden)\n\n let expression: AST.Expression | null = null\n const ctxExpression = ctx.expression()\n if (ctxExpression) {\n expression = this.visitExpression(ctxExpression)\n }\n\n let visibility: AST.VariableDeclaration['visibility'] = 'default'\n if (ctx.InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.PublicKeyword().length > 0) {\n visibility = 'public'\n } else if (ctx.PrivateKeyword().length > 0) {\n visibility = 'private'\n }\n\n let isDeclaredConst = false\n if (ctx.ConstantKeyword().length > 0) {\n isDeclaredConst = true\n }\n\n let override\n const overrideSpecifier = ctx.overrideSpecifier()\n if (overrideSpecifier.length === 0) {\n override = null\n } else {\n override = overrideSpecifier[0]\n .userDefinedTypeName()\n .map((x) => this.visitUserDefinedTypeName(x))\n }\n\n let isImmutable = false\n if (ctx.ImmutableKeyword().length > 0) {\n isImmutable = true\n }\n\n const decl: AST.StateVariableDeclarationVariable = {\n type: 'VariableDeclaration',\n typeName: type,\n name,\n identifier: this.visitIdentifier(iden),\n expression,\n visibility,\n isStateVar: true,\n isDeclaredConst,\n isIndexed: false,\n isImmutable,\n override,\n storageLocation: null,\n }\n\n const node: AST.StateVariableDeclaration = {\n type: 'StateVariableDeclaration',\n variables: [this._addMeta(decl, ctx)],\n initialValue: expression,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitVariableDeclaration(\n ctx: SP.VariableDeclarationContext\n ): AST.VariableDeclaration & WithMeta {\n let storageLocation: string | null = null\n const ctxStorageLocation = ctx.storageLocation()\n if (ctxStorageLocation) {\n storageLocation = this._toText(ctxStorageLocation)\n }\n\n const identifierCtx = ctx.identifier()\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: this.visitTypeName(ctx.typeName()),\n name: this._toText(identifierCtx),\n identifier: this.visitIdentifier(identifierCtx),\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitVariableDeclarationStatement(\n ctx: SP.VariableDeclarationStatementContext\n ): AST.VariableDeclarationStatement & WithMeta {\n let variables: Array = []\n const ctxVariableDeclaration = ctx.variableDeclaration()\n const ctxIdentifierList = ctx.identifierList()\n const ctxVariableDeclarationList = ctx.variableDeclarationList()\n if (ctxVariableDeclaration !== undefined) {\n variables = [this.visitVariableDeclaration(ctxVariableDeclaration)]\n } else if (ctxIdentifierList !== undefined) {\n variables = this.buildIdentifierList(ctxIdentifierList)\n } else if (ctxVariableDeclarationList) {\n variables = this.buildVariableDeclarationList(ctxVariableDeclarationList)\n }\n\n let initialValue: AST.Expression | null = null\n const ctxExpression = ctx.expression()\n if (ctxExpression) {\n initialValue = this.visitExpression(ctxExpression)\n }\n\n const node: AST.VariableDeclarationStatement = {\n type: 'VariableDeclarationStatement',\n variables,\n initialValue,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitStatement(ctx: SP.StatementContext) {\n try {\n return this.visit(ctx.getChild(0)) as AST.Statement & WithMeta\n } catch (e) {\n const node: any = {type: 'InvalidNode'}\n return this._addMeta(node, ctx)\n }\n }\n\n public visitSimpleStatement(ctx: SP.SimpleStatementContext) {\n try {\n return this.visit(ctx.getChild(0)) as AST.SimpleStatement & WithMeta\n } catch (e) {\n const node: any = {type: 'InvalidNode'}\n return this._addMeta(node, ctx)\n }\n }\n\n public visitEventDefinition(ctx: SP.EventDefinitionContext) {\n const parameters = ctx\n .eventParameterList()\n .eventParameter()\n .map((paramCtx) => {\n const type = this.visitTypeName(paramCtx.typeName())\n let name: string | null = null\n const paramCtxIdentifier = paramCtx.identifier()\n if (paramCtxIdentifier) {\n name = this._toText(paramCtxIdentifier)\n }\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: type,\n name,\n identifier:\n paramCtxIdentifier !== undefined\n ? this.visitIdentifier(paramCtxIdentifier)\n : null,\n isStateVar: false,\n isIndexed: paramCtx.IndexedKeyword() !== undefined,\n storageLocation: null,\n expression: null,\n }\n return this._addMeta(node, paramCtx)\n })\n\n const node: AST.EventDefinition = {\n type: 'EventDefinition',\n name: this._toText(ctx.identifier()),\n parameters,\n isAnonymous: ctx.AnonymousKeyword() !== undefined,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitBlock(ctx: SP.BlockContext): AST.Block & WithMeta {\n const node: AST.Block = {\n type: 'Block',\n statements: ctx.statement && ctx.statement().map((x) => this.visitStatement(x)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitParameter(ctx: SP.ParameterContext) {\n let storageLocation: string | null = null\n const ctxStorageLocation = ctx.storageLocation()\n if (ctxStorageLocation !== undefined) {\n storageLocation = this._toText(ctxStorageLocation)\n }\n\n let name: string | null = null\n const ctxIdentifier = ctx.identifier()\n if (ctxIdentifier !== undefined) {\n name = this._toText(ctxIdentifier)\n }\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: this.visitTypeName(ctx.typeName()),\n name,\n identifier:\n ctxIdentifier !== undefined\n ? this.visitIdentifier(ctxIdentifier)\n : null,\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionDefinition(\n ctx: SP.FunctionDefinitionContext\n ): AST.FunctionDefinition & WithMeta {\n let isConstructor = false\n let isFallback = false\n let isReceiveEther = false\n let isVirtual = false\n let name: string | null = null\n let parameters: any = []\n let returnParameters: AST.VariableDeclaration[] | null = null\n let visibility: AST.FunctionDefinition['visibility'] = 'default'\n\n let block: AST.Block | null = null\n const ctxBlock = ctx.block()\n if (ctxBlock !== undefined) {\n block = this.visitBlock(ctxBlock)\n }\n\n const modifiers = ctx\n .modifierList()\n .modifierInvocation()\n .map((mod) => this.visitModifierInvocation(mod))\n\n let stateMutability = null\n if (ctx.modifierList().stateMutability().length > 0) {\n stateMutability = this._stateMutabilityToText(\n ctx.modifierList().stateMutability(0)\n )\n }\n\n // see what type of function we're dealing with\n const ctxReturnParameters = ctx.returnParameters()\n switch (this._toText(ctx.functionDescriptor().getChild(0))) {\n case 'constructor':\n parameters = ctx\n .parameterList()\n .parameter()\n .map((x) => this.visit(x))\n\n // error out on incorrect function visibility\n if (ctx.modifierList().InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.modifierList().PublicKeyword().length > 0) {\n visibility = 'public'\n } else {\n visibility = 'default'\n }\n\n isConstructor = true\n break\n case 'fallback':\n visibility = 'external'\n isFallback = true\n break\n case 'receive':\n visibility = 'external'\n isReceiveEther = true\n break\n case 'function': {\n const identifier = ctx.functionDescriptor().identifier()\n name = identifier !== undefined ? this._toText(identifier) : ''\n\n parameters = ctx\n .parameterList()\n .parameter()\n .map((x) => this.visit(x))\n returnParameters =\n ctxReturnParameters !== undefined\n ? this.visitReturnParameters(ctxReturnParameters)\n : null\n\n // parse function visibility\n if (ctx.modifierList().ExternalKeyword().length > 0) {\n visibility = 'external'\n } else if (ctx.modifierList().InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.modifierList().PublicKeyword().length > 0) {\n visibility = 'public'\n } else if (ctx.modifierList().PrivateKeyword().length > 0) {\n visibility = 'private'\n }\n\n isConstructor = name === this._currentContract\n isFallback = name === ''\n break\n }\n }\n\n // check if function is virtual\n if (ctx.modifierList().VirtualKeyword().length > 0) {\n isVirtual = true\n }\n\n let override: AST.UserDefinedTypeName[] | null\n const overrideSpecifier = ctx.modifierList().overrideSpecifier()\n if (overrideSpecifier.length === 0) {\n override = null\n } else {\n override = overrideSpecifier[0]\n .userDefinedTypeName()\n .map((x) => this.visitUserDefinedTypeName(x))\n }\n\n const node: AST.FunctionDefinition = {\n type: 'FunctionDefinition',\n name,\n parameters,\n returnParameters,\n body: block,\n visibility,\n modifiers,\n override,\n isConstructor,\n isReceiveEther,\n isFallback,\n isVirtual,\n stateMutability,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitEnumDefinition(\n ctx: SP.EnumDefinitionContext\n ): AST.EnumDefinition & WithMeta {\n const node: AST.EnumDefinition = {\n type: 'EnumDefinition',\n name: this._toText(ctx.identifier()),\n members: ctx.enumValue().map((x) => this.visitEnumValue(x)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitEnumValue(ctx: SP.EnumValueContext): AST.EnumValue & WithMeta {\n const node: AST.EnumValue = {\n type: 'EnumValue',\n name: this._toText(ctx.identifier()),\n }\n return this._addMeta(node, ctx)\n }\n\n public visitElementaryTypeName(\n ctx: SP.ElementaryTypeNameContext\n ): AST.ElementaryTypeName & WithMeta {\n const node: AST.ElementaryTypeName = {\n type: 'ElementaryTypeName',\n name: this._toText(ctx),\n stateMutability: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitIdentifier(ctx: SP.IdentifierContext): AST.Identifier & WithMeta {\n const node: AST.Identifier = {\n type: 'Identifier',\n name: this._toText(ctx),\n }\n return this._addMeta(node, ctx)\n }\n\n public visitTypeName(ctx: SP.TypeNameContext): AST.TypeName & WithMeta {\n if (ctx.children !== undefined && ctx.children.length > 2) {\n let length = null\n if (ctx.children.length === 4) {\n const expression = ctx.expression()\n if (expression === undefined) {\n throw new Error(\n 'Assertion error: a typeName with 4 children should have an expression'\n )\n }\n length = this.visitExpression(expression)\n }\n\n const ctxTypeName = ctx.typeName()\n\n const node: AST.ArrayTypeName = {\n type: 'ArrayTypeName',\n baseTypeName: this.visitTypeName(ctxTypeName!),\n length,\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.children?.length === 2) {\n const node: AST.ElementaryTypeName = {\n type: 'ElementaryTypeName',\n name: this._toText(ctx.getChild(0)),\n stateMutability: this._toText(ctx.getChild(1)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.elementaryTypeName() !== undefined) {\n return this.visitElementaryTypeName(ctx.elementaryTypeName()!)\n }\n\n if (ctx.userDefinedTypeName() !== undefined) {\n return this.visitUserDefinedTypeName(ctx.userDefinedTypeName()!)\n }\n\n if (ctx.mapping() !== undefined) {\n return this.visitMapping(ctx.mapping()!)\n }\n\n if (ctx.functionTypeName() !== undefined) {\n return this.visitFunctionTypeName(ctx.functionTypeName()!)\n }\n\n throw new Error('Assertion error: unhandled type name case')\n }\n\n public visitUserDefinedTypeName(\n ctx: SP.UserDefinedTypeNameContext\n ): AST.UserDefinedTypeName & WithMeta {\n const node: AST.UserDefinedTypeName = {\n type: 'UserDefinedTypeName',\n namePath: this._toText(ctx),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitUsingForDeclaration(\n ctx: SP.UsingForDeclarationContext\n ): AST.UsingForDeclaration & WithMeta {\n let typeName = null\n const ctxTypeName = ctx.typeName()\n if (ctxTypeName !== undefined) {\n typeName = this.visitTypeName(ctxTypeName)\n }\n\n const isGlobal = ctx.GlobalKeyword() !== undefined;\n\n // the object of the `usingForDeclaration` can be a single identifier\n // (the library name) or a group of functions:\n // using Lib for uint;\n // using { f } for uint;\n let node: AST.UsingForDeclaration\n const usingForObject = ctx.usingForObject()\n const firstChild = this._toText(usingForObject.getChild(0))\n if (firstChild === '{') {\n node = {\n type: 'UsingForDeclaration',\n isGlobal,\n typeName,\n libraryName: null,\n functions: usingForObject\n .userDefinedTypeName()\n .map((x) => this._toText(x)),\n }\n } else {\n node = {\n type: 'UsingForDeclaration',\n isGlobal,\n typeName,\n libraryName: this._toText(usingForObject.userDefinedTypeName(0)),\n functions: [],\n }\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitPragmaDirective(\n ctx: SP.PragmaDirectiveContext\n ): AST.PragmaDirective & WithMeta {\n // this converts something like >= 0.5.0 <0.7.0\n // in >=0.5.0 <0.7.0\n const versionContext = ctx.pragmaValue().version()\n\n let value = this._toText(ctx.pragmaValue())\n if (versionContext?.children !== undefined) {\n value = versionContext.children.map((x) => this._toText(x)).join(' ')\n }\n\n const node: AST.PragmaDirective = {\n type: 'PragmaDirective',\n name: this._toText(ctx.pragmaName()),\n value,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitInheritanceSpecifier(\n ctx: SP.InheritanceSpecifierContext\n ): AST.InheritanceSpecifier & WithMeta {\n const exprList = ctx.expressionList()\n const args =\n exprList !== undefined\n ? exprList.expression().map((x) => this.visitExpression(x))\n : []\n\n const node: AST.InheritanceSpecifier = {\n type: 'InheritanceSpecifier',\n baseName: this.visitUserDefinedTypeName(ctx.userDefinedTypeName()),\n arguments: args,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitModifierInvocation(\n ctx: SP.ModifierInvocationContext\n ): AST.ModifierInvocation & WithMeta {\n const exprList = ctx.expressionList()\n\n let args\n if (exprList != null) {\n args = exprList.expression().map((x) => this.visit(x))\n } else if (ctx.children !== undefined && ctx.children.length > 1) {\n args = []\n } else {\n args = null\n }\n\n const node: AST.ModifierInvocation = {\n type: 'ModifierInvocation',\n name: this._toText(ctx.identifier()),\n arguments: args,\n }\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionTypeName(\n ctx: SP.FunctionTypeNameContext\n ): AST.FunctionTypeName & WithMeta {\n const parameterTypes = ctx\n .functionTypeParameterList(0)\n .functionTypeParameter()\n .map((typeCtx) => this.visitFunctionTypeParameter(typeCtx))\n\n let returnTypes: AST.VariableDeclaration[] = []\n if (ctx.functionTypeParameterList().length > 1) {\n returnTypes = ctx\n .functionTypeParameterList(1)\n .functionTypeParameter()\n .map((typeCtx) => this.visitFunctionTypeParameter(typeCtx))\n }\n\n let visibility = 'default'\n if (ctx.InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.ExternalKeyword().length > 0) {\n visibility = 'external'\n }\n\n let stateMutability = null\n if (ctx.stateMutability().length > 0) {\n stateMutability = this._toText(ctx.stateMutability(0))\n }\n\n const node: AST.FunctionTypeName = {\n type: 'FunctionTypeName',\n parameterTypes,\n returnTypes,\n visibility,\n stateMutability,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionTypeParameter(\n ctx: SP.FunctionTypeParameterContext\n ): AST.VariableDeclaration & WithMeta {\n let storageLocation = null\n if (ctx.storageLocation()) {\n storageLocation = this._toText(ctx.storageLocation()!)\n }\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: this.visitTypeName(ctx.typeName()),\n name: null,\n identifier: null,\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitThrowStatement(\n ctx: SP.ThrowStatementContext\n ): AST.ThrowStatement & WithMeta {\n const node: AST.ThrowStatement = {\n type: 'ThrowStatement',\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitReturnStatement(\n ctx: SP.ReturnStatementContext\n ): AST.ReturnStatement & WithMeta {\n let expression = null\n const ctxExpression = ctx.expression()\n if (ctxExpression) {\n expression = this.visitExpression(ctxExpression)\n }\n\n const node: AST.ReturnStatement = {\n type: 'ReturnStatement',\n expression,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitEmitStatement(\n ctx: SP.EmitStatementContext\n ): AST.EmitStatement & WithMeta {\n const node: AST.EmitStatement = {\n type: 'EmitStatement',\n eventCall: this.visitFunctionCall(ctx.functionCall()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitCustomErrorDefinition(\n ctx: SP.CustomErrorDefinitionContext\n ): AST.CustomErrorDefinition & WithMeta {\n const node: AST.CustomErrorDefinition = {\n type: 'CustomErrorDefinition',\n name: this._toText(ctx.identifier()),\n parameters: this.visitParameterList(ctx.parameterList()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitTypeDefinition(\n ctx: SP.TypeDefinitionContext\n ): AST.TypeDefinition & WithMeta {\n const node: AST.TypeDefinition = {\n type: 'TypeDefinition',\n name: this._toText(ctx.identifier()),\n definition: this.visitElementaryTypeName(ctx.elementaryTypeName()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitRevertStatement(\n ctx: SP.RevertStatementContext\n ): AST.RevertStatement & WithMeta {\n const node: AST.RevertStatement = {\n type: 'RevertStatement',\n revertCall: this.visitFunctionCall(ctx.functionCall()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionCall(\n ctx: SP.FunctionCallContext\n ): AST.FunctionCall & WithMeta {\n let args: AST.Expression[] = []\n const names = []\n const identifiers = []\n\n const ctxArgs = ctx.functionCallArguments()\n const ctxArgsExpressionList = ctxArgs.expressionList()\n const ctxArgsNameValueList = ctxArgs.nameValueList()\n if (ctxArgsExpressionList) {\n args = ctxArgsExpressionList\n .expression()\n .map((exprCtx) => this.visitExpression(exprCtx))\n } else if (ctxArgsNameValueList) {\n for (const nameValue of ctxArgsNameValueList.nameValue()) {\n args.push(this.visitExpression(nameValue.expression()))\n names.push(this._toText(nameValue.identifier()))\n identifiers.push(this.visitIdentifier(nameValue.identifier()))\n }\n }\n\n const node: AST.FunctionCall = {\n type: 'FunctionCall',\n expression: this.visitExpression(ctx.expression()),\n arguments: args,\n names,\n identifiers,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitStructDefinition(\n ctx: SP.StructDefinitionContext\n ): AST.StructDefinition & WithMeta {\n const node: AST.StructDefinition = {\n type: 'StructDefinition',\n name: this._toText(ctx.identifier()),\n members: ctx\n .variableDeclaration()\n .map((x) => this.visitVariableDeclaration(x)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitWhileStatement(\n ctx: SP.WhileStatementContext\n ): AST.WhileStatement & WithMeta {\n const node: AST.WhileStatement = {\n type: 'WhileStatement',\n condition: this.visitExpression(ctx.expression()),\n body: this.visitStatement(ctx.statement()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitDoWhileStatement(\n ctx: SP.DoWhileStatementContext\n ): AST.DoWhileStatement & WithMeta {\n const node: AST.DoWhileStatement = {\n type: 'DoWhileStatement',\n condition: this.visitExpression(ctx.expression()),\n body: this.visitStatement(ctx.statement()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitIfStatement(\n ctx: SP.IfStatementContext\n ): AST.IfStatement & WithMeta {\n const trueBody = this.visitStatement(ctx.statement(0))\n\n let falseBody = null\n if (ctx.statement().length > 1) {\n falseBody = this.visitStatement(ctx.statement(1))\n }\n\n const node: AST.IfStatement = {\n type: 'IfStatement',\n condition: this.visitExpression(ctx.expression()),\n trueBody,\n falseBody,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitTryStatement(\n ctx: SP.TryStatementContext\n ): AST.TryStatement & WithMeta {\n let returnParameters = null\n const ctxReturnParameters = ctx.returnParameters()\n if (ctxReturnParameters !== undefined) {\n returnParameters = this.visitReturnParameters(ctxReturnParameters)\n }\n\n const catchClauses = ctx\n .catchClause()\n .map((exprCtx) => this.visitCatchClause(exprCtx))\n\n const node: AST.TryStatement = {\n type: 'TryStatement',\n expression: this.visitExpression(ctx.expression()),\n returnParameters,\n body: this.visitBlock(ctx.block()),\n catchClauses,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitCatchClause(\n ctx: SP.CatchClauseContext\n ): AST.CatchClause & WithMeta {\n let parameters = null\n if (ctx.parameterList()) {\n parameters = this.visitParameterList(ctx.parameterList()!)\n }\n\n if (\n ctx.identifier() &&\n this._toText(ctx.identifier()!) !== 'Error' &&\n this._toText(ctx.identifier()!) !== 'Panic'\n ) {\n throw new Error('Expected \"Error\" or \"Panic\" identifier in catch clause')\n }\n\n let kind = null\n const ctxIdentifier = ctx.identifier()\n if (ctxIdentifier !== undefined) {\n kind = this._toText(ctxIdentifier)\n }\n\n const node: AST.CatchClause = {\n type: 'CatchClause',\n // deprecated, use the `kind` property instead,\n isReasonStringType: kind === 'Error',\n kind,\n parameters,\n body: this.visitBlock(ctx.block()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitExpressionStatement(\n ctx: SP.ExpressionStatementContext\n ): AST.ExpressionStatement & WithMeta {\n if (!ctx) {\n return null as any\n }\n const node: AST.ExpressionStatement = {\n type: 'ExpressionStatement',\n expression: this.visitExpression(ctx.expression()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitNumberLiteral(\n ctx: SP.NumberLiteralContext\n ): AST.NumberLiteral & WithMeta {\n const number = this._toText(ctx.getChild(0))\n let subdenomination = null\n\n if (ctx.children?.length === 2) {\n subdenomination = this._toText(ctx.getChild(1))\n }\n\n const node: AST.NumberLiteral = {\n type: 'NumberLiteral',\n number,\n subdenomination: subdenomination as AST.NumberLiteral['subdenomination'],\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitMappingKey(\n ctx: SP.MappingKeyContext\n ): (AST.ElementaryTypeName | AST.UserDefinedTypeName) & WithMeta {\n if (ctx.elementaryTypeName()) {\n return this.visitElementaryTypeName(ctx.elementaryTypeName()!)\n } else if (ctx.userDefinedTypeName()) {\n return this.visitUserDefinedTypeName(ctx.userDefinedTypeName()!)\n } else {\n throw new Error(\n 'Expected MappingKey to have either ' +\n 'elementaryTypeName or userDefinedTypeName'\n )\n }\n }\n\n public visitMapping(ctx: SP.MappingContext): AST.Mapping & WithMeta {\n const node: AST.Mapping = {\n type: 'Mapping',\n keyType: this.visitMappingKey(ctx.mappingKey()),\n valueType: this.visitTypeName(ctx.typeName()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitModifierDefinition(\n ctx: SP.ModifierDefinitionContext\n ): AST.ModifierDefinition & WithMeta {\n let parameters = null\n if (ctx.parameterList()) {\n parameters = this.visitParameterList(ctx.parameterList()!)\n }\n\n let isVirtual = false\n if (ctx.VirtualKeyword().length > 0) {\n isVirtual = true\n }\n\n let override\n const overrideSpecifier = ctx.overrideSpecifier()\n if (overrideSpecifier.length === 0) {\n override = null\n } else {\n override = overrideSpecifier[0]\n .userDefinedTypeName()\n .map((x) => this.visitUserDefinedTypeName(x))\n }\n\n let body = null\n const blockCtx = ctx.block()\n if (blockCtx !== undefined) {\n body = this.visitBlock(blockCtx)\n }\n\n const node: AST.ModifierDefinition = {\n type: 'ModifierDefinition',\n name: this._toText(ctx.identifier()),\n parameters,\n body,\n isVirtual,\n override,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitUncheckedStatement(\n ctx: SP.UncheckedStatementContext\n ): AST.UncheckedStatement & WithMeta {\n const node: AST.UncheckedStatement = {\n type: 'UncheckedStatement',\n block: this.visitBlock(ctx.block()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitExpression(ctx: SP.ExpressionContext): AST.Expression & WithMeta {\n let op: string\n\n switch (ctx.children!.length) {\n case 1: {\n // primary expression\n const primaryExpressionCtx = ctx.tryGetRuleContext(\n 0,\n SP.PrimaryExpressionContext\n )\n if (primaryExpressionCtx === undefined) {\n throw new Error(\n 'Assertion error: primary expression should exist when children length is 1'\n )\n }\n return this.visitPrimaryExpression(primaryExpressionCtx)\n }\n case 2:\n op = this._toText(ctx.getChild(0))\n\n // new expression\n if (op === 'new') {\n const node: AST.NewExpression = {\n type: 'NewExpression',\n typeName: this.visitTypeName(ctx.typeName()!),\n }\n return this._addMeta(node, ctx)\n }\n\n // prefix operators\n if (AST.unaryOpValues.includes(op as AST.UnaryOp)) {\n const node: AST.UnaryOperation = {\n type: 'UnaryOperation',\n operator: op as AST.UnaryOp,\n subExpression: this.visitExpression(\n ctx.getRuleContext(0, SP.ExpressionContext)\n ),\n isPrefix: true,\n }\n return this._addMeta(node, ctx)\n }\n\n op = this._toText(ctx.getChild(1))!\n\n // postfix operators\n if (['++', '--'].includes(op)) {\n const node: AST.UnaryOperation = {\n type: 'UnaryOperation',\n operator: op as AST.UnaryOp,\n subExpression: this.visitExpression(\n ctx.getRuleContext(0, SP.ExpressionContext)\n ),\n isPrefix: false,\n }\n return this._addMeta(node, ctx)\n }\n break\n\n case 3:\n // treat parenthesis as no-op\n if (\n this._toText(ctx.getChild(0)) === '(' &&\n this._toText(ctx.getChild(2)) === ')'\n ) {\n const node: AST.TupleExpression = {\n type: 'TupleExpression',\n components: [\n this.visitExpression(ctx.getRuleContext(0, SP.ExpressionContext)),\n ],\n isArray: false,\n }\n return this._addMeta(node, ctx)\n }\n\n op = this._toText(ctx.getChild(1))!\n\n // member access\n if (op === '.') {\n const node: AST.MemberAccess = {\n type: 'MemberAccess',\n expression: this.visitExpression(ctx.expression(0)),\n memberName: this._toText(ctx.identifier()!),\n }\n return this._addMeta(node, ctx)\n }\n\n if (isBinOp(op)) {\n const node: AST.BinaryOperation = {\n type: 'BinaryOperation',\n operator: op,\n left: this.visitExpression(ctx.expression(0)),\n right: this.visitExpression(ctx.expression(1)),\n }\n return this._addMeta(node, ctx)\n }\n break\n\n case 4:\n // function call\n if (\n this._toText(ctx.getChild(1)) === '(' &&\n this._toText(ctx.getChild(3)) === ')'\n ) {\n let args: AST.Expression[] = []\n const names = []\n const identifiers = []\n\n const ctxArgs = ctx.functionCallArguments()!\n if (ctxArgs.expressionList()) {\n args = ctxArgs\n .expressionList()!\n .expression()\n .map((exprCtx) => this.visitExpression(exprCtx))\n } else if (ctxArgs.nameValueList()) {\n for (const nameValue of ctxArgs.nameValueList()!.nameValue()) {\n args.push(this.visitExpression(nameValue.expression()))\n names.push(this._toText(nameValue.identifier()))\n identifiers.push(this.visitIdentifier(nameValue.identifier()))\n }\n }\n\n const node: AST.FunctionCall = {\n type: 'FunctionCall',\n expression: this.visitExpression(ctx.expression(0)),\n arguments: args,\n names,\n identifiers,\n }\n\n return this._addMeta(node, ctx)\n }\n\n // index access\n if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(3)) === ']'\n ) {\n if (ctx.getChild(2).text === ':') {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n const node: AST.IndexAccess = {\n type: 'IndexAccess',\n base: this.visitExpression(ctx.expression(0)),\n index: this.visitExpression(ctx.expression(1)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n // expression with nameValueList\n if (\n this._toText(ctx.getChild(1)) === '{' &&\n this._toText(ctx.getChild(3)) === '}'\n ) {\n const node: AST.NameValueExpression = {\n type: 'NameValueExpression',\n expression: this.visitExpression(ctx.expression(0)),\n arguments: this.visitNameValueList(ctx.nameValueList()!),\n }\n\n return this._addMeta(node, ctx)\n }\n\n break\n\n case 5:\n // ternary operator\n if (\n this._toText(ctx.getChild(1)) === '?' &&\n this._toText(ctx.getChild(3)) === ':'\n ) {\n const node: AST.Conditional = {\n type: 'Conditional',\n condition: this.visitExpression(ctx.expression(0)),\n trueExpression: this.visitExpression(ctx.expression(1)),\n falseExpression: this.visitExpression(ctx.expression(2)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n // index range access\n if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(2)) === ':' &&\n this._toText(ctx.getChild(4)) === ']'\n ) {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n indexEnd: this.visitExpression(ctx.expression(1)),\n }\n\n return this._addMeta(node, ctx)\n } else if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(3)) === ':' &&\n this._toText(ctx.getChild(4)) === ']'\n ) {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n indexStart: this.visitExpression(ctx.expression(1)),\n }\n\n return this._addMeta(node, ctx)\n }\n break\n\n case 6:\n // index range access\n if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(3)) === ':' &&\n this._toText(ctx.getChild(5)) === ']'\n ) {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n indexStart: this.visitExpression(ctx.expression(1)),\n indexEnd: this.visitExpression(ctx.expression(2)),\n }\n\n return this._addMeta(node, ctx)\n }\n break\n }\n\n throw new Error('Unrecognized expression')\n }\n\n public visitNameValueList(\n ctx: SP.NameValueListContext\n ): AST.NameValueList & WithMeta {\n const names: string[] = []\n const identifiers: AST.Identifier[] = []\n const args: AST.Expression[] = []\n\n for (const nameValue of ctx.nameValue()) {\n names.push(this._toText(nameValue.identifier()))\n identifiers.push(this.visitIdentifier(nameValue.identifier()))\n args.push(this.visitExpression(nameValue.expression()))\n }\n\n const node: AST.NameValueList = {\n type: 'NameValueList',\n names,\n identifiers,\n arguments: args,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFileLevelConstant(ctx: SP.FileLevelConstantContext) {\n const type = this.visitTypeName(ctx.typeName())\n const iden = ctx.identifier()\n const name = this._toText(iden)\n\n const expression = this.visitExpression(ctx.expression())\n\n const node: AST.FileLevelConstant = {\n type: 'FileLevelConstant',\n typeName: type,\n name,\n initialValue: expression,\n isDeclaredConst: true,\n isImmutable: false,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitForStatement(ctx: SP.ForStatementContext) {\n let conditionExpression: any = this.visitExpressionStatement(\n ctx.expressionStatement()!\n )\n if (conditionExpression) {\n conditionExpression = conditionExpression.expression\n }\n const node: AST.ForStatement = {\n type: 'ForStatement',\n initExpression: ctx.simpleStatement()\n ? this.visitSimpleStatement(ctx.simpleStatement()!)\n : null,\n conditionExpression,\n loopExpression: {\n type: 'ExpressionStatement',\n expression:\n ctx.expression() !== undefined\n ? this.visitExpression(ctx.expression()!)\n : null,\n },\n body: this.visitStatement(ctx.statement()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitHexLiteral(ctx: SP.HexLiteralContext) {\n const parts = ctx\n .HexLiteralFragment()\n .map((x) => this._toText(x))\n .map((x) => x.substring(4, x.length - 1))\n\n const node: AST.HexLiteral = {\n type: 'HexLiteral',\n value: parts.join(''),\n parts,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitPrimaryExpression(\n ctx: SP.PrimaryExpressionContext\n ): AST.PrimaryExpression & WithMeta {\n if (ctx.BooleanLiteral()) {\n const node: AST.BooleanLiteral = {\n type: 'BooleanLiteral',\n value: this._toText(ctx.BooleanLiteral()!) === 'true',\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.hexLiteral()) {\n return this.visitHexLiteral(ctx.hexLiteral()!)\n }\n\n if (ctx.stringLiteral()) {\n const fragments = ctx\n .stringLiteral()!\n .StringLiteralFragment()\n .map((stringLiteralFragmentCtx: any) => {\n let text = this._toText(stringLiteralFragmentCtx)!\n\n const isUnicode = text.slice(0, 7) === 'unicode'\n if (isUnicode) {\n text = text.slice(7)\n }\n const singleQuotes = text[0] === \"'\"\n const textWithoutQuotes = text.substring(1, text.length - 1)\n const value = singleQuotes\n ? textWithoutQuotes.replace(new RegExp(\"\\\\\\\\'\", 'g'), \"'\")\n : textWithoutQuotes.replace(new RegExp('\\\\\\\\\"', 'g'), '\"')\n\n return { value, isUnicode }\n })\n\n const parts = fragments.map((x: any) => x.value)\n\n const node: AST.StringLiteral = {\n type: 'StringLiteral',\n value: parts.join(''),\n parts,\n isUnicode: fragments.map((x: any) => x.isUnicode),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.numberLiteral()) {\n return this.visitNumberLiteral(ctx.numberLiteral()!)\n }\n\n if (ctx.TypeKeyword()) {\n const node: AST.Identifier = {\n type: 'Identifier',\n name: 'type',\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.typeName()) {\n return this.visitTypeName(ctx.typeName()!)\n }\n\n return this.visit(ctx.getChild(0)) as any\n }\n\n public visitTupleExpression(\n ctx: SP.TupleExpressionContext\n ): AST.TupleExpression & WithMeta {\n // remove parentheses\n const children = ctx.children!.slice(1, -1)\n const components = this._mapCommasToNulls(children).map((expr) => {\n // add a null for each empty value\n if (expr === null) {\n return null\n }\n return this.visit(expr)\n })\n\n const node: AST.TupleExpression = {\n type: 'TupleExpression',\n components,\n isArray: this._toText(ctx.getChild(0)) === '[',\n }\n\n return this._addMeta(node, ctx)\n }\n\n public buildIdentifierList(ctx: SP.IdentifierListContext) {\n // remove parentheses\n const children = ctx.children!.slice(1, -1)\n const identifiers = ctx.identifier()\n let i = 0\n return this._mapCommasToNulls(children).map((idenOrNull) => {\n // add a null for each empty value\n if (!idenOrNull) {\n return null\n }\n\n const iden = identifiers[i]\n i++\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n name: this._toText(iden),\n identifier: this.visitIdentifier(iden),\n isStateVar: false,\n isIndexed: false,\n typeName: null,\n storageLocation: null,\n expression: null,\n }\n\n return this._addMeta(node, iden)\n })\n }\n\n public buildVariableDeclarationList(\n ctx: SP.VariableDeclarationListContext\n ): Array<(AST.VariableDeclaration & WithMeta) | null> {\n // remove parentheses\n\n const variableDeclarations = ctx.variableDeclaration()\n let i = 0\n return this._mapCommasToNulls(ctx.children!).map((declOrNull) => {\n // add a null for each empty value\n if (!declOrNull) {\n return null\n }\n\n const decl = variableDeclarations[i]\n i++\n\n let storageLocation: string | null = null\n if (decl.storageLocation()) {\n storageLocation = this._toText(decl.storageLocation()!)\n }\n\n const identifierCtx = decl.identifier()\n\n const result: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n name: this._toText(identifierCtx),\n identifier: this.visitIdentifier(identifierCtx),\n typeName: this.visitTypeName(decl.typeName()),\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(result, decl)\n })\n }\n\n public visitImportDirective(ctx: SP.ImportDirectiveContext) {\n const pathString = this._toText(ctx.importPath())\n let unitAlias = null\n let unitAliasIdentifier = null\n let symbolAliases = null\n let symbolAliasesIdentifiers = null\n\n if (ctx.importDeclaration().length > 0) {\n symbolAliases = ctx.importDeclaration().map((decl) => {\n const symbol = this._toText(decl.identifier(0))\n let alias = null\n if (decl.identifier().length > 1) {\n alias = this._toText(decl.identifier(1))\n }\n return [symbol, alias] as [string, string | null]\n })\n symbolAliasesIdentifiers = ctx.importDeclaration().map((decl) => {\n const symbolIdentifier = this.visitIdentifier(decl.identifier(0))\n let aliasIdentifier = null\n if (decl.identifier().length > 1) {\n aliasIdentifier = this.visitIdentifier(decl.identifier(1))\n }\n return [symbolIdentifier, aliasIdentifier] as [\n AST.Identifier,\n AST.Identifier | null\n ]\n })\n } else {\n const identifierCtxList = ctx.identifier()\n if (identifierCtxList.length === 0) {\n // nothing to do\n } else if (identifierCtxList.length === 1) {\n const aliasIdentifierCtx = ctx.identifier(0)\n unitAlias = this._toText(aliasIdentifierCtx)\n unitAliasIdentifier = this.visitIdentifier(aliasIdentifierCtx)\n } else if (identifierCtxList.length === 2) {\n const aliasIdentifierCtx = ctx.identifier(1)\n unitAlias = this._toText(aliasIdentifierCtx)\n unitAliasIdentifier = this.visitIdentifier(aliasIdentifierCtx)\n } else {\n throw new Error(\n 'Assertion error: an import should have one or two identifiers'\n )\n }\n }\n\n const path = pathString.substring(1, pathString.length - 1)\n\n const pathLiteral: AST.StringLiteral = {\n type: 'StringLiteral',\n value: path,\n parts: [path],\n isUnicode: [false], // paths in imports don't seem to support unicode literals\n }\n\n const node: AST.ImportDirective = {\n type: 'ImportDirective',\n path,\n pathLiteral: this._addMeta(pathLiteral, ctx.importPath()),\n unitAlias,\n unitAliasIdentifier,\n symbolAliases,\n symbolAliasesIdentifiers,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public buildEventParameterList(ctx: SP.EventParameterListContext) {\n return ctx.eventParameter().map((paramCtx: any) => {\n const type = this.visit(paramCtx.typeName())\n let name = null\n if (paramCtx.identifier()) {\n name = this._toText(paramCtx.identifier())\n }\n\n return {\n type: 'VariableDeclaration',\n typeName: type,\n name,\n isStateVar: false,\n isIndexed: !!paramCtx.IndexedKeyword(0),\n }\n })\n }\n\n public visitReturnParameters(\n ctx: SP.ReturnParametersContext\n ): (AST.VariableDeclaration & WithMeta)[] {\n return this.visitParameterList(ctx.parameterList())\n }\n\n public visitParameterList(\n ctx: SP.ParameterListContext\n ): (AST.VariableDeclaration & WithMeta)[] {\n return ctx.parameter().map((paramCtx: any) => this.visitParameter(paramCtx))\n }\n\n public visitInlineAssemblyStatement(ctx: SP.InlineAssemblyStatementContext) {\n let language: string | null = null\n if (ctx.StringLiteralFragment()) {\n language = this._toText(ctx.StringLiteralFragment()!)!\n language = language.substring(1, language.length - 1)\n }\n\n const flags = []\n const flag = ctx.inlineAssemblyStatementFlag()\n if (flag !== undefined) {\n const flagString = this._toText(flag.stringLiteral())\n flags.push(flagString.slice(1, flagString.length - 1))\n }\n\n const node: AST.InlineAssemblyStatement = {\n type: 'InlineAssemblyStatement',\n language,\n flags,\n body: this.visitAssemblyBlock(ctx.assemblyBlock()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyBlock(\n ctx: SP.AssemblyBlockContext\n ): AST.AssemblyBlock & WithMeta {\n const operations = ctx\n .assemblyItem()\n .map((item) => this.visitAssemblyItem(item))\n\n const node: AST.AssemblyBlock = {\n type: 'AssemblyBlock',\n operations,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyItem(\n ctx: SP.AssemblyItemContext\n ): AST.AssemblyItem & WithMeta {\n let text\n\n if (ctx.hexLiteral()) {\n return this.visitHexLiteral(ctx.hexLiteral()!)\n }\n\n if (ctx.stringLiteral()) {\n text = this._toText(ctx.stringLiteral()!)!\n const value = text.substring(1, text.length - 1)\n const node: AST.StringLiteral = {\n type: 'StringLiteral',\n value,\n parts: [value],\n isUnicode: [false], // assembly doesn't seem to support unicode literals right now\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.BreakKeyword()) {\n const node: AST.Break = {\n type: 'Break',\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.ContinueKeyword()) {\n const node: AST.Continue = {\n type: 'Continue',\n }\n\n return this._addMeta(node, ctx)\n }\n\n return this.visit(ctx.getChild(0)) as AST.AssemblyItem & WithMeta\n }\n\n public visitAssemblyExpression(ctx: SP.AssemblyExpressionContext) {\n return this.visit(ctx.getChild(0)) as AST.AssemblyExpression & WithMeta\n }\n\n public visitAssemblyCall(ctx: SP.AssemblyCallContext) {\n const functionName = this._toText(ctx.getChild(0))\n const args = ctx\n .assemblyExpression()\n .map((assemblyExpr) => this.visitAssemblyExpression(assemblyExpr))\n\n const node: AST.AssemblyCall = {\n type: 'AssemblyCall',\n functionName,\n arguments: args,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyLiteral(\n ctx: SP.AssemblyLiteralContext\n ): AST.AssemblyLiteral & WithMeta {\n let text\n\n if (ctx.stringLiteral()) {\n text = this._toText(ctx)!\n const value = text.substring(1, text.length - 1)\n const node: AST.StringLiteral = {\n type: 'StringLiteral',\n value,\n parts: [value],\n isUnicode: [false], // assembly doesn't seem to support unicode literals right now\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.DecimalNumber()) {\n const node: AST.DecimalNumber = {\n type: 'DecimalNumber',\n value: this._toText(ctx),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.HexNumber()) {\n const node: AST.HexNumber = {\n type: 'HexNumber',\n value: this._toText(ctx),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.hexLiteral()) {\n return this.visitHexLiteral(ctx.hexLiteral()!)\n }\n\n throw new Error('Should never reach here')\n }\n\n public visitAssemblySwitch(ctx: SP.AssemblySwitchContext) {\n const node: AST.AssemblySwitch = {\n type: 'AssemblySwitch',\n expression: this.visitAssemblyExpression(ctx.assemblyExpression()),\n cases: ctx.assemblyCase().map((c) => this.visitAssemblyCase(c)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyCase(\n ctx: SP.AssemblyCaseContext\n ): AST.AssemblyCase & WithMeta {\n let value = null\n if (this._toText(ctx.getChild(0)) === 'case') {\n value = this.visitAssemblyLiteral(ctx.assemblyLiteral()!)\n }\n\n const node: AST.AssemblyCase = {\n type: 'AssemblyCase',\n block: this.visitAssemblyBlock(ctx.assemblyBlock()),\n value,\n default: value === null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyLocalDefinition(\n ctx: SP.AssemblyLocalDefinitionContext\n ): AST.AssemblyLocalDefinition & WithMeta {\n const ctxAssemblyIdentifierOrList = ctx.assemblyIdentifierOrList()\n let names\n if (ctxAssemblyIdentifierOrList.identifier()) {\n names = [this.visitIdentifier(ctxAssemblyIdentifierOrList.identifier()!)]\n } else if (ctxAssemblyIdentifierOrList.assemblyMember()) {\n names = [\n this.visitAssemblyMember(ctxAssemblyIdentifierOrList.assemblyMember()!),\n ]\n } else {\n names = ctxAssemblyIdentifierOrList\n .assemblyIdentifierList()!\n .identifier()!\n .map((x) => this.visitIdentifier(x))\n }\n\n let expression: AST.AssemblyExpression | null = null\n if (ctx.assemblyExpression() !== undefined) {\n expression = this.visitAssemblyExpression(ctx.assemblyExpression()!)\n }\n\n const node: AST.AssemblyLocalDefinition = {\n type: 'AssemblyLocalDefinition',\n names,\n expression,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyFunctionDefinition(\n ctx: SP.AssemblyFunctionDefinitionContext\n ) {\n const ctxAssemblyIdentifierList = ctx.assemblyIdentifierList()\n const args =\n ctxAssemblyIdentifierList !== undefined\n ? ctxAssemblyIdentifierList\n .identifier()\n .map((x) => this.visitIdentifier(x))\n : []\n\n const ctxAssemblyFunctionReturns = ctx.assemblyFunctionReturns()\n const returnArgs = ctxAssemblyFunctionReturns\n ? ctxAssemblyFunctionReturns\n .assemblyIdentifierList()!\n .identifier()\n .map((x) => this.visitIdentifier(x))\n : []\n\n const node: AST.AssemblyFunctionDefinition = {\n type: 'AssemblyFunctionDefinition',\n name: this._toText(ctx.identifier()),\n arguments: args,\n returnArguments: returnArgs,\n body: this.visitAssemblyBlock(ctx.assemblyBlock()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyAssignment(ctx: SP.AssemblyAssignmentContext) {\n const ctxAssemblyIdentifierOrList = ctx.assemblyIdentifierOrList()\n let names\n if (ctxAssemblyIdentifierOrList.identifier()) {\n names = [this.visitIdentifier(ctxAssemblyIdentifierOrList.identifier()!)]\n } else if (ctxAssemblyIdentifierOrList.assemblyMember()) {\n names = [\n this.visitAssemblyMember(ctxAssemblyIdentifierOrList.assemblyMember()!),\n ]\n } else {\n names = ctxAssemblyIdentifierOrList\n .assemblyIdentifierList()!\n .identifier()\n .map((x) => this.visitIdentifier(x))\n }\n\n const node: AST.AssemblyAssignment = {\n type: 'AssemblyAssignment',\n names,\n expression: this.visitAssemblyExpression(ctx.assemblyExpression()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyMember(\n ctx: SP.AssemblyMemberContext\n ): AST.AssemblyMemberAccess & WithMeta {\n const [accessed, member] = ctx.identifier()\n const node: AST.AssemblyMemberAccess = {\n type: 'AssemblyMemberAccess',\n expression: this.visitIdentifier(accessed),\n memberName: this.visitIdentifier(member),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitLabelDefinition(ctx: SP.LabelDefinitionContext) {\n const node: AST.LabelDefinition = {\n type: 'LabelDefinition',\n name: this._toText(ctx.identifier()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyStackAssignment(ctx: SP.AssemblyStackAssignmentContext) {\n const node: AST.AssemblyStackAssignment = {\n type: 'AssemblyStackAssignment',\n name: this._toText(ctx.identifier()),\n expression: this.visitAssemblyExpression(ctx.assemblyExpression()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyFor(ctx: SP.AssemblyForContext) {\n // TODO remove these type assertions\n const node: AST.AssemblyFor = {\n type: 'AssemblyFor',\n pre: this.visit(ctx.getChild(1)) as\n | AST.AssemblyBlock\n | AST.AssemblyExpression,\n condition: this.visit(ctx.getChild(2)) as AST.AssemblyExpression,\n post: this.visit(ctx.getChild(3)) as\n | AST.AssemblyBlock\n | AST.AssemblyExpression,\n body: this.visit(ctx.getChild(4)) as AST.AssemblyBlock,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyIf(ctx: SP.AssemblyIfContext) {\n const node: AST.AssemblyIf = {\n type: 'AssemblyIf',\n condition: this.visitAssemblyExpression(ctx.assemblyExpression()),\n body: this.visitAssemblyBlock(ctx.assemblyBlock()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitContinueStatement(\n ctx: SP.ContinueStatementContext\n ): AST.ContinueStatement & WithMeta {\n const node: AST.ContinueStatement = {\n type: 'ContinueStatement',\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitBreakStatement(\n ctx: SP.BreakStatementContext\n ): AST.BreakStatement & WithMeta {\n const node: AST.BreakStatement = {\n type: 'BreakStatement',\n }\n\n return this._addMeta(node, ctx)\n }\n\n private _toText(ctx: ParserRuleContext | ParseTree): string {\n const text = ctx.text\n if (text === undefined) {\n throw new Error('Assertion error: text should never be undefiend')\n }\n\n return text\n }\n\n private _stateMutabilityToText(\n ctx: SP.StateMutabilityContext\n ): AST.FunctionDefinition['stateMutability'] {\n if (ctx.PureKeyword() !== undefined) {\n return 'pure'\n }\n if (ctx.ConstantKeyword() !== undefined) {\n return 'constant'\n }\n if (ctx.PayableKeyword() !== undefined) {\n return 'payable'\n }\n if (ctx.ViewKeyword() !== undefined) {\n return 'view'\n }\n\n throw new Error('Assertion error: non-exhaustive stateMutability check')\n }\n\n private _loc(ctx: ParserRuleContext): SourceLocation {\n const sourceLocation: SourceLocation = {\n start: {\n line: ctx.start.line,\n column: ctx.start.charPositionInLine,\n },\n end: {\n line: ctx.stop ? ctx.stop.line : ctx.start.line,\n column: ctx.stop\n ? ctx.stop.charPositionInLine\n : ctx.start.charPositionInLine,\n },\n }\n return sourceLocation\n }\n\n _range(ctx: ParserRuleContext): [number, number] {\n return [ctx.start.startIndex, ctx.stop?.stopIndex ?? ctx.start.startIndex]\n }\n\n private _addMeta(\n node: T,\n ctx: ParserRuleContext\n ): T & WithMeta {\n const nodeWithMeta: AST.BaseASTNode = {\n type: node.type,\n }\n\n if (this.options.loc === true) {\n node.loc = this._loc(ctx)\n }\n if (this.options.range === true) {\n node.range = this._range(ctx)\n }\n\n return {\n ...nodeWithMeta,\n ...node,\n } as T & WithMeta\n }\n\n private _mapCommasToNulls(children: ParseTree[]) {\n if (children.length === 0) {\n return []\n }\n\n const values: Array = []\n let comma = true\n\n for (const el of children) {\n if (comma) {\n if (this._toText(el) === ',') {\n values.push(null)\n } else {\n values.push(el)\n comma = false\n }\n } else {\n if (this._toText(el) !== ',') {\n throw new Error('expected comma')\n }\n comma = true\n }\n }\n\n if (comma) {\n values.push(null)\n }\n\n return values\n }\n}\n\nfunction isBinOp(op: string): op is AST.BinOp {\n return AST.binaryOpValues.includes(op as AST.BinOp)\n}\n", "import antlr4 from 'antlr4'\n\nclass ErrorListener extends antlr4.error.ErrorListener {\n private _errors: any[]\n\n constructor() {\n super()\n\n this._errors = []\n }\n\n syntaxError(\n recognizer: any,\n offendingSymbol: any,\n line: number,\n column: number,\n message: string\n ) {\n this._errors.push({ message, line, column })\n }\n\n getErrors(): any[] {\n return this._errors\n }\n\n hasErrors() {\n return this._errors.length > 0\n }\n}\n\nexport default ErrorListener\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 './utils/stringHashCode.js';\nimport './polyfills/codepointat.js';\nimport './polyfills/fromcodepoint.js';\nimport { default as atn } from './atn/index.js';\nimport { default as dfa } from './dfa/index.js';\nimport { default as tree } from './tree/index.js';\nimport { default as error } from './error/index.js';\nimport Token from './Token.js';\nimport CommonToken from './CommonToken.js';\nimport { default as CharStreams } from './CharStreams.js';\nimport InputStream from './InputStream.js';\nimport FileStream from './FileStream.js';\nimport CommonTokenStream from './CommonTokenStream.js';\nimport Lexer from './Lexer.js';\nimport Parser from './Parser.js';\nimport PredictionContextCache from './atn/PredictionContextCache.js';\nimport ParserRuleContext from './context/ParserRuleContext.js';\nimport Interval from './misc/Interval.js';\nimport IntervalSet from './misc/IntervalSet.js';\nimport LL1Analyzer from './atn/LL1Analyzer.js';\nimport { default as Utils } from './utils/index.js';\n\nconst antlr4 = {\n atn, dfa, tree, error, Token, CommonToken, CharStreams, InputStream, FileStream, CommonTokenStream, Lexer, Parser,\n PredictionContextCache, ParserRuleContext, Interval, IntervalSet, LL1Analyzer, Utils\n};\n\nexport default antlr4;\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\nString.prototype.seed = String.prototype.seed || Math.round(Math.random() * Math.pow(2, 32));\n\nString.prototype.hashCode = function () {\n const key = this.toString();\n let h1b, k1;\n\n const remainder = key.length & 3; // key.length % 4\n const bytes = key.length - remainder;\n let h1 = String.prototype.seed;\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 */\n/*! https://mths.be/codepointat v0.2.0 by @mathias */\nif (!String.prototype.codePointAt) {\n\t(function() {\n\t\t'use strict'; // needed to support `apply`/`call` with `undefined`/`null`\n\t\tvar defineProperty = (function() {\n\t\t\t// IE 8 only supports `Object.defineProperty` on DOM elements\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tconst object = {};\n\t\t\t\tconst $defineProperty = Object.defineProperty;\n\t\t\t\tresult = $defineProperty(object, object, object) && $defineProperty;\n\t\t\t} catch(error) {\n\t\t\t\t/* eslint no-empty: [ \"off\" ] */\n\t\t\t}\n\t\t\treturn result;\n\t\t}());\n\t\tconst codePointAt = function(position) {\n\t\t\tif (this == null) {\n\t\t\t\tthrow TypeError();\n\t\t\t}\n\t\t\tconst string = String(this);\n\t\t\tconst size = string.length;\n\t\t\t// `ToInteger`\n\t\t\tlet index = position ? Number(position) : 0;\n\t\t\tif (index !== index) { // better `isNaN`\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\t// Account for out-of-bounds indices:\n\t\t\tif (index < 0 || index >= size) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\t// Get the first code unit\n\t\t\tconst first = string.charCodeAt(index);\n\t\t\tlet second;\n\t\t\tif ( // check if it\u2019s the start of a surrogate pair\n\t\t\t\tfirst >= 0xD800 && first <= 0xDBFF && // high surrogate\n\t\t\t\tsize > index + 1 // there is a next code unit\n\t\t\t) {\n\t\t\t\tsecond = string.charCodeAt(index + 1);\n\t\t\t\tif (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate\n\t\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\t\treturn (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn first;\n\t\t};\n\t\tif (defineProperty) {\n\t\t\tdefineProperty(String.prototype, 'codePointAt', {\n\t\t\t\t'value': codePointAt,\n\t\t\t\t'configurable': true,\n\t\t\t\t'writable': true\n\t\t\t});\n\t\t} else {\n\t\t\tString.prototype.codePointAt = codePointAt;\n\t\t}\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/*! https://mths.be/fromcodepoint v0.2.1 by @mathias */\nif (!String.fromCodePoint) {\n\t(function() {\n\t\tconst defineProperty = (function() {\n\t\t\t// IE 8 only supports `Object.defineProperty` on DOM elements\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tconst object = {};\n\t\t\t\tconst $defineProperty = Object.defineProperty;\n\t\t\t\tresult = $defineProperty(object, object, object) && $defineProperty;\n\t\t\t} catch(error) {\n\t\t\t\t/* eslint no-empty: [ \"off\" ] */\n\t\t\t}\n\t\t\treturn result;\n\t\t}());\n\t\tconst stringFromCharCode = String.fromCharCode;\n\t\tconst floor = Math.floor;\n\t\tconst fromCodePoint = function(_) {\n\t\t\tconst MAX_SIZE = 0x4000;\n\t\t\tconst codeUnits = [];\n\t\t\tlet highSurrogate;\n\t\t\tlet lowSurrogate;\n\t\t\tlet index = -1;\n\t\t\tconst length = arguments.length;\n\t\t\tif (!length) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tlet result = '';\n\t\t\twhile (++index < length) {\n\t\t\t\tlet codePoint = Number(arguments[index]);\n\t\t\t\tif (\n\t\t\t\t\t!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n\t\t\t\t\tcodePoint < 0 || // not a valid Unicode code point\n\t\t\t\t\tcodePoint > 0x10FFFF || // not a valid Unicode code point\n\t\t\t\t\tfloor(codePoint) !== codePoint // not an integer\n\t\t\t\t) {\n\t\t\t\t\tthrow RangeError('Invalid code point: ' + codePoint);\n\t\t\t\t}\n\t\t\t\tif (codePoint <= 0xFFFF) { // BMP code point\n\t\t\t\t\tcodeUnits.push(codePoint);\n\t\t\t\t} else { // Astral code point; split in surrogate halves\n\t\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\t\tcodePoint -= 0x10000;\n\t\t\t\t\thighSurrogate = (codePoint >> 10) + 0xD800;\n\t\t\t\t\tlowSurrogate = (codePoint % 0x400) + 0xDC00;\n\t\t\t\t\tcodeUnits.push(highSurrogate, lowSurrogate);\n\t\t\t\t}\n\t\t\t\tif (index + 1 === length || codeUnits.length > MAX_SIZE) {\n\t\t\t\t\tresult += stringFromCharCode.apply(null, codeUnits);\n\t\t\t\t\tcodeUnits.length = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\tif (defineProperty) {\n\t\t\tdefineProperty(String, 'fromCodePoint', {\n\t\t\t\t'value': fromCodePoint,\n\t\t\t\t'configurable': true,\n\t\t\t\t'writable': true\n\t\t\t});\n\t\t} else {\n\t\t\tString.fromCodePoint = fromCodePoint;\n\t\t}\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 ATN from './ATN.js';\nimport ATNDeserializer from './ATNDeserializer.js';\nimport LexerATNSimulator from './LexerATNSimulator.js';\nimport ParserATNSimulator from './ParserATNSimulator.js';\nimport PredictionMode from './PredictionMode.js';\n\nexport default { ATN, ATNDeserializer, LexerATNSimulator, ParserATNSimulator, PredictionMode }\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 *

If {@code context} is {@code null}, it is treated as\n * {@link ParserRuleContext//EMPTY}.

\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. 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 * i leads to a semantic predicate before matching a symbol, the\n * element at index i 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 *

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.

\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 *

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.

\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} 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; j0 ?\n (\",up=\" + this.reachesIntoOuterContext)\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 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 *

I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of\n * {@link SemanticContext} within the scope of this outer class.

\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 *

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.

\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 *
    \n\t *
  • {@link //NONE}: if the predicate simplifies to {@code true} after\n\t * precedence predicates are evaluated.
  • \n\t *
  • {@code null}: if the predicate simplifies to {@code false} after\n\t * precedence predicates are evaluated.
  • \n\t *
  • {@code this}: if the semantic context is not changed as a result of\n\t * precedence predicate evaluation.
  • \n\t *
  • A non-{@code null} {@link SemanticContext}: the new simplified\n\t * semantic context after precedence predicates are evaluated.
  • \n\t *
\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\n\t * The evaluation of predicates by this context is short-circuiting, but\n\t * unordered.

\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 *

\n\t * The evaluation of predicates by this context is short-circuiting, but\n\t * unordered.

\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 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 */\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>> (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 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 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 standardHashCodeFunction(a) {\n return 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 */\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 */\nexport default function valueToString(v) {\n return v === null ? \"null\" : v;\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; nexisting.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\");\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(\"\");\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 \"\";\n\t\t} else if (token === Token.EPSILON) {\n\t\t\treturn \"\";\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 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 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 * The following images show the relation of states and\n * {@link ATNState//transitions} for various grammar constructs.\n *\n *
    \n *\n *
  • Solid edges marked with an &//0949; indicate a required\n * {@link EpsilonTransition}.
  • \n *\n *
  • Dashed edges indicate locations where any transition derived from\n * {@link Transition} might appear.
  • \n *\n *
  • 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.
  • \n *\n *
  • 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.
  • \n *\n *
\n *\n *

Basic Blocks

\n *\n *

Rule

\n *\n * \n *\n *

Block of 1 or more alternatives

\n *\n * \n *\n *

Greedy Loops

\n *\n *

Greedy Closure: {@code (...)*}

\n *\n * \n *\n *

Greedy Positive Closure: {@code (...)+}

\n *\n * \n *\n *

Greedy Optional: {@code (...)?}

\n *\n * \n *\n *

Non-Greedy Loops

\n *\n *

Non-Greedy Closure: {@code (...)*?}

\n *\n * \n *\n *

Non-Greedy Positive Closure: {@code (...)+?}

\n *\n * \n *\n *

Non-Greedy Optional: {@code (...)??}

\n *\n * \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 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. 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 *

This is a one way link. It emanates from a state (usually via a list of\n * transitions) and has a target state.

\n *\n *

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.

\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\";\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 */\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\";\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 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 *

Different tops, different parents.
\n *

\n *\n *

Shared top, same parents.
\n *

\n *\n *

Shared top, different parents.
\n *

\n *\n *

Shared top, all shared parents.
\n *

\n *\n *

Equal tops, merge parents and reduce top to\n * {@link SingletonPredictionContext}.
\n *

\n */\nfunction mergeArrays(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 // 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 = [];\n let mergedParents = [];\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 === a) {\n if (mergeCache !== null) {\n mergeCache.set(a, b, a);\n }\n return a;\n }\n if (M === b) {\n if (mergeCache !== null) {\n mergeCache.set(a, b, b);\n }\n return b;\n }\n combineCommonParents(mergedParents);\n\n if (mergeCache !== null) {\n mergeCache.set(a, b, M);\n }\n return M;\n}\n\n\n/**\n * Make pass over all M {@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 *

Stack tops equal, parents merge is same; return left graph.
\n *

\n *\n *

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.
\n *

\n *\n *

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.
\n *

\n *\n *

Different stack tops pointing to different parents. Make array node for\n * the root where each element points to the corresponding original\n * parent.
\n *

\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 *

Local-Context Merges

\n *\n *

These local-context merge operations are used when {@code rootIsWildcard}\n * is true.

\n *\n *

{@link //EMPTY} is superset of any graph; return {@link //EMPTY}.
\n *

\n *\n *

{@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is\n * {@code //EMPTY}; return left graph.
\n *

\n *\n *

Special case of last merge if local context.
\n *

\n *\n *

Full-Context Merges

\n *\n *

These full-context merge operations are used when {@code rootIsWildcard}\n * is false.

\n *\n *

\n *\n *

Must keep all contexts; {@link //EMPTY} in array is a special value (and\n * null parent).
\n *

\n *\n *

\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. 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 getRuleContext() {\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 *

\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 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 getRuleContext(){\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 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. 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\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 < {@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 < {@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 * \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;\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 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 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 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 constructor(options) {\n\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 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= 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 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 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 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 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 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. 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 */\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 skip} lexer action by calling {@link Lexer//skip}.\n *\n *

The {@code skip} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.

\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 */\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 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 *

This action is implemented by calling {@link Lexer//setChannel} with the\n * value provided by {@link //getChannel}.

\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 *

This class may represent embedded actions created with the {...}\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.

\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 *

Custom actions are implemented by calling {@link Lexer//action} with the\n * appropriate rule and action indexes.

\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 *

The {@code more} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.

\n */\nexport default class LexerMoreAction extends LexerAction {\n constructor() {\n super(LexerActionType.MORE);\n }\n\n /**\n *

This action is implemented by calling {@link Lexer//popMode}.

\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 *

This action is implemented by calling {@link Lexer//pushMode} with the\n * value provided by {@link //getMode}.

\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 *

The {@code popMode} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.

\n */\nexport default class LexerPopModeAction extends LexerAction {\n constructor() {\n super(LexerActionType.POP_MODE);\n }\n\n /**\n *

This action is implemented by calling {@link Lexer//popMode}.

\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 *

This action is implemented by calling {@link Lexer//mode} with the\n * value provided by {@link //getMode}.

\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 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 *

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.

\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 *

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}.

\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. 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 \"\";\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 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.11.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; iUsed for XPath and tree pattern compilation.

\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 \"\";\n }\n let s = t.text;\n if (s===null) {\n if (t.type===Token.EOF) {\n s = \"\";\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 state(){\n return this._stateNumber;\n }\n\n set state(state) {\n this._stateNumber = state;\n }\n}\n\nRecognizer.tokenTypeMapCache = {};\nRecognizer.ruleIndexMapCache = {};\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 *

\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.

\n *\n *
\n * line line:charPositionInLine msg\n * 
\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. 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\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 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 *

\n * The default value is {@code false} to avoid the performance and memory\n * overhead of copying text for every token unless explicitly requested.

\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 *

\n * This token factory does not explicitly copy token text when constructing\n * tokens.

\n */\nCommonTokenFactory.DEFAULT = new CommonTokenFactory();\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 *

\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}.

\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 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 = \"\";\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 \"\";\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\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 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 *

If the set of expected tokens is not known and could not be computed,\n * this method returns {@code null}.

\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 //

If the state number is not known, this method returns -1.

\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 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 *

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.

\n *\n *

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.

\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. 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→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 *

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.

\n *\n *

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.

\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 *

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.

\n\t\t *\n\t\t *

This list is computed by {@link\n\t\t * ParserATNSimulator//predicateDFAState}.

\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 *

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.

\n\t *\n\t *

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.

\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 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 *

This method updates {@link //dipsIntoOuterContext} and\n\t * {@link //hasSemanticContext} when necessary.

\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 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. 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 *

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.

\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 *

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 end 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.

\n\t *\n\t *

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.

\n\t *\n\t *

If the current executor already has offsets assigned to all\n\t * position-dependent lexer actions, the method returns {@code this}.

\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 *

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.

\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 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 *

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}.

\n *\n * Constructs a new indexed custom action by associating a character offset\n * with a {@link LexerAction}.\n *\n *

Note: This class is only required for lexer actions for which\n * {@link LexerAction//isPositionDependent} returns {@code true}.

\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 *

This method calls {@link //execute} on the result of {@link //getAction}\n * using the provided {@code lexer}.

\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 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 *

\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).

\n *\n *

\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(*)).

\n *\n *

\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.)

\n *\n *

\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.

\n *\n *

\n * CACHING FULL CONTEXT PREDICTIONS

\n *\n *

\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.

\n *\n *

\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.

\n *\n *

\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.

\n *\n *

\n * AVOIDING FULL CONTEXT PREDICTION

\n *\n *

\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.

\n *\n *

\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:

\n *\n *
\n * ctorBody\n *   : '{' superCall? stat* '}'\n *   ;\n * 
\n *\n *

\n * Or, you might see something like

\n *\n *
\n * stat\n *   : superCall ';'\n *   | expression ';'\n *   | ...\n *   ;\n * 
\n *\n *

\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.

\n *\n *

\n * PREDICATES

\n *\n *

\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.

\n *\n *

\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.

\n *\n *

\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.

\n *\n *

\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.

\n *\n *

\n * SHARING DFA

\n *\n *

\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.

\n *\n *

\n * THREAD SAFETY

\n *\n *

\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.

\n *\n *

\n * Starting with SLL then failing to combined SLL/LL (Two-Stage\n * Parsing)

\n *\n *

\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}:

\n *\n *
\n * parser.{@link Parser//getInterpreter() getInterpreter()}.{@link //setPredictionMode setPredictionMode}{@code (}{@link PredictionMode//SLL}{@code )};\n * parser.{@link Parser//setErrorHandler setErrorHandler}(new {@link BailErrorStrategy}());\n * 
\n *\n *

\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.

\n *\n *

\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 > 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.

\n *\n *

\n * Let's say we have a set of SLL conflicting alternatives {@code {1, 2, 3}} and\n * a smaller LL set called s. If s is {@code {2, 3}}, then SLL\n * parsing will get an error because SLL will pursue alternative 1. If\n * s 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 s is {@code {2}} or {@code {3}} then SLL will get a syntax\n * error. If s is {@code {1}} then SLL will succeed.

\n *\n *

\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.

\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)→c. We can avoid\n * the merge if we ever see a and b again. Note that (b,a)→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.debug_list_atn_decisions = 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.debug_list_atn_decisions) {\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 || this.debug_list_atn_decisions) {\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.debug_list_atn_decisions) {\n console.log(\"execATN decision \" + dfa.decision +\n \" exec 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.debug_list_atn_decisions) {\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; iWhen {@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.

\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\n *
  • Evaluate the precedence predicates for each configuration using\n * {@link SemanticContext//evalPrecedence}.
  • \n *
  • 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 *
      \n *
    • 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.
    • \n *
    • 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.
    • \n *
    \n *
  • \n * \n *\n *

    \n * The prediction context must be considered by this filter to address\n * situations like the following.\n *

    \n * \n *
    \n     * grammar TA;\n     * prog: statement* EOF;\n     * statement: letterA | statement letterA 'b' ;\n     * letterA: 'a';\n     * 
    \n *
    \n *

    \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 *

    \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; i1\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\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.

    \n *\n *
      \n *
    • 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.
    • \n *
    • Else, if a semantically invalid but syntactically valid path exist\n * or paths exist, return the minimum associated alt.\n *
    • \n *
    • Otherwise, return {@link ATN//INVALID_ALT_NUMBER}.
    • \n *
    \n *\n *

    \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 only 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 *

    \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;i0 || ((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;i50) {\n throw \"problem\";\n }\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 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=0) {\n return this.parser.ruleNames[index];\n } else {\n return \"\";\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→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; i0) {\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;iIf {@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.

    \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 *

    If {@code D} is {@link //ERROR}, this method returns {@link //ERROR} and\n * does not change the DFA.

    \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 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 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 */\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. 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 *

    \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.

    \n *\n *

    \n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.

    \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 *

    \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 exactly which alternatives are\n * ambiguous.

    \n *\n *

    \n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.

    \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 *

    \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.

    \n *\n *

    \n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.

    \n */\n LL_EXACT_AMBIG_DETECTION: 2,\n\n /**\n *\n * Computes the SLL prediction termination condition.\n *\n *

    \n * This method computes the SLL prediction termination condition for both of\n * the following cases.

    \n *\n *
      \n *
    • The usual SLL+LL fallback upon SLL conflict
    • \n *
    • Pure SLL without LL fallback
    • \n *
    \n *\n *

    COMBINED SLL+LL PARSING

    \n *\n *

    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.

    \n *\n *

    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.

    \n *\n *

    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.

    \n *\n *

    HEURISTIC

    \n *\n *

    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):

    \n *\n *

    {@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ';' ;}

    \n *\n *

    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|[]]}.

    \n *\n *

    It also let's us continue for this rule:

    \n *\n *

    {@code [1|1|[], 1|2|[], 8|3|[]] 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 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.

    \n *\n *

    PURE SLL PARSING

    \n *\n *

    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.

    \n *\n *

    PREDICATES IN SLL+LL PARSING

    \n *\n *

    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.

    \n *\n *

    Implementation-wise, {@link ATNConfigSet} combines stack contexts but not\n * semantic predicate contexts so we might see two configurations like the\n * following.

    \n *\n *

    {@code (s, 1, x, {}), (s, 1, x', {p})}

    \n *\n *

    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.

    \n *\n *

    {@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x'', {})}

    \n *\n *

    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.

    \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;iCan 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.

    \n *\n *

    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}.

    \n *\n *

    Reduce these configuration subsets to the set of possible alternatives.\n * You can compute the alternative subsets in one pass as follows:

    \n *\n *

    {@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in\n * {@code C} holding {@code s} and {@code ctx} fixed.

    \n *\n *

    Or in pseudo-code, for each configuration {@code c} in {@code C}:

    \n *\n *
    \n     * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n     * alt and not pred\n     * 
    \n *\n *

    The values in {@code map} are the set of {@code A_s,ctx} sets.

    \n *\n *

    If {@code |A_s,ctx|=1} then there is no conflict associated with\n * {@code s} and {@code ctx}.

    \n *\n *

    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.

    \n *\n *

    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.

    \n *\n *

    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.

    \n *\n *

    CONFLICTING CONFIGS

    \n *\n *

    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.

    \n *\n *

    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.

    \n *\n *

    CONTINUE/STOP RULE

    \n *\n *

    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.

    \n *\n *

    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.

    \n *\n *

    CASES

    \n *\n *
      \n *\n *
    • no conflicts and more than 1 alternative in set => continue
    • \n *\n *
    • {@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}} => continue\n *
    • \n *\n *
    • {@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}} => stop and predict 1
    • \n *\n *
    • {@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}} => stop and predict 1, can announce\n * ambiguity {@code {1,2}}
    • \n *\n *
    • {@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}} => continue
    • \n *\n *
    • {@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}} => continue
    • \n *\n *
    \n *\n *

    EXACT AMBIGUITY DETECTION

    \n *\n *

    If all states report the same conflicting set of alternatives, then we\n * know we have the exact ambiguity set.

    \n *\n *

    |A_i|>1 and\n * A_i = A_j for all i, j.

    \n *\n *

    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...

    \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} > 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;i1) {\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\n * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n * alt and not pred\n * \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 *
    \n     * map[c.{@link ATNConfig//state state}] U= c.{@link ATNConfig//alt alt}\n     * 
    \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 key.startsWith(\"k-\")).map(key => this.data[key], 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 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 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 */\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 *
      \n\t *
    • The {@link //states} map is cleared
    • \n\t *
    • 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.
    • \n\t *
    • The {@link //precedenceDfa} field is updated
    • \n\t *
    \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\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\");\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 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 */\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.getRuleContext();\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.getRuleContext();\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 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 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 constructor(recognizer, predicate, message) {\n super({\n message: formatMessage(predicate, message || null), 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 *
      \n *
    • Ambiguities: These are cases where more than one path through the\n * grammar can match the input.
    • \n *
    • Weak context sensitivity: 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.
    • \n *
    • Strong (forced) context sensitivity: These are cases where the\n * full-context prediction resolved an SLL conflict to a unique alternative,\n * and 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.
    • \n *
    \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 */\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 *

    \n * This error strategy is useful in the following scenarios.

    \n *\n *
      \n *
    • Two-stage parsing: 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.
    • \n *
    • Silent validation: 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.
    • \n *
    \n *\n *

    \n * {@code myparser.setErrorHandler(new BailErrorStrategy());}

    \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 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 *

    The default implementation simply calls {@link //endErrorCondition} to\n * ensure that the handler is not in error recovery mode.

    \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 *

    The default implementation simply calls {@link //endErrorCondition}.

    \n */\n reportMatch(recognizer) {\n this.endErrorCondition(recognizer);\n }\n\n /**\n * {@inheritDoc}\n *\n *

    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.

    \n *\n *
      \n *
    • {@link NoViableAltException}: Dispatches the call to\n * {@link //reportNoViableAlternative}
    • \n *
    • {@link InputMismatchException}: Dispatches the call to\n * {@link //reportInputMismatch}
    • \n *
    • {@link FailedPredicateException}: Dispatches the call to\n * {@link //reportFailedPredicate}
    • \n *
    • All other types: calls {@link Parser//notifyErrorListeners} to report\n * the exception
    • \n *
    \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 *

    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.

    \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 *

    Implements Jim Idle's magic sync mechanism in closures and optional\n * subrules. E.g.,

    \n *\n *
    \n     * a : sync ( stuff sync )* ;\n     * sync : {consume to what can follow sync} ;\n     * 
    \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 *

    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.

    \n *\n *

    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.

    \n *\n *

    ORIGINS

    \n *\n *

    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

    \n *\n *
    \n     * classDef : 'class' ID '{' member* '}'\n     * 
    \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 *

    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 { }.

    \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 = \"\";\n } else {\n input = tokens.getText(new Interval(e.startToken.tokenIndex, e.offendingToken.tokenIndex));\n }\n } else {\n 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 *

    This method is called when {@link //singleTokenDeletion} identifies\n * single-token deletion as a viable recovery strategy for a mismatched\n * input error.

    \n *\n *

    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}.

    \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 *

    This method is called when {@link //singleTokenInsertion} identifies\n * single-token insertion as a viable recovery strategy for a mismatched\n * input error.

    \n *\n *

    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}.

    \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 *

    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}.

    \n *\n *

    EXTRA TOKEN (single token deletion)

    \n *\n *

    {@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.

    \n *\n *

    This recovery strategy is implemented by {@link\n * //singleTokenDeletion}.

    \n *\n *

    MISSING TOKEN (single token insertion)

    \n *\n *

    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.

    \n *\n *

    This recovery strategy is implemented by {@link\n * //singleTokenInsertion}.

    \n *\n *

    EXAMPLE

    \n *\n *

    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:

    \n *\n *
    \n     * stat → expr → atom\n     * 
    \n *\n * and it will be trying to match the {@code ')'} at this point in the\n * derivation:\n *\n *
    \n     * => ID '=' '(' INT ')' ('+' atom)* ';'\n     * ^\n     * 
    \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 *

    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.

    \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 not be in error recovery mode since the\n * returned token was a successful match.\n *\n *

    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.

    \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 = \"\";\n } else {\n tokenText = \"\";\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 \"\";\n }\n let s = t.text\n if (s === null) {\n if (t.type===Token.EOF) {\n s = \"\";\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 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. 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 fs from \"fs\";\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 InputStream(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 InputStream(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 InputStream(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 fs.readFile(path, encoding, function(err, data) {\n let is = null;\n if (data !== null) {\n is = new InputStream(data, true);\n }\n callback(err, is);\n });\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 const data = fs.readFileSync(path, encoding);\n return new InputStream(data, true);\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 './polyfills/codepointat.js';\nimport './polyfills/fromcodepoint.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 InputStream {\n\tconstructor(data, decodeToUnicodeCodePoints) {\n\t\tthis.name = \"\";\n\t\tthis.strdata = data;\n\t\tthis.decodeToUnicodeCodePoints = decodeToUnicodeCodePoints || false;\n\t\t// _loadString - Vacuum all input from a string and then treat it like a buffer.\n\t\tthis._index = 0;\n\t\tthis.data = [];\n\t\tif (this.decodeToUnicodeCodePoints) {\n\t\t\tfor (let i = 0; i < this.strdata.length; ) {\n\t\t\t\tconst codePoint = this.strdata.codePointAt(i);\n\t\t\t\tthis.data.push(codePoint);\n\t\t\t\ti += codePoint <= 0xFFFF ? 1 : 2;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.data = new Array(this.strdata.length);\n\t\t\tfor (let i = 0; i < this.strdata.length; i++) {\n\t\t\t\tconst codeUnit = this.strdata.charCodeAt(i);\n\t\t\t\tthis.data[i] = codeUnit;\n\t\t\t}\n\t\t}\n\t\tthis._size = this.data.length;\n\t}\n\n\t/**\n\t * Reset the stream so that it's in the same state it was\n\t * when the object was created *except* the data array is not\n\t * touched.\n\t */\n\treset() {\n\t\tthis._index = 0;\n\t}\n\n\tconsume() {\n\t\tif (this._index >= this._size) {\n\t\t\t// assert this.LA(1) == Token.EOF\n\t\t\tthrow (\"cannot consume EOF\");\n\t\t}\n\t\tthis._index += 1;\n\t}\n\n\tLA(offset) {\n\t\tif (offset === 0) {\n\t\t\treturn 0; // undefined\n\t\t}\n\t\tif (offset < 0) {\n\t\t\toffset += 1; // e.g., translate LA(-1) to use offset=0\n\t\t}\n\t\tconst pos = this._index + offset - 1;\n\t\tif (pos < 0 || pos >= this._size) { // invalid\n\t\t\treturn Token.EOF;\n\t\t}\n\t\treturn this.data[pos];\n\t}\n\n\tLT(offset) {\n\t\treturn this.LA(offset);\n\t}\n\n// mark/release do nothing; we have entire buffer\n\tmark() {\n\t\treturn -1;\n\t}\n\n\trelease(marker) {\n\t}\n\n\t/**\n\t * consume() ahead until p==_index; can't just set p=_index as we must\n\t * update line and column. If we seek backwards, just set p\n\t */\n\tseek(_index) {\n\t\tif (_index <= this._index) {\n\t\t\tthis._index = _index; // just jump; don't update stream state (line,\n\t\t\t\t\t\t\t\t\t// ...)\n\t\t\treturn;\n\t\t}\n\t\t// seek forward\n\t\tthis._index = Math.min(_index, this._size);\n\t}\n\n\tgetText(start, stop) {\n\t\tif (stop >= this._size) {\n\t\t\tstop = this._size - 1;\n\t\t}\n\t\tif (start >= this._size) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\tif (this.decodeToUnicodeCodePoints) {\n\t\t\t\tlet result = \"\";\n\t\t\t\tfor (let i = start; i <= stop; i++) {\n\t\t\t\t\tresult += String.fromCodePoint(this.data[i]);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t} else {\n\t\t\t\treturn this.strdata.slice(start, stop + 1);\n\t\t\t}\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn this.strdata;\n\t}\n\n\tget index(){\n\t\treturn this._index;\n\t}\n\n\tget size(){\n\t\treturn this._size;\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 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\tconstructor(fileName, decodeToUnicodeCodePoints) {\n\t\tconst data = fs.readFileSync(fileName, \"utf8\");\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\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 *

    \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}.

    \n *\n *

    \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 *

    \n *\n *

    \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.

    \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. 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 *

    \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}.

    \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 *

    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.

    \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 *
      \n\t\t *
    • {@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}.
    • \n\t\t *
    • {@link //fetch}: The check to prevent adding multiple EOF symbols\n\t\t * into\n\t\t * {@link //tokens} is trivial with this field.
    • \n\t\t *
        \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(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// 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 *

        For example, {@link CommonTokenStream} overrides this method to ensure\n\t * that\n\t * the seek target is always an on-channel token.

        \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// 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\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\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// Get the text of all tokens in this buffer.///\n\tgetText(interval) {\n\t\tthis.lazyInit();\n\t\tthis.fill();\n\t\tif (interval === undefined || interval === null) {\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// Get all tokens from lexer until EOF///\n\tfill() {\n\t\tthis.lazyInit();\n\t\twhile (this.fetch(1000) === 1000) {\n\t\t\tcontinue;\n\t\t}\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\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 *

        If the symbol type does not match,\n * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n * strategy to attempt recovery. If {@link //getBuildParseTree} 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}.

        \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 *

        If the symbol type does not match,\n * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n * strategy to attempt recovery. If {@link //getBuildParseTree} 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}.

        \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 *

        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.

        \n *\n *

        With the following specific exceptions, calls to listener events are\n * deterministic, i.e. for identical input the calls to listener\n * methods will be the same.

        \n *\n *
          \n *
        • Alterations to the grammar used to generate code may change the\n * behavior of the listener calls.
        • \n *
        • Alterations to the command line options passed to ANTLR 4 when\n * generating the parser may change the behavior of the listener calls.
        • \n *
        • Changing the version of the ANTLR Tool used to generate the parser\n * may change the behavior of the listener calls.
        • \n *
        \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 *

        If {@code listener} is {@code null} or has not been added as a parse\n * listener, this method does nothing.

        \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 * 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 *

        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}.

        \n *\n *
        \n     * A B\n     * ^\n     * 
        \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 is 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 *
        \n     * return getExpectedTokens().contains(symbol);\n     * 
        \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<String> 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 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 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 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\tconstructor(parent, invokingStateNumber) {\n\t\tparent = parent || null;\n\t\tinvokingStateNumber = invokingStateNumber || null;\n\t\tsuper(parent, invokingStateNumber);\n\t\tthis.ruleIndex = -1;\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) {\n\t\t\treturn null;\n\t\t}\n\t\tfor(let j=0; j\";\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 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 \"../utils/arrayToString.js\";\n\nexport default { arrayToString };\n", "// Generated from antlr/SolidityBlocks.g4 by ANTLR 4.9.0-SNAPSHOT\n\n\nimport { ATN } from \"antlr4ts/atn/ATN\";\nimport { ATNDeserializer } from \"antlr4ts/atn/ATNDeserializer\";\nimport { FailedPredicateException } from \"antlr4ts/FailedPredicateException\";\nimport { NotNull } from \"antlr4ts/Decorators\";\nimport { NoViableAltException } from \"antlr4ts/NoViableAltException\";\nimport { Override } from \"antlr4ts/Decorators\";\nimport { Parser } from \"antlr4ts/Parser\";\nimport { ParserRuleContext } from \"antlr4ts/ParserRuleContext\";\nimport { ParserATNSimulator } from \"antlr4ts/atn/ParserATNSimulator\";\nimport { ParseTreeListener } from \"antlr4ts/tree/ParseTreeListener\";\nimport { ParseTreeVisitor } from \"antlr4ts/tree/ParseTreeVisitor\";\nimport { RecognitionException } from \"antlr4ts/RecognitionException\";\nimport { RuleContext } from \"antlr4ts/RuleContext\";\n//import { RuleVersion } from \"antlr4ts/RuleVersion\";\nimport { TerminalNode } from \"antlr4ts/tree/TerminalNode\";\nimport { Token } from \"antlr4ts/Token\";\nimport { TokenStream } from \"antlr4ts/TokenStream\";\nimport { Vocabulary } from \"antlr4ts/Vocabulary\";\nimport { VocabularyImpl } from \"antlr4ts/VocabularyImpl\";\n\nimport * as Utils from \"antlr4ts/misc/Utils\";\n\nimport { SolidityBlocksListener } from \"./SolidityBlocksListener\";\n\nexport class SolidityBlocksParser extends Parser {\n\tpublic static readonly T__0 = 1;\n\tpublic static readonly T__1 = 2;\n\tpublic static readonly T__2 = 3;\n\tpublic static readonly T__3 = 4;\n\tpublic static readonly T__4 = 5;\n\tpublic static readonly Constructorkeyword = 6;\n\tpublic static readonly Identifier = 7;\n\tpublic static readonly WS = 8;\n\tpublic static readonly COMMENT = 9;\n\tpublic static readonly STRINGS = 10;\n\tpublic static readonly STRINGS_2 = 11;\n\tpublic static readonly PRAGMA = 12;\n\tpublic static readonly IMPORT = 13;\n\tpublic static readonly LINE_COMMENT = 14;\n\tpublic static readonly AMP = 15;\n\tpublic static readonly TILDE = 16;\n\tpublic static readonly PIPE = 17;\n\tpublic static readonly LT = 18;\n\tpublic static readonly GT = 19;\n\tpublic static readonly DOT = 20;\n\tpublic static readonly EQUAL = 21;\n\tpublic static readonly LPAREN = 22;\n\tpublic static readonly RBRACE = 23;\n\tpublic static readonly LBRACE = 24;\n\tpublic static readonly RPAREN = 25;\n\tpublic static readonly PLUS = 26;\n\tpublic static readonly MINUS = 27;\n\tpublic static readonly STAR = 28;\n\tpublic static readonly SLASH = 29;\n\tpublic static readonly BACKSLASH = 30;\n\tpublic static readonly PERCENT = 31;\n\tpublic static readonly CARET = 32;\n\tpublic static readonly BANG = 33;\n\tpublic static readonly QUESTION = 34;\n\tpublic static readonly COLON = 35;\n\tpublic static readonly SEMI = 36;\n\tpublic static readonly COMMA = 37;\n\tpublic static readonly OTHER = 38;\n\tpublic static readonly RULE_sol = 0;\n\tpublic static readonly RULE_contract = 1;\n\tpublic static readonly RULE_function = 2;\n\tpublic static readonly RULE_functionDescriptor = 3;\n\tpublic static readonly RULE_subrule = 4;\n\tpublic static readonly RULE_functionname = 5;\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly ruleNames: string[] = [\n\t\t\"sol\", \"contract\", \"function\", \"functionDescriptor\", \"subrule\", \"functionname\",\n\t];\n\n\tprivate static readonly _LITERAL_NAMES: Array = [\n\t\tundefined, \"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'function'\", \n\t\t\"'constructor'\", undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, \"'&'\", \"'~'\", \"'|'\", \"'<'\", \"'>'\", \"'.'\", \n\t\t\"'='\", \"'('\", \"'}'\", \"'{'\", \"')'\", \"'+'\", \"'-'\", \"'*'\", \"'/'\", \"'\\\\'\", \n\t\t\"'%'\", \"'^'\", \"'!'\", \"'?'\", \"':'\", \"';'\", \"','\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, \"Constructorkeyword\", \n\t\t\"Identifier\", \"WS\", \"COMMENT\", \"STRINGS\", \"STRINGS_2\", \"PRAGMA\", \"IMPORT\", \n\t\t\"LINE_COMMENT\", \"AMP\", \"TILDE\", \"PIPE\", \"LT\", \"GT\", \"DOT\", \"EQUAL\", \"LPAREN\", \n\t\t\"RBRACE\", \"LBRACE\", \"RPAREN\", \"PLUS\", \"MINUS\", \"STAR\", \"SLASH\", \"BACKSLASH\", \n\t\t\"PERCENT\", \"CARET\", \"BANG\", \"QUESTION\", \"COLON\", \"SEMI\", \"COMMA\", \"OTHER\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityBlocksParser._LITERAL_NAMES, SolidityBlocksParser._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityBlocksParser.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"SolidityBlocks.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityBlocksParser.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityBlocksParser._serializedATN; }\n\n\tprotected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {\n\t\treturn new FailedPredicateException(this, predicate, message);\n\t}\n\n\tconstructor(input: TokenStream) {\n\t\tsuper(input);\n\t\tthis._interp = new ParserATNSimulator(SolidityBlocksParser._ATN, this);\n\t}\n\t// @RuleVersion(0)\n\tpublic sol(): SolContext {\n\t\tlet _localctx: SolContext = new SolContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 0, SolidityBlocksParser.RULE_sol);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 15;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityBlocksParser.T__0) | (1 << SolidityBlocksParser.T__1) | (1 << SolidityBlocksParser.T__2) | (1 << SolidityBlocksParser.T__3))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 12;\n\t\t\t\tthis.contract();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 17;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 18;\n\t\t\tthis.match(SolidityBlocksParser.EOF);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic contract(): ContractContext {\n\t\tlet _localctx: ContractContext = new ContractContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 2, SolidityBlocksParser.RULE_contract);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 21;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityBlocksParser.T__0) {\n\t\t\t\t{\n\t\t\t\tthis.state = 20;\n\t\t\t\tthis.match(SolidityBlocksParser.T__0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 23;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityBlocksParser.T__1) | (1 << SolidityBlocksParser.T__2) | (1 << SolidityBlocksParser.T__3))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\tthis.state = 24;\n\t\t\tthis.functionname();\n\t\t\tthis.state = 25;\n\t\t\tthis.match(SolidityBlocksParser.LBRACE);\n\t\t\tthis.state = 30;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 3, this._ctx);\n\t\t\twhile (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1 + 1) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 28;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\t\tcase SolidityBlocksParser.T__4:\n\t\t\t\t\tcase SolidityBlocksParser.Constructorkeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 26;\n\t\t\t\t\t\tthis.function();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SolidityBlocksParser.Identifier:\n\t\t\t\t\tcase SolidityBlocksParser.AMP:\n\t\t\t\t\tcase SolidityBlocksParser.TILDE:\n\t\t\t\t\tcase SolidityBlocksParser.PIPE:\n\t\t\t\t\tcase SolidityBlocksParser.LT:\n\t\t\t\t\tcase SolidityBlocksParser.GT:\n\t\t\t\t\tcase SolidityBlocksParser.DOT:\n\t\t\t\t\tcase SolidityBlocksParser.EQUAL:\n\t\t\t\t\tcase SolidityBlocksParser.LPAREN:\n\t\t\t\t\tcase SolidityBlocksParser.RBRACE:\n\t\t\t\t\tcase SolidityBlocksParser.LBRACE:\n\t\t\t\t\tcase SolidityBlocksParser.RPAREN:\n\t\t\t\t\tcase SolidityBlocksParser.PLUS:\n\t\t\t\t\tcase SolidityBlocksParser.MINUS:\n\t\t\t\t\tcase SolidityBlocksParser.STAR:\n\t\t\t\t\tcase SolidityBlocksParser.SLASH:\n\t\t\t\t\tcase SolidityBlocksParser.BACKSLASH:\n\t\t\t\t\tcase SolidityBlocksParser.PERCENT:\n\t\t\t\t\tcase SolidityBlocksParser.CARET:\n\t\t\t\t\tcase SolidityBlocksParser.BANG:\n\t\t\t\t\tcase SolidityBlocksParser.QUESTION:\n\t\t\t\t\tcase SolidityBlocksParser.COLON:\n\t\t\t\t\tcase SolidityBlocksParser.SEMI:\n\t\t\t\t\tcase SolidityBlocksParser.COMMA:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 27;\n\t\t\t\t\t\tthis.subrule();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 32;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 3, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 33;\n\t\t\tthis.match(SolidityBlocksParser.RBRACE);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic function(): FunctionContext {\n\t\tlet _localctx: FunctionContext = new FunctionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 4, SolidityBlocksParser.RULE_function);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 35;\n\t\t\tthis.functionDescriptor();\n\t\t\tthis.state = 36;\n\t\t\tthis.match(SolidityBlocksParser.LPAREN);\n\t\t\tthis.state = 40;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityBlocksParser.Identifier) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 37;\n\t\t\t\tthis.match(SolidityBlocksParser.Identifier);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 42;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 51;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);\n\t\t\twhile (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1 + 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 43;\n\t\t\t\t\tthis.match(SolidityBlocksParser.COMMA);\n\t\t\t\t\tthis.state = 45;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tdo {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 44;\n\t\t\t\t\t\tthis.match(SolidityBlocksParser.Identifier);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 47;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t} while (_la === SolidityBlocksParser.Identifier);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 53;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 54;\n\t\t\tthis.match(SolidityBlocksParser.RPAREN);\n\t\t\tthis.state = 58;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (((((_la - 7)) & ~0x1F) === 0 && ((1 << (_la - 7)) & ((1 << (SolidityBlocksParser.Identifier - 7)) | (1 << (SolidityBlocksParser.LPAREN - 7)) | (1 << (SolidityBlocksParser.RPAREN - 7)) | (1 << (SolidityBlocksParser.COMMA - 7)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 55;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(((((_la - 7)) & ~0x1F) === 0 && ((1 << (_la - 7)) & ((1 << (SolidityBlocksParser.Identifier - 7)) | (1 << (SolidityBlocksParser.LPAREN - 7)) | (1 << (SolidityBlocksParser.RPAREN - 7)) | (1 << (SolidityBlocksParser.COMMA - 7)))) !== 0))) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 60;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 61;\n\t\t\tthis.match(SolidityBlocksParser.LBRACE);\n\t\t\tthis.state = 65;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);\n\t\t\twhile (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1 + 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 62;\n\t\t\t\t\tthis.subrule();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 67;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 68;\n\t\t\tthis.match(SolidityBlocksParser.RBRACE);\n\t\t\tthis.state = 70;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 9, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 69;\n\t\t\t\tthis.match(SolidityBlocksParser.SEMI);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionDescriptor(): FunctionDescriptorContext {\n\t\tlet _localctx: FunctionDescriptorContext = new FunctionDescriptorContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 6, SolidityBlocksParser.RULE_functionDescriptor);\n\t\ttry {\n\t\t\tthis.state = 75;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityBlocksParser.T__4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 72;\n\t\t\t\tthis.match(SolidityBlocksParser.T__4);\n\t\t\t\tthis.state = 73;\n\t\t\t\tthis.functionname();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityBlocksParser.Constructorkeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 74;\n\t\t\t\tthis.match(SolidityBlocksParser.Constructorkeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic subrule(): SubruleContext {\n\t\tlet _localctx: SubruleContext = new SubruleContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 8, SolidityBlocksParser.RULE_subrule);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 77;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 7)) & ~0x1F) === 0 && ((1 << (_la - 7)) & ((1 << (SolidityBlocksParser.Identifier - 7)) | (1 << (SolidityBlocksParser.AMP - 7)) | (1 << (SolidityBlocksParser.TILDE - 7)) | (1 << (SolidityBlocksParser.PIPE - 7)) | (1 << (SolidityBlocksParser.LT - 7)) | (1 << (SolidityBlocksParser.GT - 7)) | (1 << (SolidityBlocksParser.DOT - 7)) | (1 << (SolidityBlocksParser.EQUAL - 7)) | (1 << (SolidityBlocksParser.LPAREN - 7)) | (1 << (SolidityBlocksParser.RBRACE - 7)) | (1 << (SolidityBlocksParser.LBRACE - 7)) | (1 << (SolidityBlocksParser.RPAREN - 7)) | (1 << (SolidityBlocksParser.PLUS - 7)) | (1 << (SolidityBlocksParser.MINUS - 7)) | (1 << (SolidityBlocksParser.STAR - 7)) | (1 << (SolidityBlocksParser.SLASH - 7)) | (1 << (SolidityBlocksParser.BACKSLASH - 7)) | (1 << (SolidityBlocksParser.PERCENT - 7)) | (1 << (SolidityBlocksParser.CARET - 7)) | (1 << (SolidityBlocksParser.BANG - 7)) | (1 << (SolidityBlocksParser.QUESTION - 7)) | (1 << (SolidityBlocksParser.COLON - 7)) | (1 << (SolidityBlocksParser.SEMI - 7)) | (1 << (SolidityBlocksParser.COMMA - 7)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionname(): FunctionnameContext {\n\t\tlet _localctx: FunctionnameContext = new FunctionnameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 10, SolidityBlocksParser.RULE_functionname);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 79;\n\t\t\tthis.match(SolidityBlocksParser.Identifier);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic static readonly _serializedATN: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x03(T\\x04\\x02\\t\\x02\" +\n\t\t\"\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\\x04\\x07\\t\\x07\" +\n\t\t\"\\x03\\x02\\x07\\x02\\x10\\n\\x02\\f\\x02\\x0E\\x02\\x13\\v\\x02\\x03\\x02\\x03\\x02\\x03\" +\n\t\t\"\\x03\\x05\\x03\\x18\\n\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x07\\x03\" +\n\t\t\"\\x1F\\n\\x03\\f\\x03\\x0E\\x03\\\"\\v\\x03\\x03\\x03\\x03\\x03\\x03\\x04\\x03\\x04\\x03\\x04\" +\n\t\t\"\\x07\\x04)\\n\\x04\\f\\x04\\x0E\\x04,\\v\\x04\\x03\\x04\\x03\\x04\\x06\\x040\\n\\x04\\r\" +\n\t\t\"\\x04\\x0E\\x041\\x07\\x044\\n\\x04\\f\\x04\\x0E\\x047\\v\\x04\\x03\\x04\\x03\\x04\\x07\" +\n\t\t\"\\x04;\\n\\x04\\f\\x04\\x0E\\x04>\\v\\x04\\x03\\x04\\x03\\x04\\x07\\x04B\\n\\x04\\f\\x04\" +\n\t\t\"\\x0E\\x04E\\v\\x04\\x03\\x04\\x03\\x04\\x05\\x04I\\n\\x04\\x03\\x05\\x03\\x05\\x03\\x05\" +\n\t\t\"\\x05\\x05N\\n\\x05\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\x07\\x05 5C\\x02\\x02\" +\n\t\t\"\\b\\x02\\x02\\x04\\x02\\x06\\x02\\b\\x02\\n\\x02\\f\\x02\\x02\\x05\\x03\\x02\\x04\\x06\\x06\" +\n\t\t\"\\x02\\t\\t\\x18\\x18\\x1B\\x1B\\'\\'\\x04\\x02\\t\\t\\x11\\'\\x02X\\x02\\x11\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x04\\x17\\x03\\x02\\x02\\x02\\x06%\\x03\\x02\\x02\\x02\\bM\\x03\\x02\\x02\\x02\\n\" +\n\t\t\"O\\x03\\x02\\x02\\x02\\fQ\\x03\\x02\\x02\\x02\\x0E\\x10\\x05\\x04\\x03\\x02\\x0F\\x0E\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x10\\x13\\x03\\x02\\x02\\x02\\x11\\x0F\\x03\\x02\\x02\\x02\\x11\\x12\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x12\\x14\\x03\\x02\\x02\\x02\\x13\\x11\\x03\\x02\\x02\\x02\\x14\\x15\\x07\" +\n\t\t\"\\x02\\x02\\x03\\x15\\x03\\x03\\x02\\x02\\x02\\x16\\x18\\x07\\x03\\x02\\x02\\x17\\x16\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x17\\x18\\x03\\x02\\x02\\x02\\x18\\x19\\x03\\x02\\x02\\x02\\x19\\x1A\\t\" +\n\t\t\"\\x02\\x02\\x02\\x1A\\x1B\\x05\\f\\x07\\x02\\x1B \\x07\\x1A\\x02\\x02\\x1C\\x1F\\x05\\x06\" +\n\t\t\"\\x04\\x02\\x1D\\x1F\\x05\\n\\x06\\x02\\x1E\\x1C\\x03\\x02\\x02\\x02\\x1E\\x1D\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x1F\\\"\\x03\\x02\\x02\\x02 !\\x03\\x02\\x02\\x02 \\x1E\\x03\\x02\\x02\\x02\" +\n\t\t\"!#\\x03\\x02\\x02\\x02\\\" \\x03\\x02\\x02\\x02#$\\x07\\x19\\x02\\x02$\\x05\\x03\\x02\\x02\" +\n\t\t\"\\x02%&\\x05\\b\\x05\\x02&*\\x07\\x18\\x02\\x02\\')\\x07\\t\\x02\\x02(\\'\\x03\\x02\\x02\" +\n\t\t\"\\x02),\\x03\\x02\\x02\\x02*(\\x03\\x02\\x02\\x02*+\\x03\\x02\\x02\\x02+5\\x03\\x02\\x02\" +\n\t\t\"\\x02,*\\x03\\x02\\x02\\x02-/\\x07\\'\\x02\\x02.0\\x07\\t\\x02\\x02/.\\x03\\x02\\x02\\x02\" +\n\t\t\"01\\x03\\x02\\x02\\x021/\\x03\\x02\\x02\\x0212\\x03\\x02\\x02\\x0224\\x03\\x02\\x02\\x02\" +\n\t\t\"3-\\x03\\x02\\x02\\x0247\\x03\\x02\\x02\\x0256\\x03\\x02\\x02\\x0253\\x03\\x02\\x02\\x02\" +\n\t\t\"68\\x03\\x02\\x02\\x0275\\x03\\x02\\x02\\x028<\\x07\\x1B\\x02\\x029;\\t\\x03\\x02\\x02\" +\n\t\t\":9\\x03\\x02\\x02\\x02;>\\x03\\x02\\x02\\x02<:\\x03\\x02\\x02\\x02<=\\x03\\x02\\x02\\x02\" +\n\t\t\"=?\\x03\\x02\\x02\\x02><\\x03\\x02\\x02\\x02?C\\x07\\x1A\\x02\\x02@B\\x05\\n\\x06\\x02\" +\n\t\t\"A@\\x03\\x02\\x02\\x02BE\\x03\\x02\\x02\\x02CD\\x03\\x02\\x02\\x02CA\\x03\\x02\\x02\\x02\" +\n\t\t\"DF\\x03\\x02\\x02\\x02EC\\x03\\x02\\x02\\x02FH\\x07\\x19\\x02\\x02GI\\x07&\\x02\\x02\" +\n\t\t\"HG\\x03\\x02\\x02\\x02HI\\x03\\x02\\x02\\x02I\\x07\\x03\\x02\\x02\\x02JK\\x07\\x07\\x02\" +\n\t\t\"\\x02KN\\x05\\f\\x07\\x02LN\\x07\\b\\x02\\x02MJ\\x03\\x02\\x02\\x02ML\\x03\\x02\\x02\\x02\" +\n\t\t\"N\\t\\x03\\x02\\x02\\x02OP\\t\\x04\\x02\\x02P\\v\\x03\\x02\\x02\\x02QR\\x07\\t\\x02\\x02\" +\n\t\t\"R\\r\\x03\\x02\\x02\\x02\\r\\x11\\x17\\x1E *15 = [\n\t\tundefined, \"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'function'\", \n\t\t\"'constructor'\", undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, \"'&'\", \"'~'\", \"'|'\", \"'<'\", \"'>'\", \"'.'\", \n\t\t\"'='\", \"'('\", \"'}'\", \"'{'\", \"')'\", \"'+'\", \"'-'\", \"'*'\", \"'/'\", \"'\\\\'\", \n\t\t\"'%'\", \"'^'\", \"'!'\", \"'?'\", \"':'\", \"';'\", \"','\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, \"Constructorkeyword\", \n\t\t\"Identifier\", \"WS\", \"COMMENT\", \"STRINGS\", \"STRINGS_2\", \"PRAGMA\", \"IMPORT\", \n\t\t\"LINE_COMMENT\", \"AMP\", \"TILDE\", \"PIPE\", \"LT\", \"GT\", \"DOT\", \"EQUAL\", \"LPAREN\", \n\t\t\"RBRACE\", \"LBRACE\", \"RPAREN\", \"PLUS\", \"MINUS\", \"STAR\", \"SLASH\", \"BACKSLASH\", \n\t\t\"PERCENT\", \"CARET\", \"BANG\", \"QUESTION\", \"COLON\", \"SEMI\", \"COMMA\", \"OTHER\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityBlocksLexer._LITERAL_NAMES, SolidityBlocksLexer._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityBlocksLexer.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\n\tconstructor(input: CharStream) {\n\t\tsuper(input);\n\t\tthis._interp = new LexerATNSimulator(SolidityBlocksLexer._ATN, this);\n\t}\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"SolidityBlocks.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityBlocksLexer.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityBlocksLexer._serializedATN; }\n\n\t// @Override\n\tpublic get channelNames(): string[] { return SolidityBlocksLexer.channelNames; }\n\n\t// @Override\n\tpublic get modeNames(): string[] { return SolidityBlocksLexer.modeNames; }\n\n\tpublic static readonly _serializedATN: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x02(\\u0117\\b\\x01\" +\n\t\t\"\\x04\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\" +\n\t\t\"\\x04\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x04\\n\\t\\n\\x04\\v\\t\\v\\x04\\f\\t\\f\\x04\\r\" +\n\t\t\"\\t\\r\\x04\\x0E\\t\\x0E\\x04\\x0F\\t\\x0F\\x04\\x10\\t\\x10\\x04\\x11\\t\\x11\\x04\\x12\\t\" +\n\t\t\"\\x12\\x04\\x13\\t\\x13\\x04\\x14\\t\\x14\\x04\\x15\\t\\x15\\x04\\x16\\t\\x16\\x04\\x17\\t\" +\n\t\t\"\\x17\\x04\\x18\\t\\x18\\x04\\x19\\t\\x19\\x04\\x1A\\t\\x1A\\x04\\x1B\\t\\x1B\\x04\\x1C\\t\" +\n\t\t\"\\x1C\\x04\\x1D\\t\\x1D\\x04\\x1E\\t\\x1E\\x04\\x1F\\t\\x1F\\x04 \\t \\x04!\\t!\\x04\\\"\\t\" +\n\t\t\"\\\"\\x04#\\t#\\x04$\\t$\\x04%\\t%\\x04&\\t&\\x04\\'\\t\\'\\x03\\x02\\x03\\x02\\x03\\x02\\x03\" +\n\t\t\"\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\\x03\\x03\\x03\" +\n\t\t\"\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x04\\x03\\x04\\x03\\x04\\x03\" +\n\t\t\"\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x05\\x03\\x05\\x03\" +\n\t\t\"\\x05\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x06\\x03\\x06\\x03\\x06\\x03\" +\n\t\t\"\\x06\\x03\\x06\\x03\\x06\\x03\\x06\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\x07\\x03\" +\n\t\t\"\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\" +\n\t\t\"\\b\\x06\\b\\x8A\\n\\b\\r\\b\\x0E\\b\\x8B\\x03\\t\\x06\\t\\x8F\\n\\t\\r\\t\\x0E\\t\\x90\\x03\\t\" +\n\t\t\"\\x03\\t\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x07\\n\\x99\\n\\n\\f\\n\\x0E\\n\\x9C\\v\\n\\x03\\n\\x03\" +\n\t\t\"\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\v\\x03\\v\\x07\\v\\xA5\\n\\v\\f\\v\\x0E\\v\\xA8\\v\\v\\x03\\v\" +\n\t\t\"\\x03\\v\\x03\\v\\x03\\v\\x03\\f\\x03\\f\\x07\\f\\xB0\\n\\f\\f\\f\\x0E\\f\\xB3\\v\\f\\x03\\f\\x03\" +\n\t\t\"\\f\\x03\\f\\x03\\f\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x07\\r\\xC1\" +\n\t\t\"\\n\\r\\f\\r\\x0E\\r\\xC4\\v\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\x0E\\x03\\x0E\\x03\\x0E\" +\n\t\t\"\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x07\\x0E\\xD2\\n\\x0E\\f\\x0E\\x0E\\x0E\" +\n\t\t\"\\xD5\\v\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x03\" +\n\t\t\"\\x0F\\x07\\x0F\\xDF\\n\\x0F\\f\\x0F\\x0E\\x0F\\xE2\\v\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x10\" +\n\t\t\"\\x03\\x10\\x03\\x11\\x03\\x11\\x03\\x12\\x03\\x12\\x03\\x13\\x03\\x13\\x03\\x14\\x03\\x14\" +\n\t\t\"\\x03\\x15\\x03\\x15\\x03\\x16\\x03\\x16\\x03\\x17\\x03\\x17\\x03\\x18\\x03\\x18\\x03\\x19\" +\n\t\t\"\\x03\\x19\\x03\\x1A\\x03\\x1A\\x03\\x1B\\x03\\x1B\\x03\\x1C\\x03\\x1C\\x03\\x1D\\x03\\x1D\" +\n\t\t\"\\x03\\x1E\\x03\\x1E\\x03\\x1F\\x03\\x1F\\x03 \\x03 \\x03!\\x03!\\x03\\\"\\x03\\\"\\x03#\" +\n\t\t\"\\x03#\\x03$\\x03$\\x03%\\x03%\\x03&\\x03&\\x03\\'\\x03\\'\\x03\\'\\x03\\'\\x07\\x9A\\xA6\" +\n\t\t\"\\xB1\\xC2\\xD3\\x02\\x02(\\x03\\x02\\x03\\x05\\x02\\x04\\x07\\x02\\x05\\t\\x02\\x06\\v\" +\n\t\t\"\\x02\\x07\\r\\x02\\b\\x0F\\x02\\t\\x11\\x02\\n\\x13\\x02\\v\\x15\\x02\\f\\x17\\x02\\r\\x19\" +\n\t\t\"\\x02\\x0E\\x1B\\x02\\x0F\\x1D\\x02\\x10\\x1F\\x02\\x11!\\x02\\x12#\\x02\\x13%\\x02\\x14\" +\n\t\t\"\\'\\x02\\x15)\\x02\\x16+\\x02\\x17-\\x02\\x18/\\x02\\x191\\x02\\x1A3\\x02\\x1B5\\x02\" +\n\t\t\"\\x1C7\\x02\\x1D9\\x02\\x1E;\\x02\\x1F=\\x02 ?\\x02!A\\x02\\\"C\\x02#E\\x02$G\\x02%I\" +\n\t\t\"\\x02&K\\x02\\'M\\x02(\\x03\\x02\\x05\\x06\\x022;C\\\\aac|\\x05\\x02\\v\\f\\x0F\\x0F\\\"\" +\n\t\t\"\\\"\\x04\\x02\\f\\f\\x0F\\x0F\\x02\\u011E\\x02\\x03\\x03\\x02\\x02\\x02\\x02\\x05\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02\\x07\\x03\\x02\\x02\\x02\\x02\\t\\x03\\x02\\x02\\x02\\x02\\v\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\r\\x03\\x02\\x02\\x02\\x02\\x0F\\x03\\x02\\x02\\x02\\x02\\x11\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\x13\\x03\\x02\\x02\\x02\\x02\\x15\\x03\\x02\\x02\\x02\\x02\\x17\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\x19\\x03\\x02\\x02\\x02\\x02\\x1B\\x03\\x02\\x02\\x02\\x02\\x1D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\x1F\\x03\\x02\\x02\\x02\\x02!\\x03\\x02\\x02\\x02\\x02#\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02%\\x03\\x02\\x02\\x02\\x02\\'\\x03\\x02\\x02\\x02\\x02)\\x03\\x02\\x02\\x02\\x02+\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x02-\\x03\\x02\\x02\\x02\\x02/\\x03\\x02\\x02\\x02\\x021\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x023\\x03\\x02\\x02\\x02\\x025\\x03\\x02\\x02\\x02\\x027\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x029\\x03\\x02\\x02\\x02\\x02;\\x03\\x02\\x02\\x02\\x02=\\x03\\x02\\x02\\x02\\x02?\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02A\\x03\\x02\\x02\\x02\\x02C\\x03\\x02\\x02\\x02\\x02E\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02G\\x03\\x02\\x02\\x02\\x02I\\x03\\x02\\x02\\x02\\x02K\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"M\\x03\\x02\\x02\\x02\\x03O\\x03\\x02\\x02\\x02\\x05X\\x03\\x02\\x02\\x02\\x07a\\x03\\x02\" +\n\t\t\"\\x02\\x02\\tk\\x03\\x02\\x02\\x02\\vs\\x03\\x02\\x02\\x02\\r|\\x03\\x02\\x02\\x02\\x0F\" +\n\t\t\"\\x89\\x03\\x02\\x02\\x02\\x11\\x8E\\x03\\x02\\x02\\x02\\x13\\x94\\x03\\x02\\x02\\x02\\x15\" +\n\t\t\"\\xA2\\x03\\x02\\x02\\x02\\x17\\xAD\\x03\\x02\\x02\\x02\\x19\\xB8\\x03\\x02\\x02\\x02\\x1B\" +\n\t\t\"\\xC9\\x03\\x02\\x02\\x02\\x1D\\xDA\\x03\\x02\\x02\\x02\\x1F\\xE5\\x03\\x02\\x02\\x02!\" +\n\t\t\"\\xE7\\x03\\x02\\x02\\x02#\\xE9\\x03\\x02\\x02\\x02%\\xEB\\x03\\x02\\x02\\x02\\'\\xED\\x03\" +\n\t\t\"\\x02\\x02\\x02)\\xEF\\x03\\x02\\x02\\x02+\\xF1\\x03\\x02\\x02\\x02-\\xF3\\x03\\x02\\x02\" +\n\t\t\"\\x02/\\xF5\\x03\\x02\\x02\\x021\\xF7\\x03\\x02\\x02\\x023\\xF9\\x03\\x02\\x02\\x025\\xFB\" +\n\t\t\"\\x03\\x02\\x02\\x027\\xFD\\x03\\x02\\x02\\x029\\xFF\\x03\\x02\\x02\\x02;\\u0101\\x03\" +\n\t\t\"\\x02\\x02\\x02=\\u0103\\x03\\x02\\x02\\x02?\\u0105\\x03\\x02\\x02\\x02A\\u0107\\x03\" +\n\t\t\"\\x02\\x02\\x02C\\u0109\\x03\\x02\\x02\\x02E\\u010B\\x03\\x02\\x02\\x02G\\u010D\\x03\" +\n\t\t\"\\x02\\x02\\x02I\\u010F\\x03\\x02\\x02\\x02K\\u0111\\x03\\x02\\x02\\x02M\\u0113\\x03\" +\n\t\t\"\\x02\\x02\\x02OP\\x07c\\x02\\x02PQ\\x07d\\x02\\x02QR\\x07u\\x02\\x02RS\\x07v\\x02\\x02\" +\n\t\t\"ST\\x07t\\x02\\x02TU\\x07c\\x02\\x02UV\\x07e\\x02\\x02VW\\x07v\\x02\\x02W\\x04\\x03\" +\n\t\t\"\\x02\\x02\\x02XY\\x07e\\x02\\x02YZ\\x07q\\x02\\x02Z[\\x07p\\x02\\x02[\\\\\\x07v\\x02\" +\n\t\t\"\\x02\\\\]\\x07t\\x02\\x02]^\\x07c\\x02\\x02^_\\x07e\\x02\\x02_`\\x07v\\x02\\x02`\\x06\" +\n\t\t\"\\x03\\x02\\x02\\x02ab\\x07k\\x02\\x02bc\\x07p\\x02\\x02cd\\x07v\\x02\\x02de\\x07g\\x02\" +\n\t\t\"\\x02ef\\x07t\\x02\\x02fg\\x07h\\x02\\x02gh\\x07c\\x02\\x02hi\\x07e\\x02\\x02ij\\x07\" +\n\t\t\"g\\x02\\x02j\\b\\x03\\x02\\x02\\x02kl\\x07n\\x02\\x02lm\\x07k\\x02\\x02mn\\x07d\\x02\" +\n\t\t\"\\x02no\\x07t\\x02\\x02op\\x07c\\x02\\x02pq\\x07t\\x02\\x02qr\\x07{\\x02\\x02r\\n\\x03\" +\n\t\t\"\\x02\\x02\\x02st\\x07h\\x02\\x02tu\\x07w\\x02\\x02uv\\x07p\\x02\\x02vw\\x07e\\x02\\x02\" +\n\t\t\"wx\\x07v\\x02\\x02xy\\x07k\\x02\\x02yz\\x07q\\x02\\x02z{\\x07p\\x02\\x02{\\f\\x03\\x02\" +\n\t\t\"\\x02\\x02|}\\x07e\\x02\\x02}~\\x07q\\x02\\x02~\\x7F\\x07p\\x02\\x02\\x7F\\x80\\x07u\" +\n\t\t\"\\x02\\x02\\x80\\x81\\x07v\\x02\\x02\\x81\\x82\\x07t\\x02\\x02\\x82\\x83\\x07w\\x02\\x02\" +\n\t\t\"\\x83\\x84\\x07e\\x02\\x02\\x84\\x85\\x07v\\x02\\x02\\x85\\x86\\x07q\\x02\\x02\\x86\\x87\" +\n\t\t\"\\x07t\\x02\\x02\\x87\\x0E\\x03\\x02\\x02\\x02\\x88\\x8A\\t\\x02\\x02\\x02\\x89\\x88\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x8A\\x8B\\x03\\x02\\x02\\x02\\x8B\\x89\\x03\\x02\\x02\\x02\\x8B\\x8C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x8C\\x10\\x03\\x02\\x02\\x02\\x8D\\x8F\\t\\x03\\x02\\x02\\x8E\\x8D\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x8F\\x90\\x03\\x02\\x02\\x02\\x90\\x8E\\x03\\x02\\x02\\x02\\x90\\x91\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x91\\x92\\x03\\x02\\x02\\x02\\x92\\x93\\b\\t\\x02\\x02\\x93\\x12\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x94\\x95\\x071\\x02\\x02\\x95\\x96\\x07,\\x02\\x02\\x96\\x9A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x97\\x99\\v\\x02\\x02\\x02\\x98\\x97\\x03\\x02\\x02\\x02\\x99\\x9C\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x9A\\x9B\\x03\\x02\\x02\\x02\\x9A\\x98\\x03\\x02\\x02\\x02\\x9B\\x9D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x9C\\x9A\\x03\\x02\\x02\\x02\\x9D\\x9E\\x07,\\x02\\x02\\x9E\\x9F\\x071\\x02\\x02\" +\n\t\t\"\\x9F\\xA0\\x03\\x02\\x02\\x02\\xA0\\xA1\\b\\n\\x02\\x02\\xA1\\x14\\x03\\x02\\x02\\x02\\xA2\" +\n\t\t\"\\xA6\\x07$\\x02\\x02\\xA3\\xA5\\v\\x02\\x02\\x02\\xA4\\xA3\\x03\\x02\\x02\\x02\\xA5\\xA8\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA6\\xA7\\x03\\x02\\x02\\x02\\xA6\\xA4\\x03\\x02\\x02\\x02\\xA7\\xA9\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA8\\xA6\\x03\\x02\\x02\\x02\\xA9\\xAA\\x07$\\x02\\x02\\xAA\\xAB\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xAB\\xAC\\b\\v\\x02\\x02\\xAC\\x16\\x03\\x02\\x02\\x02\\xAD\\xB1\\x07\" +\n\t\t\")\\x02\\x02\\xAE\\xB0\\v\\x02\\x02\\x02\\xAF\\xAE\\x03\\x02\\x02\\x02\\xB0\\xB3\\x03\\x02\" +\n\t\t\"\\x02\\x02\\xB1\\xB2\\x03\\x02\\x02\\x02\\xB1\\xAF\\x03\\x02\\x02\\x02\\xB2\\xB4\\x03\\x02\" +\n\t\t\"\\x02\\x02\\xB3\\xB1\\x03\\x02\\x02\\x02\\xB4\\xB5\\x07)\\x02\\x02\\xB5\\xB6\\x03\\x02\" +\n\t\t\"\\x02\\x02\\xB6\\xB7\\b\\f\\x02\\x02\\xB7\\x18\\x03\\x02\\x02\\x02\\xB8\\xB9\\x07r\\x02\" +\n\t\t\"\\x02\\xB9\\xBA\\x07t\\x02\\x02\\xBA\\xBB\\x07c\\x02\\x02\\xBB\\xBC\\x07i\\x02\\x02\\xBC\" +\n\t\t\"\\xBD\\x07o\\x02\\x02\\xBD\\xBE\\x07c\\x02\\x02\\xBE\\xC2\\x03\\x02\\x02\\x02\\xBF\\xC1\" +\n\t\t\"\\v\\x02\\x02\\x02\\xC0\\xBF\\x03\\x02\\x02\\x02\\xC1\\xC4\\x03\\x02\\x02\\x02\\xC2\\xC3\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xC2\\xC0\\x03\\x02\\x02\\x02\\xC3\\xC5\\x03\\x02\\x02\\x02\\xC4\\xC2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xC5\\xC6\\x07=\\x02\\x02\\xC6\\xC7\\x03\\x02\\x02\\x02\\xC7\\xC8\" +\n\t\t\"\\b\\r\\x02\\x02\\xC8\\x1A\\x03\\x02\\x02\\x02\\xC9\\xCA\\x07k\\x02\\x02\\xCA\\xCB\\x07\" +\n\t\t\"o\\x02\\x02\\xCB\\xCC\\x07r\\x02\\x02\\xCC\\xCD\\x07q\\x02\\x02\\xCD\\xCE\\x07t\\x02\\x02\" +\n\t\t\"\\xCE\\xCF\\x07v\\x02\\x02\\xCF\\xD3\\x03\\x02\\x02\\x02\\xD0\\xD2\\v\\x02\\x02\\x02\\xD1\" +\n\t\t\"\\xD0\\x03\\x02\\x02\\x02\\xD2\\xD5\\x03\\x02\\x02\\x02\\xD3\\xD4\\x03\\x02\\x02\\x02\\xD3\" +\n\t\t\"\\xD1\\x03\\x02\\x02\\x02\\xD4\\xD6\\x03\\x02\\x02\\x02\\xD5\\xD3\\x03\\x02\\x02\\x02\\xD6\" +\n\t\t\"\\xD7\\x07=\\x02\\x02\\xD7\\xD8\\x03\\x02\\x02\\x02\\xD8\\xD9\\b\\x0E\\x02\\x02\\xD9\\x1C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xDA\\xDB\\x071\\x02\\x02\\xDB\\xDC\\x071\\x02\\x02\\xDC\\xE0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xDD\\xDF\\n\\x04\\x02\\x02\\xDE\\xDD\\x03\\x02\\x02\\x02\\xDF\\xE2\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xE0\\xDE\\x03\\x02\\x02\\x02\\xE0\\xE1\\x03\\x02\\x02\\x02\\xE1\\xE3\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xE2\\xE0\\x03\\x02\\x02\\x02\\xE3\\xE4\\b\\x0F\\x02\\x02\\xE4\\x1E\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xE5\\xE6\\x07(\\x02\\x02\\xE6 \\x03\\x02\\x02\\x02\\xE7\\xE8\\x07\\x80\" +\n\t\t\"\\x02\\x02\\xE8\\\"\\x03\\x02\\x02\\x02\\xE9\\xEA\\x07~\\x02\\x02\\xEA$\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xEB\\xEC\\x07>\\x02\\x02\\xEC&\\x03\\x02\\x02\\x02\\xED\\xEE\\x07@\\x02\\x02\\xEE(\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xEF\\xF0\\x070\\x02\\x02\\xF0*\\x03\\x02\\x02\\x02\\xF1\\xF2\\x07?\\x02\" +\n\t\t\"\\x02\\xF2,\\x03\\x02\\x02\\x02\\xF3\\xF4\\x07*\\x02\\x02\\xF4.\\x03\\x02\\x02\\x02\\xF5\" +\n\t\t\"\\xF6\\x07\\x7F\\x02\\x02\\xF60\\x03\\x02\\x02\\x02\\xF7\\xF8\\x07}\\x02\\x02\\xF82\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xF9\\xFA\\x07+\\x02\\x02\\xFA4\\x03\\x02\\x02\\x02\\xFB\\xFC\\x07-\\x02\" +\n\t\t\"\\x02\\xFC6\\x03\\x02\\x02\\x02\\xFD\\xFE\\x07/\\x02\\x02\\xFE8\\x03\\x02\\x02\\x02\\xFF\" +\n\t\t\"\\u0100\\x07,\\x02\\x02\\u0100:\\x03\\x02\\x02\\x02\\u0101\\u0102\\x071\\x02\\x02\\u0102\" +\n\t\t\"<\\x03\\x02\\x02\\x02\\u0103\\u0104\\x07^\\x02\\x02\\u0104>\\x03\\x02\\x02\\x02\\u0105\" +\n\t\t\"\\u0106\\x07\\'\\x02\\x02\\u0106@\\x03\\x02\\x02\\x02\\u0107\\u0108\\x07`\\x02\\x02\\u0108\" +\n\t\t\"B\\x03\\x02\\x02\\x02\\u0109\\u010A\\x07#\\x02\\x02\\u010AD\\x03\\x02\\x02\\x02\\u010B\" +\n\t\t\"\\u010C\\x07A\\x02\\x02\\u010CF\\x03\\x02\\x02\\x02\\u010D\\u010E\\x07<\\x02\\x02\\u010E\" +\n\t\t\"H\\x03\\x02\\x02\\x02\\u010F\\u0110\\x07=\\x02\\x02\\u0110J\\x03\\x02\\x02\\x02\\u0111\" +\n\t\t\"\\u0112\\x07.\\x02\\x02\\u0112L\\x03\\x02\\x02\\x02\\u0113\\u0114\\v\\x02\\x02\\x02\\u0114\" +\n\t\t\"\\u0115\\x03\\x02\\x02\\x02\\u0115\\u0116\\b\\'\\x02\\x02\\u0116N\\x03\\x02\\x02\\x02\" +\n\t\t\"\\v\\x02\\x8B\\x90\\x9A\\xA6\\xB1\\xC2\\xD3\\xE0\\x03\\b\\x02\\x02\";\n\tpublic static __ATN: ATN;\n\tpublic static get _ATN(): ATN {\n\t\tif (!SolidityBlocksLexer.__ATN) {\n\t\t\tSolidityBlocksLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(SolidityBlocksLexer._serializedATN));\n\t\t}\n\n\t\treturn SolidityBlocksLexer.__ATN;\n\t}\n\n}\n\n"], + "sourcesContent": ["export let process = {\n cwd: () => '',\n env: () => {}\n}\n\nexport let global = {}\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.7499997-07:00\r\n\r\n/** How to emit recognition errors. */\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\n\r\nexport interface ANTLRErrorListener {\r\n\t/**\r\n\t * Upon syntax error, notify any interested parties. This is not how to\r\n\t * recover from errors or compute error messages. {@link ANTLRErrorStrategy}\r\n\t * specifies how to recover from syntax errors and how to compute error\r\n\t * messages. This listener's job is simply to emit a computed message,\r\n\t * though it has enough information to create its own message in many cases.\r\n\t *\r\n\t * The {@link RecognitionException} is non-`undefined` for all syntax errors except\r\n\t * when we discover mismatched token errors that we can recover from\r\n\t * in-line, without returning from the surrounding rule (via the single\r\n\t * token insertion and deletion mechanism).\r\n\t *\r\n\t * @param recognizer\r\n\t * What parser got the error. From this\r\n\t * \t\t object, you can access the context as well\r\n\t * \t\t as the input stream.\r\n\t * @param offendingSymbol\r\n\t * The offending token in the input token\r\n\t * \t\t stream, unless recognizer is a lexer (then it's `undefined`). If\r\n\t * \t\t no viable alternative error, `e` has token at which we\r\n\t * \t\t started production for the decision.\r\n\t * @param line\r\n\t * \t\t The line number in the input where the error occurred.\r\n\t * @param charPositionInLine\r\n\t * \t\t The character position within that line where the error occurred.\r\n\t * @param msg\r\n\t * \t\t The message to emit.\r\n\t * @param e\r\n\t * The exception generated by the parser that led to\r\n\t * the reporting of an error. It is `undefined` in the case where\r\n\t * the parser was able to recover in line without exiting the\r\n\t * surrounding rule.\r\n\t */\r\n\tsyntaxError?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingSymbol: T | undefined,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\t/*@NotNull*/\r\n\t\tmsg: string,\r\n\t\te: RecognitionException | undefined) => void;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.9102174-07:00\r\n\r\nimport { Parser } from \"./Parser\";\r\nimport { Token } from \"./Token\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\n\r\n/**\r\n * The interface for defining strategies to deal with syntax errors encountered\r\n * during a parse by ANTLR-generated parsers. We distinguish between three\r\n * different kinds of errors:\r\n *\r\n * * The parser could not figure out which path to take in the ATN (none of\r\n * the available alternatives could possibly match)\r\n * * The current input does not match what we were looking for\r\n * * A predicate evaluated to false\r\n *\r\n * Implementations of this interface report syntax errors by calling\r\n * {@link Parser#notifyErrorListeners}.\r\n *\r\n * TODO: what to do about lexers\r\n */\r\nexport interface ANTLRErrorStrategy {\r\n\t/**\r\n\t * Reset the error handler state for the specified `recognizer`.\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\treset(/*@NotNull*/ recognizer: Parser): void;\r\n\r\n\t/**\r\n\t * This method is called when an unexpected symbol is encountered during an\r\n\t * inline match operation, such as {@link Parser#match}. If the error\r\n\t * strategy successfully recovers from the match failure, this method\r\n\t * returns the {@link Token} instance which should be treated as the\r\n\t * successful result of the match.\r\n\t *\r\n\t * This method handles the consumption of any tokens - the caller should\r\n\t * *not* call {@link Parser#consume} after a successful recovery.\r\n\t *\r\n\t * Note that the calling code will not report an error if this method\r\n\t * returns successfully. The error strategy implementation is responsible\r\n\t * for calling {@link Parser#notifyErrorListeners} as appropriate.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @ if the error strategy was not able to\r\n\t * recover from the unexpected input symbol\r\n\t */\r\n\trecoverInline(/*@NotNull*/ recognizer: Parser): Token;\r\n\r\n\t/**\r\n\t * This method is called to recover from exception `e`. This method is\r\n\t * called after {@link #reportError} by the default exception handler\r\n\t * generated for a rule method.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception to recover from\r\n\t * @ if the error strategy could not recover from\r\n\t * the recognition exception\r\n\t */\r\n\trecover(/*@NotNull*/ recognizer: Parser, /*@NotNull*/ e: RecognitionException): void;\r\n\r\n\t/**\r\n\t * This method provides the error handler with an opportunity to handle\r\n\t * syntactic or semantic errors in the input stream before they result in a\r\n\t * {@link RecognitionException}.\r\n\t *\r\n\t * The generated code currently contains calls to {@link #sync} after\r\n\t * entering the decision state of a closure block (`(...)*` or\r\n\t * `(...)+`).\r\n\t *\r\n\t * For an implementation based on Jim Idle's \"magic sync\" mechanism, see\r\n\t * {@link DefaultErrorStrategy#sync}.\r\n\t *\r\n\t * @see DefaultErrorStrategy#sync\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @ if an error is detected by the error\r\n\t * strategy but cannot be automatically recovered at the current state in\r\n\t * the parsing process\r\n\t */\r\n\tsync(/*@NotNull*/ recognizer: Parser): void;\r\n\r\n\t/**\r\n\t * Tests whether or not `recognizer` is in the process of recovering\r\n\t * from an error. In error recovery mode, {@link Parser#consume} adds\r\n\t * symbols to the parse tree by calling\r\n\t * {@link Parser#createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)} instead of\r\n\t * {@link Parser#createTerminalNode(ParserRuleContext, Token)}.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @returns `true` if the parser is currently recovering from a parse\r\n\t * error, otherwise `false`\r\n\t */\r\n\tinErrorRecoveryMode(/*@NotNull*/ recognizer: Parser): boolean;\r\n\r\n\t/**\r\n\t * This method is called by when the parser successfully matches an input\r\n\t * symbol.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\treportMatch(/*@NotNull*/ recognizer: Parser): void;\r\n\r\n\t/**\r\n\t * Report any kind of {@link RecognitionException}. This method is called by\r\n\t * the default exception handler generated for a rule method.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception to report\r\n\t */\r\n\treportError(\r\n\t\t/*@NotNull*/ recognizer: Parser,\r\n\t\t/*@NotNull*/ e: RecognitionException): void;\r\n}\r\n", "'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n", "'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n", "'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n", "'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n", "'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n", "'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n", "'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n", "'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n", "'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n/* globals document: false */\nvar documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (value === documentDotAll) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (typeof value === 'function' && !value.prototype) { return true; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (value === documentDotAll) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (typeof value === 'function' && !value.prototype) { return true; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\treturn strClass === fnClass || strClass === genClass;\n\t};\n", "'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n", "'use strict';\n\nvar possibleNames = [\n\t'BigInt64Array',\n\t'BigUint64Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Int8Array',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray'\n];\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\nmodule.exports = function availableTypedArrays() {\n\tvar out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n", "'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\ttoStrTags[typedArray] = descriptor.get;\n\t\t}\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar anyTrue = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!anyTrue) {\n\t\t\ttry {\n\t\t\t\tanyTrue = getter.call(value) === typedArray;\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn anyTrue;\n};\n\nmodule.exports = function isTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag || !(Symbol.toStringTag in value)) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\treturn $indexOf(typedArrays, tag) > -1;\n\t}\n\tif (!gOPD) { return false; }\n\treturn tryTypedArrays(value);\n};\n", "'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tif (typeof g[typedArray] === 'function') {\n\t\t\tvar arr = new g[typedArray]();\n\t\t\tif (Symbol.toStringTag in arr) {\n\t\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\t\tif (!descriptor) {\n\t\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t\t}\n\t\t\t\ttoStrTags[typedArray] = descriptor.get;\n\t\t\t}\n\t\t}\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar foundName = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!foundName) {\n\t\t\ttry {\n\t\t\t\tvar name = getter.call(value);\n\t\t\t\tif (name === typedArray) {\n\t\t\t\t\tfoundName = name;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\t\t}\n\t});\n\treturn foundName;\n};\n\nvar isTypedArray = require('is-typed-array');\n\nmodule.exports = function whichTypedArray(value) {\n\tif (!isTypedArray(value)) { return false; }\n\tif (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }\n\treturn tryTypedArrays(value);\n};\n", "// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n", "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echoes the value of a value. Tries to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n", "// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n\n/* eslint node-core/alphabetize-errors: \"error\" */\n\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n'use strict'; // The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar codes = {}; // Lazy loaded\n\nvar assert;\nvar util;\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inherits(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n var _this;\n\n _classCallCheck(this, NodeError);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3)));\n _this.code = code;\n return _this;\n }\n\n return NodeError;\n }(Base);\n\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = require('../assert');\n assert(typeof name === 'string', \"'name' must be a string\"); // determiner: 'must be' or 'must not be'\n\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } // TODO(BridgeAR): Improve the output by showing `null` and similar.\n\n\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = require('util/');\n var inspected = util.inspect(value);\n\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (assert === undefined) assert = require('../assert');\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;", "// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _require = require('util/'),\n inspect = _require.inspect;\n\nvar _require2 = require('../errors'),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\n\n\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n\n while (count) {\n str += str;\n count--;\n }\n\n str += str.substring(0, maxCount - str.length);\n return str;\n}\n\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n}; // Comparing short primitives should just show === / !== instead of using the\n// diff.\n\nvar kMaxShortLength = 10;\n\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\n\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\n\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = ''; // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n } // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n\n\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length; // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n } // Ignore the first characters.\n\n\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n } // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n\n\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n\n var maxLines = Math.max(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n'); // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the expected line to the cache.\n\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++; // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++; // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2; // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = ''; // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n } // Inspected object to big (Show ~20 rows max)\n\n\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\n\nvar AssertionError =\n/*#__PURE__*/\nfunction (_Error) {\n _inherits(AssertionError, _Error);\n\n function AssertionError(options) {\n var _this;\n\n _classCallCheck(this, AssertionError);\n\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n\n if (message != null) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, String(message)));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n } // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n\n\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, createErrDiff(actual, expected, operator)));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n'); // In case \"actual\" is an object, it should not be reference equal.\n\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n } // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (res.length > 27) {\n res.pop();\n }\n } // Only print a single input.\n\n\n if (res.length === 1) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \" \").concat(res[0])));\n } else {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\")));\n }\n } else {\n var _res = inspectValue(actual);\n\n var other = '';\n var knownOperators = kReadableOperator[operator];\n\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(_res).concat(other)));\n }\n }\n\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n } // Create error message including the error code in the name.\n\n\n _this.stack; // Reset the name.\n\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: inspect.custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread({}, ctx, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n\n return AssertionError;\n}(_wrapNativeSuper(Error));\n\nmodule.exports = AssertionError;", "/**\n * Code refactored from Mozilla Developer Network:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n */\n\n'use strict';\n\nfunction assign(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n var to = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n continue;\n }\n\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n}\n\nfunction polyfill() {\n if (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value: assign\n });\n }\n}\n\nmodule.exports = {\n assign: assign,\n polyfill: polyfill\n};\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n", "'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n", "'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n", "'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar supportsDescriptors = origDefineProperty && hasPropertyDescriptors;\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value; // eslint-disable-line no-param-reassign\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n", "'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n", "'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "'use strict';\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n", "'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar regexFlagsSupported = /a/g.flags !== undefined;\n\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\n\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\n\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : require('is-nan');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\n\nvar _require$types = require('util/').types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\n\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n } // The maximum size for an array is 2 ** 32 -1.\n\n\n return key.length === 10 && key >= Math.pow(2, 32);\n}\n\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n} // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}\n\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3; // Check if they have the same source and flags\n\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\n\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\n\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\n\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n} // Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n } // Check more closely if val1 and val2 are equal.\n\n\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n\n return false;\n }\n\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n\n if (val1Tag !== val2Tag) {\n return false;\n }\n\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n } // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // want to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n\n\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n } // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n\n\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (_keys.length !== _keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\n\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\n\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2); // The pair must have the same number of owned properties.\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n } // Cheap key test\n\n\n var i = 0;\n\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n\n if (symbolKeysA.length !== 0) {\n var count = 0;\n\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n } // Use memos to handle cycles.\n\n\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n\n memos.position++;\n }\n\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\n\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n\n return false;\n} // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\n\n\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n\n case 'object':\n // Only pass in null as object!\n return undefined;\n\n case 'symbol':\n return false;\n\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n\n }\n\n return true;\n}\n\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\n\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n\n if (altValue != null) {\n return altValue;\n }\n\n var curB = b.get(altValue);\n\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\n\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i]; // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n } // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n\n\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null values.\n\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(val);\n }\n }\n\n if (set !== null) {\n var bValues = arrayFromSet(b);\n\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i]; // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n\n return false;\n}\n\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null\n // keys.\n\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n }\n }\n }\n\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n\n return true;\n }\n }\n } // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n\n\n for (i = 0; i < keys.length; i++) {\n var _key = keys[i];\n\n if (!innerDeepEqual(a[_key], b[_key], strict, memos)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\n\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\n\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};", "// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = require('./internal/errors'),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\n\nvar AssertionError = require('./internal/assert/assertion_error');\n\nvar _require2 = require('util/'),\n inspect = _require2.inspect;\n\nvar _require$types = require('util/').types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\n\nvar objectAssign = Object.assign ? Object.assign : require('es6-object-assign').assign;\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\n\nfunction lazyLoadComparison() {\n var comparison = require('./internal/util/comparisons');\n\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n} // Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\n\n\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\n\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\n\nvar warned = false; // The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {}; // All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\n\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n\n if (argsLen === 2) operator = '!=';\n }\n\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n\n if (message !== undefined) {\n errArgs.message = message;\n }\n\n var err = new AssertionError(errArgs);\n\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n\n throw err;\n}\n\nassert.fail = fail; // The AssertionError is defined in internal/error.\n\nassert.AssertionError = AssertionError;\n\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n} // Pure assertion tests whether a value is truthy, as determined\n// by !!value.\n\n\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\n\nassert.ok = ok; // The equality assertion tests shallow, coercive equality with ==.\n\n/* eslint-disable no-restricted-properties */\n\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n}; // The non-equality assertion tests for whether two objects are not\n// equal with !=.\n\n\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n}; // The equivalence assertion tests a deep equality relation.\n\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n}; // The non-equivalence assertion tests for any deep inequality.\n\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\n\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\n\nvar Comparison = function Comparison(obj, keys, actual) {\n var _this = this;\n\n _classCallCheck(this, Comparison);\n\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && obj[key].test(actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n};\n\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\n\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return expected.test(actual); // assert.doesNotThrow does not accept objects.\n\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n } // Handle primitives properly.\n\n\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n\n var keys = Object.keys(expected); // Special handle errors to make sure the name and the message are compared\n // as well.\n\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && expected[key].test(actual[key])) {\n return;\n }\n\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n } // Guard instanceof against arrow functions as they don't have a prototype.\n\n\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n\n try {\n fn();\n } catch (e) {\n return e;\n }\n\n return NO_EXCEPTION_SENTINEL;\n}\n\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\n\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn(); // Fail in case no promise is returned.\n\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\n\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\n\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n\n throw actual;\n}\n\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\n\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\n\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\n\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\n\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n }); // Make sure we actually have a stack trace!\n\n var origStack = err.stack;\n\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift(); // Filter all frames existing in err.stack.\n\n var tmp1 = newErr.stack.split('\\n');\n\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n\n throw newErr;\n }\n}; // Expose a strict only variant of assert\n\n\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\n\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport function NotNull(\r\n\ttarget: any,\r\n\tpropertyKey: PropertyKey,\r\n\tpropertyDescriptor?: PropertyDescriptor | number) {\r\n\t// intentionally empty\r\n}\r\n\r\nexport function Nullable(\r\n\ttarget: any,\r\n\tpropertyKey: PropertyKey,\r\n\tpropertyDescriptor?: PropertyDescriptor | number) {\r\n\t// intentionally empty\r\n}\r\n\r\nexport function Override(\r\n\ttarget: any,\r\n\tpropertyKey: PropertyKey,\r\n\tpropertyDescriptor?: PropertyDescriptor) {\r\n\t// do something with 'target' ...\r\n}\r\n\r\nexport function SuppressWarnings(options: string) {\r\n\treturn (target: any, propertyKey: PropertyKey, descriptor?: PropertyDescriptor) => {\r\n\t\t// intentionally empty\r\n\t};\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.6934376-07:00\r\n\r\nexport namespace IntStream {\r\n\t/**\r\n\t * The value returned by {@link #LA LA()} when the end of the stream is\r\n\t * reached.\r\n\t */\r\n\texport const EOF: number = -1;\r\n\r\n\t/**\r\n\t * The value returned by {@link #getSourceName} when the actual name of the\r\n\t * underlying source is not known.\r\n\t */\r\n\texport const UNKNOWN_SOURCE_NAME: string = \"\";\r\n}\r\n\r\n/**\r\n * A simple stream of symbols whose values are represented as integers. This\r\n * interface provides *marked ranges* with support for a minimum level\r\n * of buffering necessary to implement arbitrary lookahead during prediction.\r\n * For more information on marked ranges, see {@link #mark}.\r\n *\r\n * **Initializing Methods:** Some methods in this interface have\r\n * unspecified behavior if no call to an initializing method has occurred after\r\n * the stream was constructed. The following is a list of initializing methods:\r\n *\r\n * * {@link #LA}\r\n * * {@link #consume}\r\n * * {@link #size}\r\n */\r\nexport interface IntStream {\r\n\t/**\r\n\t * Consumes the current symbol in the stream. This method has the following\r\n\t * effects:\r\n\t *\r\n\t * * **Forward movement:** The value of `index`\r\n\t * before calling this method is less than the value of `index`\r\n\t * after calling this method.\r\n\t * * **Ordered lookahead:** The value of `LA(1)` before\r\n\t * calling this method becomes the value of `LA(-1)` after calling\r\n\t * this method.\r\n\t *\r\n\t * Note that calling this method does not guarantee that `index` is\r\n\t * incremented by exactly 1, as that would preclude the ability to implement\r\n\t * filtering streams (e.g. {@link CommonTokenStream} which distinguishes\r\n\t * between \"on-channel\" and \"off-channel\" tokens).\r\n\t *\r\n\t * @throws IllegalStateException if an attempt is made to consume the\r\n\t * end of the stream (i.e. if `LA(1)==`{@link #EOF EOF} before calling\r\n\t * `consume`).\r\n\t */\r\n\tconsume(): void;\r\n\r\n\t/**\r\n\t * Gets the value of the symbol at offset `i` from the current\r\n\t * position. When `i==1`, this method returns the value of the current\r\n\t * symbol in the stream (which is the next symbol to be consumed). When\r\n\t * `i==-1`, this method returns the value of the previously read\r\n\t * symbol in the stream. It is not valid to call this method with\r\n\t * `i==0`, but the specific behavior is unspecified because this\r\n\t * method is frequently called from performance-critical code.\r\n\t *\r\n\t * This method is guaranteed to succeed if any of the following are true:\r\n\t *\r\n\t * * `i>0`\r\n\t * * `i==-1` and `index` returns a value greater\r\n\t * than the value of `index` after the stream was constructed\r\n\t * and `LA(1)` was called in that order. Specifying the current\r\n\t * `index` relative to the index after the stream was created\r\n\t * allows for filtering implementations that do not return every symbol\r\n\t * from the underlying source. Specifying the call to `LA(1)`\r\n\t * allows for lazily initialized streams.\r\n\t * * `LA(i)` refers to a symbol consumed within a marked region\r\n\t * that has not yet been released.\r\n\t *\r\n\t * If `i` represents a position at or beyond the end of the stream,\r\n\t * this method returns {@link #EOF}.\r\n\t *\r\n\t * The return value is unspecified if `i<0` and fewer than `-i`\r\n\t * calls to {@link #consume consume()} have occurred from the beginning of\r\n\t * the stream before calling this method.\r\n\t *\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * retrieving the value of the specified symbol\r\n\t */\r\n\tLA(i: number): number;\r\n\r\n\t/**\r\n\t * A mark provides a guarantee that {@link #seek seek()} operations will be\r\n\t * valid over a \"marked range\" extending from the index where `mark()`\r\n\t * was called to the current `index`. This allows the use of\r\n\t * streaming input sources by specifying the minimum buffering requirements\r\n\t * to support arbitrary lookahead during prediction.\r\n\t *\r\n\t * The returned mark is an opaque handle (type `int`) which is passed\r\n\t * to {@link #release release()} when the guarantees provided by the marked\r\n\t * range are no longer necessary. When calls to\r\n\t * `mark()`/`release()` are nested, the marks must be released\r\n\t * in reverse order of which they were obtained. Since marked regions are\r\n\t * used during performance-critical sections of prediction, the specific\r\n\t * behavior of invalid usage is unspecified (i.e. a mark is not released, or\r\n\t * a mark is released twice, or marks are not released in reverse order from\r\n\t * which they were created).\r\n\t *\r\n\t * The behavior of this method is unspecified if no call to an\r\n\t * {@link IntStream initializing method} has occurred after this stream was\r\n\t * constructed.\r\n\t *\r\n\t * This method does not change the current position in the input stream.\r\n\t *\r\n\t * The following example shows the use of {@link #mark mark()},\r\n\t * {@link #release release(mark)}, `index`, and\r\n\t * {@link #seek seek(index)} as part of an operation to safely work within a\r\n\t * marked region, then restore the stream position to its original value and\r\n\t * release the mark.\r\n\t *\r\n\t * ```\r\n\t * IntStream stream = ...;\r\n\t * int index = -1;\r\n\t * int mark = stream.mark();\r\n\t * try {\r\n\t * index = stream.index;\r\n\t * // perform work here...\r\n\t * } finally {\r\n\t * if (index != -1) {\r\n\t * stream.seek(index);\r\n\t * }\r\n\t * stream.release(mark);\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @returns An opaque marker which should be passed to\r\n\t * {@link #release release()} when the marked range is no longer required.\r\n\t */\r\n\tmark(): number;\r\n\r\n\t/**\r\n\t * This method releases a marked range created by a call to\r\n\t * {@link #mark mark()}. Calls to `release()` must appear in the\r\n\t * reverse order of the corresponding calls to `mark()`. If a mark is\r\n\t * released twice, or if marks are not released in reverse order of the\r\n\t * corresponding calls to `mark()`, the behavior is unspecified.\r\n\t *\r\n\t * For more information and an example, see {@link #mark}.\r\n\t *\r\n\t * @param marker A marker returned by a call to `mark()`.\r\n\t * @see #mark\r\n\t */\r\n\trelease(marker: number): void;\r\n\r\n\t/**\r\n\t * Return the index into the stream of the input symbol referred to by\r\n\t * `LA(1)`.\r\n\t *\r\n\t * The behavior of this method is unspecified if no call to an\r\n\t * {@link IntStream initializing method} has occurred after this stream was\r\n\t * constructed.\r\n\t */\r\n\treadonly index: number;\r\n\r\n\t/**\r\n\t * Set the input cursor to the position indicated by `index`. If the\r\n\t * specified index lies past the end of the stream, the operation behaves as\r\n\t * though `index` was the index of the EOF symbol. After this method\r\n\t * returns without throwing an exception, then at least one of the following\r\n\t * will be true.\r\n\t *\r\n\t * * `index` will return the index of the first symbol\r\n\t * appearing at or after the specified `index`. Specifically,\r\n\t * implementations which filter their sources should automatically\r\n\t * adjust `index` forward the minimum amount required for the\r\n\t * operation to target a non-ignored symbol.\r\n\t * * `LA(1)` returns {@link #EOF}\r\n\t *\r\n\t * This operation is guaranteed to not throw an exception if `index`\r\n\t * lies within a marked region. For more information on marked regions, see\r\n\t * {@link #mark}. The behavior of this method is unspecified if no call to\r\n\t * an {@link IntStream initializing method} has occurred after this stream\r\n\t * was constructed.\r\n\t *\r\n\t * @param index The absolute index to seek to.\r\n\t *\r\n\t * @throws IllegalArgumentException if `index` is less than 0\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * seeking to the specified index\r\n\t */\r\n\tseek(index: number): void;\r\n\r\n\t/**\r\n\t * Returns the total number of symbols in the stream, including a single EOF\r\n\t * symbol.\r\n\t *\r\n\t * @throws UnsupportedOperationException if the size of the stream is\r\n\t * unknown.\r\n\t */\r\n\treadonly size: number;\r\n\r\n\t/**\r\n\t * Gets the name of the underlying symbol source. This method returns a\r\n\t * non-undefined, non-empty string. If such a name is not known, this method\r\n\t * returns {@link #UNKNOWN_SOURCE_NAME}.\r\n\t */\r\n\t//@NotNull\r\n\treadonly sourceName: string;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n// ConvertTo-TS run at 2016-10-04T11:26:49.0828748-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Arrays } from \"./misc/Arrays\";\r\nimport { Override } from \"./Decorators\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\n\r\nconst READ_BUFFER_SIZE: number = 1024;\r\nconst INITIAL_BUFFER_SIZE: number = 1024;\r\n\r\n/**\r\n * Vacuum all input from a {@link Reader}/{@link InputStream} and then treat it\r\n * like a `char[]` buffer. Can also pass in a {@link String} or\r\n * `char[]` to use.\r\n *\r\n * If you need encoding, pass in stream/reader with correct encoding.\r\n *\r\n * @deprecated as of 4.7, please use `CharStreams` interface.\r\n */\r\nexport class ANTLRInputStream implements CharStream {\r\n\t/** The data being scanned */\r\n\tprotected data: string;\r\n\r\n\t/** How many characters are actually in the buffer */\r\n\tprotected n: number;\r\n\r\n\t/** 0..n-1 index into string of next char */\r\n\tprotected p: number = 0;\r\n\r\n\t/** What is name or source of this char stream? */\r\n\tpublic name?: string;\r\n\r\n\t/** Copy data in string to a local char array */\r\n\tconstructor(input: string) {\r\n\t\tthis.data = input;\r\n\t\tthis.n = input.length;\r\n\t}\r\n\r\n\t/** Reset the stream so that it's in the same state it was\r\n\t * when the object was created *except* the data array is not\r\n\t * touched.\r\n\t */\r\n\tpublic reset(): void {\r\n\t\tthis.p = 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic consume(): void {\r\n\t\tif (this.p >= this.n) {\r\n\t\t\tassert(this.LA(1) === IntStream.EOF);\r\n\t\t\tthrow new Error(\"cannot consume EOF\");\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"prev p=\"+p+\", c=\"+(char)data[p]);\r\n\t\tif (this.p < this.n) {\r\n\t\t\tthis.p++;\r\n\t\t\t//System.out.println(\"p moves to \"+p+\" (c='\"+(char)data[p]+\"')\");\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic LA(i: number): number {\r\n\t\tif (i === 0) {\r\n\t\t\treturn 0; // undefined\r\n\t\t}\r\n\t\tif (i < 0) {\r\n\t\t\ti++; // e.g., translate LA(-1) to use offset i=0; then data[p+0-1]\r\n\t\t\tif ((this.p + i - 1) < 0) {\r\n\t\t\t\treturn IntStream.EOF; // invalid; no char before first char\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((this.p + i - 1) >= this.n) {\r\n\t\t\t//System.out.println(\"char LA(\"+i+\")=EOF; p=\"+p);\r\n\t\t\treturn IntStream.EOF;\r\n\t\t}\r\n\t\t//System.out.println(\"char LA(\"+i+\")=\"+(char)data[p+i-1]+\"; p=\"+p);\r\n\t\t//System.out.println(\"LA(\"+i+\"); p=\"+p+\" n=\"+n+\" data.length=\"+data.length);\r\n\t\treturn this.data.charCodeAt(this.p + i - 1);\r\n\t}\r\n\r\n\tpublic LT(i: number): number {\r\n\t\treturn this.LA(i);\r\n\t}\r\n\r\n\t/** Return the current input symbol index 0..n where n indicates the\r\n\t * last symbol has been read. The index is the index of char to\r\n\t * be returned from LA(1).\r\n\t */\r\n\t@Override\r\n\tget index(): number {\r\n\t\treturn this.p;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.n;\r\n\t}\r\n\r\n\t/** mark/release do nothing; we have entire buffer */\r\n\t@Override\r\n\tpublic mark(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic release(marker: number): void {\r\n\t\t// No default implementation since this stream buffers the entire input\r\n\t}\r\n\r\n\t/** consume() ahead until p==index; can't just set p=index as we must\r\n\t * update line and charPositionInLine. If we seek backwards, just set p\r\n\t */\r\n\t@Override\r\n\tpublic seek(index: number): void {\r\n\t\tif (index <= this.p) {\r\n\t\t\tthis.p = index; // just jump; don't update stream state (line, ...)\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// seek forward, consume until p hits index or n (whichever comes first)\r\n\t\tindex = Math.min(index, this.n);\r\n\t\twhile (this.p < index) {\r\n\t\t\tthis.consume();\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getText(interval: Interval): string {\r\n\t\tlet start: number = interval.a;\r\n\t\tlet stop: number = interval.b;\r\n\t\tif (stop >= this.n) {\r\n\t\t\tstop = this.n - 1;\r\n\t\t}\r\n\t\tlet count: number = stop - start + 1;\r\n\t\tif (start >= this.n) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t// System.err.println(\"data: \"+Arrays.toString(data)+\", n=\"+n+\r\n\t\t// \t\t\t\t \", start=\"+start+\r\n\t\t// \t\t\t\t \", stop=\"+stop);\r\n\t\treturn this.data.substr(start, count);\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\tif (!this.name) {\r\n\t\t\treturn IntStream.UNKNOWN_SOURCE_NAME;\r\n\t\t}\r\n\t\treturn this.name;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString() { return this.data; }\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.4734328-07:00\r\n\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\n\r\nconst INITIAL_NUM_TRANSITIONS: number = 4;\r\n\r\n/**\r\n * The following images show the relation of states and\r\n * {@link ATNState#transitions} for various grammar constructs.\r\n *\r\n * * Solid edges marked with an ε indicate a required\r\n * {@link EpsilonTransition}.\r\n *\r\n * * Dashed edges indicate locations where any transition derived from\r\n * {@link Transition} might appear.\r\n *\r\n * * Dashed nodes are place holders for either a sequence of linked\r\n * {@link BasicState} states or the inclusion of a block representing a nested\r\n * construct in one of the forms below.\r\n *\r\n * * Nodes showing multiple outgoing alternatives with a `...` support\r\n * any number of alternatives (one or more). Nodes without the `...` only\r\n * support the exact number of alternatives shown in the diagram.\r\n *\r\n *

        Basic Blocks

        \r\n *\r\n *

        Rule

        \r\n *\r\n * \r\n *\r\n *

        Block of 1 or more alternatives

        \r\n *\r\n * \r\n *\r\n *

        Greedy Loops

        \r\n *\r\n *

        Greedy Closure: `(...)*`

        \r\n *\r\n * \r\n *\r\n *

        Greedy Positive Closure: `(...)+`

        \r\n *\r\n * \r\n *\r\n *

        Greedy Optional: `(...)?`

        \r\n *\r\n * \r\n *\r\n *

        Non-Greedy Loops

        \r\n *\r\n *

        Non-Greedy Closure: `(...)*?`

        \r\n *\r\n * \r\n *\r\n *

        Non-Greedy Positive Closure: `(...)+?`

        \r\n *\r\n * \r\n *\r\n *

        Non-Greedy Optional: `(...)??`

        \r\n *\r\n * \r\n */\r\nexport abstract class ATNState {\r\n\r\n\t/** Which ATN are we in? */\r\n\tpublic atn?: ATN;\r\n\r\n\tpublic stateNumber: number = ATNState.INVALID_STATE_NUMBER;\r\n\r\n\tpublic ruleIndex: number = 0; // at runtime, we don't have Rule objects\r\n\r\n\tpublic epsilonOnlyTransitions: boolean = false;\r\n\r\n\t/** Track the transitions emanating from this ATN state. */\r\n\tprotected transitions: Transition[] = [];\r\n\r\n\tprotected optimizedTransitions: Transition[] = this.transitions;\r\n\r\n\t/** Used to cache lookahead during parsing, not used during construction */\r\n\tpublic nextTokenWithinRule?: IntervalSet;\r\n\r\n\t/**\r\n\t * Gets the state number.\r\n\t *\r\n\t * @returns the state number\r\n\t */\r\n\tpublic getStateNumber(): number {\r\n\t\treturn this.stateNumber;\r\n\t}\r\n\r\n\t/**\r\n\t * For all states except {@link RuleStopState}, this returns the state\r\n\t * number. Returns -1 for stop states.\r\n\t *\r\n\t * @returns -1 for {@link RuleStopState}, otherwise the state number\r\n\t */\r\n\tget nonStopStateNumber(): number {\r\n\t\treturn this.getStateNumber();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.stateNumber;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\t// are these states same object?\r\n\t\tif (o instanceof ATNState) {\r\n\t\t\treturn this.stateNumber === o.stateNumber;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget isNonGreedyExitState(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn String(this.stateNumber);\r\n\t}\r\n\r\n\tpublic getTransitions(): Transition[] {\r\n\t\treturn this.transitions.slice(0);\r\n\t}\r\n\r\n\tget numberOfTransitions(): number {\r\n\t\treturn this.transitions.length;\r\n\t}\r\n\r\n\tpublic addTransition(e: Transition, index?: number): void {\r\n\t\tif (this.transitions.length === 0) {\r\n\t\t\tthis.epsilonOnlyTransitions = e.isEpsilon;\r\n\t\t}\r\n\t\telse if (this.epsilonOnlyTransitions !== e.isEpsilon) {\r\n\t\t\tthis.epsilonOnlyTransitions = false;\r\n\t\t\tthrow new Error(\"ATN state \" + this.stateNumber + \" has both epsilon and non-epsilon transitions.\");\r\n\t\t}\r\n\r\n\t\tthis.transitions.splice(index !== undefined ? index : this.transitions.length, 0, e);\r\n\t}\r\n\r\n\tpublic transition(i: number): Transition {\r\n\t\treturn this.transitions[i];\r\n\t}\r\n\r\n\tpublic setTransition(i: number, e: Transition): void {\r\n\t\tthis.transitions[i] = e;\r\n\t}\r\n\r\n\tpublic removeTransition(index: number): Transition {\r\n\t\treturn this.transitions.splice(index, 1)[0];\r\n\t}\r\n\r\n\tpublic abstract readonly stateType: ATNStateType;\r\n\r\n\tget onlyHasEpsilonTransitions(): boolean {\r\n\t\treturn this.epsilonOnlyTransitions;\r\n\t}\r\n\r\n\tpublic setRuleIndex(ruleIndex: number): void {\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\tget isOptimized(): boolean {\r\n\t\treturn this.optimizedTransitions !== this.transitions;\r\n\t}\r\n\r\n\tget numberOfOptimizedTransitions(): number {\r\n\t\treturn this.optimizedTransitions.length;\r\n\t}\r\n\r\n\tpublic getOptimizedTransition(i: number): Transition {\r\n\t\treturn this.optimizedTransitions[i];\r\n\t}\r\n\r\n\tpublic addOptimizedTransition(e: Transition): void {\r\n\t\tif (!this.isOptimized) {\r\n\t\t\tthis.optimizedTransitions = new Array();\r\n\t\t}\r\n\r\n\t\tthis.optimizedTransitions.push(e);\r\n\t}\r\n\r\n\tpublic setOptimizedTransition(i: number, e: Transition): void {\r\n\t\tif (!this.isOptimized) {\r\n\t\t\tthrow new Error(\"This ATNState is not optimized.\");\r\n\t\t}\r\n\r\n\t\tthis.optimizedTransitions[i] = e;\r\n\t}\r\n\r\n\tpublic removeOptimizedTransition(i: number): void {\r\n\t\tif (!this.isOptimized) {\r\n\t\t\tthrow new Error(\"This ATNState is not optimized.\");\r\n\t\t}\r\n\r\n\t\tthis.optimizedTransitions.splice(i, 1);\r\n\t}\r\n}\r\n\r\nexport namespace ATNState {\r\n\texport const INVALID_STATE_NUMBER: number = -1;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.4734328-07:00\r\n\r\nexport enum ATNStateType {\r\n\tINVALID_TYPE = 0,\r\n\tBASIC = 1,\r\n\tRULE_START = 2,\r\n\tBLOCK_START = 3,\r\n\tPLUS_BLOCK_START = 4,\r\n\tSTAR_BLOCK_START = 5,\r\n\tTOKEN_START = 6,\r\n\tRULE_STOP = 7,\r\n\tBLOCK_END = 8,\r\n\tSTAR_LOOP_BACK = 9,\r\n\tSTAR_LOOP_ENTRY = 10,\r\n\tPLUS_LOOP_BACK = 11,\r\n\tLOOP_END = 12,\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.0697674-07:00\r\nimport { CharStream } from \"./CharStream\";\r\nimport { IntervalSet } from \"./misc/IntervalSet\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { Token } from \"./Token\";\r\n\r\n\r\n/** The root of the ANTLR exception hierarchy. In general, ANTLR tracks just\r\n * 3 kinds of errors: prediction errors, failed predicate errors, and\r\n * mismatched input errors. In each case, the parser knows where it is\r\n * in the input, where it is in the ATN, the rule invocation stack,\r\n * and what kind of problem occurred.\r\n */\r\nexport class RecognitionException extends Error {\r\n\t// private static serialVersionUID: number = -3861826954750022374L;\r\n\r\n\t/** The {@link Recognizer} where this exception originated. */\r\n\tprivate _recognizer?: Recognizer;\r\n\r\n\tprivate ctx?: RuleContext;\r\n\r\n\tprivate input?: IntStream;\r\n\r\n\t/**\r\n\t * The current {@link Token} when an error occurred. Since not all streams\r\n\t * support accessing symbols by index, we have to track the {@link Token}\r\n\t * instance itself.\r\n\t */\r\n\tprivate offendingToken?: Token;\r\n\r\n\tprivate _offendingState: number = -1;\r\n\r\n\tconstructor(\r\n\t\tlexer: Lexer | undefined,\r\n\t\tinput: CharStream);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Recognizer | undefined,\r\n\t\tinput: IntStream | undefined,\r\n\t\tctx: ParserRuleContext | undefined);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Recognizer | undefined,\r\n\t\tinput: IntStream | undefined,\r\n\t\tctx: ParserRuleContext | undefined,\r\n\t\tmessage: string);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Lexer | Recognizer | undefined,\r\n\t\tinput: CharStream | IntStream | undefined,\r\n\t\tctx?: ParserRuleContext,\r\n\t\tmessage?: string) {\r\n\t\tsuper(message);\r\n\r\n\t\tthis._recognizer = recognizer;\r\n\t\tthis.input = input;\r\n\t\tthis.ctx = ctx;\r\n\t\tif (recognizer) {\r\n\t\t\tthis._offendingState = recognizer.state;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the ATN state number the parser was in at the time the error\r\n\t * occurred. For {@link NoViableAltException} and\r\n\t * {@link LexerNoViableAltException} exceptions, this is the\r\n\t * {@link DecisionState} number. For others, it is the state whose outgoing\r\n\t * edge we couldn't match.\r\n\t *\r\n\t * If the state number is not known, this method returns -1.\r\n\t */\r\n\tget offendingState(): number {\r\n\t\treturn this._offendingState;\r\n\t}\r\n\r\n\tprotected setOffendingState(offendingState: number): void {\r\n\t\tthis._offendingState = offendingState;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the set of input symbols which could potentially follow the\r\n\t * previously matched symbol at the time this exception was thrown.\r\n\t *\r\n\t * If the set of expected tokens is not known and could not be computed,\r\n\t * this method returns `undefined`.\r\n\t *\r\n\t * @returns The set of token types that could potentially follow the current\r\n\t * state in the ATN, or `undefined` if the information is not available.\r\n\t */\r\n\tget expectedTokens(): IntervalSet | undefined {\r\n\t\tif (this._recognizer) {\r\n\t\t\treturn this._recognizer.atn.getExpectedTokens(this._offendingState, this.ctx);\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the {@link RuleContext} at the time this exception was thrown.\r\n\t *\r\n\t * If the context is not available, this method returns `undefined`.\r\n\t *\r\n\t * @returns The {@link RuleContext} at the time this exception was thrown.\r\n\t * If the context is not available, this method returns `undefined`.\r\n\t */\r\n\tget context(): RuleContext | undefined {\r\n\t\treturn this.ctx;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the input stream which is the symbol source for the recognizer where\r\n\t * this exception was thrown.\r\n\t *\r\n\t * If the input stream is not available, this method returns `undefined`.\r\n\t *\r\n\t * @returns The input stream which is the symbol source for the recognizer\r\n\t * where this exception was thrown, or `undefined` if the stream is not\r\n\t * available.\r\n\t */\r\n\r\n\tget inputStream(): IntStream | undefined {\r\n\t\treturn this.input;\r\n\t}\r\n\r\n\tpublic getOffendingToken(recognizer?: Recognizer): Token | undefined {\r\n\t\tif (recognizer && recognizer !== this._recognizer) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\treturn this.offendingToken;\r\n\t}\r\n\r\n\tprotected setOffendingToken(\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingToken?: TSymbol): void {\r\n\t\tif (recognizer === this._recognizer) {\r\n\t\t\tthis.offendingToken = offendingToken;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the {@link Recognizer} where this exception occurred.\r\n\t *\r\n\t * If the recognizer is not available, this method returns `undefined`.\r\n\t *\r\n\t * @returns The recognizer where this exception occurred, or `undefined` if\r\n\t * the recognizer is not available.\r\n\t */\r\n\tget recognizer(): Recognizer | undefined {\r\n\t\treturn this._recognizer;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.8530496-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** An ATN transition between any two ATN states. Subclasses define\r\n * atom, set, epsilon, action, predicate, rule transitions.\r\n *\r\n * This is a one way link. It emanates from a state (usually via a list of\r\n * transitions) and has a target state.\r\n *\r\n * Since we never have to change the ATN transitions once we construct it,\r\n * we can fix these transitions as specific classes. The DFA transitions\r\n * on the other hand need to update the labels as it adds transitions to\r\n * the states. We'll use the term Edge for the DFA to distinguish them from\r\n * ATN transitions.\r\n */\r\nexport abstract class Transition {\r\n\tpublic static readonly serializationNames: string[] = [\r\n\t\t\"INVALID\",\r\n\t\t\"EPSILON\",\r\n\t\t\"RANGE\",\r\n\t\t\"RULE\",\r\n\t\t\"PREDICATE\",\r\n\t\t\"ATOM\",\r\n\t\t\"ACTION\",\r\n\t\t\"SET\",\r\n\t\t\"NOT_SET\",\r\n\t\t\"WILDCARD\",\r\n\t\t\"PRECEDENCE\",\r\n\t];\r\n\r\n\t// @SuppressWarnings(\"serial\")\r\n\t// static serializationTypes: Map, number> =\r\n\t// \tCollections.unmodifiableMap(new HashMap, Integer>() {{\r\n\t// \t\tput(EpsilonTransition.class, EPSILON);\r\n\t// \t\tput(RangeTransition.class, RANGE);\r\n\t// \t\tput(RuleTransition.class, RULE);\r\n\t// \t\tput(PredicateTransition.class, PREDICATE);\r\n\t// \t\tput(AtomTransition.class, ATOM);\r\n\t// \t\tput(ActionTransition.class, ACTION);\r\n\t// \t\tput(SetTransition.class, SET);\r\n\t// \t\tput(NotSetTransition.class, NOT_SET);\r\n\t// \t\tput(WildcardTransition.class, WILDCARD);\r\n\t// \t\tput(PrecedencePredicateTransition.class, PRECEDENCE);\r\n\t// \t}});\r\n\r\n\t/** The target of this transition. */\r\n\t@NotNull\r\n\tpublic target: ATNState;\r\n\r\n\tconstructor(@NotNull target: ATNState) {\r\n\t\tif (target == null) {\r\n\t\t\tthrow new Error(\"target cannot be null.\");\r\n\t\t}\r\n\r\n\t\tthis.target = target;\r\n\t}\r\n\r\n\tpublic abstract readonly serializationType: TransitionType;\r\n\r\n\t/**\r\n\t * Determines if the transition is an \"epsilon\" transition.\r\n\t *\r\n\t * The default implementation returns `false`.\r\n\t *\r\n\t * @returns `true` if traversing this transition in the ATN does not\r\n\t * consume an input symbol; otherwise, `false` if traversing this\r\n\t * transition consumes (matches) an input symbol.\r\n\t */\r\n\tget isEpsilon(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget label(): IntervalSet | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic abstract matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:24.6596177-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Transition } from \"./Transition\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport abstract class AbstractPredicateTransition extends Transition {\r\n\r\n\tconstructor(target: ATNState) {\r\n\t\tsuper(target);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:42.1239660-07:00\r\nimport { Equatable } from \"./Stubs\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport namespace MurmurHash {\r\n\r\n\tconst DEFAULT_SEED: number = 0;\r\n\r\n\t/**\r\n\t * Initialize the hash using the specified `seed`.\r\n\t *\r\n\t * @param seed the seed (optional)\r\n\t * @returns the intermediate hash value\r\n\t */\r\n\texport function initialize(seed: number = DEFAULT_SEED): number {\r\n\t\treturn seed;\r\n\t}\r\n\r\n\t/**\r\n\t * Update the intermediate hash value for the next input `value`.\r\n\t *\r\n\t * @param hash the intermediate hash value\r\n\t * @param value the value to add to the current hash\r\n\t * @returns the updated intermediate hash value\r\n\t */\r\n\texport function update(hash: number, value: number | string | Equatable | null | undefined): number {\r\n\t\tconst c1: number = 0xCC9E2D51;\r\n\t\tconst c2: number = 0x1B873593;\r\n\t\tconst r1: number = 15;\r\n\t\tconst r2: number = 13;\r\n\t\tconst m: number = 5;\r\n\t\tconst n: number = 0xE6546B64;\r\n\r\n\t\tif (value == null) {\r\n\t\t\tvalue = 0;\r\n\t\t} else if (typeof value === \"string\") {\r\n\t\t\tvalue = hashString(value);\r\n\t\t} else if (typeof value === \"object\") {\r\n\t\t\tvalue = value.hashCode();\r\n\t\t}\r\n\r\n\t\tlet k: number = value;\r\n\t\tk = Math.imul(k, c1);\r\n\t\tk = (k << r1) | (k >>> (32 - r1));\r\n\t\tk = Math.imul(k, c2);\r\n\r\n\t\thash = hash ^ k;\r\n\t\thash = (hash << r2) | (hash >>> (32 - r2));\r\n\t\thash = Math.imul(hash, m) + n;\r\n\r\n\t\treturn hash & 0xFFFFFFFF;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Apply the final computation steps to the intermediate value `hash`\r\n\t * to form the final result of the MurmurHash 3 hash function.\r\n\t *\r\n\t * @param hash the intermediate hash value\r\n\t * @param numberOfWords the number of integer values added to the hash\r\n\t * @returns the final hash result\r\n\t */\r\n\texport function finish(hash: number, numberOfWords: number): number {\r\n\t\thash = hash ^ (numberOfWords * 4);\r\n\t\thash = hash ^ (hash >>> 16);\r\n\t\thash = Math.imul(hash, 0x85EBCA6B);\r\n\t\thash = hash ^ (hash >>> 13);\r\n\t\thash = Math.imul(hash, 0xC2B2AE35);\r\n\t\thash = hash ^ (hash >>> 16);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Utility function to compute the hash code of an array using the\r\n\t * MurmurHash algorithm.\r\n\t *\r\n\t * @param the array element type\r\n\t * @param data the array data\r\n\t * @param seed the seed for the MurmurHash algorithm\r\n\t * @returns the hash code of the data\r\n\t */\r\n\texport function hashCode(data: Iterable, seed: number = DEFAULT_SEED): number {\r\n\t\tlet hash: number = initialize(seed);\r\n\t\tlet length = 0;\r\n\t\tfor (let value of data) {\r\n\t\t\thash = update(hash, value);\r\n\t\t\tlength++;\r\n\t\t}\r\n\r\n\t\thash = finish(hash, length);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Function to hash a string. Based on the implementation found here:\r\n\t * http://stackoverflow.com/a/7616484\r\n\t */\r\n\tfunction hashString(str: string): number {\r\n\t\tlet len = str.length;\r\n\t\tif (len === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tlet hash = 0;\r\n\t\tfor (let i = 0; i < len; i++) {\r\n\t\t\tlet c = str.charCodeAt(i);\r\n\t\t\thash = (((hash << 5) >>> 0) - hash) + c;\r\n\t\t\thash |= 0;\r\n\t\t}\r\n\r\n\t\treturn hash;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:42.2127260-07:00\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\n\r\n/**\r\n * This default implementation of {@link EqualityComparator} uses object equality\r\n * for comparisons by calling {@link Object#hashCode} and {@link Object#equals}.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ObjectEqualityComparator implements EqualityComparator {\r\n\tpublic static readonly INSTANCE: ObjectEqualityComparator = new ObjectEqualityComparator();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation returns\r\n\t * `obj.`{@link Object#hashCode hashCode()}.\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(obj: Equatable | null | undefined): number {\r\n\t\tif (obj == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn obj.hashCode();\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation relies on object equality. If both objects are\r\n\t * `undefined` or `null`, this method returns `true`. Otherwise if only\r\n\t * `a` is `undefined` or `null`, this method returns `false`. Otherwise,\r\n\t * this method returns the result of\r\n\t * `a.`{@link Object#equals equals}`(b)`.\r\n\t */\r\n\t@Override\r\n\tpublic equals(a: Equatable | null | undefined, b: Equatable | null | undefined): boolean {\r\n\t\tif (a == null) {\r\n\t\t\treturn b == null;\r\n\t\t}\r\n\r\n\t\treturn a.equals(b);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\nimport { ObjectEqualityComparator } from \"./ObjectEqualityComparator\";\r\n\r\n/**\r\n * This default implementation of {@link EqualityComparator} uses object equality\r\n * for comparisons by calling {@link Object#hashCode} and {@link Object#equals}.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class DefaultEqualityComparator implements EqualityComparator {\r\n\tpublic static readonly INSTANCE: DefaultEqualityComparator = new DefaultEqualityComparator();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation returns\r\n\t * `obj.`{@link Object#hashCode hashCode()}.\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(obj: any): number {\r\n\t\tif (obj == null) {\r\n\t\t\treturn 0;\r\n\t\t} else if (typeof obj === \"string\" || typeof obj === \"number\") {\r\n\t\t\treturn MurmurHash.hashCode([obj]);\r\n\t\t} else {\r\n\t\t\treturn ObjectEqualityComparator.INSTANCE.hashCode(obj as Equatable);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation relies on object equality. If both objects are\r\n\t * `undefined` or `null`, this method returns `true`. Otherwise if only\r\n\t * `a` is `undefined` or `null`, this method returns `false`. Otherwise,\r\n\t * this method returns the result of\r\n\t * `a.`{@link Object#equals equals}`(b)`.\r\n\t */\r\n\t@Override\r\n\tpublic equals(a: any, b: any): boolean {\r\n\t\tif (a == null) {\r\n\t\t\treturn b == null;\r\n\t\t} else if (typeof a === \"string\" || typeof a === \"number\") {\r\n\t\t\treturn a === b;\r\n\t\t} else {\r\n\t\t\treturn ObjectEqualityComparator.INSTANCE.equals(a as Equatable, b as Equatable);\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:41.7434086-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport { DefaultEqualityComparator } from \"./DefaultEqualityComparator\";\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { NotNull, Nullable, Override, SuppressWarnings } from \"../Decorators\";\r\nimport { JavaCollection, JavaSet } from \"./Stubs\";\r\nimport { ObjectEqualityComparator } from \"./ObjectEqualityComparator\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\n\r\n/** {@link Set} implementation with closed hashing (open addressing). */\r\n\r\n// NOTE: JavaScript's Set interface has a significant difference from Java's:\r\n// \t\t e.g. the return type of add() differs!\r\n// For this reason I've commented tweaked the implements clause\r\n\r\nconst INITAL_CAPACITY: number = 16; // must be power of 2\r\nconst LOAD_FACTOR: number = 0.75;\r\n\r\nexport class Array2DHashSet implements JavaSet {\r\n\t@NotNull\r\n\tprotected comparator: EqualityComparator;\r\n\r\n\tprotected buckets: Array;\r\n\r\n\t/** How many elements in set */\r\n\tprotected n: number = 0;\r\n\r\n\tprotected threshold: number = Math.floor(INITAL_CAPACITY * LOAD_FACTOR); // when to expand\r\n\r\n\tconstructor(comparator?: EqualityComparator, initialCapacity?: number);\r\n\tconstructor(set: Array2DHashSet);\r\n\tconstructor(\r\n\t\tcomparatorOrSet?: EqualityComparator | Array2DHashSet,\r\n\t\tinitialCapacity: number = INITAL_CAPACITY) {\r\n\r\n\t\tif (comparatorOrSet instanceof Array2DHashSet) {\r\n\t\t\tthis.comparator = comparatorOrSet.comparator;\r\n\t\t\tthis.buckets = comparatorOrSet.buckets.slice(0);\r\n\t\t\tfor (let i = 0; i < this.buckets.length; i++) {\r\n\t\t\t\tlet bucket = this.buckets[i];\r\n\t\t\t\tif (bucket) {\r\n\t\t\t\t\tthis.buckets[i] = bucket.slice(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.n = comparatorOrSet.n;\r\n\t\t\tthis.threshold = comparatorOrSet.threshold;\r\n\t\t} else {\r\n\t\t\tthis.comparator = comparatorOrSet || DefaultEqualityComparator.INSTANCE;\r\n\t\t\tthis.buckets = this.createBuckets(initialCapacity);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Add `o` to set if not there; return existing value if already\r\n\t * there. This method performs the same operation as {@link #add} aside from\r\n\t * the return value.\r\n\t */\r\n\tpublic getOrAdd(o: T): T {\r\n\t\tif (this.n > this.threshold) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\t\treturn this.getOrAddImpl(o);\r\n\t}\r\n\r\n\tprotected getOrAddImpl(o: T): T {\r\n\t\tlet b: number = this.getBucket(o);\r\n\t\tlet bucket = this.buckets[b];\r\n\r\n\t\t// NEW BUCKET\r\n\t\tif (!bucket) {\r\n\t\t\tbucket = [o];\r\n\t\t\tthis.buckets[b] = bucket;\r\n\t\t\tthis.n++;\r\n\t\t\treturn o;\r\n\t\t}\r\n\r\n\t\t// LOOK FOR IT IN BUCKET\r\n\t\tfor (let existing of bucket) {\r\n\t\t\tif (this.comparator.equals(existing, o)) {\r\n\t\t\t\treturn existing; // found existing, quit\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// FULL BUCKET, expand and add to end\r\n\t\tbucket.push(o);\r\n\t\tthis.n++;\r\n\t\treturn o;\r\n\t}\r\n\r\n\tpublic get(o: T): T | undefined {\r\n\t\tif (o == null) {\r\n\t\t\treturn o;\r\n\t\t}\r\n\t\tlet b: number = this.getBucket(o);\r\n\t\tlet bucket = this.buckets[b];\r\n\t\tif (!bucket) {\r\n\t\t\t// no bucket\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tfor (let e of bucket) {\r\n\t\t\tif (this.comparator.equals(e, o)) {\r\n\t\t\t\treturn e;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tprotected getBucket(o: T): number {\r\n\t\tlet hash: number = this.comparator.hashCode(o);\r\n\t\tlet b: number = hash & (this.buckets.length - 1); // assumes len is power of 2\r\n\t\treturn b;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\thash = MurmurHash.update(hash, this.comparator.hashCode(o));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thash = MurmurHash.finish(hash, this.size);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (!(o instanceof Array2DHashSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (o.size !== this.size) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tlet same: boolean = this.containsAll(o);\r\n\t\treturn same;\r\n\t}\r\n\r\n\tprotected expand(): void {\r\n\t\tlet old = this.buckets;\r\n\t\tlet newCapacity: number = this.buckets.length * 2;\r\n\t\tlet newTable: Array = this.createBuckets(newCapacity);\r\n\t\tthis.buckets = newTable;\r\n\t\tthis.threshold = Math.floor(newCapacity * LOAD_FACTOR);\r\n//\t\tSystem.out.println(\"new size=\"+newCapacity+\", thres=\"+threshold);\r\n\t\t// rehash all existing entries\r\n\t\tlet oldSize: number = this.size;\r\n\t\tfor (let bucket of old) {\r\n\t\t\tif (!bucket) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tlet b: number = this.getBucket(o);\r\n\t\t\t\tlet newBucket: T[] | undefined = this.buckets[b];\r\n\t\t\t\tif (!newBucket) {\r\n\t\t\t\t\tnewBucket = [];\r\n\t\t\t\t\tthis.buckets[b] = newBucket;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnewBucket.push(o);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tassert(this.n === oldSize);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic add(t: T): boolean {\r\n\t\tlet existing: T = this.getOrAdd(t);\r\n\t\treturn existing === t;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.n;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.n === 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic contains(o: any): boolean {\r\n\t\treturn this.containsFast(this.asElementType(o));\r\n\t}\r\n\r\n\tpublic containsFast(@Nullable obj: T): boolean {\r\n\t\tif (obj == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.get(obj) != null;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic *[Symbol.iterator](): IterableIterator {\r\n\t\tyield* this.toArray();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toArray(): T[] {\r\n\t\tconst a = new Array(this.size);\r\n\r\n\t\t// Copy elements from the nested arrays into the destination array\r\n\t\tlet i: number = 0; // Position within destination array\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\ta[i++] = o;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn a;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic containsAll(collection: JavaCollection): boolean {\r\n\t\tif (collection instanceof Array2DHashSet) {\r\n\t\t\tlet s = collection as any as Array2DHashSet;\r\n\t\t\tfor (let bucket of s.buckets) {\r\n\t\t\t\tif (bucket == null) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfor (let o of bucket) {\r\n\t\t\t\t\tif (o == null) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!this.containsFast(this.asElementType(o))) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (let o of collection) {\r\n\t\t\t\tif (!this.containsFast(this.asElementType(o))) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic addAll(c: Iterable): boolean {\r\n\t\tlet changed: boolean = false;\r\n\r\n\t\tfor (let o of c) {\r\n\t\t\tlet existing: T = this.getOrAdd(o);\r\n\t\t\tif (existing !== o) {\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clear(): void {\r\n\t\tthis.buckets = this.createBuckets(INITAL_CAPACITY);\r\n\t\tthis.n = 0;\r\n\t\tthis.threshold = Math.floor(INITAL_CAPACITY * LOAD_FACTOR);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (this.size === 0) {\r\n\t\t\treturn \"{}\";\r\n\t\t}\r\n\r\n\t\tlet buf = \"{\";\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (first) {\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += \", \";\r\n\t\t\t\t}\r\n\t\t\t\tbuf += o.toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\tbuf += \"}\";\r\n\t\treturn buf;\r\n\t}\r\n\r\n\tpublic toTableString(): string {\r\n\t\tlet buf = \"\";\r\n\t\tfor (let bucket of this.buckets) {\r\n\t\t\tif (bucket == null) {\r\n\t\t\t\tbuf += \"null\\n\";\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tbuf += \"[\";\r\n\t\t\tlet first: boolean = true;\r\n\t\t\tfor (let o of bucket) {\r\n\t\t\t\tif (first) {\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tif (o == null) {\r\n\t\t\t\t\tbuf += \"_\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += o.toString();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbuf += \"]\\n\";\r\n\t\t}\r\n\t\treturn buf;\r\n\t}\r\n\r\n\t/**\r\n\t * Return `o` as an instance of the element type `T`. If\r\n\t * `o` is non-undefined but known to not be an instance of `T`, this\r\n\t * method returns `undefined`. The base implementation does not perform any\r\n\t * type checks; override this method to provide strong type checks for the\r\n\t * {@link #contains} and {@link #remove} methods to ensure the arguments to\r\n\t * the {@link EqualityComparator} for the set always have the expected\r\n\t * types.\r\n\t *\r\n\t * @param o the object to try and cast to the element type of the set\r\n\t * @returns `o` if it could be an instance of `T`, otherwise\r\n\t * `undefined`.\r\n\t */\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tprotected asElementType(o: any): T {\r\n\t\treturn o as T;\r\n\t}\r\n\r\n\t/**\r\n\t * Return an array of `T[]` with length `capacity`.\r\n\t *\r\n\t * @param capacity the length of the array to return\r\n\t * @returns the newly constructed array\r\n\t */\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tprotected createBuckets(capacity: number): Array {\r\n\t\treturn new Array(capacity);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-03T02:09:42.2127260-07:00\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\nimport { ObjectEqualityComparator } from \"./ObjectEqualityComparator\";\r\n\r\n/**\r\n * This default implementation of {@link EqualityComparator} uses object equality\r\n * for comparisons by calling {@link Object#hashCode} and {@link Object#equals}.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ArrayEqualityComparator implements EqualityComparator {\r\n\tpublic static readonly INSTANCE: ArrayEqualityComparator = new ArrayEqualityComparator();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation returns\r\n\t * `obj.`{@link Object#hashCode hashCode()}.\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(obj: Equatable[]): number {\r\n\t\tif (obj == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn MurmurHash.hashCode(obj, 0);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation relies on object equality. If both objects are\r\n\t * `undefined`, this method returns `true`. Otherwise if only\r\n\t * `a` is `undefined`, this method returns `false`. Otherwise,\r\n\t * this method returns the result of\r\n\t * `a.`{@link Object#equals equals}`(b)`.\r\n\t */\r\n\t@Override\r\n\tpublic equals(a: Equatable[], b: Equatable[]): boolean {\r\n\t\tif (a == null) {\r\n\t\t\treturn b == null;\r\n\t\t} else if (b == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (a.length !== b.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < a.length; i++) {\r\n\t\t\tif (!ObjectEqualityComparator.INSTANCE.equals(a[i], b[i])) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:45.0833752-07:00\r\n\r\n// Taking a case-by-case approach to pporting this functionality\r\n// as much of it may be supported natively by JavaScript. Or otherwise need\r\n// substantial rethink\r\n\r\nimport { NotNull } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\nimport { IntegerList } from \"./IntegerList\";\r\n\r\nexport function escapeWhitespace(s: string, escapeSpaces: boolean): string {\r\n\treturn escapeSpaces ? s.replace(/ /, \"\\u00B7\") : s\r\n\t\t.replace(/\\t/, \"\\\\t\")\r\n\t\t.replace(/\\n/, \"\\\\n\")\r\n\t\t.replace(/\\r/, \"\\\\r\");\r\n}\r\n\r\n// Seriously: why isn't this built in to java? ugh!\r\nexport function join(collection: Iterable, separator: string): string {\r\n\tlet buf = \"\";\r\n\tlet first = true;\r\n\tfor (let current of collection) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t} else {\r\n\t\t\tbuf += separator;\r\n\t\t}\r\n\r\n\t\tbuf += current;\r\n\t}\r\n\r\n\treturn buf;\r\n}\r\n\r\nexport function equals(x: Equatable | undefined, y: Equatable | undefined): boolean {\r\n\tif (x === y) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tif (x === undefined || y === undefined) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn x.equals(y);\r\n}\r\n\r\n// export function numNonnull(data: any[]): number {\r\n// \tlet n: number = 0;\r\n// \tif ( data == null ) return n;\r\n// \tfor (let o of data) {\r\n// \t\tif ( o!=null ) n++;\r\n// \t}\r\n// \treturn n;\r\n// }\r\n\r\n// export function removeAllElements(data: Collection, value: T): void {\r\n// \tif ( data==null ) return;\r\n// \twhile ( data.contains(value) ) data.remove(value);\r\n// }\r\n\r\n// export function writeFile(@NotNull file: File, @NotNull content: Uint8Array): void {\r\n// \tlet fos: FileOutputStream = new FileOutputStream(file);\r\n// \ttry {\r\n// \t\tfos.write(content);\r\n// \t} finally {\r\n// \t\tfos.close();\r\n// \t}\r\n// }\r\n\r\n// export function writeFile(@NotNull fileName: string, @NotNull content: string): void {\r\n// \twriteFile(fileName, content, null);\r\n// }\r\n\r\n// export function writeFile(@NotNull fileName: string, @NotNull content: string, @Nullable encoding: string): void {\r\n// \tlet f: File = new File(fileName);\r\n// \tlet fos: FileOutputStream = new FileOutputStream(f);\r\n// \tlet osw: OutputStreamWriter;\r\n// \tif (encoding != null) {\r\n// \t\tosw = new OutputStreamWriter(fos, encoding);\r\n// \t}\r\n// \telse {\r\n// \t\tosw = new OutputStreamWriter(fos);\r\n// \t}\r\n\r\n// \ttry {\r\n// \t\tosw.write(content);\r\n// \t}\r\n// \tfinally {\r\n// \t\tosw.close();\r\n// \t}\r\n// }\r\n\r\n// @NotNull\r\n// export function readFile(@NotNull fileName: string): char[] {\r\n// \treturn readFile(fileName, null);\r\n// }\r\n\r\n// @NotNull\r\n// export function readFile(@NotNull fileName: string, @Nullable encoding: string): char[] {\r\n// \tlet f: File = new File(fileName);\r\n// \tlet size: number = (int)f.length();\r\n// \tlet isr: InputStreamReader;\r\n// \tlet fis: FileInputStream = new FileInputStream(fileName);\r\n// \tif ( encoding!=null ) {\r\n// \t\tisr = new InputStreamReader(fis, encoding);\r\n// \t}\r\n// \telse {\r\n// \t\tisr = new InputStreamReader(fis);\r\n// \t}\r\n// \tlet data: char[] = null;\r\n// \ttry {\r\n// \t\tdata = new char[size];\r\n// \t\tlet n: number = isr.read(data);\r\n// \t\tif (n < data.length) {\r\n// \t\t\tdata = Arrays.copyOf(data, n);\r\n// \t\t}\r\n// \t}\r\n// \tfinally {\r\n// \t\tisr.close();\r\n// \t}\r\n// \treturn data;\r\n// }\r\n\r\n// export function removeAll(@NotNull predicate: List list,@NotNull Predicate): void {\r\n// \tlet j: number = 0;\r\n// \tfor (let i = 0; i < list.size; i++) {\r\n// \t\tlet item: T = list.get(i);\r\n// \t\tif (!predicate.eval(item)) {\r\n// \t\t\tif (j != i) {\r\n// \t\t\t\tlist.set(j, item);\r\n// \t\t\t}\r\n\r\n// \t\t\tj++;\r\n// \t\t}\r\n// \t}\r\n\r\n// \tif (j < list.size) {\r\n// \t\tlist.subList(j, list.size).clear();\r\n// \t}\r\n// }\r\n\r\n// export function removeAll(@NotNull predicate: Iterable iterable,@NotNull Predicate): void {\r\n// \tif (iterable instanceof List) {\r\n// \t\tremoveAll((List)iterable, predicate);\r\n// \t\treturn;\r\n// \t}\r\n\r\n// \tfor (Iterator iterator = iterable.iterator(); iterator.hasNext(); ) {\r\n// \t\tlet item: T = iterator.next();\r\n// \t\tif (predicate.eval(item)) {\r\n// \t\t\titerator.remove();\r\n// \t\t}\r\n// \t}\r\n// }\r\n\r\n/** Convert array of strings to string→index map. Useful for\r\n * converting rulenames to name→ruleindex map.\r\n */\r\nexport function toMap(keys: string[]): Map {\r\n\tlet m: Map = new Map();\r\n\tfor (let i = 0; i < keys.length; i++) {\r\n\t\tm.set(keys[i], i);\r\n\t}\r\n\r\n\treturn m;\r\n}\r\n\r\nexport function toCharArray(str: string): Uint16Array;\r\nexport function toCharArray(data: IntegerList): Uint16Array;\r\nexport function toCharArray(str: string | IntegerList): Uint16Array {\r\n\tif (typeof str === \"string\") {\r\n\t\tlet result = new Uint16Array(str.length);\r\n\t\tfor (let i = 0; i < str.length; i++) {\r\n\t\t\tresult[i] = str.charCodeAt(i);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t} else {\r\n\t\treturn str.toCharArray();\r\n\t}\r\n}\r\n\r\n// /**\r\n// \t* @since 4.5\r\n// \t*/\r\n// @NotNull\r\n// export function toSet(@NotNull bits: BitSet): IntervalSet {\r\n// \tlet s: IntervalSet = new IntervalSet();\r\n// \tlet i: number = bits.nextSetBit(0);\r\n// \twhile ( i >= 0 ) {\r\n// \t\ts.add(i);\r\n// \t\ti = bits.nextSetBit(i+1);\r\n// \t}\r\n// \treturn s;\r\n// }\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.9521478-07:00\r\n\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ArrayEqualityComparator } from \"../misc/ArrayEqualityComparator\";\r\nimport { Comparable } from \"../misc/Stubs\";\r\nimport { Equatable } from \"../misc/Stubs\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\nfunction max>(items: Iterable): T | undefined {\r\n\tlet result: T | undefined;\r\n\tfor (let current of items) {\r\n\t\tif (result === undefined) {\r\n\t\t\tresult = current;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tlet comparison = result.compareTo(current);\r\n\t\tif (comparison < 0) {\r\n\t\t\tresult = current;\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\nfunction min>(items: Iterable): T | undefined {\r\n\tlet result: T | undefined;\r\n\tfor (let current of items) {\r\n\t\tif (result === undefined) {\r\n\t\t\tresult = current;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tlet comparison = result.compareTo(current);\r\n\t\tif (comparison > 0) {\r\n\t\t\tresult = current;\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\n/** A tree structure used to record the semantic context in which\r\n * an ATN configuration is valid. It's either a single predicate,\r\n * a conjunction `p1&&p2`, or a sum of products `p1||p2`.\r\n *\r\n * I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of\r\n * {@link SemanticContext} within the scope of this outer class.\r\n */\r\nexport abstract class SemanticContext implements Equatable {\r\n\tprivate static _NONE: SemanticContext;\r\n\r\n\t/**\r\n\t * The default {@link SemanticContext}, which is semantically equivalent to\r\n\t * a predicate of the form `{true}?`.\r\n\t */\r\n\tstatic get NONE(): SemanticContext {\r\n\t\tif (SemanticContext._NONE === undefined) {\r\n\t\t\tSemanticContext._NONE = new SemanticContext.Predicate();\r\n\t\t}\r\n\r\n\t\treturn SemanticContext._NONE;\r\n\t}\r\n\r\n\t/**\r\n\t * For context independent predicates, we evaluate them without a local\r\n\t * context (i.e., unedfined context). That way, we can evaluate them without\r\n\t * having to create proper rule-specific context during prediction (as\r\n\t * opposed to the parser, which creates them naturally). In a practical\r\n\t * sense, this avoids a cast exception from RuleContext to myruleContext.\r\n\t *\r\n\t * For context dependent predicates, we must pass in a local context so that\r\n\t * references such as $arg evaluate properly as _localctx.arg. We only\r\n\t * capture context dependent predicates in the context in which we begin\r\n\t * prediction, so we passed in the outer context here in case of context\r\n\t * dependent predicate evaluation.\r\n\t */\r\n\tpublic abstract eval(parser: Recognizer, parserCallStack: RuleContext): boolean;\r\n\r\n\t/**\r\n\t * Evaluate the precedence predicates for the context and reduce the result.\r\n\t *\r\n\t * @param parser The parser instance.\r\n\t * @param parserCallStack\r\n\t * @returns The simplified semantic context after precedence predicates are\r\n\t * evaluated, which will be one of the following values.\r\n\t *\r\n\t * * {@link #NONE}: if the predicate simplifies to `true` after\r\n\t * precedence predicates are evaluated.\r\n\t * * `undefined`: if the predicate simplifies to `false` after\r\n\t * precedence predicates are evaluated.\r\n\t * * `this`: if the semantic context is not changed as a result of\r\n\t * precedence predicate evaluation.\r\n\t * * A non-`undefined` {@link SemanticContext}: the new simplified\r\n\t * semantic context after precedence predicates are evaluated.\r\n\t */\r\n\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\treturn this;\r\n\t}\r\n\r\n\tpublic abstract hashCode(): number;\r\n\r\n\tpublic abstract equals(obj: any): boolean;\r\n\r\n\tpublic static and(a: SemanticContext | undefined, b: SemanticContext): SemanticContext {\r\n\t\tif (!a || a === SemanticContext.NONE) {\r\n\t\t\treturn b;\r\n\t\t}\r\n\t\tif (b === SemanticContext.NONE) {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t\tlet result: SemanticContext.AND = new SemanticContext.AND(a, b);\r\n\t\tif (result.opnds.length === 1) {\r\n\t\t\treturn result.opnds[0];\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @see ParserATNSimulator#getPredsForAmbigAlts\r\n\t */\r\n\tpublic static or(a: SemanticContext | undefined, b: SemanticContext): SemanticContext {\r\n\t\tif (!a) {\r\n\t\t\treturn b;\r\n\t\t}\r\n\r\n\t\tif (a === SemanticContext.NONE || b === SemanticContext.NONE) {\r\n\t\t\treturn SemanticContext.NONE;\r\n\t\t}\r\n\t\tlet result: SemanticContext.OR = new SemanticContext.OR(a, b);\r\n\t\tif (result.opnds.length === 1) {\r\n\t\t\treturn result.opnds[0];\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n\r\nexport namespace SemanticContext {\r\n\t/**\r\n\t * This random 30-bit prime represents the value of `AND.class.hashCode()`.\r\n\t */\r\n\tconst AND_HASHCODE = 40363613;\r\n\t/**\r\n\t * This random 30-bit prime represents the value of `OR.class.hashCode()`.\r\n\t */\r\n\tconst OR_HASHCODE = 486279973;\r\n\r\n\tfunction filterPrecedencePredicates(collection: SemanticContext[]): SemanticContext.PrecedencePredicate[] {\r\n\t\tlet result: SemanticContext.PrecedencePredicate[] = [];\r\n\t\tfor (let i = 0; i < collection.length; i++) {\r\n\t\t\tlet context: SemanticContext = collection[i];\r\n\t\t\tif (context instanceof SemanticContext.PrecedencePredicate) {\r\n\t\t\t\tresult.push(context);\r\n\r\n\t\t\t\t// Remove the item from 'collection' and move i back so we look at the same index again\r\n\t\t\t\tcollection.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\texport class Predicate extends SemanticContext {\r\n\t\tpublic ruleIndex: number;\r\n\t\tpublic predIndex: number;\r\n\t\tpublic isCtxDependent: boolean; // e.g., $i ref in pred\r\n\r\n\t\tconstructor();\r\n\t\tconstructor(ruleIndex: number, predIndex: number, isCtxDependent: boolean);\r\n\r\n\t\tconstructor(ruleIndex: number = -1, predIndex: number = -1, isCtxDependent: boolean = false) {\r\n\t\t\tsuper();\r\n\t\t\tthis.ruleIndex = ruleIndex;\r\n\t\t\tthis.predIndex = predIndex;\r\n\t\t\tthis.isCtxDependent = isCtxDependent;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\tlet localctx: RuleContext | undefined = this.isCtxDependent ? parserCallStack : undefined;\r\n\t\t\treturn parser.sempred(localctx, this.ruleIndex, this.predIndex);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\tlet hashCode: number = MurmurHash.initialize();\r\n\t\t\thashCode = MurmurHash.update(hashCode, this.ruleIndex);\r\n\t\t\thashCode = MurmurHash.update(hashCode, this.predIndex);\r\n\t\t\thashCode = MurmurHash.update(hashCode, this.isCtxDependent ? 1 : 0);\r\n\t\t\thashCode = MurmurHash.finish(hashCode, 3);\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (!(obj instanceof Predicate)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn this.ruleIndex === obj.ruleIndex &&\r\n\t\t\t\tthis.predIndex === obj.predIndex &&\r\n\t\t\t\tthis.isCtxDependent === obj.isCtxDependent;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn \"{\" + this.ruleIndex + \":\" + this.predIndex + \"}?\";\r\n\t\t}\r\n\t}\r\n\r\n\texport class PrecedencePredicate extends SemanticContext implements Comparable {\r\n\t\tpublic precedence: number;\r\n\r\n\t\tconstructor(precedence: number) {\r\n\t\t\tsuper();\r\n\t\t\tthis.precedence = precedence;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\treturn parser.precpred(parserCallStack, this.precedence);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\t\tif (parser.precpred(parserCallStack, this.precedence)) {\r\n\t\t\t\treturn SemanticContext.NONE;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic compareTo(o: PrecedencePredicate): number {\r\n\t\t\treturn this.precedence - o.precedence;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\tlet hashCode: number = 1;\r\n\t\t\thashCode = 31 * hashCode + this.precedence;\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (!(obj instanceof PrecedencePredicate)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\treturn this.precedence === obj.precedence;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\t// precedence >= _precedenceStack.peek()\r\n\t\tpublic toString(): string {\r\n\t\t\treturn \"{\" + this.precedence + \">=prec}?\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This is the base class for semantic context \"operators\", which operate on\r\n\t * a collection of semantic context \"operands\".\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\texport abstract class Operator extends SemanticContext {\r\n\t\t/**\r\n\t\t * Gets the operands for the semantic context operator.\r\n\t\t *\r\n\t\t * @returns a collection of {@link SemanticContext} operands for the\r\n\t\t * operator.\r\n\t\t *\r\n\t\t * @since 4.3\r\n\t\t */\r\n\t\t// @NotNull\r\n\t\tpublic abstract readonly operands: Iterable;\r\n\t}\r\n\r\n\t/**\r\n\t * A semantic context which is true whenever none of the contained contexts\r\n\t * is false.\r\n\t */\r\n\texport class AND extends Operator {\r\n\t\tpublic opnds: SemanticContext[];\r\n\r\n\t\tconstructor(@NotNull a: SemanticContext, @NotNull b: SemanticContext) {\r\n\t\t\tsuper();\r\n\r\n\t\t\tlet operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\t\tif (a instanceof AND) {\r\n\t\t\t\toperands.addAll(a.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(a);\r\n\t\t\t}\r\n\r\n\t\t\tif (b instanceof AND) {\r\n\t\t\t\toperands.addAll(b.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(b);\r\n\t\t\t}\r\n\r\n\t\t\tthis.opnds = operands.toArray();\r\n\t\t\tlet precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds);\r\n\r\n\t\t\t// interested in the transition with the lowest precedence\r\n\t\t\tlet reduced = min(precedencePredicates);\r\n\t\t\tif (reduced) {\r\n\t\t\t\tthis.opnds.push(reduced);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tget operands(): Iterable {\r\n\t\t\treturn this.opnds;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif (!(obj instanceof AND)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn ArrayEqualityComparator.INSTANCE.equals(this.opnds, obj.opnds);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\treturn MurmurHash.hashCode(this.opnds, AND_HASHCODE);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * {@inheritDoc}\r\n\t\t *\r\n\t\t * The evaluation of predicates by this context is short-circuiting, but\r\n\t\t * unordered.\r\n\t\t */\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\tfor (let opnd of this.opnds) {\r\n\t\t\t\tif (!opnd.eval(parser, parserCallStack)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\t\tlet differs: boolean = false;\r\n\t\t\tlet operands: SemanticContext[] = [];\r\n\t\t\tfor (let context of this.opnds) {\r\n\t\t\t\tlet evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack);\r\n\t\t\t\tdiffers = differs || (evaluated !== context);\r\n\t\t\t\tif (evaluated == null) {\r\n\t\t\t\t\t// The AND context is false if any element is false\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\t\t\t\telse if (evaluated !== SemanticContext.NONE) {\r\n\t\t\t\t\t// Reduce the result by skipping true elements\r\n\t\t\t\t\toperands.push(evaluated);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!differs) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\r\n\t\t\tif (operands.length === 0) {\r\n\t\t\t\t// all elements were true, so the AND context is true\r\n\t\t\t\treturn SemanticContext.NONE;\r\n\t\t\t}\r\n\r\n\t\t\tlet result: SemanticContext = operands[0];\r\n\t\t\tfor (let i = 1; i < operands.length; i++) {\r\n\t\t\t\tresult = SemanticContext.and(result, operands[i]);\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn Utils.join(this.opnds, \"&&\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A semantic context which is true whenever at least one of the contained\r\n\t * contexts is true.\r\n\t */\r\n\texport class OR extends Operator {\r\n\t\tpublic opnds: SemanticContext[];\r\n\r\n\t\tconstructor(@NotNull a: SemanticContext, @NotNull b: SemanticContext) {\r\n\t\t\tsuper();\r\n\r\n\t\t\tlet operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\t\tif (a instanceof OR) {\r\n\t\t\t\toperands.addAll(a.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(a);\r\n\t\t\t}\r\n\r\n\t\t\tif (b instanceof OR) {\r\n\t\t\t\toperands.addAll(b.opnds);\r\n\t\t\t} else {\r\n\t\t\t\toperands.add(b);\r\n\t\t\t}\r\n\r\n\t\t\tthis.opnds = operands.toArray();\r\n\t\t\tlet precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds);\r\n\r\n\t\t\t// interested in the transition with the highest precedence\r\n\t\t\tlet reduced = max(precedencePredicates);\r\n\t\t\tif (reduced) {\r\n\t\t\t\tthis.opnds.push(reduced);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tget operands(): Iterable {\r\n\t\t\treturn this.opnds;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (this === obj) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif (!(obj instanceof OR)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn ArrayEqualityComparator.INSTANCE.equals(this.opnds, obj.opnds);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\treturn MurmurHash.hashCode(this.opnds, OR_HASHCODE);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * {@inheritDoc}\r\n\t\t *\r\n\t\t * The evaluation of predicates by this context is short-circuiting, but\r\n\t\t * unordered.\r\n\t\t */\r\n\t\t@Override\r\n\t\tpublic eval(parser: Recognizer, parserCallStack: RuleContext): boolean {\r\n\t\t\tfor (let opnd of this.opnds) {\r\n\t\t\t\tif (opnd.eval(parser, parserCallStack)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined {\r\n\t\t\tlet differs: boolean = false;\r\n\t\t\tlet operands: SemanticContext[] = [];\r\n\t\t\tfor (let context of this.opnds) {\r\n\t\t\t\tlet evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack);\r\n\t\t\t\tdiffers = differs || (evaluated !== context);\r\n\t\t\t\tif (evaluated === SemanticContext.NONE) {\r\n\t\t\t\t\t// The OR context is true if any element is true\r\n\t\t\t\t\treturn SemanticContext.NONE;\r\n\t\t\t\t} else if (evaluated) {\r\n\t\t\t\t\t// Reduce the result by skipping false elements\r\n\t\t\t\t\toperands.push(evaluated);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!differs) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\r\n\t\t\tif (operands.length === 0) {\r\n\t\t\t\t// all elements were false, so the OR context is false\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\r\n\t\t\tlet result: SemanticContext = operands[0];\r\n\t\t\tfor (let i = 1; i < operands.length; i++) {\r\n\t\t\t\tresult = SemanticContext.or(result, operands[i]);\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn Utils.join(this.opnds, \"||\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.2826960-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./AbstractPredicateTransition\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** TODO: this is old comment:\r\n * A tree of semantic predicates from the grammar AST if label==SEMPRED.\r\n * In the ATN, labels will always be exactly one predicate, but the DFA\r\n * may have to combine a bunch of them as it collects predicates from\r\n * multiple ATN configurations into a single DFA state.\r\n */\r\nexport class PredicateTransition extends AbstractPredicateTransition {\r\n\tpublic ruleIndex: number;\r\n\tpublic predIndex: number;\r\n\tpublic isCtxDependent: boolean; // e.g., $i ref in pred\r\n\r\n\tconstructor(@NotNull target: ATNState, ruleIndex: number, predIndex: number, isCtxDependent: boolean) {\r\n\t\tsuper(target);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t\tthis.predIndex = predIndex;\r\n\t\tthis.isCtxDependent = isCtxDependent;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.PREDICATE;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean { return true; }\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget predicate(): SemanticContext.Predicate {\r\n\t\treturn new SemanticContext.Predicate(this.ruleIndex, this.predIndex, this.isCtxDependent);\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \"pred_\" + this.ruleIndex + \":\" + this.predIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.4099946-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./atn/AbstractPredicateTransition\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { Parser } from \"./Parser\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { PredicateTransition } from \"./atn/PredicateTransition\";\r\n\r\n/** A semantic predicate failed during validation. Validation of predicates\r\n * occurs when normally parsing the alternative just like matching a token.\r\n * Disambiguating predicate evaluation occurs when we test a predicate during\r\n * prediction.\r\n */\r\nexport class FailedPredicateException extends RecognitionException {\r\n\t//private static serialVersionUID: number = 5379330841495778709L;\r\n\r\n\tprivate _ruleIndex: number;\r\n\tprivate _predicateIndex: number;\r\n\tprivate _predicate?: string;\r\n\r\n\tconstructor(@NotNull recognizer: Parser, predicate?: string, message?: string) {\r\n\t\tsuper(\r\n\t\t\trecognizer,\r\n\t\t\trecognizer.inputStream,\r\n\t\t\trecognizer.context,\r\n\t\t\tFailedPredicateException.formatMessage(predicate, message));\r\n\t\tlet s: ATNState = recognizer.interpreter.atn.states[recognizer.state];\r\n\r\n\t\tlet trans = s.transition(0) as AbstractPredicateTransition;\r\n\t\tif (trans instanceof PredicateTransition) {\r\n\t\t\tthis._ruleIndex = trans.ruleIndex;\r\n\t\t\tthis._predicateIndex = trans.predIndex;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._ruleIndex = 0;\r\n\t\t\tthis._predicateIndex = 0;\r\n\t\t}\r\n\r\n\t\tthis._predicate = predicate;\r\n\t\tsuper.setOffendingToken(recognizer, recognizer.currentToken);\r\n\t}\r\n\r\n\tget ruleIndex(): number {\r\n\t\treturn this._ruleIndex;\r\n\t}\r\n\r\n\tget predicateIndex(): number {\r\n\t\treturn this._predicateIndex;\r\n\t}\r\n\r\n\tget predicate(): string | undefined {\r\n\t\treturn this._predicate;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprivate static formatMessage(predicate: string | undefined, message: string | undefined): string {\r\n\t\tif (message) {\r\n\t\t\treturn message;\r\n\t\t}\r\n\r\n\t\treturn `failed predicate: {${predicate}}?`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.5187682-07:00\r\n\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/** This signifies any kind of mismatched input exceptions such as\r\n * when the current input does not match the expected token.\r\n */\r\nexport class InputMismatchException extends RecognitionException {\r\n\t//private static serialVersionUID: number = 1532568338707443067L;\r\n\r\n\tconstructor(/*@NotNull*/ recognizer: Parser);\r\n\tconstructor(/*@NotNull*/ recognizer: Parser, state: number, context: ParserRuleContext);\r\n\tconstructor(@NotNull recognizer: Parser, state?: number, context?: ParserRuleContext) {\r\n\t\tif (context === undefined) {\r\n\t\t\tcontext = recognizer.context;\r\n\t\t}\r\n\r\n\t\tsuper(recognizer, recognizer.inputStream, context);\r\n\r\n\t\tif (state !== undefined) {\r\n\t\t\tthis.setOffendingState(state);\r\n\t\t}\r\n\r\n\t\tthis.setOffendingToken(recognizer, recognizer.currentToken);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport namespace Arrays {\r\n\t/**\r\n\t * Searches the specified array of numbers for the specified value using the binary search algorithm. The array must\r\n\t * be sorted prior to making this call. If it is not sorted, the results are unspecified. If the array contains\r\n\t * multiple elements with the specified value, there is no guarantee which one will be found.\r\n\t *\r\n\t * @returns index of the search key, if it is contained in the array; otherwise, (-(insertion point) - 1). The\r\n\t * insertion point is defined as the point at which the key would be inserted into the array: the index of the first\r\n\t * element greater than the key, or array.length if all elements in the array are less than the specified key. Note\r\n\t * that this guarantees that the return value will be >= 0 if and only if the key is found.\r\n\t */\r\n\texport function binarySearch(array: ArrayLike, key: number, fromIndex?: number, toIndex?: number): number {\r\n\t\treturn binarySearch0(array, fromIndex !== undefined ? fromIndex : 0, toIndex !== undefined ? toIndex : array.length, key);\r\n\t}\r\n\r\n\tfunction binarySearch0(array: ArrayLike, fromIndex: number, toIndex: number, key: number): number {\r\n\t\tlet low: number = fromIndex;\r\n\t\tlet high: number = toIndex - 1;\r\n\r\n\t\twhile (low <= high) {\r\n\t\t\tlet mid: number = (low + high) >>> 1;\r\n\t\t\tlet midVal: number = array[mid];\r\n\r\n\t\t\tif (midVal < key) {\r\n\t\t\t\tlow = mid + 1;\r\n\t\t\t} else if (midVal > key) {\r\n\t\t\t\thigh = mid - 1;\r\n\t\t\t} else {\r\n\t\t\t\t// key found\r\n\t\t\t\treturn mid;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// key not found.\r\n\t\treturn -(low + 1);\r\n\t}\r\n\r\n\texport function toString(array: Iterable) {\r\n\t\tlet result = \"[\";\r\n\r\n\t\tlet first = true;\r\n\t\tfor (let element of array) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tresult += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tif (element === null) {\r\n\t\t\t\tresult += \"null\";\r\n\t\t\t} else if (element === undefined) {\r\n\t\t\t\tresult += \"undefined\";\r\n\t\t\t} else {\r\n\t\t\t\tresult += element;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresult += \"]\";\r\n\t\treturn result;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.5099429-07:00\r\n\r\nimport { Arrays } from \"./Arrays\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { JavaCollection } from \"./Stubs\";\r\n\r\nconst EMPTY_DATA: Int32Array = new Int32Array(0);\r\n\r\nconst INITIAL_SIZE: number = 4;\r\nconst MAX_ARRAY_SIZE: number = (((1 << 31) >>> 0) - 1) - 8;\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class IntegerList {\r\n\t@NotNull\r\n\tprivate _data: Int32Array;\r\n\r\n\tprivate _size: number;\r\n\r\n\tconstructor(arg?: number | IntegerList | Iterable) {\r\n\t\tif (!arg) {\r\n\t\t\tthis._data = EMPTY_DATA;\r\n\t\t\tthis._size = 0;\r\n\t\t} else if (arg instanceof IntegerList) {\r\n\t\t\tthis._data = arg._data.slice(0);\r\n\t\t\tthis._size = arg._size;\r\n\t\t} else if (typeof arg === \"number\") {\r\n\t\t\tif (arg === 0) {\r\n\t\t\t\tthis._data = EMPTY_DATA;\r\n\t\t\t\tthis._size = 0;\r\n\t\t\t} else {\r\n\t\t\t\tthis._data = new Int32Array(arg);\r\n\t\t\t\tthis._size = 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// arg is Iterable\r\n\t\t\tthis._data = EMPTY_DATA;\r\n\t\t\tthis._size = 0;\r\n\t\t\tfor (let value of arg) {\r\n\t\t\t\tthis.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic add(value: number): void {\r\n\t\tif (this._data.length === this._size) {\r\n\t\t\tthis.ensureCapacity(this._size + 1);\r\n\t\t}\r\n\r\n\t\tthis._data[this._size] = value;\r\n\t\tthis._size++;\r\n\t}\r\n\r\n\tpublic addAll(list: number[] | IntegerList | JavaCollection): void {\r\n\t\tif (Array.isArray(list)) {\r\n\t\t\tthis.ensureCapacity(this._size + list.length);\r\n\t\t\tthis._data.subarray(this._size, this._size + list.length).set(list);\r\n\t\t\tthis._size += list.length;\r\n\t\t} else if (list instanceof IntegerList) {\r\n\t\t\tthis.ensureCapacity(this._size + list._size);\r\n\t\t\tthis._data.subarray(this._size, this._size + list.size).set(list._data);\r\n\t\t\tthis._size += list._size;\r\n\t\t} else {\r\n\t\t\t// list is JavaCollection\r\n\t\t\tthis.ensureCapacity(this._size + list.size);\r\n\t\t\tlet current: number = 0;\r\n\t\t\tfor (let xi of list) {\r\n\t\t\t\tthis._data[this._size + current] = xi;\r\n\t\t\t\tcurrent++;\r\n\t\t\t}\r\n\r\n\t\t\tthis._size += list.size;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic get(index: number): number {\r\n\t\tif (index < 0 || index >= this._size) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\treturn this._data[index];\r\n\t}\r\n\r\n\tpublic contains(value: number): boolean {\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tif (this._data[i] === value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tpublic set(index: number, value: number): number {\r\n\t\tif (index < 0 || index >= this._size) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\tlet previous: number = this._data[index];\r\n\t\tthis._data[index] = value;\r\n\t\treturn previous;\r\n\t}\r\n\r\n\tpublic removeAt(index: number): number {\r\n\t\tlet value: number = this.get(index);\r\n\t\tthis._data.copyWithin(index, index + 1, this._size);\r\n\t\tthis._data[this._size - 1] = 0;\r\n\t\tthis._size--;\r\n\t\treturn value;\r\n\t}\r\n\r\n\tpublic removeRange(fromIndex: number, toIndex: number): void {\r\n\t\tif (fromIndex < 0 || toIndex < 0 || fromIndex > this._size || toIndex > this._size) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\tif (fromIndex > toIndex) {\r\n\t\t\tthrow RangeError();\r\n\t\t}\r\n\r\n\t\tthis._data.copyWithin(toIndex, fromIndex, this._size);\r\n\t\tthis._data.fill(0, this._size - (toIndex - fromIndex), this._size);\r\n\t\tthis._size -= (toIndex - fromIndex);\r\n\t}\r\n\r\n\tget isEmpty(): boolean {\r\n\t\treturn this._size === 0;\r\n\t}\r\n\r\n\tget size(): number {\r\n\t\treturn this._size;\r\n\t}\r\n\r\n\tpublic trimToSize(): void {\r\n\t\tif (this._data.length === this._size) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._data = this._data.slice(0, this._size);\r\n\t}\r\n\r\n\tpublic clear(): void {\r\n\t\tthis._data.fill(0, 0, this._size);\r\n\t\tthis._size = 0;\r\n\t}\r\n\r\n\tpublic toArray(): number[] {\r\n\t\tif (this._size === 0) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\treturn Array.from(this._data.subarray(0, this._size));\r\n\t}\r\n\r\n\tpublic sort(): void {\r\n\t\tthis._data.subarray(0, this._size).sort();\r\n\t}\r\n\r\n\t/**\r\n\t * Compares the specified object with this list for equality. Returns\r\n\t * `true` if and only if the specified object is also an {@link IntegerList},\r\n\t * both lists have the same size, and all corresponding pairs of elements in\r\n\t * the two lists are equal. In other words, two lists are defined to be\r\n\t * equal if they contain the same elements in the same order.\r\n\t *\r\n\t * This implementation first checks if the specified object is this\r\n\t * list. If so, it returns `true`; if not, it checks if the\r\n\t * specified object is an {@link IntegerList}. If not, it returns `false`;\r\n\t * if so, it checks the size of both lists. If the lists are not the same size,\r\n\t * it returns `false`; otherwise it iterates over both lists, comparing\r\n\t * corresponding pairs of elements. If any comparison returns `false`,\r\n\t * this method returns `false`.\r\n\t *\r\n\t * @param o the object to be compared for equality with this list\r\n\t * @returns `true` if the specified object is equal to this list\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!(o instanceof IntegerList)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._size !== o._size) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tif (this._data[i] !== o._data[i]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the hash code value for this list.\r\n\t *\r\n\t * This implementation uses exactly the code that is used to define the\r\n\t * list hash function in the documentation for the {@link List#hashCode}\r\n\t * method.\r\n\t *\r\n\t * @returns the hash code value for this list\r\n\t */\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hashCode: number = 1;\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\thashCode = 31 * hashCode + this._data[i];\r\n\t\t}\r\n\r\n\t\treturn hashCode;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a string representation of this list.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this._data.toString();\r\n\t}\r\n\r\n\tpublic binarySearch(key: number, fromIndex?: number, toIndex?: number): number {\r\n\t\tif (fromIndex === undefined) {\r\n\t\t\tfromIndex = 0;\r\n\t\t}\r\n\r\n\t\tif (toIndex === undefined) {\r\n\t\t\ttoIndex = this._size;\r\n\t\t}\r\n\r\n\t\tif (fromIndex < 0 || toIndex < 0 || fromIndex > this._size || toIndex > this._size) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tif (fromIndex > toIndex) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\treturn Arrays.binarySearch(this._data, key, fromIndex, toIndex);\r\n\t}\r\n\r\n\tprivate ensureCapacity(capacity: number): void {\r\n\t\tif (capacity < 0 || capacity > MAX_ARRAY_SIZE) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tlet newLength: number;\r\n\t\tif (this._data.length === 0) {\r\n\t\t\tnewLength = INITIAL_SIZE;\r\n\t\t} else {\r\n\t\t\tnewLength = this._data.length;\r\n\t\t}\r\n\r\n\t\twhile (newLength < capacity) {\r\n\t\t\tnewLength = newLength * 2;\r\n\t\t\tif (newLength < 0 || newLength > MAX_ARRAY_SIZE) {\r\n\t\t\t\tnewLength = MAX_ARRAY_SIZE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet tmp = new Int32Array(newLength);\r\n\t\ttmp.set(this._data);\r\n\t\tthis._data = tmp;\r\n\t}\r\n\r\n\t/** Convert the list to a UTF-16 encoded char array. If all values are less\r\n\t * than the 0xFFFF 16-bit code point limit then this is just a char array\r\n\t * of 16-bit char as usual. For values in the supplementary range, encode\r\n\t * them as two UTF-16 code units.\r\n\t */\r\n\tpublic toCharArray(): Uint16Array {\r\n\t\t// Optimize for the common case (all data values are < 0xFFFF) to avoid an extra scan\r\n\t\tlet resultArray: Uint16Array = new Uint16Array(this._size);\r\n\t\tlet resultIdx = 0;\r\n\t\tlet calculatedPreciseResultSize = false;\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tlet codePoint = this._data[i];\r\n\t\t\tif (codePoint >= 0 && codePoint < 0x10000) {\r\n\t\t\t\tresultArray[resultIdx] = codePoint;\r\n\t\t\t\tresultIdx++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Calculate the precise result size if we encounter a code point > 0xFFFF\r\n\t\t\tif (!calculatedPreciseResultSize) {\r\n\t\t\t\tlet newResultArray = new Uint16Array(this.charArraySize());\r\n\t\t\t\tnewResultArray.set(resultArray, 0);\r\n\t\t\t\tresultArray = newResultArray;\r\n\t\t\t\tcalculatedPreciseResultSize = true;\r\n\t\t\t}\r\n\r\n\t\t\t// This will throw RangeError if the code point is not a valid Unicode code point\r\n\t\t\tlet pair = String.fromCodePoint(codePoint);\r\n\t\t\tresultArray[resultIdx] = pair.charCodeAt(0);\r\n\t\t\tresultArray[resultIdx + 1] = pair.charCodeAt(1);\r\n\t\t\tresultIdx += 2;\r\n\t\t}\r\n\t\treturn resultArray;\r\n\t}\r\n\r\n\tprivate charArraySize(): number {\r\n\t\tlet result = 0;\r\n\t\tfor (let i = 0; i < this._size; i++) {\r\n\t\t\tresult += this._data[i] >= 0x10000 ? 2 : 1;\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.7402214-07:00\r\n\r\nimport { Override } from \"../Decorators\";\r\nimport { Equatable } from \"./Stubs\";\r\n\r\nconst INTERVAL_POOL_MAX_VALUE: number = 1000;\r\n\r\n/** An immutable inclusive interval a..b */\r\nexport class Interval implements Equatable {\r\n\tprivate static _INVALID: Interval = new Interval(-1, -2);\r\n\tstatic get INVALID(): Interval {\r\n\t\treturn Interval._INVALID;\r\n\t}\r\n\r\n\tprivate static readonly cache: Interval[] = new Array(INTERVAL_POOL_MAX_VALUE + 1);\r\n\r\n\t/**\r\n\t * @param a The start of the interval\r\n\t * @param b The end of the interval (inclusive)\r\n\t */\r\n\tconstructor(public a: number, public b: number) {\r\n\t}\r\n\r\n\t/** Interval objects are used readonly so share all with the\r\n\t * same single value a==b up to some max size. Use an array as a perfect hash.\r\n\t * Return shared object for 0..INTERVAL_POOL_MAX_VALUE or a new\r\n\t * Interval object with a..a in it. On Java.g4, 218623 IntervalSets\r\n\t * have a..a (set with 1 element).\r\n\t */\r\n\tpublic static of(a: number, b: number): Interval {\r\n\t\t// cache just a..a\r\n\t\tif (a !== b || a < 0 || a > INTERVAL_POOL_MAX_VALUE) {\r\n\t\t\treturn new Interval(a, b);\r\n\t\t}\r\n\r\n\t\tif (Interval.cache[a] == null) {\r\n\t\t\tInterval.cache[a] = new Interval(a, a);\r\n\t\t}\r\n\r\n\t\treturn Interval.cache[a];\r\n\t}\r\n\r\n\t/** return number of elements between a and b inclusively. x..x is length 1.\r\n\t * if b < a, then length is 0. 9..10 has length 2.\r\n\t */\r\n\tget length(): number {\r\n\t\tif (this.b < this.a) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn this.b - this.a + 1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if (!(o instanceof Interval)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.a === o.a && this.b === o.b;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = 23;\r\n\t\thash = hash * 31 + this.a;\r\n\t\thash = hash * 31 + this.b;\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/** Does this start completely before other? Disjoint */\r\n\tpublic startsBeforeDisjoint(other: Interval): boolean {\r\n\t\treturn this.a < other.a && this.b < other.a;\r\n\t}\r\n\r\n\t/** Does this start at or before other? Nondisjoint */\r\n\tpublic startsBeforeNonDisjoint(other: Interval): boolean {\r\n\t\treturn this.a <= other.a && this.b >= other.a;\r\n\t}\r\n\r\n\t/** Does this.a start after other.b? May or may not be disjoint */\r\n\tpublic startsAfter(other: Interval): boolean {\r\n\t\treturn this.a > other.a;\r\n\t}\r\n\r\n\t/** Does this start completely after other? Disjoint */\r\n\tpublic startsAfterDisjoint(other: Interval): boolean {\r\n\t\treturn this.a > other.b;\r\n\t}\r\n\r\n\t/** Does this start after other? NonDisjoint */\r\n\tpublic startsAfterNonDisjoint(other: Interval): boolean {\r\n\t\treturn this.a > other.a && this.a <= other.b; // this.b>=other.b implied\r\n\t}\r\n\r\n\t/** Are both ranges disjoint? I.e., no overlap? */\r\n\tpublic disjoint(other: Interval): boolean {\r\n\t\treturn this.startsBeforeDisjoint(other) || this.startsAfterDisjoint(other);\r\n\t}\r\n\r\n\t/** Are two intervals adjacent such as 0..41 and 42..42? */\r\n\tpublic adjacent(other: Interval): boolean {\r\n\t\treturn this.a === other.b + 1 || this.b === other.a - 1;\r\n\t}\r\n\r\n\tpublic properlyContains(other: Interval): boolean {\r\n\t\treturn other.a >= this.a && other.b <= this.b;\r\n\t}\r\n\r\n\t/** Return the interval computed from combining this and other */\r\n\tpublic union(other: Interval): Interval {\r\n\t\treturn Interval.of(Math.min(this.a, other.a), Math.max(this.b, other.b));\r\n\t}\r\n\r\n\t/** Return the interval in common between this and o */\r\n\tpublic intersection(other: Interval): Interval {\r\n\t\treturn Interval.of(Math.max(this.a, other.a), Math.min(this.b, other.b));\r\n\t}\r\n\r\n\t/** Return the interval with elements from `this` not in `other`;\r\n\t * `other` must not be totally enclosed (properly contained)\r\n\t * within `this`, which would result in two disjoint intervals\r\n\t * instead of the single one returned by this method.\r\n\t */\r\n\tpublic differenceNotProperlyContained(other: Interval): Interval | undefined {\r\n\t\tlet diff: Interval | undefined;\r\n\t\tif (other.startsBeforeNonDisjoint(this)) {\r\n\t\t\t// other.a to left of this.a (or same)\r\n\t\t\tdiff = Interval.of(Math.max(this.a, other.b + 1), this.b);\r\n\t\t} else if (other.startsAfterNonDisjoint(this)) {\r\n\t\t\t// other.a to right of this.a\r\n\t\t\tdiff = Interval.of(this.a, other.a - 1);\r\n\t\t}\r\n\r\n\t\treturn diff;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this.a + \"..\" + this.b;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.7862802-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { TokenStream } from \"./TokenStream\";\r\n\r\n/** A token has properties: text, type, line, character position in the line\r\n * (so we can ignore tabs), token channel, index, and source from which\r\n * we obtained this token.\r\n */\r\nexport interface Token {\r\n\t/**\r\n\t * Get the text of the token.\r\n\t */\r\n\treadonly text: string | undefined;\r\n\r\n\t/** Get the token type of the token */\r\n\treadonly type: number;\r\n\r\n\t/** The line number on which the 1st character of this token was matched,\r\n\t * line=1..n\r\n\t */\r\n\treadonly line: number;\r\n\r\n\t/** The index of the first character of this token relative to the\r\n\t * beginning of the line at which it occurs, 0..n-1\r\n\t */\r\n\treadonly charPositionInLine: number;\r\n\r\n\t/** Return the channel this token. Each token can arrive at the parser\r\n\t * on a different channel, but the parser only \"tunes\" to a single channel.\r\n\t * The parser ignores everything not on DEFAULT_CHANNEL.\r\n\t */\r\n\treadonly channel: number;\r\n\r\n\t/** An index from 0..n-1 of the token object in the input stream.\r\n\t * This must be valid in order to print token streams and\r\n\t * use TokenRewriteStream.\r\n\t *\r\n\t * Return -1 to indicate that this token was conjured up since\r\n\t * it doesn't have a valid index.\r\n\t */\r\n\treadonly tokenIndex: number;\r\n\r\n\t/** The starting character index of the token\r\n\t * This method is optional; return -1 if not implemented.\r\n\t */\r\n\treadonly startIndex: number;\r\n\r\n\t/** The last character index of the token.\r\n\t * This method is optional; return -1 if not implemented.\r\n\t */\r\n\treadonly stopIndex: number;\r\n\r\n\t/** Gets the {@link TokenSource} which created this token.\r\n\t */\r\n\treadonly tokenSource: TokenSource | undefined;\r\n\r\n\t/**\r\n\t * Gets the {@link CharStream} from which this token was derived.\r\n\t */\r\n\treadonly inputStream: CharStream | undefined;\r\n}\r\n\r\nexport namespace Token {\r\n\texport const INVALID_TYPE: number = 0;\r\n\r\n\t/** During lookahead operations, this \"token\" signifies we hit rule end ATN state\r\n\t * and did not follow it despite needing to.\r\n\t */\r\n\texport const EPSILON: number = -2;\r\n\r\n\texport const MIN_USER_TOKEN_TYPE: number = 1;\r\n\r\n\texport const EOF: number = IntStream.EOF;\r\n\r\n\t/** All tokens go to the parser (unless skip() is called in that rule)\r\n\t * on a particular \"channel\". The parser tunes to a particular channel\r\n\t * so that whitespace etc... can go to the parser on a \"hidden\" channel.\r\n\t */\r\n\texport const DEFAULT_CHANNEL: number = 0;\r\n\r\n\t/** Anything on different channel than DEFAULT_CHANNEL is not parsed\r\n\t * by parser.\r\n\t */\r\n\texport const HIDDEN_CHANNEL: number = 1;\r\n\r\n\t/**\r\n\t * This is the minimum constant value which can be assigned to a\r\n\t * user-defined token channel.\r\n\t *\r\n\t * The non-negative numbers less than {@link #MIN_USER_CHANNEL_VALUE} are\r\n\t * assigned to the predefined channels {@link #DEFAULT_CHANNEL} and\r\n\t * {@link #HIDDEN_CHANNEL}.\r\n\t *\r\n\t * @see `Token.channel`\r\n\t */\r\n\texport const MIN_USER_CHANNEL_VALUE: number = 2;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.1614404-07:00\r\n\r\nimport { ATNSimulator } from \"./atn/ATNSimulator\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { WritableToken } from \"./WritableToken\";\r\n\r\nexport class CommonToken implements WritableToken {\r\n\t/**\r\n\t * An empty {@link Tuple2} which is used as the default value of\r\n\t * {@link #source} for tokens that do not have a source.\r\n\t */\r\n\tprotected static readonly EMPTY_SOURCE: { source?: TokenSource, stream?: CharStream } =\r\n\t\t{ source: undefined, stream: undefined };\r\n\r\n\t/**\r\n\t * This is the backing field for `type`.\r\n\t */\r\n\tprivate _type: number;\r\n\t/**\r\n\t * This is the backing field for {@link #getLine} and {@link #setLine}.\r\n\t */\r\n\tprivate _line: number = 0;\r\n\t/**\r\n\t * This is the backing field for {@link #getCharPositionInLine} and\r\n\t * {@link #setCharPositionInLine}.\r\n\t */\r\n\tprivate _charPositionInLine: number = -1; // set to invalid position\r\n\t/**\r\n\t * This is the backing field for {@link #getChannel} and\r\n\t * {@link #setChannel}.\r\n\t */\r\n\tprivate _channel: number = Token.DEFAULT_CHANNEL;\r\n\t/**\r\n\t * This is the backing field for {@link #getTokenSource} and\r\n\t * {@link #getInputStream}.\r\n\t *\r\n\t * These properties share a field to reduce the memory footprint of\r\n\t * {@link CommonToken}. Tokens created by a {@link CommonTokenFactory} from\r\n\t * the same source and input stream share a reference to the same\r\n\t * {@link Tuple2} containing these values.\r\n\t */\r\n\t@NotNull\r\n\tprotected source: { source?: TokenSource, stream?: CharStream };\r\n\r\n\t/**\r\n\t * This is the backing field for {@link #getText} when the token text is\r\n\t * explicitly set in the constructor or via {@link #setText}.\r\n\t *\r\n\t * @see `text`\r\n\t */\r\n\tprivate _text?: string;\r\n\r\n\t/**\r\n\t * This is the backing field for `tokenIndex`.\r\n\t */\r\n\tprotected index: number = -1;\r\n\r\n\t/**\r\n\t * This is the backing field for `startIndex`.\r\n\t */\r\n\tprotected start: number;\r\n\r\n\t/**\r\n\t * This is the backing field for `stopIndex`.\r\n\t */\r\n\tprivate stop: number;\r\n\r\n\tconstructor(type: number, text?: string, @NotNull source: { source?: TokenSource, stream?: CharStream } = CommonToken.EMPTY_SOURCE, channel: number = Token.DEFAULT_CHANNEL, start: number = 0, stop: number = 0) {\r\n\t\tthis._text = text;\r\n\t\tthis._type = type;\r\n\t\tthis.source = source;\r\n\t\tthis._channel = channel;\r\n\t\tthis.start = start;\r\n\t\tthis.stop = stop;\r\n\t\tif (source.source != null) {\r\n\t\t\tthis._line = source.source.line;\r\n\t\t\tthis._charPositionInLine = source.source.charPositionInLine;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Constructs a new {@link CommonToken} as a copy of another {@link Token}.\r\n\t *\r\n\t * If `oldToken` is also a {@link CommonToken} instance, the newly\r\n\t * constructed token will share a reference to the {@link #text} field and\r\n\t * the {@link Tuple2} stored in {@link #source}. Otherwise, {@link #text} will\r\n\t * be assigned the result of calling {@link #getText}, and {@link #source}\r\n\t * will be constructed from the result of {@link Token#getTokenSource} and\r\n\t * {@link Token#getInputStream}.\r\n\t *\r\n\t * @param oldToken The token to copy.\r\n\t */\r\n\tpublic static fromToken(@NotNull oldToken: Token): CommonToken {\r\n\t\tlet result: CommonToken = new CommonToken(oldToken.type, undefined, CommonToken.EMPTY_SOURCE, oldToken.channel, oldToken.startIndex, oldToken.stopIndex);\r\n\t\tresult._line = oldToken.line;\r\n\t\tresult.index = oldToken.tokenIndex;\r\n\t\tresult._charPositionInLine = oldToken.charPositionInLine;\r\n\r\n\t\tif (oldToken instanceof CommonToken) {\r\n\t\t\tresult._text = oldToken._text;\r\n\t\t\tresult.source = oldToken.source;\r\n\t\t} else {\r\n\t\t\tresult._text = oldToken.text;\r\n\t\t\tresult.source = { source: oldToken.tokenSource, stream: oldToken.inputStream };\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tget type(): number {\r\n\t\treturn this._type;\r\n\t}\r\n\r\n\t// @Override\r\n\tset type(type: number) {\r\n\t\tthis._type = type;\r\n\t}\r\n\r\n\t@Override\r\n\tget line(): number {\r\n\t\treturn this._line;\r\n\t}\r\n\r\n\t// @Override\r\n\tset line(line: number) {\r\n\t\tthis._line = line;\r\n\t}\r\n\r\n\t@Override\r\n\tget text(): string | undefined {\r\n\t\tif (this._text != null) {\r\n\t\t\treturn this._text;\r\n\t\t}\r\n\r\n\t\tlet input: CharStream | undefined = this.inputStream;\r\n\t\tif (input == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet n: number = input.size;\r\n\t\tif (this.start < n && this.stop < n) {\r\n\t\t\treturn input.getText(Interval.of(this.start, this.stop));\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Explicitly set the text for this token. If {code text} is not\r\n\t * `undefined`, then {@link #getText} will return this value rather than\r\n\t * extracting the text from the input.\r\n\t *\r\n\t * @param text The explicit text of the token, or `undefined` if the text\r\n\t * should be obtained from the input along with the start and stop indexes\r\n\t * of the token.\r\n\t */\r\n\t// @Override\r\n\tset text(text: string | undefined) {\r\n\t\tthis._text = text;\r\n\t}\r\n\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\treturn this._charPositionInLine;\r\n\t}\r\n\r\n\t// @Override\r\n\tset charPositionInLine(charPositionInLine: number) {\r\n\t\tthis._charPositionInLine = charPositionInLine;\r\n\t}\r\n\r\n\t@Override\r\n\tget channel(): number {\r\n\t\treturn this._channel;\r\n\t}\r\n\r\n\t// @Override\r\n\tset channel(channel: number) {\r\n\t\tthis._channel = channel;\r\n\t}\r\n\r\n\t@Override\r\n\tget startIndex(): number {\r\n\t\treturn this.start;\r\n\t}\r\n\r\n\tset startIndex(start: number) {\r\n\t\tthis.start = start;\r\n\t}\r\n\r\n\t@Override\r\n\tget stopIndex(): number {\r\n\t\treturn this.stop;\r\n\t}\r\n\r\n\tset stopIndex(stop: number) {\r\n\t\tthis.stop = stop;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenIndex(): number {\r\n\t\treturn this.index;\r\n\t}\r\n\r\n\t// @Override\r\n\tset tokenIndex(index: number) {\r\n\t\tthis.index = index;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenSource(): TokenSource | undefined {\r\n\t\treturn this.source.source;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): CharStream | undefined {\r\n\t\treturn this.source.stream;\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(recognizer: Recognizer | undefined): string;\r\n\r\n\t@Override\r\n\tpublic toString(recognizer?: Recognizer): string {\r\n\t\tlet channelStr: string = \"\";\r\n\t\tif (this._channel > 0) {\r\n\t\t\tchannelStr = \",channel=\" + this._channel;\r\n\t\t}\r\n\r\n\t\tlet txt: string | undefined = this.text;\r\n\t\tif (txt != null) {\r\n\t\t\ttxt = txt.replace(/\\n/g, \"\\\\n\");\r\n\t\t\ttxt = txt.replace(/\\r/g, \"\\\\r\");\r\n\t\t\ttxt = txt.replace(/\\t/g, \"\\\\t\");\r\n\t\t} else {\r\n\t\t\ttxt = \"\";\r\n\t\t}\r\n\r\n\t\tlet typeString = String(this._type);\r\n\t\tif (recognizer) {\r\n\t\t\ttypeString = recognizer.vocabulary.getDisplayName(this._type);\r\n\t\t}\r\n\r\n\t\treturn \"[@\" + this.tokenIndex + \",\" + this.start + \":\" + this.stop + \"='\" + txt + \"',<\" + typeString + \">\" + channelStr + \",\" + this._line + \":\" + this.charPositionInLine + \"]\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.3010112-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CommonToken } from \"./CommonToken\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * This default implementation of {@link TokenFactory} creates\r\n * {@link CommonToken} objects.\r\n */\r\nexport class CommonTokenFactory implements TokenFactory {\r\n\t/**\r\n\t * Indicates whether {@link CommonToken#setText} should be called after\r\n\t * constructing tokens to explicitly set the text. This is useful for cases\r\n\t * where the input stream might not be able to provide arbitrary substrings\r\n\t * of text from the input after the lexer creates a token (e.g. the\r\n\t * implementation of {@link CharStream#getText} in\r\n\t * {@link UnbufferedCharStream}\r\n\t * {@link UnsupportedOperationException}). Explicitly setting the token text\r\n\t * allows {@link Token#getText} to be called at any time regardless of the\r\n\t * input stream implementation.\r\n\t *\r\n\t * The default value is `false` to avoid the performance and memory\r\n\t * overhead of copying text for every token unless explicitly requested.\r\n\t */\r\n\tprotected copyText: boolean;\r\n\r\n\t/**\r\n\t * Constructs a {@link CommonTokenFactory} with the specified value for\r\n\t * {@link #copyText}.\r\n\t *\r\n\t * When `copyText` is `false`, the {@link #DEFAULT} instance\r\n\t * should be used instead of constructing a new instance.\r\n\t *\r\n\t * @param copyText The value for {@link #copyText}.\r\n\t */\r\n\tconstructor(copyText: boolean = false) {\r\n\t\tthis.copyText = copyText;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic create(\r\n\t\tsource: { source?: TokenSource, stream?: CharStream },\r\n\t\ttype: number,\r\n\t\ttext: string | undefined,\r\n\t\tchannel: number,\r\n\t\tstart: number,\r\n\t\tstop: number,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number): CommonToken {\r\n\r\n\t\tlet t: CommonToken = new CommonToken(type, text, source, channel, start, stop);\r\n\t\tt.line = line;\r\n\t\tt.charPositionInLine = charPositionInLine;\r\n\t\tif (text == null && this.copyText && source.stream != null) {\r\n\t\t\tt.text = source.stream.getText(Interval.of(start, stop));\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic createSimple(type: number, text: string): CommonToken {\r\n\t\treturn new CommonToken(type, text);\r\n\t}\r\n}\r\n\r\nexport namespace CommonTokenFactory {\r\n\t/**\r\n\t * The default {@link CommonTokenFactory} instance.\r\n\t *\r\n\t * This token factory does not explicitly copy token text when constructing\r\n\t * tokens.\r\n\t */\r\n\texport const DEFAULT: TokenFactory = new CommonTokenFactory();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.6647101-07:00\r\n\r\nimport { IntegerList } from \"./IntegerList\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class IntegerStack extends IntegerList {\r\n\r\n\tconstructor(arg?: number | IntegerStack) {\r\n\t\tsuper(arg);\r\n\t}\r\n\r\n\tpublic push(value: number): void {\r\n\t\tthis.add(value);\r\n\t}\r\n\r\n\tpublic pop(): number {\r\n\t\treturn this.removeAt(this.size - 1);\r\n\t}\r\n\r\n\tpublic peek(): number {\r\n\t\treturn this.get(this.size - 1);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.1172076-07:00\r\n\r\nimport { LexerActionExecutor } from \"../atn/LexerActionExecutor\";\r\n\r\n/**\r\n * Stores information about a {@link DFAState} which is an accept state under\r\n * some condition. Certain settings, such as\r\n * {@link ParserATNSimulator#getPredictionMode()}, may be used in addition to\r\n * this information to determine whether or not a particular state is an accept\r\n * state.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class AcceptStateInfo {\r\n\tprivate readonly _prediction: number;\r\n\tprivate readonly _lexerActionExecutor?: LexerActionExecutor;\r\n\r\n\tconstructor(prediction: number);\r\n\tconstructor(prediction: number, lexerActionExecutor: LexerActionExecutor | undefined);\r\n\tconstructor(prediction: number, lexerActionExecutor?: LexerActionExecutor) {\r\n\t\tthis._prediction = prediction;\r\n\t\tthis._lexerActionExecutor = lexerActionExecutor;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the prediction made by this accept state. Note that this value\r\n\t * assumes the predicates, if any, in the {@link DFAState} evaluate to\r\n\t * `true`. If predicate evaluation is enabled, the final prediction of\r\n\t * the accept state will be determined by the result of predicate\r\n\t * evaluation.\r\n\t */\r\n\tget prediction(): number {\r\n\t\treturn this._prediction;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the {@link LexerActionExecutor} which can be used to execute actions\r\n\t * and/or commands after the lexer matches a token.\r\n\t */\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn this._lexerActionExecutor;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { Array2DHashSet } from \"./Array2DHashSet\";\r\nimport { DefaultEqualityComparator } from \"./DefaultEqualityComparator\";\r\nimport { EqualityComparator } from \"./EqualityComparator\";\r\nimport { Equatable, JavaCollection, JavaMap, JavaSet } from \"./Stubs\";\r\n\r\n// Since `Array2DHashMap` is implemented on top of `Array2DHashSet`, we defined a bucket type which can store a\r\n// key-value pair. The value is optional since looking up values in the map by a key only needs to include the key.\r\ninterface Bucket { key: K; value?: V; }\r\n\r\nclass MapKeyEqualityComparator implements EqualityComparator> {\r\n\tprivate readonly keyComparator: EqualityComparator;\r\n\r\n\tconstructor(keyComparator: EqualityComparator) {\r\n\t\tthis.keyComparator = keyComparator;\r\n\t}\r\n\r\n\tpublic hashCode(obj: Bucket): number {\r\n\t\treturn this.keyComparator.hashCode(obj.key);\r\n\t}\r\n\r\n\tpublic equals(a: Bucket, b: Bucket): boolean {\r\n\t\treturn this.keyComparator.equals(a.key, b.key);\r\n\t}\r\n}\r\n\r\nexport class Array2DHashMap implements JavaMap {\r\n\tprivate backingStore: Array2DHashSet>;\r\n\r\n\tconstructor(keyComparer: EqualityComparator);\r\n\tconstructor(map: Array2DHashMap);\r\n\tconstructor(keyComparer: EqualityComparator | Array2DHashMap) {\r\n\t\tif (keyComparer instanceof Array2DHashMap) {\r\n\t\t\tthis.backingStore = new Array2DHashSet>(keyComparer.backingStore);\r\n\t\t} else {\r\n\t\t\tthis.backingStore = new Array2DHashSet>(new MapKeyEqualityComparator(keyComparer));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic clear(): void {\r\n\t\tthis.backingStore.clear();\r\n\t}\r\n\r\n\tpublic containsKey(key: K): boolean {\r\n\t\treturn this.backingStore.contains({ key });\r\n\t}\r\n\r\n\tpublic get(key: K): V | undefined {\r\n\t\tlet bucket = this.backingStore.get({ key });\r\n\t\tif (!bucket) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn bucket.value;\r\n\t}\r\n\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.backingStore.isEmpty;\r\n\t}\r\n\r\n\tpublic put(key: K, value: V): V | undefined {\r\n\t\tlet element = this.backingStore.get({ key, value });\r\n\t\tlet result: V | undefined;\r\n\t\tif (!element) {\r\n\t\t\tthis.backingStore.add({ key, value });\r\n\t\t} else {\r\n\t\t\tresult = element.value;\r\n\t\t\telement.value = value;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic putIfAbsent(key: K, value: V): V | undefined {\r\n\t\tlet element = this.backingStore.get({ key, value });\r\n\t\tlet result: V | undefined;\r\n\t\tif (!element) {\r\n\t\t\tthis.backingStore.add({ key, value });\r\n\t\t} else {\r\n\t\t\tresult = element.value;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tget size(): number {\r\n\t\treturn this.backingStore.size;\r\n\t}\r\n\r\n\tpublic hashCode(): number {\r\n\t\treturn this.backingStore.hashCode();\r\n\t}\r\n\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (!(o instanceof Array2DHashMap)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.backingStore.equals(o.backingStore);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.4381103-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\n\r\nexport abstract class DecisionState extends ATNState {\r\n\tpublic decision: number = -1;\r\n\tpublic nonGreedy: boolean = false;\r\n\tpublic sll: boolean = false;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.6390614-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { Override } from \"../Decorators\";\r\nimport { JavaMap } from \"../misc/Stubs\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport * as assert from \"assert\";\r\n\r\n/** Used to cache {@link PredictionContext} objects. Its used for the shared\r\n * context cash associated with contexts in DFA states. This cache\r\n * can be used for both lexers and parsers.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class PredictionContextCache {\r\n\tpublic static UNCACHED: PredictionContextCache = new PredictionContextCache(false);\r\n\r\n\tprivate contexts: JavaMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\tprivate childContexts: JavaMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\tprivate joinContexts: JavaMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\r\n\tprivate enableCache: boolean;\r\n\r\n\tconstructor(enableCache: boolean = true) {\r\n\t\tthis.enableCache = enableCache;\r\n\t}\r\n\r\n\tpublic getAsCached(context: PredictionContext): PredictionContext {\r\n\t\tif (!this.enableCache) {\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\tlet result = this.contexts.get(context);\r\n\t\tif (!result) {\r\n\t\t\tresult = context;\r\n\t\t\tthis.contexts.put(context, context);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic getChild(context: PredictionContext, invokingState: number): PredictionContext {\r\n\t\tif (!this.enableCache) {\r\n\t\t\treturn context.getChild(invokingState);\r\n\t\t}\r\n\r\n\t\tlet operands: PredictionContextCache.PredictionContextAndInt = new PredictionContextCache.PredictionContextAndInt(context, invokingState);\r\n\t\tlet result = this.childContexts.get(operands);\r\n\t\tif (!result) {\r\n\t\t\tresult = context.getChild(invokingState);\r\n\t\t\tresult = this.getAsCached(result);\r\n\t\t\tthis.childContexts.put(operands, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic join(x: PredictionContext, y: PredictionContext): PredictionContext {\r\n\t\tif (!this.enableCache) {\r\n\t\t\treturn PredictionContext.join(x, y, this);\r\n\t\t}\r\n\r\n\t\tlet operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(x, y);\r\n\t\tlet result = this.joinContexts.get(operands);\r\n\t\tif (result) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\tresult = PredictionContext.join(x, y, this);\r\n\t\tresult = this.getAsCached(result);\r\n\t\tthis.joinContexts.put(operands, result);\r\n\t\treturn result;\r\n\t}\r\n}\r\n\r\nexport namespace PredictionContextCache {\r\n\texport class PredictionContextAndInt {\r\n\t\tprivate obj: PredictionContext;\r\n\t\tprivate value: number;\r\n\r\n\t\tconstructor(obj: PredictionContext, value: number) {\r\n\t\t\tthis.obj = obj;\r\n\t\t\tthis.value = value;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(obj: any): boolean {\r\n\t\t\tif (!(obj instanceof PredictionContextAndInt)) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (obj === this) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tlet other: PredictionContextAndInt = obj;\r\n\t\t\treturn this.value === other.value\r\n\t\t\t\t&& (this.obj === other.obj || (this.obj != null && this.obj.equals(other.obj)));\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\tlet hashCode: number = 5;\r\n\t\t\thashCode = 7 * hashCode + (this.obj != null ? this.obj.hashCode() : 0);\r\n\t\t\thashCode = 7 * hashCode + this.value;\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\t}\r\n\r\n\texport class IdentityCommutativePredictionContextOperands {\r\n\t\tprivate _x: PredictionContext;\r\n\t\tprivate _y: PredictionContext;\r\n\r\n\t\tconstructor(x: PredictionContext, y: PredictionContext) {\r\n\t\t\tassert(x != null);\r\n\t\t\tassert(y != null);\r\n\t\t\tthis._x = x;\r\n\t\t\tthis._y = y;\r\n\t\t}\r\n\r\n\t\tget x(): PredictionContext {\r\n\t\t\treturn this._x;\r\n\t\t}\r\n\r\n\t\tget y(): PredictionContext {\r\n\t\t\treturn this._y;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(o: any): boolean {\r\n\t\t\tif (!(o instanceof IdentityCommutativePredictionContextOperands)) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (this === o) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tlet other: IdentityCommutativePredictionContextOperands = o;\r\n\t\t\treturn (this._x === other._x && this._y === other._y) || (this._x === other._y && this._y === other._x);\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(): number {\r\n\t\t\treturn this._x.hashCode() ^ this._y.hashCode();\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.3812636-07:00\r\n\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { Arrays } from \"../misc/Arrays\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { EqualityComparator } from \"../misc/EqualityComparator\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { Equatable, JavaSet } from \"../misc/Stubs\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\nconst INITIAL_HASH: number = 1;\r\n\r\nexport abstract class PredictionContext implements Equatable {\r\n\t/**\r\n\t * Stores the computed hash code of this {@link PredictionContext}. The hash\r\n\t * code is computed in parts to match the following reference algorithm.\r\n\t *\r\n\t * ```\r\n\t * private int referenceHashCode() {\r\n\t * int hash = {@link MurmurHash#initialize MurmurHash.initialize}({@link #INITIAL_HASH});\r\n\t *\r\n\t * for (int i = 0; i < this.size; i++) {\r\n\t * hash = {@link MurmurHash#update MurmurHash.update}(hash, {@link #getParent getParent}(i));\r\n\t * }\r\n\t *\r\n\t * for (int i = 0; i < this.size; i++) {\r\n\t * hash = {@link MurmurHash#update MurmurHash.update}(hash, {@link #getReturnState getReturnState}(i));\r\n\t * }\r\n\t *\r\n\t * hash = {@link MurmurHash#finish MurmurHash.finish}(hash, 2 * this.size);\r\n\t * return hash;\r\n\t * }\r\n\t * ```\r\n\t */\r\n\tprivate readonly cachedHashCode: number;\r\n\r\n\tconstructor(cachedHashCode: number) {\r\n\t\tthis.cachedHashCode = cachedHashCode;\r\n\t}\r\n\r\n\tprotected static calculateEmptyHashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize(INITIAL_HASH);\r\n\t\thash = MurmurHash.finish(hash, 0);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\tprotected static calculateSingleHashCode(parent: PredictionContext, returnState: number): number {\r\n\t\tlet hash: number = MurmurHash.initialize(INITIAL_HASH);\r\n\t\thash = MurmurHash.update(hash, parent);\r\n\t\thash = MurmurHash.update(hash, returnState);\r\n\t\thash = MurmurHash.finish(hash, 2);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\tprotected static calculateHashCode(parents: PredictionContext[], returnStates: number[]): number {\r\n\t\tlet hash: number = MurmurHash.initialize(INITIAL_HASH);\r\n\r\n\t\tfor (let parent of parents) {\r\n\t\t\thash = MurmurHash.update(hash, parent);\r\n\t\t}\r\n\r\n\t\tfor (let returnState of returnStates) {\r\n\t\t\thash = MurmurHash.update(hash, returnState);\r\n\t\t}\r\n\r\n\t\thash = MurmurHash.finish(hash, 2 * parents.length);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\tpublic abstract readonly size: number;\r\n\r\n\tpublic abstract getReturnState(index: number): number;\r\n\r\n\tpublic abstract findReturnState(returnState: number): number;\r\n\r\n\t// @NotNull\r\n\tpublic abstract getParent(index: number): PredictionContext;\r\n\r\n\tprotected abstract addEmptyContext(): PredictionContext;\r\n\r\n\tprotected abstract removeEmptyContext(): PredictionContext;\r\n\r\n\tpublic static fromRuleContext(atn: ATN, outerContext: RuleContext, fullContext: boolean = true): PredictionContext {\r\n\t\tif (outerContext.isEmpty) {\r\n\t\t\treturn fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL;\r\n\t\t}\r\n\r\n\t\tlet parent: PredictionContext;\r\n\t\tif (outerContext._parent) {\r\n\t\t\tparent = PredictionContext.fromRuleContext(atn, outerContext._parent, fullContext);\r\n\t\t} else {\r\n\t\t\tparent = fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL;\r\n\t\t}\r\n\r\n\t\tlet state: ATNState = atn.states[outerContext.invokingState];\r\n\t\tlet transition: RuleTransition = state.transition(0) as RuleTransition;\r\n\t\treturn parent.getChild(transition.followState.stateNumber);\r\n\t}\r\n\r\n\tprivate static addEmptyContext(context: PredictionContext): PredictionContext {\r\n\t\treturn context.addEmptyContext();\r\n\t}\r\n\r\n\tprivate static removeEmptyContext(context: PredictionContext): PredictionContext {\r\n\t\treturn context.removeEmptyContext();\r\n\t}\r\n\r\n\tpublic static join(@NotNull context0: PredictionContext, @NotNull context1: PredictionContext, @NotNull contextCache: PredictionContextCache = PredictionContextCache.UNCACHED): PredictionContext {\r\n\t\tif (context0 === context1) {\r\n\t\t\treturn context0;\r\n\t\t}\r\n\r\n\t\tif (context0.isEmpty) {\r\n\t\t\treturn PredictionContext.isEmptyLocal(context0) ? context0 : PredictionContext.addEmptyContext(context1);\r\n\t\t} else if (context1.isEmpty) {\r\n\t\t\treturn PredictionContext.isEmptyLocal(context1) ? context1 : PredictionContext.addEmptyContext(context0);\r\n\t\t}\r\n\r\n\t\tlet context0size: number = context0.size;\r\n\t\tlet context1size: number = context1.size;\r\n\t\tif (context0size === 1 && context1size === 1 && context0.getReturnState(0) === context1.getReturnState(0)) {\r\n\t\t\tlet merged: PredictionContext = contextCache.join(context0.getParent(0), context1.getParent(0));\r\n\t\t\tif (merged === context0.getParent(0)) {\r\n\t\t\t\treturn context0;\r\n\t\t\t} else if (merged === context1.getParent(0)) {\r\n\t\t\t\treturn context1;\r\n\t\t\t} else {\r\n\t\t\t\treturn merged.getChild(context0.getReturnState(0));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet count: number = 0;\r\n\t\tlet parentsList: PredictionContext[] = new Array(context0size + context1size);\r\n\t\tlet returnStatesList: number[] = new Array(parentsList.length);\r\n\t\tlet leftIndex: number = 0;\r\n\t\tlet rightIndex: number = 0;\r\n\t\tlet canReturnLeft: boolean = true;\r\n\t\tlet canReturnRight: boolean = true;\r\n\t\twhile (leftIndex < context0size && rightIndex < context1size) {\r\n\t\t\tif (context0.getReturnState(leftIndex) === context1.getReturnState(rightIndex)) {\r\n\t\t\t\tparentsList[count] = contextCache.join(context0.getParent(leftIndex), context1.getParent(rightIndex));\r\n\t\t\t\treturnStatesList[count] = context0.getReturnState(leftIndex);\r\n\t\t\t\tcanReturnLeft = canReturnLeft && parentsList[count] === context0.getParent(leftIndex);\r\n\t\t\t\tcanReturnRight = canReturnRight && parentsList[count] === context1.getParent(rightIndex);\r\n\t\t\t\tleftIndex++;\r\n\t\t\t\trightIndex++;\r\n\t\t\t} else if (context0.getReturnState(leftIndex) < context1.getReturnState(rightIndex)) {\r\n\t\t\t\tparentsList[count] = context0.getParent(leftIndex);\r\n\t\t\t\treturnStatesList[count] = context0.getReturnState(leftIndex);\r\n\t\t\t\tcanReturnRight = false;\r\n\t\t\t\tleftIndex++;\r\n\t\t\t} else {\r\n\t\t\t\tassert(context1.getReturnState(rightIndex) < context0.getReturnState(leftIndex));\r\n\t\t\t\tparentsList[count] = context1.getParent(rightIndex);\r\n\t\t\t\treturnStatesList[count] = context1.getReturnState(rightIndex);\r\n\t\t\t\tcanReturnLeft = false;\r\n\t\t\t\trightIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tcount++;\r\n\t\t}\r\n\r\n\t\twhile (leftIndex < context0size) {\r\n\t\t\tparentsList[count] = context0.getParent(leftIndex);\r\n\t\t\treturnStatesList[count] = context0.getReturnState(leftIndex);\r\n\t\t\tleftIndex++;\r\n\t\t\tcanReturnRight = false;\r\n\t\t\tcount++;\r\n\t\t}\r\n\r\n\t\twhile (rightIndex < context1size) {\r\n\t\t\tparentsList[count] = context1.getParent(rightIndex);\r\n\t\t\treturnStatesList[count] = context1.getReturnState(rightIndex);\r\n\t\t\trightIndex++;\r\n\t\t\tcanReturnLeft = false;\r\n\t\t\tcount++;\r\n\t\t}\r\n\r\n\t\tif (canReturnLeft) {\r\n\t\t\treturn context0;\r\n\t\t} else if (canReturnRight) {\r\n\t\t\treturn context1;\r\n\t\t}\r\n\r\n\t\tif (count < parentsList.length) {\r\n\t\t\tparentsList = parentsList.slice(0, count);\r\n\t\t\treturnStatesList = returnStatesList.slice(0, count);\r\n\t\t}\r\n\r\n\t\tif (parentsList.length === 0) {\r\n\t\t\t// if one of them was EMPTY_LOCAL, it would be empty and handled at the beginning of the method\r\n\t\t\treturn PredictionContext.EMPTY_FULL;\r\n\t\t} else if (parentsList.length === 1) {\r\n\t\t\treturn new SingletonPredictionContext(parentsList[0], returnStatesList[0]);\r\n\t\t} else {\r\n\t\t\treturn new ArrayPredictionContext(parentsList, returnStatesList);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static isEmptyLocal(context: PredictionContext): boolean {\r\n\t\treturn context === PredictionContext.EMPTY_LOCAL;\r\n\t}\r\n\r\n\tpublic static getCachedContext(\r\n\t\t@NotNull context: PredictionContext,\r\n\t\t@NotNull contextCache: Array2DHashMap,\r\n\t\t@NotNull visited: PredictionContext.IdentityHashMap): PredictionContext {\r\n\t\tif (context.isEmpty) {\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\tlet existing = visited.get(context);\r\n\t\tif (existing) {\r\n\t\t\treturn existing;\r\n\t\t}\r\n\r\n\t\texisting = contextCache.get(context);\r\n\t\tif (existing) {\r\n\t\t\tvisited.put(context, existing);\r\n\t\t\treturn existing;\r\n\t\t}\r\n\r\n\t\tlet changed: boolean = false;\r\n\t\tlet parents: PredictionContext[] = new Array(context.size);\r\n\t\tfor (let i = 0; i < parents.length; i++) {\r\n\t\t\tlet parent: PredictionContext = PredictionContext.getCachedContext(context.getParent(i), contextCache, visited);\r\n\t\t\tif (changed || parent !== context.getParent(i)) {\r\n\t\t\t\tif (!changed) {\r\n\t\t\t\t\tparents = new Array(context.size);\r\n\t\t\t\t\tfor (let j = 0; j < context.size; j++) {\r\n\t\t\t\t\t\tparents[j] = context.getParent(j);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tparents[i] = parent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!changed) {\r\n\t\t\texisting = contextCache.putIfAbsent(context, context);\r\n\t\t\tvisited.put(context, existing != null ? existing : context);\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\t// We know parents.length>0 because context.isEmpty is checked at the beginning of the method.\r\n\t\tlet updated: PredictionContext;\r\n\t\tif (parents.length === 1) {\r\n\t\t\tupdated = new SingletonPredictionContext(parents[0], context.getReturnState(0));\r\n\t\t} else {\r\n\t\t\tlet returnStates: number[] = new Array(context.size);\r\n\t\t\tfor (let i = 0; i < context.size; i++) {\r\n\t\t\t\treturnStates[i] = context.getReturnState(i);\r\n\t\t\t}\r\n\r\n\t\t\tupdated = new ArrayPredictionContext(parents, returnStates, context.hashCode());\r\n\t\t}\r\n\r\n\t\texisting = contextCache.putIfAbsent(updated, updated);\r\n\t\tvisited.put(updated, existing || updated);\r\n\t\tvisited.put(context, existing || updated);\r\n\r\n\t\treturn updated;\r\n\t}\r\n\r\n\tpublic appendSingleContext(returnContext: number, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn this.appendContext(PredictionContext.EMPTY_FULL.getChild(returnContext), contextCache);\r\n\t}\r\n\r\n\tpublic abstract appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext;\r\n\r\n\tpublic getChild(returnState: number): PredictionContext {\r\n\t\treturn new SingletonPredictionContext(this, returnState);\r\n\t}\r\n\r\n\tpublic abstract readonly isEmpty: boolean;\r\n\r\n\tpublic abstract readonly hasEmpty: boolean;\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.cachedHashCode;\r\n\t}\r\n\r\n\t// @Override\r\n\tpublic abstract equals(o: any): boolean;\r\n\r\n\tpublic toStrings(recognizer: Recognizer | undefined, currentState: number, stop: PredictionContext = PredictionContext.EMPTY_FULL): string[] {\r\n\t\tlet result: string[] = [];\r\n\r\n\t\touter:\r\n\t\tfor (let perm = 0; ; perm++) {\r\n\t\t\tlet offset: number = 0;\r\n\t\t\tlet last: boolean = true;\r\n\t\t\tlet p: PredictionContext = this;\r\n\t\t\tlet stateNumber: number = currentState;\r\n\t\t\tlet localBuffer: string = \"\";\r\n\t\t\tlocalBuffer += \"[\";\r\n\t\t\twhile (!p.isEmpty && p !== stop) {\r\n\t\t\t\tlet index: number = 0;\r\n\t\t\t\tif (p.size > 0) {\r\n\t\t\t\t\tlet bits: number = 1;\r\n\t\t\t\t\twhile (((1 << bits) >>> 0) < p.size) {\r\n\t\t\t\t\t\tbits++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet mask: number = ((1 << bits) >>> 0) - 1;\r\n\t\t\t\t\tindex = (perm >> offset) & mask;\r\n\t\t\t\t\tlast = last && index >= p.size - 1;\r\n\t\t\t\t\tif (index >= p.size) {\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toffset += bits;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (recognizer) {\r\n\t\t\t\t\tif (localBuffer.length > 1) {\r\n\t\t\t\t\t\t// first char is '[', if more than that this isn't the first rule\r\n\t\t\t\t\t\tlocalBuffer += \" \";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet atn: ATN = recognizer.atn;\r\n\t\t\t\t\tlet s: ATNState = atn.states[stateNumber];\r\n\t\t\t\t\tlet ruleName: string = recognizer.ruleNames[s.ruleIndex];\r\n\t\t\t\t\tlocalBuffer += ruleName;\r\n\t\t\t\t} else if (p.getReturnState(index) !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tif (!p.isEmpty) {\r\n\t\t\t\t\t\tif (localBuffer.length > 1) {\r\n\t\t\t\t\t\t\t// first char is '[', if more than that this isn't the first rule\r\n\t\t\t\t\t\t\tlocalBuffer += \" \";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlocalBuffer += p.getReturnState(index);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstateNumber = p.getReturnState(index);\r\n\t\t\t\tp = p.getParent(index);\r\n\t\t\t}\r\n\r\n\t\t\tlocalBuffer += \"]\";\r\n\t\t\tresult.push(localBuffer);\r\n\r\n\t\t\tif (last) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n\r\nclass EmptyPredictionContext extends PredictionContext {\r\n\tprivate fullContext: boolean;\r\n\r\n\tconstructor(fullContext: boolean) {\r\n\t\tsuper(PredictionContext.calculateEmptyHashCode());\r\n\t\tthis.fullContext = fullContext;\r\n\t}\r\n\r\n\tget isFullContext(): boolean {\r\n\t\treturn this.fullContext;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected addEmptyContext(): PredictionContext {\r\n\t\treturn this;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected removeEmptyContext(): PredictionContext {\r\n\t\tthrow new Error(\"Cannot remove the empty context from itself.\");\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getParent(index: number): PredictionContext {\r\n\t\tthrow new Error(\"index out of bounds\");\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getReturnState(index: number): number {\r\n\t\tthrow new Error(\"index out of bounds\");\r\n\t}\r\n\r\n\t@Override\r\n\tpublic findReturnState(returnState: number): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendSingleContext(returnContext: number, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn contextCache.getChild(this, returnContext);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn suffix;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasEmpty(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\treturn this === o;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toStrings(recognizer: any, currentState: number, stop?: PredictionContext): string[] {\r\n\t\treturn [\"[]\"];\r\n\t}\r\n\r\n}\r\n\r\nclass ArrayPredictionContext extends PredictionContext {\r\n\t@NotNull\r\n\tpublic parents: PredictionContext[];\r\n\r\n\t@NotNull\r\n\tpublic returnStates: number[];\r\n\r\n\tconstructor( @NotNull parents: PredictionContext[], returnStates: number[], hashCode?: number) {\r\n\t\tsuper(hashCode || PredictionContext.calculateHashCode(parents, returnStates));\r\n\t\tassert(parents.length === returnStates.length);\r\n\t\tassert(returnStates.length > 1 || returnStates[0] !== PredictionContext.EMPTY_FULL_STATE_KEY, \"Should be using PredictionContext.EMPTY instead.\");\r\n\r\n\t\tthis.parents = parents;\r\n\t\tthis.returnStates = returnStates;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getParent(index: number): PredictionContext {\r\n\t\treturn this.parents[index];\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getReturnState(index: number): number {\r\n\t\treturn this.returnStates[index];\r\n\t}\r\n\r\n\t@Override\r\n\tpublic findReturnState(returnState: number): number {\r\n\t\treturn Arrays.binarySearch(this.returnStates, returnState);\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.returnStates.length;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasEmpty(): boolean {\r\n\t\treturn this.returnStates[this.returnStates.length - 1] === PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected addEmptyContext(): PredictionContext {\r\n\t\tif (this.hasEmpty) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tlet parents2: PredictionContext[] = this.parents.slice(0);\r\n\t\tlet returnStates2: number[] = this.returnStates.slice(0);\r\n\t\tparents2.push(PredictionContext.EMPTY_FULL);\r\n\t\treturnStates2.push(PredictionContext.EMPTY_FULL_STATE_KEY);\r\n\t\treturn new ArrayPredictionContext(parents2, returnStates2);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected removeEmptyContext(): PredictionContext {\r\n\t\tif (!this.hasEmpty) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (this.returnStates.length === 2) {\r\n\t\t\treturn new SingletonPredictionContext(this.parents[0], this.returnStates[0]);\r\n\t\t} else {\r\n\t\t\tlet parents2: PredictionContext[] = this.parents.slice(0, this.parents.length - 1);\r\n\t\t\tlet returnStates2: number[] = this.returnStates.slice(0, this.returnStates.length - 1);\r\n\t\t\treturn new ArrayPredictionContext(parents2, returnStates2);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn ArrayPredictionContext.appendContextImpl(this, suffix, new PredictionContext.IdentityHashMap());\r\n\t}\r\n\r\n\tprivate static appendContextImpl(context: PredictionContext, suffix: PredictionContext, visited: PredictionContext.IdentityHashMap): PredictionContext {\r\n\t\tif (suffix.isEmpty) {\r\n\t\t\tif (PredictionContext.isEmptyLocal(suffix)) {\r\n\t\t\t\tif (context.hasEmpty) {\r\n\t\t\t\t\treturn PredictionContext.EMPTY_LOCAL;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthrow new Error(\"what to do here?\");\r\n\t\t\t}\r\n\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\tif (suffix.size !== 1) {\r\n\t\t\tthrow new Error(\"Appending a tree suffix is not yet supported.\");\r\n\t\t}\r\n\r\n\t\tlet result = visited.get(context);\r\n\t\tif (!result) {\r\n\t\t\tif (context.isEmpty) {\r\n\t\t\t\tresult = suffix;\r\n\t\t\t} else {\r\n\t\t\t\tlet parentCount: number = context.size;\r\n\t\t\t\tif (context.hasEmpty) {\r\n\t\t\t\t\tparentCount--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet updatedParents: PredictionContext[] = new Array(parentCount);\r\n\t\t\t\tlet updatedReturnStates: number[] = new Array(parentCount);\r\n\t\t\t\tfor (let i = 0; i < parentCount; i++) {\r\n\t\t\t\t\tupdatedReturnStates[i] = context.getReturnState(i);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let i = 0; i < parentCount; i++) {\r\n\t\t\t\t\tupdatedParents[i] = ArrayPredictionContext.appendContextImpl(context.getParent(i), suffix, visited);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (updatedParents.length === 1) {\r\n\t\t\t\t\tresult = new SingletonPredictionContext(updatedParents[0], updatedReturnStates[0]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tassert(updatedParents.length > 1);\r\n\t\t\t\t\tresult = new ArrayPredictionContext(updatedParents, updatedReturnStates);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (context.hasEmpty) {\r\n\t\t\t\t\tresult = PredictionContext.join(result, suffix);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvisited.put(context, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (this === o) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(o instanceof ArrayPredictionContext)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this.hashCode() !== o.hashCode()) {\r\n\t\t\t// can't be same if hash is different\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet other: ArrayPredictionContext = o;\r\n\t\treturn this.equalsImpl(other, new Array2DHashSet());\r\n\t}\r\n\r\n\tprivate equalsImpl(other: ArrayPredictionContext, visited: JavaSet): boolean {\r\n\t\tlet selfWorkList: PredictionContext[] = [];\r\n\t\tlet otherWorkList: PredictionContext[] = [];\r\n\t\tselfWorkList.push(this);\r\n\t\totherWorkList.push(other);\r\n\t\twhile (true) {\r\n\t\t\tlet currentSelf = selfWorkList.pop();\r\n\t\t\tlet currentOther = otherWorkList.pop();\r\n\t\t\tif (!currentSelf || !currentOther) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tlet operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(currentSelf, currentOther);\r\n\t\t\tif (!visited.add(operands)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet selfSize: number = operands.x.size;\r\n\t\t\tif (selfSize === 0) {\r\n\t\t\t\tif (!operands.x.equals(operands.y)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet otherSize: number = operands.y.size;\r\n\t\t\tif (selfSize !== otherSize) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < selfSize; i++) {\r\n\t\t\t\tif (operands.x.getReturnState(i) !== operands.y.getReturnState(i)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet selfParent: PredictionContext = operands.x.getParent(i);\r\n\t\t\t\tlet otherParent: PredictionContext = operands.y.getParent(i);\r\n\t\t\t\tif (selfParent.hashCode() !== otherParent.hashCode()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (selfParent !== otherParent) {\r\n\t\t\t\t\tselfWorkList.push(selfParent);\r\n\t\t\t\t\totherWorkList.push(otherParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nexport class SingletonPredictionContext extends PredictionContext {\r\n\r\n\t@NotNull\r\n\tpublic parent: PredictionContext;\r\n\tpublic returnState: number;\r\n\r\n\tconstructor(@NotNull parent: PredictionContext, returnState: number) {\r\n\t\tsuper(PredictionContext.calculateSingleHashCode(parent, returnState));\r\n\t\t// assert(returnState != PredictionContext.EMPTY_FULL_STATE_KEY && returnState != PredictionContext.EMPTY_LOCAL_STATE_KEY);\r\n\t\tthis.parent = parent;\r\n\t\tthis.returnState = returnState;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getParent(index: number): PredictionContext {\r\n\t\t// assert(index == 0);\r\n\t\treturn this.parent;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getReturnState(index: number): number {\r\n\t\t// assert(index == 0);\r\n\t\treturn this.returnState;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic findReturnState(returnState: number): number {\r\n\t\treturn this.returnState === returnState ? 0 : -1;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn 1;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasEmpty(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext {\r\n\t\treturn contextCache.getChild(this.parent.appendContext(suffix, contextCache), this.returnState);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected addEmptyContext(): PredictionContext {\r\n\t\tlet parents: PredictionContext[] = [this.parent, PredictionContext.EMPTY_FULL];\r\n\t\tlet returnStates: number[] = [this.returnState, PredictionContext.EMPTY_FULL_STATE_KEY];\r\n\t\treturn new ArrayPredictionContext(parents, returnStates);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected removeEmptyContext(): PredictionContext {\r\n\t\treturn this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(o instanceof SingletonPredictionContext)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet other: SingletonPredictionContext = o;\r\n\t\tif (this.hashCode() !== other.hashCode()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.returnState === other.returnState\r\n\t\t\t&& this.parent.equals(other.parent);\r\n\t}\r\n}\r\n\r\nexport namespace PredictionContext {\r\n\texport const EMPTY_LOCAL: PredictionContext = new EmptyPredictionContext(false);\r\n\texport const EMPTY_FULL: PredictionContext = new EmptyPredictionContext(true);\r\n\texport const EMPTY_LOCAL_STATE_KEY: number = -((1 << 31) >>> 0);\r\n\texport const EMPTY_FULL_STATE_KEY: number = ((1 << 31) >>> 0) - 1;\r\n\r\n\texport class IdentityHashMap extends Array2DHashMap {\r\n\t\tconstructor() {\r\n\t\t\tsuper(IdentityEqualityComparator.INSTANCE);\r\n\t\t}\r\n\t}\r\n\r\n\texport class IdentityEqualityComparator implements EqualityComparator {\r\n\t\tpublic static readonly INSTANCE: IdentityEqualityComparator = new IdentityEqualityComparator();\r\n\r\n\t\tprivate IdentityEqualityComparator() {\r\n\t\t\t// intentionally empty\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic hashCode(obj: PredictionContext): number {\r\n\t\t\treturn obj.hashCode();\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(a: PredictionContext, b: PredictionContext): boolean {\r\n\t\t\treturn a === b;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.2796692-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Equatable } from \"../misc/Stubs\";\r\nimport { LexerActionExecutor } from \"./LexerActionExecutor\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\n/**\r\n * This field stores the bit mask for implementing the\r\n * {@link #isPrecedenceFilterSuppressed} property as a bit within the\r\n * existing {@link #altAndOuterContextDepth} field.\r\n */\r\nconst SUPPRESS_PRECEDENCE_FILTER: number = 0x80000000;\r\n\r\n/**\r\n * Represents a location with context in an ATN. The location is identified by the following values:\r\n *\r\n * * The current ATN state\r\n * * The predicted alternative\r\n * * The semantic context which must be true for this configuration to be enabled\r\n * * The syntactic context, which is represented as a graph-structured stack whose path(s) lead to the root of the rule\r\n * invocations leading to this state\r\n *\r\n * In addition to these values, `ATNConfig` stores several properties about paths taken to get to the location which\r\n * were added over time to help with performance, correctness, and/or debugging.\r\n *\r\n * * `reachesIntoOuterContext`:: Used to ensure semantic predicates are not evaluated in the wrong context.\r\n * * `hasPassedThroughNonGreedyDecision`: Used for enabling first-match-wins instead of longest-match-wins after\r\n * crossing a non-greedy decision.\r\n * * `lexerActionExecutor`: Used for tracking the lexer action(s) to execute should this instance be selected during\r\n * lexing.\r\n * * `isPrecedenceFilterSuppressed`: A state variable for one of the dynamic disambiguation strategies employed by\r\n * `ParserATNSimulator.applyPrecedenceFilter`.\r\n *\r\n * Due to the use of a graph-structured stack, a single `ATNConfig` is capable of representing many individual ATN\r\n * configurations which reached the same location in an ATN by following different paths.\r\n *\r\n * PERF: To conserve memory, `ATNConfig` is split into several different concrete types. `ATNConfig` itself stores the\r\n * minimum amount of information typically used to define an `ATNConfig` instance. Various derived types provide\r\n * additional storage space for cases where a non-default value is used for some of the object properties. The\r\n * `ATNConfig.create` and `ATNConfig.transform` methods automatically select the smallest concrete type capable of\r\n * representing the unique information for any given `ATNConfig`.\r\n */\r\nexport class ATNConfig implements Equatable {\r\n\t/** The ATN state associated with this configuration */\r\n\t@NotNull\r\n\tprivate _state: ATNState;\r\n\r\n\t/**\r\n\t * This is a bit-field currently containing the following values.\r\n\t *\r\n\t * * 0x00FFFFFF: Alternative\r\n\t * * 0x7F000000: Outer context depth\r\n\t * * 0x80000000: Suppress precedence filter\r\n\t */\r\n\tprivate altAndOuterContextDepth: number;\r\n\r\n\t/** The stack of invoking states leading to the rule/states associated\r\n\t * with this config. We track only those contexts pushed during\r\n\t * execution of the ATN simulator.\r\n\t */\r\n\t@NotNull\r\n\tprivate _context: PredictionContext;\r\n\r\n\tconstructor(/*@NotNull*/ state: ATNState, alt: number, /*@NotNull*/ context: PredictionContext);\r\n\tconstructor(/*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, /*@NotNull*/ context: PredictionContext);\r\n\r\n\tconstructor(@NotNull state: ATNState, altOrConfig: number | ATNConfig, @NotNull context: PredictionContext) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tassert((altOrConfig & 0xFFFFFF) === altOrConfig);\r\n\t\t\tthis._state = state;\r\n\t\t\tthis.altAndOuterContextDepth = altOrConfig;\r\n\t\t\tthis._context = context;\r\n\t\t} else {\r\n\t\t\tthis._state = state;\r\n\t\t\tthis.altAndOuterContextDepth = altOrConfig.altAndOuterContextDepth;\r\n\t\t\tthis._context = context;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static create(/*@NotNull*/ state: ATNState, alt: number, context: PredictionContext): ATNConfig;\r\n\r\n\tpublic static create(/*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, /*@NotNull*/ semanticContext: SemanticContext): ATNConfig;\r\n\r\n\tpublic static create(/*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, /*@*/ semanticContext: SemanticContext, lexerActionExecutor: LexerActionExecutor | undefined): ATNConfig;\r\n\r\n\tpublic static create(@NotNull state: ATNState, alt: number, context: PredictionContext, @NotNull semanticContext: SemanticContext = SemanticContext.NONE, lexerActionExecutor?: LexerActionExecutor): ATNConfig {\r\n\t\tif (semanticContext !== SemanticContext.NONE) {\r\n\t\t\tif (lexerActionExecutor != null) {\r\n\t\t\t\treturn new ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, state, alt, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn new SemanticContextATNConfig(semanticContext, state, alt, context);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (lexerActionExecutor != null) {\r\n\t\t\treturn new ActionATNConfig(lexerActionExecutor, state, alt, context, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn new ATNConfig(state, alt, context);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Gets the ATN state associated with this configuration */\r\n\t@NotNull\r\n\tget state(): ATNState {\r\n\t\treturn this._state;\r\n\t}\r\n\r\n\t/** What alt (or lexer rule) is predicted by this configuration */\r\n\tget alt(): number {\r\n\t\treturn this.altAndOuterContextDepth & 0x00FFFFFF;\r\n\t}\r\n\r\n\t@NotNull\r\n\tget context(): PredictionContext {\r\n\t\treturn this._context;\r\n\t}\r\n\r\n\tset context(@NotNull context: PredictionContext) {\r\n\t\tthis._context = context;\r\n\t}\r\n\r\n\tget reachesIntoOuterContext(): boolean {\r\n\t\treturn this.outerContextDepth !== 0;\r\n\t}\r\n\r\n\t/**\r\n\t * We cannot execute predicates dependent upon local context unless\r\n\t * we know for sure we are in the correct context. Because there is\r\n\t * no way to do this efficiently, we simply cannot evaluate\r\n\t * dependent predicates unless we are in the rule that initially\r\n\t * invokes the ATN simulator.\r\n\t *\r\n\t * closure() tracks the depth of how far we dip into the outer context:\r\n\t * depth > 0. Note that it may not be totally accurate depth since I\r\n\t * don't ever decrement. TODO: make it a boolean then\r\n\t */\r\n\tget outerContextDepth(): number {\r\n\t\treturn (this.altAndOuterContextDepth >>> 24) & 0x7F;\r\n\t}\r\n\r\n\tset outerContextDepth(outerContextDepth: number) {\r\n\t\tassert(outerContextDepth >= 0);\r\n\t\t// saturate at 0x7F - everything but zero/positive is only used for debug information anyway\r\n\t\touterContextDepth = Math.min(outerContextDepth, 0x7F);\r\n\t\tthis.altAndOuterContextDepth = ((outerContextDepth << 24) | (this.altAndOuterContextDepth & ~0x7F000000) >>> 0);\r\n\t}\r\n\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@NotNull\r\n\tget semanticContext(): SemanticContext {\r\n\t\treturn SemanticContext.NONE;\r\n\t}\r\n\r\n\tget hasPassedThroughNonGreedyDecision(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clone(): ATNConfig {\r\n\t\treturn this.transform(this.state, false);\r\n\t}\r\n\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, /*@NotNull*/ semanticContext: SemanticContext): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, context: PredictionContext): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, lexerActionExecutor: LexerActionExecutor): ATNConfig;\r\n\tpublic transform(/*@NotNull*/ state: ATNState, checkNonGreedy: boolean, arg2?: SemanticContext | PredictionContext | LexerActionExecutor): ATNConfig {\r\n\t\tif (arg2 == null) {\r\n\t\t\treturn this.transformImpl(state, this._context, this.semanticContext, checkNonGreedy, this.lexerActionExecutor);\r\n\t\t} else if (arg2 instanceof PredictionContext) {\r\n\t\t\treturn this.transformImpl(state, arg2, this.semanticContext, checkNonGreedy, this.lexerActionExecutor);\r\n\t\t} else if (arg2 instanceof SemanticContext) {\r\n\t\t\treturn this.transformImpl(state, this._context, arg2, checkNonGreedy, this.lexerActionExecutor);\r\n\t\t} else {\r\n\t\t\treturn this.transformImpl(state, this._context, this.semanticContext, checkNonGreedy, arg2);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate transformImpl(@NotNull state: ATNState, context: PredictionContext, @NotNull semanticContext: SemanticContext, checkNonGreedy: boolean, lexerActionExecutor: LexerActionExecutor | undefined): ATNConfig {\r\n\t\tlet passedThroughNonGreedy: boolean = checkNonGreedy && ATNConfig.checkNonGreedyDecision(this, state);\r\n\t\tif (semanticContext !== SemanticContext.NONE) {\r\n\t\t\tif (lexerActionExecutor != null || passedThroughNonGreedy) {\r\n\t\t\t\treturn new ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, state, this, context, passedThroughNonGreedy);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn new SemanticContextATNConfig(semanticContext, state, this, context);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (lexerActionExecutor != null || passedThroughNonGreedy) {\r\n\t\t\treturn new ActionATNConfig(lexerActionExecutor, state, this, context, passedThroughNonGreedy);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn new ATNConfig(state, this, context);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static checkNonGreedyDecision(source: ATNConfig, target: ATNState): boolean {\r\n\t\treturn source.hasPassedThroughNonGreedyDecision\r\n\t\t\t|| target instanceof DecisionState && target.nonGreedy;\r\n\t}\r\n\r\n\tpublic appendContext(context: number, contextCache: PredictionContextCache): ATNConfig;\r\n\tpublic appendContext(context: PredictionContext, contextCache: PredictionContextCache): ATNConfig;\r\n\tpublic appendContext(context: number | PredictionContext, contextCache: PredictionContextCache): ATNConfig {\r\n\t\tif (typeof context === \"number\") {\r\n\t\t\tlet appendedContext: PredictionContext = this.context.appendSingleContext(context, contextCache);\r\n\t\t\tlet result: ATNConfig = this.transform(this.state, false, appendedContext);\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tlet appendedContext: PredictionContext = this.context.appendContext(context, contextCache);\r\n\t\t\tlet result: ATNConfig = this.transform(this.state, false, appendedContext);\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Determines if this `ATNConfig` fully contains another `ATNConfig`.\r\n\t *\r\n\t * An ATN configuration represents a position (including context) in an ATN during parsing. Since `ATNConfig` stores\r\n\t * the context as a graph, a single `ATNConfig` instance is capable of representing many ATN configurations which\r\n\t * are all in the same \"location\" but have different contexts. These `ATNConfig` instances are again merged when\r\n\t * they are added to an `ATNConfigSet`. This method supports `ATNConfigSet.contains` by evaluating whether a\r\n\t * particular `ATNConfig` contains all of the ATN configurations represented by another `ATNConfig`.\r\n\t *\r\n\t * An `ATNConfig` _a_ contains another `ATNConfig` _b_ if all of the following conditions are met:\r\n\t *\r\n\t * * The configurations are in the same state (`state`)\r\n\t * * The configurations predict the same alternative (`alt`)\r\n\t * * The semantic context of _a_ implies the semantic context of _b_ (this method performs a weaker equality check)\r\n\t * * Joining the prediction contexts of _a_ and _b_ results in the prediction context of _a_\r\n\t *\r\n\t * This method implements a conservative approximation of containment. As a result, when this method returns `true`\r\n\t * it is known that parsing from `subconfig` can only recognize a subset of the inputs which can be recognized\r\n\t * starting at the current `ATNConfig`. However, due to the imprecise evaluation of implication for the semantic\r\n\t * contexts, no assumptions can be made about the relationship between the configurations when this method returns\r\n\t * `false`.\r\n\t *\r\n\t * @param subconfig The sub configuration.\r\n\t * @returns `true` if this configuration contains `subconfig`; otherwise, `false`.\r\n\t */\r\n\tpublic contains(subconfig: ATNConfig): boolean {\r\n\t\tif (this.state.stateNumber !== subconfig.state.stateNumber\r\n\t\t\t|| this.alt !== subconfig.alt\r\n\t\t\t|| !this.semanticContext.equals(subconfig.semanticContext)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet leftWorkList: PredictionContext[] = [];\r\n\t\tlet rightWorkList: PredictionContext[] = [];\r\n\t\tleftWorkList.push(this.context);\r\n\t\trightWorkList.push(subconfig.context);\r\n\t\twhile (true) {\r\n\t\t\tlet left = leftWorkList.pop();\r\n\t\t\tlet right = rightWorkList.pop();\r\n\t\t\tif (!left || !right) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (left === right) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tif (left.size < right.size) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (right.isEmpty) {\r\n\t\t\t\treturn left.hasEmpty;\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = 0; i < right.size; i++) {\r\n\t\t\t\t\tlet index: number = left.findReturnState(right.getReturnState(i));\r\n\t\t\t\t\tif (index < 0) {\r\n\t\t\t\t\t\t// assumes invokingStates has no duplicate entries\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tleftWorkList.push(left.getParent(index));\r\n\t\t\t\t\trightWorkList.push(right.getParent(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget isPrecedenceFilterSuppressed(): boolean {\r\n\t\treturn (this.altAndOuterContextDepth & SUPPRESS_PRECEDENCE_FILTER) !== 0;\r\n\t}\r\n\r\n\tset isPrecedenceFilterSuppressed(value: boolean) {\r\n\t\tif (value) {\r\n\t\t\tthis.altAndOuterContextDepth |= SUPPRESS_PRECEDENCE_FILTER;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.altAndOuterContextDepth &= ~SUPPRESS_PRECEDENCE_FILTER;\r\n\t\t}\r\n\t}\r\n\r\n\t/** An ATN configuration is equal to another if both have\r\n\t * the same state, they predict the same alternative, and\r\n\t * syntactic/semantic contexts are the same.\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (this === o) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(o instanceof ATNConfig)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.state.stateNumber === o.state.stateNumber\r\n\t\t\t&& this.alt === o.alt\r\n\t\t\t&& this.reachesIntoOuterContext === o.reachesIntoOuterContext\r\n\t\t\t&& this.context.equals(o.context)\r\n\t\t\t&& this.semanticContext.equals(o.semanticContext)\r\n\t\t\t&& this.isPrecedenceFilterSuppressed === o.isPrecedenceFilterSuppressed\r\n\t\t\t&& this.hasPassedThroughNonGreedyDecision === o.hasPassedThroughNonGreedyDecision\r\n\t\t\t&& ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor, o.lexerActionExecutor);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hashCode: number = MurmurHash.initialize(7);\r\n\t\thashCode = MurmurHash.update(hashCode, this.state.stateNumber);\r\n\t\thashCode = MurmurHash.update(hashCode, this.alt);\r\n\t\thashCode = MurmurHash.update(hashCode, this.reachesIntoOuterContext ? 1 : 0);\r\n\t\thashCode = MurmurHash.update(hashCode, this.context);\r\n\t\thashCode = MurmurHash.update(hashCode, this.semanticContext);\r\n\t\thashCode = MurmurHash.update(hashCode, this.hasPassedThroughNonGreedyDecision ? 1 : 0);\r\n\t\thashCode = MurmurHash.update(hashCode, this.lexerActionExecutor);\r\n\t\thashCode = MurmurHash.finish(hashCode, 7);\r\n\t\treturn hashCode;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a graphical representation of the current `ATNConfig` in Graphviz format. The graph can be stored to a\r\n\t * **.dot** file and then rendered to an image using Graphviz.\r\n\t *\r\n\t * @returns A Graphviz graph representing the current `ATNConfig`.\r\n\t *\r\n\t * @see http://www.graphviz.org/\r\n\t */\r\n\tpublic toDotString(): string {\r\n\t\tlet builder = \"\";\r\n\t\tbuilder += (\"digraph G {\\n\");\r\n\t\tbuilder += (\"rankdir=LR;\\n\");\r\n\r\n\t\tlet visited = new Array2DHashMap(PredictionContext.IdentityEqualityComparator.INSTANCE);\r\n\t\tlet workList: PredictionContext[] = [];\r\n\t\tfunction getOrAddContext(context: PredictionContext): number {\r\n\t\t\tlet newNumber = visited.size;\r\n\t\t\tlet result = visited.putIfAbsent(context, newNumber);\r\n\t\t\tif (result != null) {\r\n\t\t\t\t// Already saw this context\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\r\n\t\t\tworkList.push(context);\r\n\t\t\treturn newNumber;\r\n\t\t}\r\n\r\n\t\tworkList.push(this.context);\r\n\t\tvisited.put(this.context, 0);\r\n\t\twhile (true) {\r\n\t\t\tlet current = workList.pop();\r\n\t\t\tif (!current) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < current.size; i++) {\r\n\t\t\t\tbuilder += (\" s\") + (getOrAddContext(current));\r\n\t\t\t\tbuilder += (\"->\");\r\n\t\t\t\tbuilder += (\"s\") + (getOrAddContext(current.getParent(i)));\r\n\t\t\t\tbuilder += (\"[label=\\\"\") + (current.getReturnState(i)) + (\"\\\"];\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbuilder += (\"}\\n\");\r\n\t\treturn builder.toString();\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(recog: Recognizer | undefined, showAlt: boolean): string;\r\n\tpublic toString(recog: Recognizer | undefined, showAlt: boolean, showContext: boolean): string;\r\n\tpublic toString(recog?: Recognizer, showAlt?: boolean, showContext?: boolean): string {\r\n\t\t// Must check showContext before showAlt to preserve original overload behavior\r\n\t\tif (showContext == null) {\r\n\t\t\tshowContext = showAlt != null;\r\n\t\t}\r\n\r\n\t\tif (showAlt == null) {\r\n\t\t\tshowAlt = true;\r\n\t\t}\r\n\r\n\t\tlet buf = \"\";\r\n\t\t// if (this.state.ruleIndex >= 0) {\r\n\t\t// \tif (recog != null) {\r\n\t\t// \t\tbuf += (recog.ruleNames[this.state.ruleIndex] + \":\");\r\n\t\t// \t} else {\r\n\t\t// \t\tbuf += (this.state.ruleIndex + \":\");\r\n\t\t// \t}\r\n\t\t// }\r\n\t\tlet contexts: string[];\r\n\t\tif (showContext) {\r\n\t\t\tcontexts = this.context.toStrings(recog, this.state.stateNumber);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcontexts = [\"?\"];\r\n\t\t}\r\n\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let contextDesc of contexts) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbuf += (\", \");\r\n\t\t\t}\r\n\r\n\t\t\tbuf += (\"(\");\r\n\t\t\tbuf += (this.state);\r\n\t\t\tif (showAlt) {\r\n\t\t\t\tbuf += (\",\");\r\n\t\t\t\tbuf += (this.alt);\r\n\t\t\t}\r\n\t\t\tif (this.context) {\r\n\t\t\t\tbuf += (\",\");\r\n\t\t\t\tbuf += (contextDesc);\r\n\t\t\t}\r\n\t\t\tif (this.semanticContext !== SemanticContext.NONE) {\r\n\t\t\t\tbuf += (\",\");\r\n\t\t\t\tbuf += (this.semanticContext);\r\n\t\t\t}\r\n\t\t\tif (this.reachesIntoOuterContext) {\r\n\t\t\t\tbuf += (\",up=\") + (this.outerContextDepth);\r\n\t\t\t}\r\n\t\t\tbuf += (\")\");\r\n\t\t}\r\n\t\treturn buf.toString();\r\n\t}\r\n}\r\n\r\n/**\r\n * This class was derived from `ATNConfig` purely as a memory optimization. It allows for the creation of an `ATNConfig`\r\n * with a non-default semantic context.\r\n *\r\n * See the `ATNConfig` documentation for more information about conserving memory through the use of several concrete\r\n * types.\r\n */\r\nclass SemanticContextATNConfig extends ATNConfig {\r\n\t@NotNull\r\n\tprivate _semanticContext: SemanticContext;\r\n\r\n\tconstructor(semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext);\r\n\tconstructor(semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext);\r\n\tconstructor(semanticContext: SemanticContext, @NotNull state: ATNState, @NotNull altOrConfig: number | ATNConfig, context: PredictionContext) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t} else {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t}\r\n\r\n\t\tthis._semanticContext = semanticContext;\r\n\t}\r\n\r\n\t@Override\r\n\tget semanticContext(): SemanticContext {\r\n\t\treturn this._semanticContext;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * This class was derived from `ATNConfig` purely as a memory optimization. It allows for the creation of an `ATNConfig`\r\n * with a lexer action.\r\n *\r\n * See the `ATNConfig` documentation for more information about conserving memory through the use of several concrete\r\n * types.\r\n */\r\nclass ActionATNConfig extends ATNConfig {\r\n\tprivate _lexerActionExecutor?: LexerActionExecutor;\r\n\tprivate passedThroughNonGreedyDecision: boolean;\r\n\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull state: ATNState, @NotNull altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t} else {\r\n\t\t\tsuper(state, altOrConfig, context);\r\n\t\t\tif (altOrConfig.semanticContext !== SemanticContext.NONE) {\r\n\t\t\t\tthrow new Error(\"Not supported\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._lexerActionExecutor = lexerActionExecutor;\r\n\t\tthis.passedThroughNonGreedyDecision = passedThroughNonGreedyDecision;\r\n\t}\r\n\r\n\t@Override\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn this._lexerActionExecutor;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasPassedThroughNonGreedyDecision(): boolean {\r\n\t\treturn this.passedThroughNonGreedyDecision;\r\n\t}\r\n}\r\n\r\n/**\r\n * This class was derived from `SemanticContextATNConfig` purely as a memory optimization. It allows for the creation of\r\n * an `ATNConfig` with both a lexer action and a non-default semantic context.\r\n *\r\n * See the `ATNConfig` documentation for more information about conserving memory through the use of several concrete\r\n * types.\r\n */\r\nclass ActionSemanticContextATNConfig extends SemanticContextATNConfig {\r\n\tprivate _lexerActionExecutor?: LexerActionExecutor;\r\n\tprivate passedThroughNonGreedyDecision: boolean;\r\n\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean);\r\n\tconstructor(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull semanticContext: SemanticContext, @NotNull state: ATNState, altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) {\r\n\t\tif (typeof altOrConfig === \"number\") {\r\n\t\t\tsuper(semanticContext, state, altOrConfig, context);\r\n\t\t} else {\r\n\t\t\tsuper(semanticContext, state, altOrConfig, context);\r\n\t\t}\r\n\r\n\t\tthis._lexerActionExecutor = lexerActionExecutor;\r\n\t\tthis.passedThroughNonGreedyDecision = passedThroughNonGreedyDecision;\r\n\t}\r\n\r\n\t@Override\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\treturn this._lexerActionExecutor;\r\n\t}\r\n\r\n\t@Override\r\n\tget hasPassedThroughNonGreedyDecision(): boolean {\r\n\t\treturn this.passedThroughNonGreedyDecision;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport * as assert from \"assert\";\r\nimport * as util from \"util\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\n\r\n/**\r\n * Private empty array used to construct empty BitSets\r\n */\r\nconst EMPTY_DATA: Uint16Array = new Uint16Array(0);\r\n\r\n/**\r\n * Gets the word index of the `UInt16` element in `BitSet.data` containing the bit with the specified index.\r\n */\r\nfunction getIndex(bitNumber: number) {\r\n\treturn bitNumber >>> 4;\r\n}\r\n\r\n/**\r\n * Convert a word index into the bit index of the LSB of that word\r\n */\r\n\r\nfunction unIndex(n: number) {\r\n\treturn n * 16;\r\n}\r\n\r\n/**\r\n * Gets the bit number of the least significant bit set LSB which is set in a word non-zero word;\r\n * Bit numbers run from LSB to MSB starting with 0.\r\n */\r\nfunction findLSBSet(word: number) {\r\n\tlet bit = 1;\r\n\tfor (let i = 0; i < 16; i++) {\r\n\t\tif ((word & bit) !== 0) {\r\n\t\t\treturn i;\r\n\t\t}\r\n\t\tbit = (bit << 1) >>> 0;\r\n\t}\r\n\tthrow new RangeError(\"No specified bit found\");\r\n}\r\n\r\nfunction findMSBSet(word: number) {\r\n\tlet bit = (1 << 15) >>> 0;\r\n\tfor (let i = 15; i >= 0; i--) {\r\n\t\tif ((word & bit) !== 0) {\r\n\t\t\treturn i;\r\n\t\t}\r\n\t\tbit = bit >>> 1;\r\n\t}\r\n\tthrow new RangeError(\"No specified bit found\");\r\n}\r\n\r\n/**\r\n * Gets a 16-bit mask with bit numbers fromBit to toBit (inclusive) set.\r\n * Bit numbers run from LSB to MSB starting with 0.\r\n */\r\nfunction bitsFor(fromBit: number, toBit: number): number {\r\n\tfromBit &= 0xF;\r\n\ttoBit &= 0xF;\r\n\tif (fromBit === toBit) {\r\n\t\treturn (1 << fromBit) >>> 0;\r\n\t}\r\n\treturn ((0xFFFF >>> (15 - toBit)) ^ (0xFFFF >>> (16 - fromBit)));\r\n}\r\n\r\n/**\r\n * A lookup table for number of set bits in a 16-bit integer. This is used to quickly count the cardinality (number of unique elements) of a BitSet.\r\n */\r\nconst POP_CNT: Uint8Array = new Uint8Array(65536);\r\nfor (let i = 0; i < 16; i++) {\r\n\tconst stride = (1 << i) >>> 0;\r\n\tlet index = 0;\r\n\twhile (index < POP_CNT.length) {\r\n\t\t// skip the numbers where the bit isn't set\r\n\t\tindex += stride;\r\n\r\n\t\t// increment the ones where the bit is set\r\n\t\tfor (let j = 0; j < stride; j++) {\r\n\t\t\tPOP_CNT[index]++;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport class BitSet implements Iterable{\r\n\tprivate data: Uint16Array;\r\n\r\n\t/**\r\n\t * Creates a new bit set. All bits are initially `false`.\r\n\t */\r\n\tconstructor();\r\n\r\n\t/**\r\n\t * Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range `0`\r\n\t * through `nbits-1`. All bits are initially `false`.\r\n\t */\r\n\tconstructor(nbits: number);\r\n\r\n\t/**\r\n\t * Creates a bit set from a iterable list of numbers (including another BitSet);\r\n\t */\r\n\tconstructor(numbers: Iterable);\r\n\r\n\t/*\r\n\t** constructor implementation\r\n\t*/\r\n\tconstructor(arg?: number | Iterable) {\r\n\t\tif (!arg) {\r\n\t\t\t// covering the case of unspecified and nbits===0\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t} else if (typeof arg === \"number\") {\r\n\t\t\tif (arg < 0) {\r\n\t\t\t\tthrow new RangeError(\"nbits cannot be negative\");\r\n\t\t\t} else {\r\n\t\t\t\tthis.data = new Uint16Array(getIndex(arg - 1) + 1);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (arg instanceof BitSet) {\r\n\t\t\t\tthis.data = arg.data.slice(0); // Clone the data\r\n\t\t\t} else {\r\n\t\t\t\tlet max = -1;\r\n\t\t\t\tfor (let v of arg) {\r\n\t\t\t\t\tif (max < v) {\r\n\t\t\t\t\t\tmax = v;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.data = new Uint16Array(getIndex(max - 1) + 1);\r\n\t\t\t\tfor (let v of arg) {\r\n\t\t\t\t\tthis.set(v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Performs a logical **AND** of this target bit set with the argument bit set. This bit set is modified so that\r\n\t * each bit in it has the value `true` if and only if it both initially had the value `true` and the corresponding\r\n\t * bit in the bit set argument also had the value `true`.\r\n\t */\r\n\tpublic and(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst words = Math.min(data.length, other.length);\r\n\r\n\t\tlet lastWord = -1;\t// Keep track of index of last non-zero word\r\n\r\n\t\tfor (let i = 0; i < words; i++) {\r\n\t\t\tlet value = data[i] &= other[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t}\r\n\r\n\t\tif (lastWord < data.length - 1) {\r\n\t\t\tthis.data = data.slice(0, lastWord + 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clears all of the bits in this `BitSet` whose corresponding bit is set in the specified `BitSet`.\r\n\t */\r\n\tpublic andNot(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst words = Math.min(data.length, other.length);\r\n\r\n\t\tlet lastWord = -1;\t// Keep track of index of last non-zero word\r\n\r\n\t\tfor (let i = 0; i < words; i++) {\r\n\t\t\tlet value = data[i] &= (other[i] ^ 0xFFFF);\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t}\r\n\r\n\t\tif (lastWord < data.length - 1) {\r\n\t\t\tthis.data = data.slice(0, lastWord + 1);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Returns the number of bits set to `true` in this `BitSet`.\r\n\t */\r\n\tpublic cardinality(): number {\r\n\t\tif (this.isEmpty) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet result = 0;\r\n\r\n\t\tfor (let i = 0; i < length; i++) {\r\n\t\t\tresult += POP_CNT[data[i]];\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets all of the bits in this `BitSet` to `false`.\r\n\t */\r\n\tpublic clear(): void;\r\n\r\n\t/**\r\n\t * Sets the bit specified by the index to `false`.\r\n\t *\r\n\t * @param bitIndex the index of the bit to be cleared\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic clear(bitIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to `false`.\r\n\t *\r\n\t * @param fromIndex index of the first bit to be cleared\r\n\t * @param toIndex index after the last bit to be cleared\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic clear(fromIndex: number, toIndex: number): void;\r\n\tpublic clear(fromIndex?: number, toIndex?: number): void {\r\n\t\tif (fromIndex == null) {\r\n\t\t\tthis.data.fill(0);\r\n\t\t} else if (toIndex == null) {\r\n\t\t\tthis.set(fromIndex, false);\r\n\t\t} else {\r\n\t\t\tthis.set(fromIndex, toIndex, false);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the bit at the specified index to the complement of its current value.\r\n\t *\r\n\t * @param bitIndex the index of the bit to flip\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic flip(bitIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets each bit from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to the complement\r\n\t * of its current value.\r\n\t *\r\n\t * @param fromIndex index of the first bit to flip\r\n\t * @param toIndex index after the last bit to flip\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic flip(fromIndex: number, toIndex: number): void;\r\n\tpublic flip(fromIndex: number, toIndex?: number): void {\r\n\t\tif (toIndex == null) {\r\n\t\t\ttoIndex = fromIndex;\r\n\t\t}\r\n\t\tif (fromIndex < 0 || toIndex < fromIndex) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tconst lastWord = getIndex(toIndex);\r\n\r\n\t\tif (word === lastWord) {\r\n\t\t\tthis.data[word] ^= bitsFor(fromIndex, toIndex);\r\n\t\t} else {\r\n\t\t\tthis.data[word++] ^= bitsFor(fromIndex, 15);\r\n\t\t\twhile (word < lastWord) {\r\n\t\t\t\tthis.data[word++] ^= 0xFFFF;\r\n\t\t\t}\r\n\t\t\tthis.data[word++] ^= bitsFor(0, toIndex);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the value of the bit with the specified index. The value is `true` if the bit with the index `bitIndex`\r\n\t * is currently set in this `BitSet`; otherwise, the result is `false`.\r\n\t *\r\n\t * @param bitIndex the bit index\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic get(bitIndex: number): boolean;\r\n\r\n\t/**\r\n\t * Returns a new `BitSet` composed of bits from this `BitSet` from `fromIndex` (inclusive) to `toIndex` (exclusive).\r\n\t *\r\n\t * @param fromIndex index of the first bit to include\r\n\t * @param toIndex index after the last bit to include\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic get(fromIndex: number, toIndex: number): BitSet;\r\n\tpublic get(fromIndex: number, toIndex?: number): boolean | BitSet {\r\n\t\tif (toIndex === undefined) {\r\n\t\t\treturn !!(this.data[getIndex(fromIndex)] & bitsFor(fromIndex, fromIndex));\r\n\t\t} else {\r\n\t\t\t// return a BitSet\r\n\t\t\tlet result = new BitSet(toIndex + 1);\r\n\t\t\tfor (let i = fromIndex; i <= toIndex; i++) {\r\n\t\t\t\tresult.set(i, this.get(i));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns true if the specified `BitSet` has any bits set to `true` that are also set to `true` in this `BitSet`.\r\n\t *\r\n\t * @param set `BitSet` to intersect with\r\n\t */\r\n\tpublic intersects(set: BitSet): boolean {\r\n\t\tlet smallerLength = Math.min(this.length(), set.length());\r\n\t\tif (smallerLength === 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet bound = getIndex(smallerLength - 1);\r\n\t\tfor (let i = 0; i <= bound; i++) {\r\n\t\t\tif ((this.data[i] & set.data[i]) !== 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns true if this `BitSet` contains no bits that are set to `true`.\r\n\t */\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.length() === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the \"logical size\" of this `BitSet`: the index of the highest set bit in the `BitSet` plus one. Returns\r\n\t * zero if the `BitSet` contains no set bits.\r\n\t */\r\n\tpublic length(): number {\r\n\t\tif (!this.data.length) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn this.previousSetBit(unIndex(this.data.length) - 1) + 1;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index of the first bit that is set to `false` that occurs on or after the specified starting index,\r\n\t * If no such bit exists then `-1` is returned.\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic nextClearBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word > length) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\tlet ignore = 0xFFFF ^ bitsFor(fromIndex, 15);\r\n\r\n\t\tif ((data[word] | ignore) === 0xFFFF) {\r\n\t\t\tword++;\r\n\t\t\tignore = 0;\r\n\t\t\tfor (; word < length; word++) {\r\n\t\t\t\tif (data[word] !== 0xFFFF) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word === length) {\r\n\t\t\t\t// Hit the end\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findLSBSet((data[word] | ignore) ^ 0xFFFF);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index of the first bit that is set to `true` that occurs on or after the specified starting index.\r\n\t * If no such bit exists then `-1` is returned.\r\n\t *\r\n\t * To iterate over the `true` bits in a `BitSet`, use the following loop:\r\n\t *\r\n\t * ```\r\n\t * for (let i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) {\r\n\t * // operate on index i here\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic nextSetBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word > length) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tlet mask = bitsFor(fromIndex, 15);\r\n\r\n\t\tif ((data[word] & mask) === 0) {\r\n\t\t\tword++;\r\n\t\t\tmask = 0xFFFF;\r\n\t\t\tfor (; word < length; word++) {\r\n\t\t\t\tif (data[word] !== 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word >= length) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findLSBSet(data[word] & mask);\r\n\t}\r\n\r\n\t/**\r\n\t * Performs a logical **OR** of this bit set with the bit set argument. This bit set is modified so that a bit in it\r\n\t * has the value `true` if and only if it either already had the value `true` or the corresponding bit in the bit\r\n\t * set argument has the value `true`.\r\n\t */\r\n\tpublic or(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst minWords = Math.min(data.length, other.length);\r\n\t\tconst words = Math.max(data.length, other.length);\r\n\t\tconst dest = data.length === words ? data : new Uint16Array(words);\r\n\r\n\t\tlet lastWord = -1;\r\n\r\n\t\t// Or those words both sets have in common\r\n\r\n\t\tfor (let i = 0; i < minWords; i++) {\r\n\t\t\tlet value = dest[i] = data[i] | other[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy words from larger set (if there is one)\r\n\r\n\t\tconst longer = data.length > other.length ? data : other;\r\n\t\tfor (let i = minWords; i < words; i++) {\r\n\t\t\tlet value = dest[i] = longer[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t} else if (dest.length === lastWord + 1) {\r\n\t\t\tthis.data = dest;\r\n\t\t} else {\r\n\t\t\tthis.data = dest.slice(0, lastWord);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index of the nearest bit that is set to `false` that occurs on or before the specified starting\r\n\t * index. If no such bit exists, or if `-1` is given as the starting index, then `-1` is returned.\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is less than `-1`\r\n\t */\r\n\tpublic previousClearBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word >= length) {\r\n\t\t\tword = length - 1;\r\n\t\t}\r\n\r\n\t\tlet ignore = 0xFFFF ^ bitsFor(0, fromIndex);\r\n\r\n\t\tif ((data[word] | ignore) === 0xFFFF) {\r\n\t\t\tignore = 0;\r\n\t\t\tword--;\r\n\t\t\tfor (; word >= 0; word--) {\r\n\t\t\t\tif (data[word] !== 0xFFFF) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word < 0) {\r\n\t\t\t\t// Hit the end\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findMSBSet((data[word] | ignore) ^ 0xFFFF);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Returns the index of the nearest bit that is set to `true` that occurs on or before the specified starting index.\r\n\t * If no such bit exists, or if `-1` is given as the starting index, then `-1` is returned.\r\n\t *\r\n\t * To iterate over the `true` bits in a `BitSet`, use the following loop:\r\n\t *\r\n\t * ```\r\n\t * for (let i = bs.length(); (i = bs.previousSetBit(i-1)) >= 0; ) {\r\n\t * // operate on index i here\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param fromIndex the index to start checking from (inclusive)\r\n\t *\r\n\t * @throws RangeError if the specified index is less than `-1`\r\n\t */\r\n\tpublic previousSetBit(fromIndex: number): number {\r\n\t\tif (fromIndex < 0) {\r\n\t\t\tthrow new RangeError(\"fromIndex cannot be negative\");\r\n\t\t}\r\n\r\n\t\tconst data = this.data;\r\n\t\tconst length = data.length;\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tif (word >= length) {\r\n\t\t\tword = length - 1;\r\n\t\t}\r\n\r\n\t\tlet mask = bitsFor(0, fromIndex);\r\n\r\n\t\tif ((data[word] & mask) === 0) {\r\n\t\t\tword--;\r\n\t\t\tmask = 0xFFFF;\r\n\t\t\tfor (; word >= 0; word--) {\r\n\t\t\t\tif (data[word] !== 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (word < 0) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unIndex(word) + findMSBSet(data[word] & mask);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the bit at the specified index to `true`.\r\n\t *\r\n\t * @param bitIndex a bit index\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic set(bitIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets the bit at the specified index to the specified value.\r\n\t *\r\n\t * @param bitIndex a bit index\r\n\t * @param value a boolean value to set\r\n\t *\r\n\t * @throws RangeError if the specified index is negative\r\n\t */\r\n\tpublic set(bitIndex: number, value: boolean): void;\r\n\r\n\t/**\r\n\t * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to `true`.\r\n\t *\r\n\t * @param fromIndex index of the first bit to be set\r\n\t * @param toIndex index after the last bit to be set\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic set(fromIndex: number, toIndex: number): void;\r\n\r\n\t/**\r\n\t * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to the specified\r\n\t * value.\r\n\t *\r\n\t * @param fromIndex index of the first bit to be set\r\n\t * @param toIndex index after the last bit to be set\r\n\t * @param value value to set the selected bits to\r\n\t *\r\n\t * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`\r\n\t */\r\n\tpublic set(fromIndex: number, toIndex: number, value: boolean): void;\r\n\tpublic set(fromIndex: number, toIndex?: boolean | number, value?: boolean): void {\r\n\t\tif (toIndex === undefined) {\r\n\t\t\ttoIndex = fromIndex;\r\n\t\t\tvalue = true;\r\n\t\t} else if (typeof toIndex === \"boolean\") {\r\n\t\t\tvalue = toIndex;\r\n\t\t\ttoIndex = fromIndex;\r\n\t\t}\r\n\r\n\t\tif (value === undefined) {\r\n\t\t\tvalue = true;\r\n\t\t}\r\n\r\n\t\tif (fromIndex < 0 || fromIndex > toIndex) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tlet word = getIndex(fromIndex);\r\n\t\tlet lastWord = getIndex(toIndex);\r\n\r\n\t\tif (value && lastWord >= this.data.length) {\r\n\t\t\t// Grow array \"just enough\" for bits we need to set\r\n\t\t\tlet temp = new Uint16Array(lastWord + 1);\r\n\t\t\tthis.data.forEach((value, index) => temp[index] = value);\r\n\t\t\tthis.data = temp;\r\n\t\t} else if (!value) {\r\n\t\t\t// But there is no need to grow array to clear bits.\r\n\t\t\tif (word >= this.data.length) {\r\n\t\t\t\t// Early exit\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (lastWord >= this.data.length) {\r\n\t\t\t\t// Adjust work to fit array\r\n\t\t\t\tlastWord = this.data.length - 1;\r\n\t\t\t\ttoIndex = this.data.length * 16 - 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (word === lastWord) {\r\n\t\t\tthis._setBits(word, value, bitsFor(fromIndex, toIndex));\r\n\t\t} else {\r\n\t\t\tthis._setBits(word++, value, bitsFor(fromIndex, 15));\r\n\t\t\twhile (word < lastWord) {\r\n\t\t\t\tthis.data[word++] = value ? 0xFFFF : 0;\r\n\t\t\t}\r\n\t\t\tthis._setBits(word, value, bitsFor(0, toIndex));\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _setBits(word: number, value: boolean, mask: number) {\r\n\t\tif (value) {\r\n\t\t\tthis.data[word] |= mask;\r\n\t\t} else {\r\n\t\t\tthis.data[word] &= 0xFFFF ^ mask;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of bits of space actually in use by this `BitSet` to represent bit values. The maximum element\r\n\t * in the set is the size - 1st element.\r\n\t */\r\n\tget size(): number {\r\n\t\treturn this.data.byteLength * 8;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new byte array containing all the bits in this bit set.\r\n\t *\r\n\t * More precisely, if\r\n\t * `let bytes = s.toByteArray();`\r\n\t * then `bytes.length === (s.length()+7)/8` and `s.get(n) === ((bytes[n/8] & (1<<(n%8))) != 0)` for all\r\n\t * `n < 8 * bytes.length`.\r\n\t */\r\n\t// toByteArray(): Int8Array {\r\n\t// \tthrow new Error(\"NOT IMPLEMENTED\");\r\n\t// }\r\n\r\n\t/**\r\n\t * Returns a new integer array containing all the bits in this bit set.\r\n\t *\r\n\t * More precisely, if\r\n\t * `let integers = s.toIntegerArray();`\r\n\t * then `integers.length === (s.length()+31)/32` and `s.get(n) === ((integers[n/32] & (1<<(n%32))) != 0)` for all\r\n\t * `n < 32 * integers.length`.\r\n\t */\r\n\t// toIntegerArray(): Int32Array {\r\n\t// \tthrow new Error(\"NOT IMPLEMENTED\");\r\n\t// }\r\n\r\n\tpublic hashCode(): number {\r\n\t\treturn MurmurHash.hashCode(this.data, 22);\r\n\t}\r\n\r\n\t/**\r\n\t * Compares this object against the specified object. The result is `true` if and only if the argument is not\r\n\t * `undefined` and is a `Bitset` object that has exactly the same set of bits set to `true` as this bit set. That\r\n\t * is, for every nonnegative index `k`,\r\n\t *\r\n\t * ```\r\n\t * ((BitSet)obj).get(k) == this.get(k)\r\n\t * ```\r\n\t *\r\n\t * must be true. The current sizes of the two bit sets are not compared.\r\n\t */\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof BitSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tconst len = this.length();\r\n\r\n\t\tif (len !== obj.length()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (len === 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tlet bound = getIndex(len - 1);\r\n\t\tfor (let i = 0; i <= bound; i++) {\r\n\t\t\tif (this.data[i] !== obj.data[i]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a string representation of this bit set. For every index for which this `BitSet` contains a bit in the\r\n\t * set state, the decimal representation of that index is included in the result. Such indices are listed in order\r\n\t * from lowest to highest, separated by \", \" (a comma and a space) and surrounded by braces, resulting in the usual\r\n\t * mathematical notation for a set of integers.\r\n\t *\r\n\t * Example:\r\n\t *\r\n\t * BitSet drPepper = new BitSet();\r\n\t *\r\n\t * Now `drPepper.toString()` returns `\"{}\"`.\r\n\t *\r\n\t * drPepper.set(2);\r\n\t *\r\n\t * Now `drPepper.toString()` returns `\"{2}\"`.\r\n\t *\r\n\t * drPepper.set(4);\r\n\t * drPepper.set(10);\r\n\t *\r\n\t * Now `drPepper.toString()` returns `\"{2, 4, 10}\"`.\r\n\t */\r\n\tpublic toString(): string {\r\n\t\tlet result = \"{\";\r\n\r\n\t\tlet first = true;\r\n\t\tfor (let i = this.nextSetBit(0); i >= 0; i = this.nextSetBit(i + 1)) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tresult += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tresult += i;\r\n\t\t}\r\n\r\n\t\tresult += \"}\";\r\n\t\treturn result;\r\n\t}\r\n\r\n\t// static valueOf(bytes: Int8Array): BitSet;\r\n\t// static valueOf(buffer: ArrayBuffer): BitSet;\r\n\t// static valueOf(integers: Int32Array): BitSet;\r\n\t// static valueOf(data: Int8Array | Int32Array | ArrayBuffer): BitSet {\r\n\t// \tthrow new Error(\"NOT IMPLEMENTED\");\r\n\t// }\r\n\r\n\t/**\r\n\t * Performs a logical **XOR** of this bit set with the bit set argument. This bit set is modified so that a bit in\r\n\t * it has the value `true` if and only if one of the following statements holds:\r\n\t *\r\n\t * * The bit initially has the value `true`, and the corresponding bit in the argument has the value `false`.\r\n\t * * The bit initially has the value `false`, and the corresponding bit in the argument has the value `true`.\r\n\t */\r\n\tpublic xor(set: BitSet): void {\r\n\t\tconst data = this.data;\r\n\t\tconst other = set.data;\r\n\t\tconst minWords = Math.min(data.length, other.length);\r\n\t\tconst words = Math.max(data.length, other.length);\r\n\t\tconst dest = data.length === words ? data : new Uint16Array(words);\r\n\r\n\t\tlet lastWord = -1;\r\n\r\n\t\t// Xor those words both sets have in common\r\n\r\n\t\tfor (let i = 0; i < minWords; i++) {\r\n\t\t\tlet value = dest[i] = data[i] ^ other[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy words from larger set (if there is one)\r\n\r\n\t\tconst longer = data.length > other.length ? data : other;\r\n\t\tfor (let i = minWords; i < words; i++) {\r\n\t\t\tlet value = dest[i] = longer[i];\r\n\t\t\tif (value !== 0) {\r\n\t\t\t\tlastWord = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (lastWord === -1) {\r\n\t\t\tthis.data = EMPTY_DATA;\r\n\t\t} else if (dest.length === lastWord + 1) {\r\n\t\t\tthis.data = dest;\r\n\t\t} else {\r\n\t\t\tthis.data = dest.slice(0, lastWord + 1);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic clone() {\r\n\t\treturn new BitSet(this);\r\n\t}\r\n\r\n\tpublic [Symbol.iterator](): IterableIterator {\r\n\t\treturn new BitSetIterator(this.data);\r\n\t}\r\n\r\n\t// Overrides formatting for nodejs assert etc.\r\n\tpublic [(util.inspect as any).custom](): string {\r\n\t\treturn \"BitSet \" + this.toString();\r\n\t}\r\n}\r\n\r\nclass BitSetIterator implements IterableIterator{\r\n\tprivate index = 0;\r\n\tprivate mask = 0xFFFF;\r\n\r\n\tconstructor(private data: Uint16Array) { }\r\n\r\n\tpublic next() {\r\n\t\twhile (this.index < this.data.length) {\r\n\t\t\tconst bits = this.data[this.index] & this.mask;\r\n\t\t\tif (bits !== 0) {\r\n\t\t\t\tconst bitNumber = unIndex(this.index) + findLSBSet(bits);\r\n\t\t\t\tthis.mask = bitsFor(bitNumber + 1, 15);\r\n\t\t\t\treturn { done: false, value: bitNumber };\r\n\t\t\t}\r\n\t\t\tthis.index++;\r\n\t\t\tthis.mask = 0xFFFF;\r\n\t\t}\r\n\t\treturn { done: true, value: -1 };\r\n\t}\r\n\r\n\tpublic [Symbol.iterator](): IterableIterator { return this; }\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.5488013-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ArrayEqualityComparator } from \"../misc/ArrayEqualityComparator\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { ConflictInfo } from \"./ConflictInfo\";\r\nimport { EqualityComparator } from \"../misc/EqualityComparator\";\r\nimport { JavaSet } from \"../misc/Stubs\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\n\r\nimport * as assert from \"assert\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\ninterface KeyType { state: number; alt: number; }\r\n\r\nclass KeyTypeEqualityComparer implements EqualityComparator {\r\n\tpublic hashCode(key: KeyType) {\r\n\t\treturn key.state ^ key.alt;\r\n\t}\r\n\r\n\tpublic equals(a: KeyType, b: KeyType) {\r\n\t\treturn a.state === b.state && a.alt === b.alt;\r\n\t}\r\n\r\n\tpublic static readonly INSTANCE = new KeyTypeEqualityComparer();\r\n}\r\n\r\nfunction NewKeyedConfigMap(map?: Array2DHashMap) {\r\n\tif (map) {\r\n\t\treturn new Array2DHashMap(map);\r\n\t} else {\r\n\t\treturn new Array2DHashMap(KeyTypeEqualityComparer.INSTANCE);\r\n\t}\r\n}\r\n\r\n/**\r\n * Represents a set of ATN configurations (see `ATNConfig`). As configurations are added to the set, they are merged\r\n * with other `ATNConfig` instances already in the set when possible using the graph-structured stack.\r\n *\r\n * An instance of this class represents the complete set of positions (with context) in an ATN which would be associated\r\n * with a single DFA state. Its internal representation is more complex than traditional state used for NFA to DFA\r\n * conversion due to performance requirements (both improving speed and reducing memory overhead) as well as supporting\r\n * features such as semantic predicates and non-greedy operators in a form to support ANTLR's prediction algorithm.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ATNConfigSet implements JavaSet {\r\n\t/**\r\n\t * This maps (state, alt) -> merged {@link ATNConfig}. The key does not account for\r\n\t * the {@link ATNConfig#getSemanticContext} of the value, which is only a problem if a single\r\n\t * `ATNConfigSet` contains two configs with the same state and alternative\r\n\t * but different semantic contexts. When this case arises, the first config\r\n\t * added to this map stays, and the remaining configs are placed in {@link #unmerged}.\r\n\t *\r\n\t * This map is only used for optimizing the process of adding configs to the set,\r\n\t * and is `undefined` for read-only sets stored in the DFA.\r\n\t */\r\n\tprivate mergedConfigs?: Array2DHashMap;\r\n\r\n\t/**\r\n\t * This is an \"overflow\" list holding configs which cannot be merged with one\r\n\t * of the configs in {@link #mergedConfigs} but have a colliding key. This\r\n\t * occurs when two configs in the set have the same state and alternative but\r\n\t * different semantic contexts.\r\n\t *\r\n\t * This list is only used for optimizing the process of adding configs to the set,\r\n\t * and is `undefined` for read-only sets stored in the DFA.\r\n\t */\r\n\tprivate unmerged?: ATNConfig[];\r\n\r\n\t/**\r\n\t * This is a list of all configs in this set.\r\n\t */\r\n\tprivate configs: ATNConfig[];\r\n\r\n\tprivate _uniqueAlt: number = 0;\r\n\tprivate _conflictInfo?: ConflictInfo;\r\n\t// Used in parser and lexer. In lexer, it indicates we hit a pred\r\n\t// while computing a closure operation. Don't make a DFA state from this.\r\n\tprivate _hasSemanticContext: boolean = false;\r\n\tprivate _dipsIntoOuterContext: boolean = false;\r\n\t/**\r\n\t * When `true`, this config set represents configurations where the entire\r\n\t * outer context has been consumed by the ATN interpreter. This prevents the\r\n\t * {@link ParserATNSimulator#closure} from pursuing the global FOLLOW when a\r\n\t * rule stop state is reached with an empty prediction context.\r\n\t *\r\n\t * Note: `outermostConfigSet` and {@link #dipsIntoOuterContext} should never\r\n\t * be true at the same time.\r\n\t */\r\n\tprivate outermostConfigSet: boolean = false;\r\n\r\n\tprivate cachedHashCode: number = -1;\r\n\r\n\tconstructor();\r\n\tconstructor(set: ATNConfigSet, readonly: boolean);\r\n\tconstructor(set?: ATNConfigSet, readonly?: boolean) {\r\n\t\tif (!set) {\r\n\t\t\tthis.mergedConfigs = NewKeyedConfigMap();\r\n\t\t\tthis.unmerged = [];\r\n\t\t\tthis.configs = [];\r\n\r\n\t\t\tthis._uniqueAlt = ATN.INVALID_ALT_NUMBER;\r\n\t\t} else {\r\n\r\n\t\t\tif (readonly) {\r\n\t\t\t\tthis.mergedConfigs = undefined;\r\n\t\t\t\tthis.unmerged = undefined;\r\n\t\t\t} else if (!set.isReadOnly) {\r\n\t\t\t\tthis.mergedConfigs = NewKeyedConfigMap(set.mergedConfigs);\r\n\t\t\t\tthis.unmerged = (set.unmerged as ATNConfig[]).slice(0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.mergedConfigs = NewKeyedConfigMap();\r\n\t\t\t\tthis.unmerged = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.configs = set.configs.slice(0);\r\n\r\n\t\t\tthis._dipsIntoOuterContext = set._dipsIntoOuterContext;\r\n\t\t\tthis._hasSemanticContext = set._hasSemanticContext;\r\n\t\t\tthis.outermostConfigSet = set.outermostConfigSet;\r\n\r\n\t\t\tif (readonly || !set.isReadOnly) {\r\n\t\t\t\tthis._uniqueAlt = set._uniqueAlt;\r\n\t\t\t\tthis._conflictInfo = set._conflictInfo;\r\n\t\t\t}\r\n\r\n\t\t\t// if (!readonly && set.isReadOnly) -> addAll is called from clone()\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the set of all alternatives represented by configurations in this\r\n\t * set.\r\n\t */\r\n\t@NotNull\r\n\tpublic getRepresentedAlternatives(): BitSet {\r\n\t\tif (this._conflictInfo != null) {\r\n\t\t\treturn this._conflictInfo.conflictedAlts.clone();\r\n\t\t}\r\n\r\n\t\tlet alts: BitSet = new BitSet();\r\n\t\tfor (let config of this) {\r\n\t\t\talts.set(config.alt);\r\n\t\t}\r\n\r\n\t\treturn alts;\r\n\t}\r\n\r\n\tget isReadOnly(): boolean {\r\n\t\treturn this.mergedConfigs == null;\r\n\t}\r\n\r\n\tget isOutermostConfigSet(): boolean {\r\n\t\treturn this.outermostConfigSet;\r\n\t}\r\n\r\n\tset isOutermostConfigSet(outermostConfigSet: boolean) {\r\n\t\tif (this.outermostConfigSet && !outermostConfigSet) {\r\n\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t}\r\n\r\n\t\tassert(!outermostConfigSet || !this._dipsIntoOuterContext);\r\n\t\tthis.outermostConfigSet = outermostConfigSet;\r\n\t}\r\n\r\n\tpublic getStates(): Array2DHashSet {\r\n\t\tlet states = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\tfor (let c of this.configs) {\r\n\t\t\tstates.add(c.state);\r\n\t\t}\r\n\r\n\t\treturn states;\r\n\t}\r\n\r\n\tpublic optimizeConfigs(interpreter: ATNSimulator): void {\r\n\t\tif (this.configs.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (let config of this.configs) {\r\n\t\t\tconfig.context = interpreter.atn.getCachedContext(config.context);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic clone(readonly: boolean): ATNConfigSet {\r\n\t\tlet copy: ATNConfigSet = new ATNConfigSet(this, readonly);\r\n\t\tif (!readonly && this.isReadOnly) {\r\n\t\t\tcopy.addAll(this.configs);\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.configs.length;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.configs.length === 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic contains(o: any): boolean {\r\n\t\tif (!(o instanceof ATNConfig)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this.mergedConfigs && this.unmerged) {\r\n\t\t\tlet config: ATNConfig = o;\r\n\t\t\tlet configKey = this.getKey(config);\r\n\t\t\tlet mergedConfig = this.mergedConfigs.get(configKey);\r\n\t\t\tif (mergedConfig != null && this.canMerge(config, configKey, mergedConfig)) {\r\n\t\t\t\treturn mergedConfig.contains(config);\r\n\t\t\t}\r\n\r\n\t\t\tfor (let c of this.unmerged) {\r\n\t\t\t\tif (c.contains(o)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (let c of this.configs) {\r\n\t\t\t\tif (c.contains(o)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic *[Symbol.iterator](): IterableIterator {\r\n\t\tyield* this.configs;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toArray(): ATNConfig[] {\r\n\t\treturn this.configs;\r\n\t}\r\n\r\n\tpublic add(e: ATNConfig): boolean;\r\n\tpublic add(e: ATNConfig, contextCache: PredictionContextCache | undefined): boolean;\r\n\tpublic add(e: ATNConfig, contextCache?: PredictionContextCache): boolean {\r\n\t\tthis.ensureWritable();\r\n\t\tif (!this.mergedConfigs || !this.unmerged) {\r\n\t\t\tthrow new Error(\"Covered by ensureWritable but duplicated here for strict null check limitation\");\r\n\t\t}\r\n\r\n\t\tassert(!this.outermostConfigSet || !e.reachesIntoOuterContext);\r\n\r\n\t\tif (contextCache == null) {\r\n\t\t\tcontextCache = PredictionContextCache.UNCACHED;\r\n\t\t}\r\n\r\n\t\tlet addKey: boolean;\r\n\t\tlet key = this.getKey(e);\r\n\t\tlet mergedConfig = this.mergedConfigs.get(key);\r\n\t\taddKey = (mergedConfig == null);\r\n\t\tif (mergedConfig != null && this.canMerge(e, key, mergedConfig)) {\r\n\t\t\tmergedConfig.outerContextDepth = Math.max(mergedConfig.outerContextDepth, e.outerContextDepth);\r\n\t\t\tif (e.isPrecedenceFilterSuppressed) {\r\n\t\t\t\tmergedConfig.isPrecedenceFilterSuppressed = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet joined: PredictionContext = PredictionContext.join(mergedConfig.context, e.context, contextCache);\r\n\t\t\tthis.updatePropertiesForMergedConfig(e);\r\n\t\t\tif (mergedConfig.context === joined) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tmergedConfig.context = joined;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < this.unmerged.length; i++) {\r\n\t\t\tlet unmergedConfig: ATNConfig = this.unmerged[i];\r\n\t\t\tif (this.canMerge(e, key, unmergedConfig)) {\r\n\t\t\t\tunmergedConfig.outerContextDepth = Math.max(unmergedConfig.outerContextDepth, e.outerContextDepth);\r\n\t\t\t\tif (e.isPrecedenceFilterSuppressed) {\r\n\t\t\t\t\tunmergedConfig.isPrecedenceFilterSuppressed = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet joined: PredictionContext = PredictionContext.join(unmergedConfig.context, e.context, contextCache);\r\n\t\t\t\tthis.updatePropertiesForMergedConfig(e);\r\n\t\t\t\tif (unmergedConfig.context === joined) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tunmergedConfig.context = joined;\r\n\r\n\t\t\t\tif (addKey) {\r\n\t\t\t\t\tthis.mergedConfigs.put(key, unmergedConfig);\r\n\t\t\t\t\tthis.unmerged.splice(i, 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.configs.push(e);\r\n\t\tif (addKey) {\r\n\t\t\tthis.mergedConfigs.put(key, e);\r\n\t\t} else {\r\n\t\t\tthis.unmerged.push(e);\r\n\t\t}\r\n\r\n\t\tthis.updatePropertiesForAddedConfig(e);\r\n\t\treturn true;\r\n\t}\r\n\r\n\tprivate updatePropertiesForMergedConfig(config: ATNConfig): void {\r\n\t\t// merged configs can't change the alt or semantic context\r\n\t\tthis._dipsIntoOuterContext = this._dipsIntoOuterContext || config.reachesIntoOuterContext;\r\n\t\tassert(!this.outermostConfigSet || !this._dipsIntoOuterContext);\r\n\t}\r\n\r\n\tprivate updatePropertiesForAddedConfig(config: ATNConfig): void {\r\n\t\tif (this.configs.length === 1) {\r\n\t\t\tthis._uniqueAlt = config.alt;\r\n\t\t} else if (this._uniqueAlt !== config.alt) {\r\n\t\t\tthis._uniqueAlt = ATN.INVALID_ALT_NUMBER;\r\n\t\t}\r\n\r\n\t\tthis._hasSemanticContext = this._hasSemanticContext || !SemanticContext.NONE.equals(config.semanticContext);\r\n\t\tthis._dipsIntoOuterContext = this._dipsIntoOuterContext || config.reachesIntoOuterContext;\r\n\t\tassert(!this.outermostConfigSet || !this._dipsIntoOuterContext);\r\n\t}\r\n\r\n\tprotected canMerge(left: ATNConfig, leftKey: { state: number, alt: number }, right: ATNConfig): boolean {\r\n\t\tif (left.state.stateNumber !== right.state.stateNumber) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (leftKey.alt !== right.alt) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn left.semanticContext.equals(right.semanticContext);\r\n\t}\r\n\r\n\tprotected getKey(e: ATNConfig): { state: number, alt: number } {\r\n\t\treturn { state: e.state.stateNumber, alt: e.alt };\r\n\t}\r\n\r\n\t@Override\r\n\tpublic containsAll(c: Iterable): boolean {\r\n\t\tfor (let o of c) {\r\n\t\t\tif (!(o instanceof ATNConfig)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (!this.contains(o)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic addAll(c: Iterable): boolean;\r\n\tpublic addAll(c: Iterable, contextCache: PredictionContextCache): boolean;\r\n\tpublic addAll(c: Iterable, contextCache?: PredictionContextCache): boolean {\r\n\t\tthis.ensureWritable();\r\n\r\n\t\tlet changed: boolean = false;\r\n\t\tfor (let group of c) {\r\n\t\t\tif (this.add(group, contextCache)) {\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clear(): void {\r\n\t\tthis.ensureWritable();\r\n\t\tif (!this.mergedConfigs || !this.unmerged) {\r\n\t\t\tthrow new Error(\"Covered by ensureWritable but duplicated here for strict null check limitation\");\r\n\t\t}\r\n\r\n\t\tthis.mergedConfigs.clear();\r\n\t\tthis.unmerged.length = 0;\r\n\t\tthis.configs.length = 0;\r\n\r\n\t\tthis._dipsIntoOuterContext = false;\r\n\t\tthis._hasSemanticContext = false;\r\n\t\tthis._uniqueAlt = ATN.INVALID_ALT_NUMBER;\r\n\t\tthis._conflictInfo = undefined;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (this === obj) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!(obj instanceof ATNConfigSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.outermostConfigSet === obj.outermostConfigSet\r\n\t\t\t&& Utils.equals(this._conflictInfo, obj._conflictInfo)\r\n\t\t\t&& ArrayEqualityComparator.INSTANCE.equals(this.configs, obj.configs);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tif (this.isReadOnly && this.cachedHashCode !== -1) {\r\n\t\t\treturn this.cachedHashCode;\r\n\t\t}\r\n\r\n\t\tlet hashCode: number = 1;\r\n\t\thashCode = 5 * hashCode ^ (this.outermostConfigSet ? 1 : 0);\r\n\t\thashCode = 5 * hashCode ^ ArrayEqualityComparator.INSTANCE.hashCode(this.configs);\r\n\r\n\t\tif (this.isReadOnly) {\r\n\t\t\tthis.cachedHashCode = hashCode;\r\n\t\t}\r\n\r\n\t\treturn hashCode;\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(showContext: boolean): string;\r\n\tpublic toString(showContext?: boolean): string {\r\n\t\tif (showContext == null) {\r\n\t\t\tshowContext = false;\r\n\t\t}\r\n\r\n\t\tlet buf = \"\";\r\n\t\tlet sortedConfigs = this.configs.slice(0);\r\n\t\tsortedConfigs.sort((o1, o2) => {\r\n\t\t\tif (o1.alt !== o2.alt) {\r\n\t\t\t\treturn o1.alt - o2.alt;\r\n\t\t\t}\r\n\t\t\telse if (o1.state.stateNumber !== o2.state.stateNumber) {\r\n\t\t\t\treturn o1.state.stateNumber - o2.state.stateNumber;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn o1.semanticContext.toString().localeCompare(o2.semanticContext.toString());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbuf += (\"[\");\r\n\t\tfor (let i = 0; i < sortedConfigs.length; i++) {\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tbuf += (\", \");\r\n\t\t\t}\r\n\t\t\tbuf += (sortedConfigs[i].toString(undefined, true, showContext));\r\n\t\t}\r\n\t\tbuf += (\"]\");\r\n\r\n\t\tif (this._hasSemanticContext) {\r\n\t\t\tbuf += (\",hasSemanticContext=\") + (this._hasSemanticContext);\r\n\t\t}\r\n\t\tif (this._uniqueAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\tbuf += (\",uniqueAlt=\") + (this._uniqueAlt);\r\n\t\t}\r\n\t\tif (this._conflictInfo != null) {\r\n\t\t\tbuf += (\",conflictingAlts=\") + (this._conflictInfo.conflictedAlts);\r\n\t\t\tif (!this._conflictInfo.isExact) {\r\n\t\t\t\tbuf += (\"*\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this._dipsIntoOuterContext) {\r\n\t\t\tbuf += (\",dipsIntoOuterContext\");\r\n\t\t}\r\n\t\treturn buf.toString();\r\n\t}\r\n\r\n\tget uniqueAlt(): number {\r\n\t\treturn this._uniqueAlt;\r\n\t}\r\n\r\n\tget hasSemanticContext(): boolean {\r\n\t\treturn this._hasSemanticContext;\r\n\t}\r\n\r\n\tset hasSemanticContext(value: boolean) {\r\n\t\tthis.ensureWritable();\r\n\t\tthis._hasSemanticContext = value;\r\n\t}\r\n\r\n\tget conflictInfo(): ConflictInfo | undefined {\r\n\t\treturn this._conflictInfo;\r\n\t}\r\n\r\n\tset conflictInfo(conflictInfo: ConflictInfo | undefined) {\r\n\t\tthis.ensureWritable();\r\n\t\tthis._conflictInfo = conflictInfo;\r\n\t}\r\n\r\n\tget conflictingAlts(): BitSet | undefined {\r\n\t\tif (this._conflictInfo == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this._conflictInfo.conflictedAlts;\r\n\t}\r\n\r\n\tget isExactConflict(): boolean {\r\n\t\tif (this._conflictInfo == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._conflictInfo.isExact;\r\n\t}\r\n\r\n\tget dipsIntoOuterContext(): boolean {\r\n\t\treturn this._dipsIntoOuterContext;\r\n\t}\r\n\r\n\tpublic get(index: number): ATNConfig {\r\n\t\treturn this.configs[index];\r\n\t}\r\n\r\n\tprotected ensureWritable(): void {\r\n\t\tif (this.isReadOnly) {\r\n\t\t\tthrow new Error(\"This ATNConfigSet is read only.\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.7771056-07:00\r\n\r\nimport { AcceptStateInfo } from \"./AcceptStateInfo\";\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { ATNConfigSet } from \"../atn/ATNConfigSet\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { LexerActionExecutor } from \"../atn/LexerActionExecutor\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { PredictionContext } from \"../atn/PredictionContext\";\r\nimport { SemanticContext } from \"../atn/SemanticContext\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\n/** A DFA state represents a set of possible ATN configurations.\r\n * As Aho, Sethi, Ullman p. 117 says \"The DFA uses its state\r\n * to keep track of all possible states the ATN can be in after\r\n * reading each input symbol. That is to say, after reading\r\n * input a1a2..an, the DFA is in a state that represents the\r\n * subset T of the states of the ATN that are reachable from the\r\n * ATN's start state along some path labeled a1a2..an.\"\r\n * In conventional NFA→DFA conversion, therefore, the subset T\r\n * would be a bitset representing the set of states the\r\n * ATN could be in. We need to track the alt predicted by each\r\n * state as well, however. More importantly, we need to maintain\r\n * a stack of states, tracking the closure operations as they\r\n * jump from rule to rule, emulating rule invocations (method calls).\r\n * I have to add a stack to simulate the proper lookahead sequences for\r\n * the underlying LL grammar from which the ATN was derived.\r\n *\r\n * I use a set of ATNConfig objects not simple states. An ATNConfig\r\n * is both a state (ala normal conversion) and a RuleContext describing\r\n * the chain of rules (if any) followed to arrive at that state.\r\n *\r\n * A DFA state may have multiple references to a particular state,\r\n * but with different ATN contexts (with same or different alts)\r\n * meaning that state was reached via a different set of rule invocations.\r\n */\r\nexport class DFAState {\r\n\tpublic stateNumber: number = -1;\r\n\r\n\t@NotNull\r\n\tpublic configs: ATNConfigSet;\r\n\r\n\t/** `edges.get(symbol)` points to target of symbol.\r\n\t */\r\n\t@NotNull\r\n\tprivate readonly edges: Map;\r\n\r\n\tprivate _acceptStateInfo: AcceptStateInfo | undefined;\r\n\r\n\t/** These keys for these edges are the top level element of the global context. */\r\n\t@NotNull\r\n\tprivate readonly contextEdges: Map;\r\n\r\n\t/** Symbols in this set require a global context transition before matching an input symbol. */\r\n\tprivate contextSymbols: BitSet | undefined;\r\n\r\n\t/**\r\n\t * This list is computed by {@link ParserATNSimulator#predicateDFAState}.\r\n\t */\r\n\tpublic predicates: DFAState.PredPrediction[] | undefined;\r\n\r\n\t/**\r\n\t * Constructs a new `DFAState`.\r\n\t *\r\n\t * @param configs The set of ATN configurations defining this state.\r\n\t */\r\n\tconstructor(configs: ATNConfigSet) {\r\n\t\tthis.configs = configs;\r\n\t\tthis.edges = new Map();\r\n\t\tthis.contextEdges = new Map();\r\n\t}\r\n\r\n\tget isContextSensitive(): boolean {\r\n\t\treturn !!this.contextSymbols;\r\n\t}\r\n\r\n\tpublic isContextSymbol(symbol: number): boolean {\r\n\t\tif (!this.isContextSensitive) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.contextSymbols!.get(symbol);\r\n\t}\r\n\r\n\tpublic setContextSymbol(symbol: number): void {\r\n\t\tassert(this.isContextSensitive);\r\n\t\tthis.contextSymbols!.set(symbol);\r\n\t}\r\n\r\n\tpublic setContextSensitive(atn: ATN): void {\r\n\t\tassert(!this.configs.isOutermostConfigSet);\r\n\t\tif (this.isContextSensitive) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this.contextSymbols) {\r\n\t\t\tthis.contextSymbols = new BitSet();\r\n\t\t}\r\n\t}\r\n\r\n\tget acceptStateInfo(): AcceptStateInfo | undefined {\r\n\t\treturn this._acceptStateInfo;\r\n\t}\r\n\r\n\tset acceptStateInfo(acceptStateInfo: AcceptStateInfo | undefined) {\r\n\t\tthis._acceptStateInfo = acceptStateInfo;\r\n\t}\r\n\r\n\tget isAcceptState(): boolean {\r\n\t\treturn !!this._acceptStateInfo;\r\n\t}\r\n\r\n\tget prediction(): number {\r\n\t\tif (!this._acceptStateInfo) {\r\n\t\t\treturn ATN.INVALID_ALT_NUMBER;\r\n\t\t}\r\n\r\n\t\treturn this._acceptStateInfo.prediction;\r\n\t}\r\n\r\n\tget lexerActionExecutor(): LexerActionExecutor | undefined {\r\n\t\tif (!this._acceptStateInfo) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this._acceptStateInfo.lexerActionExecutor;\r\n\t}\r\n\r\n\tpublic getTarget(symbol: number): DFAState | undefined {\r\n\t\treturn this.edges.get(symbol);\r\n\t}\r\n\r\n\tpublic setTarget(symbol: number, target: DFAState): void {\r\n\t\tthis.edges.set(symbol, target);\r\n\t}\r\n\r\n\tpublic getEdgeMap(): Map {\r\n\t\treturn this.edges;\r\n\t}\r\n\r\n\tpublic getContextTarget(invokingState: number): DFAState | undefined {\r\n\t\tif (invokingState === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\tinvokingState = -1;\r\n\t\t}\r\n\r\n\t\treturn this.contextEdges.get(invokingState);\r\n\t}\r\n\r\n\tpublic setContextTarget(invokingState: number, target: DFAState): void {\r\n\t\tif (!this.isContextSensitive) {\r\n\t\t\tthrow new Error(\"The state is not context sensitive.\");\r\n\t\t}\r\n\r\n\t\tif (invokingState === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\tinvokingState = -1;\r\n\t\t}\r\n\r\n\t\tthis.contextEdges.set(invokingState, target);\r\n\t}\r\n\r\n\tpublic getContextEdgeMap(): Map {\r\n\t\tlet map = new Map(this.contextEdges);\r\n\t\tlet existing = map.get(-1);\r\n\t\tif (existing !== undefined) {\r\n\t\t\tif (map.size === 1) {\r\n\t\t\t\tlet result = new Map();\r\n\t\t\t\tresult.set(PredictionContext.EMPTY_FULL_STATE_KEY, existing);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tmap.delete(-1);\r\n\t\t\t\tmap.set(PredictionContext.EMPTY_FULL_STATE_KEY, existing);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize(7);\r\n\t\thash = MurmurHash.update(hash, this.configs.hashCode());\r\n\t\thash = MurmurHash.finish(hash, 1);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Two {@link DFAState} instances are equal if their ATN configuration sets\r\n\t * are the same. This method is used to see if a state already exists.\r\n\t *\r\n\t * Because the number of alternatives and number of ATN configurations are\r\n\t * finite, there is a finite number of DFA states that can be processed.\r\n\t * This is necessary to show that the algorithm terminates.\r\n\t *\r\n\t * Cannot test the DFA state numbers here because in\r\n\t * {@link ParserATNSimulator#addDFAState} we need to know if any other state\r\n\t * exists that has this exact set of ATN configurations. The\r\n\t * {@link #stateNumber} is irrelevant.\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\t// compare set of ATN configurations in this set with other\r\n\t\tif (this === o) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!(o instanceof DFAState)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet other: DFAState = o;\r\n\t\tlet sameSet: boolean = this.configs.equals(other.configs);\r\n//\t\tSystem.out.println(\"DFAState.equals: \"+configs+(sameSet?\"==\":\"!=\")+other.configs);\r\n\t\treturn sameSet;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet buf = \"\";\r\n\t\tbuf += (this.stateNumber) + (\":\") + (this.configs);\r\n\t\tif (this.isAcceptState) {\r\n\t\t\tbuf += (\"=>\");\r\n\t\t\tif (this.predicates) {\r\n\t\t\t\tbuf += this.predicates;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbuf += (this.prediction);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn buf.toString();\r\n\t}\r\n}\r\n\r\nexport namespace DFAState {\r\n\t/** Map a predicate to a predicted alternative. */\r\n\texport class PredPrediction {\r\n\t\t@NotNull\r\n\t\tpublic pred: SemanticContext; // never null; at least SemanticContext.NONE\r\n\t\tpublic alt: number;\r\n\t\tconstructor(@NotNull pred: SemanticContext, alt: number) {\r\n\t\t\tthis.alt = alt;\r\n\t\t\tthis.pred = pred;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic toString(): string {\r\n\t\t\treturn \"(\" + this.pred + \", \" + this.alt + \")\";\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.3184311-07:00\r\n\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\n\r\nexport abstract class ATNSimulator {\r\n\t/** Must distinguish between missing edge and edge we know leads nowhere */\r\n\tprivate static _ERROR: DFAState;\r\n\t@NotNull\r\n\tstatic get ERROR(): DFAState {\r\n\t\tif (!ATNSimulator._ERROR) {\r\n\t\t\tATNSimulator._ERROR = new DFAState(new ATNConfigSet());\r\n\t\t\tATNSimulator._ERROR.stateNumber = PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t}\r\n\r\n\t\treturn ATNSimulator._ERROR;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic atn: ATN;\r\n\r\n\tconstructor(@NotNull atn: ATN) {\r\n\t\tthis.atn = atn;\r\n\t}\r\n\r\n\tpublic abstract reset(): void;\r\n\r\n\t/**\r\n\t * Clear the DFA cache used by the current instance. Since the DFA cache may\r\n\t * be shared by multiple ATN simulators, this method may affect the\r\n\t * performance (but not accuracy) of other parsers which are being used\r\n\t * concurrently.\r\n\t *\r\n\t * @ if the current instance does not\r\n\t * support clearing the DFA.\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\tpublic clearDFA(): void {\r\n\t\tthis.atn.clearDFA();\r\n\t}\r\n}\r\n\r\nexport namespace ATNSimulator {\r\n\tconst RULE_VARIANT_DELIMITER: string = \"$\";\r\n\tconst RULE_LF_VARIANT_MARKER: string = \"$lf$\";\r\n\tconst RULE_NOLF_VARIANT_MARKER: string = \"$nolf$\";\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.5479602-07:00\r\n\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ConsoleErrorListener implements ANTLRErrorListener {\r\n\t/**\r\n\t * Provides a default instance of {@link ConsoleErrorListener}.\r\n\t */\r\n\tpublic static readonly INSTANCE: ConsoleErrorListener = new ConsoleErrorListener();\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This implementation prints messages to {@link System#err} containing the\r\n\t * values of `line`, `charPositionInLine`, and `msg` using\r\n\t * the following format.\r\n\t *\r\n\t *
        \r\n\t * line *line*:*charPositionInLine* *msg*\r\n\t * 
        \r\n\t */\r\n\tpublic syntaxError(\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingSymbol: T,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\tmsg: string,\r\n\t\te: RecognitionException | undefined): void {\r\n\t\tconsole.error(`line ${line}:${charPositionInLine} ${msg}`);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:56.8126690-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Override, NotNull } from \"./Decorators\";\r\n\r\n/**\r\n * This implementation of {@link ANTLRErrorListener} dispatches all calls to a\r\n * collection of delegate listeners. This reduces the effort required to support multiple\r\n * listeners.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ProxyErrorListener> implements ANTLRErrorListener {\r\n\r\n\tconstructor(private delegates: TListener[]) {\r\n\t\tif (!delegates) {\r\n\t\t\tthrow new Error(\"Invalid delegates\");\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getDelegates(): ReadonlyArray {\r\n\t\treturn this.delegates;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic syntaxError(\r\n\t\t@NotNull recognizer: Recognizer,\r\n\t\toffendingSymbol: T | undefined,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\t@NotNull msg: string,\r\n\t\te: RecognitionException | undefined): void {\r\n\t\tthis.delegates.forEach((listener) => {\r\n\t\t\tif (listener.syntaxError) {\r\n\t\t\t\tlistener.syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.1954441-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNSimulator } from \"./atn/ATNSimulator\";\r\nimport { ConsoleErrorListener } from \"./ConsoleErrorListener\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { ParseInfo } from \"./atn/ParseInfo\";\r\nimport { ProxyErrorListener } from \"./ProxyErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { SuppressWarnings, NotNull } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\nimport { VocabularyImpl } from \"./VocabularyImpl\";\r\n\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\nexport abstract class Recognizer {\r\n\tpublic static readonly EOF: number = -1;\r\n\r\n\tprivate static tokenTypeMapCache =\r\n\t\tnew WeakMap>();\r\n\tprivate static ruleIndexMapCache =\r\n\t\tnew WeakMap>();\r\n\r\n\t@SuppressWarnings(\"serial\")\r\n\t@NotNull\r\n\tprivate readonly _listeners: Array> = [ConsoleErrorListener.INSTANCE];\r\n\r\n\tprotected _interp!: ATNInterpreter;\r\n\r\n\tprivate _stateNumber = -1;\r\n\r\n\tpublic abstract readonly ruleNames: string[];\r\n\r\n\t/**\r\n\t * Get the vocabulary used by the recognizer.\r\n\t *\r\n\t * @returns A {@link Vocabulary} instance providing information about the\r\n\t * vocabulary used by the grammar.\r\n\t */\r\n\tpublic abstract readonly vocabulary: Vocabulary;\r\n\r\n\t/**\r\n\t * Get a map from token names to token types.\r\n\t *\r\n\t * Used for XPath and tree pattern compilation.\r\n\t */\r\n\t@NotNull\r\n\tpublic getTokenTypeMap(): ReadonlyMap {\r\n\t\tlet vocabulary: Vocabulary = this.vocabulary;\r\n\t\tlet result = Recognizer.tokenTypeMapCache.get(vocabulary);\r\n\t\tif (result == null) {\r\n\t\t\tlet intermediateResult = new Map();\r\n\t\t\tfor (let i = 0; i <= this.atn.maxTokenType; i++) {\r\n\t\t\t\tlet literalName = vocabulary.getLiteralName(i);\r\n\t\t\t\tif (literalName != null) {\r\n\t\t\t\t\tintermediateResult.set(literalName, i);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet symbolicName = vocabulary.getSymbolicName(i);\r\n\t\t\t\tif (symbolicName != null) {\r\n\t\t\t\t\tintermediateResult.set(symbolicName, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tintermediateResult.set(\"EOF\", Token.EOF);\r\n\t\t\tresult = intermediateResult;\r\n\t\t\tRecognizer.tokenTypeMapCache.set(vocabulary, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Get a map from rule names to rule indexes.\r\n\t *\r\n\t * Used for XPath and tree pattern compilation.\r\n\t */\r\n\t@NotNull\r\n\tpublic getRuleIndexMap(): ReadonlyMap {\r\n\t\tlet ruleNames: string[] = this.ruleNames;\r\n\t\tif (ruleNames == null) {\r\n\t\t\tthrow new Error(\"The current recognizer does not provide a list of rule names.\");\r\n\t\t}\r\n\r\n\t\tlet result: ReadonlyMap | undefined = Recognizer.ruleIndexMapCache.get(ruleNames);\r\n\t\tif (result == null) {\r\n\t\t\tresult = Utils.toMap(ruleNames);\r\n\t\t\tRecognizer.ruleIndexMapCache.set(ruleNames, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic getTokenType(tokenName: string): number {\r\n\t\tlet ttype = this.getTokenTypeMap().get(tokenName);\r\n\t\tif (ttype != null) {\r\n\t\t\treturn ttype;\r\n\t\t}\r\n\t\treturn Token.INVALID_TYPE;\r\n\t}\r\n\r\n\t/**\r\n\t * If this recognizer was generated, it will have a serialized ATN\r\n\t * representation of the grammar.\r\n\t *\r\n\t * For interpreters, we don't know their serialized ATN despite having\r\n\t * created the interpreter from it.\r\n\t */\r\n\t@NotNull\r\n\tget serializedATN(): string {\r\n\t\tthrow new Error(\"there is no serialized ATN\");\r\n\t}\r\n\r\n\t/** For debugging and other purposes, might want the grammar name.\r\n\t * Have ANTLR generate an implementation for this method.\r\n\t */\r\n\tpublic abstract readonly grammarFileName: string;\r\n\r\n\t/**\r\n\t * Get the {@link ATN} used by the recognizer for prediction.\r\n\t *\r\n\t * @returns The {@link ATN} used by the recognizer for prediction.\r\n\t */\r\n\t@NotNull\r\n\tget atn(): ATN {\r\n\t\treturn this._interp.atn;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the ATN interpreter used by the recognizer for prediction.\r\n\t *\r\n\t * @returns The ATN interpreter used by the recognizer for prediction.\r\n\t */\r\n\t@NotNull\r\n\tget interpreter(): ATNInterpreter {\r\n\t\treturn this._interp;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the ATN interpreter used by the recognizer for prediction.\r\n\t *\r\n\t * @param interpreter The ATN interpreter used by the recognizer for\r\n\t * prediction.\r\n\t */\r\n\tset interpreter(@NotNull interpreter: ATNInterpreter) {\r\n\t\tthis._interp = interpreter;\r\n\t}\r\n\r\n\t/** If profiling during the parse/lex, this will return DecisionInfo records\r\n\t * for each decision in recognizer in a ParseInfo object.\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\tget parseInfo(): Promise {\r\n\t\treturn Promise.resolve(undefined);\r\n\t}\r\n\r\n\t/** What is the error header, normally line/character position information? */\r\n\t@NotNull\r\n\tpublic getErrorHeader(@NotNull e: RecognitionException): string {\r\n\t\tlet token = e.getOffendingToken();\r\n\t\tif (!token) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tlet line = token.line;\r\n\t\tlet charPositionInLine: number = token.charPositionInLine;\r\n\t\treturn \"line \" + line + \":\" + charPositionInLine;\r\n\t}\r\n\r\n\t/**\r\n\t * @exception NullPointerException if `listener` is `undefined`.\r\n\t */\r\n\tpublic addErrorListener(@NotNull listener: ANTLRErrorListener): void {\r\n\t\tif (!listener) {\r\n\t\t\tthrow new TypeError(\"listener must not be null\");\r\n\t\t}\r\n\t\tthis._listeners.push(listener);\r\n\t}\r\n\r\n\tpublic removeErrorListener(@NotNull listener: ANTLRErrorListener): void {\r\n\t\tlet position = this._listeners.indexOf(listener);\r\n\t\tif (position !== -1) {\r\n\t\t\tthis._listeners.splice(position, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic removeErrorListeners(): void {\r\n\t\tthis._listeners.length = 0;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getErrorListeners(): Array> {\r\n\t\treturn this._listeners.slice(0);\r\n\t}\r\n\r\n\tpublic getErrorListenerDispatch(): ANTLRErrorListener {\r\n\t\treturn new ProxyErrorListener>(this.getErrorListeners());\r\n\t}\r\n\r\n\t// subclass needs to override these if there are sempreds or actions\r\n\t// that the ATN interp needs to execute\r\n\tpublic sempred(\r\n\t\t_localctx: RuleContext | undefined,\r\n\t\truleIndex: number,\r\n\t\tactionIndex: number): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic precpred(\r\n\t\tlocalctx: RuleContext | undefined,\r\n\t\tprecedence: number): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic action(\r\n\t\t_localctx: RuleContext | undefined,\r\n\t\truleIndex: number,\r\n\t\tactionIndex: number): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\tget state(): number {\r\n\t\treturn this._stateNumber;\r\n\t}\r\n\r\n\t/** Indicate that the recognizer has changed internal state that is\r\n\t * consistent with the ATN state passed in. This way we always know\r\n\t * where we are in the ATN as the parser goes along. The rule\r\n\t * context objects form a stack that lets us see the stack of\r\n\t * invoking rules. Combine this and we have complete ATN\r\n\t * configuration information.\r\n\t */\r\n\tset state(atnState: number) {\r\n//\t\tSystem.err.println(\"setState \"+atnState);\r\n\t\tthis._stateNumber = atnState;\r\n//\t\tif ( traceATNStates ) _ctx.trace(atnState);\r\n\t}\r\n\r\n\tpublic abstract readonly inputStream: IntStream | undefined;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:59.5829654-07:00\r\n\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\n\r\n/**\r\n * This class provides a default implementation of the {@link Vocabulary}\r\n * interface.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class VocabularyImpl implements Vocabulary {\r\n\t/**\r\n\t * Gets an empty {@link Vocabulary} instance.\r\n\t *\r\n\t * No literal or symbol names are assigned to token types, so\r\n\t * {@link #getDisplayName(int)} returns the numeric value for all tokens\r\n\t * except {@link Token#EOF}.\r\n\t */\r\n\t@NotNull\r\n\tpublic static readonly EMPTY_VOCABULARY: VocabularyImpl = new VocabularyImpl([], [], []);\r\n\r\n\t@NotNull\r\n\tprivate readonly literalNames: Array;\r\n\t@NotNull\r\n\tprivate readonly symbolicNames: Array;\r\n\t@NotNull\r\n\tprivate readonly displayNames: Array;\r\n\r\n\tprivate _maxTokenType: number;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link VocabularyImpl} from the specified\r\n\t * literal, symbolic, and display token names.\r\n\t *\r\n\t * @param literalNames The literal names assigned to tokens, or an empty array\r\n\t * if no literal names are assigned.\r\n\t * @param symbolicNames The symbolic names assigned to tokens, or\r\n\t * an empty array if no symbolic names are assigned.\r\n\t * @param displayNames The display names assigned to tokens, or an empty array\r\n\t * to use the values in `literalNames` and `symbolicNames` as\r\n\t * the source of display names, as described in\r\n\t * {@link #getDisplayName(int)}.\r\n\t *\r\n\t * @see #getLiteralName(int)\r\n\t * @see #getSymbolicName(int)\r\n\t * @see #getDisplayName(int)\r\n\t */\r\n\tconstructor(literalNames: Array, symbolicNames: Array, displayNames: Array) {\r\n\t\tthis.literalNames = literalNames;\r\n\t\tthis.symbolicNames = symbolicNames;\r\n\t\tthis.displayNames = displayNames;\r\n\t\t// See note here on -1 part: https://github.com/antlr/antlr4/pull/1146\r\n\t\tthis._maxTokenType =\r\n\t\t\tMath.max(this.displayNames.length,\r\n\t\t\t\tMath.max(this.literalNames.length, this.symbolicNames.length)) - 1;\r\n\t}\r\n\r\n\t@Override\r\n\tget maxTokenType(): number {\r\n\t\treturn this._maxTokenType;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getLiteralName(tokenType: number): string | undefined {\r\n\t\tif (tokenType >= 0 && tokenType < this.literalNames.length) {\r\n\t\t\treturn this.literalNames[tokenType];\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getSymbolicName(tokenType: number): string | undefined {\r\n\t\tif (tokenType >= 0 && tokenType < this.symbolicNames.length) {\r\n\t\t\treturn this.symbolicNames[tokenType];\r\n\t\t}\r\n\r\n\t\tif (tokenType === Token.EOF) {\r\n\t\t\treturn \"EOF\";\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic getDisplayName(tokenType: number): string {\r\n\t\tif (tokenType >= 0 && tokenType < this.displayNames.length) {\r\n\t\t\tlet displayName = this.displayNames[tokenType];\r\n\t\t\tif (displayName) {\r\n\t\t\t\treturn displayName;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet literalName = this.getLiteralName(tokenType);\r\n\t\tif (literalName) {\r\n\t\t\treturn literalName;\r\n\t\t}\r\n\r\n\t\tlet symbolicName = this.getSymbolicName(tokenType);\r\n\t\tif (symbolicName) {\r\n\t\t\treturn symbolicName;\r\n\t\t}\r\n\r\n\t\treturn String(tokenType);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.5097925-07:00\r\n\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { ATNSimulator } from \"../atn/ATNSimulator\";\r\nimport { ATNState } from \"../atn/ATNState\";\r\nimport { DFA } from \"./DFA\";\r\nimport { DFAState } from \"./DFAState\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { PredictionContext } from \"../atn/PredictionContext\";\r\nimport { Recognizer } from \"../Recognizer\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\n/** A DFA walker that knows how to dump them to serialized strings. */\r\nexport class DFASerializer {\r\n\t@NotNull\r\n\tprivate dfa: DFA;\r\n\t@NotNull\r\n\tprivate vocabulary: Vocabulary;\r\n\r\n\tpublic ruleNames?: string[];\r\n\r\n\tpublic atn?: ATN;\r\n\r\n\tconstructor(/*@NotNull*/ dfa: DFA, /*@NotNull*/ vocabulary: Vocabulary);\r\n\tconstructor(/*@NotNull*/ dfa: DFA, /*@Nullable*/ parser: Recognizer | undefined);\r\n\tconstructor(/*@NotNull*/ dfa: DFA, /*@NotNull*/ vocabulary: Vocabulary, /*@Nullable*/ ruleNames: string[] | undefined, /*@Nullable*/ atn: ATN | undefined);\r\n\tconstructor(dfa: DFA, vocabulary: Vocabulary | Recognizer | undefined, ruleNames?: string[], atn?: ATN) {\r\n\t\tif (vocabulary instanceof Recognizer) {\r\n\t\t\truleNames = vocabulary.ruleNames;\r\n\t\t\tatn = vocabulary.atn;\r\n\t\t\tvocabulary = vocabulary.vocabulary;\r\n\t\t} else if (!vocabulary) {\r\n\t\t\tvocabulary = VocabularyImpl.EMPTY_VOCABULARY;\r\n\t\t}\r\n\r\n\t\tthis.dfa = dfa;\r\n\t\tthis.vocabulary = vocabulary;\r\n\t\tthis.ruleNames = ruleNames;\r\n\t\tthis.atn = atn;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (!this.dfa.s0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet buf = \"\";\r\n\r\n\t\tif (this.dfa.states) {\r\n\t\t\tlet states: DFAState[] = new Array(...this.dfa.states.toArray());\r\n\t\t\tstates.sort((o1, o2) => o1.stateNumber - o2.stateNumber);\r\n\r\n\t\t\tfor (let s of states) {\r\n\t\t\t\tlet edges: Map = s.getEdgeMap();\r\n\t\t\t\tlet edgeKeys = [...edges.keys()].sort((a, b) => a - b);\r\n\t\t\t\tlet contextEdges: Map = s.getContextEdgeMap();\r\n\t\t\t\tlet contextEdgeKeys = [...contextEdges.keys()].sort((a, b) => a - b);\r\n\t\t\t\tfor (let entry of edgeKeys) {\r\n\t\t\t\t\tlet value = edges.get(entry);\r\n\t\t\t\t\tif ((value == null || value === ATNSimulator.ERROR) && !s.isContextSymbol(entry)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet contextSymbol: boolean = false;\r\n\t\t\t\t\tbuf += (this.getStateString(s)) + (\"-\") + (this.getEdgeLabel(entry)) + (\"->\");\r\n\t\t\t\t\tif (s.isContextSymbol(entry)) {\r\n\t\t\t\t\t\tbuf += (\"!\");\r\n\t\t\t\t\t\tcontextSymbol = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet t: DFAState | undefined = value;\r\n\t\t\t\t\tif (t && t.stateNumber !== ATNSimulator.ERROR.stateNumber) {\r\n\t\t\t\t\t\tbuf += (this.getStateString(t)) + (\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (contextSymbol) {\r\n\t\t\t\t\t\tbuf += (\"ctx\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (s.isContextSensitive) {\r\n\t\t\t\t\tfor (let entry of contextEdgeKeys) {\r\n\t\t\t\t\t\tbuf += (this.getStateString(s))\r\n\t\t\t\t\t\t\t+ (\"-\")\r\n\t\t\t\t\t\t\t+ (this.getContextLabel(entry))\r\n\t\t\t\t\t\t\t+ (\"->\")\r\n\t\t\t\t\t\t\t+ (this.getStateString(contextEdges.get(entry)!))\r\n\t\t\t\t\t\t\t+ (\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet output: string = buf;\r\n\t\tif (output.length === 0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t//return Utils.sortLinesInString(output);\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprotected getContextLabel(i: number): string {\r\n\t\tif (i === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\treturn \"ctx:EMPTY_FULL\";\r\n\t\t}\r\n\t\telse if (i === PredictionContext.EMPTY_LOCAL_STATE_KEY) {\r\n\t\t\treturn \"ctx:EMPTY_LOCAL\";\r\n\t\t}\r\n\r\n\t\tif (this.atn && i > 0 && i <= this.atn.states.length) {\r\n\t\t\tlet state: ATNState = this.atn.states[i];\r\n\t\t\tlet ruleIndex: number = state.ruleIndex;\r\n\t\t\tif (this.ruleNames && ruleIndex >= 0 && ruleIndex < this.ruleNames.length) {\r\n\t\t\t\treturn \"ctx:\" + String(i) + \"(\" + this.ruleNames[ruleIndex] + \")\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn \"ctx:\" + String(i);\r\n\t}\r\n\r\n\tprotected getEdgeLabel(i: number): string {\r\n\t\treturn this.vocabulary.getDisplayName(i);\r\n\t}\r\n\r\n\tpublic getStateString(s: DFAState): string {\r\n\t\tif (s === ATNSimulator.ERROR) {\r\n\t\t\treturn \"ERROR\";\r\n\t\t}\r\n\r\n\t\tlet n: number = s.stateNumber;\r\n\t\tlet stateStr: string = \"s\" + n;\r\n\t\tif (s.isAcceptState) {\r\n\t\t\tif (s.predicates) {\r\n\t\t\t\tstateStr = \":s\" + n + \"=>\" + s.predicates;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstateStr = \":s\" + n + \"=>\" + s.prediction;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s.isContextSensitive) {\r\n\t\t\tstateStr += \"*\";\r\n\t\t\tfor (let config of s.configs) {\r\n\t\t\t\tif (config.reachesIntoOuterContext) {\r\n\t\t\t\t\tstateStr += \"*\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn stateStr;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:39.2167238-07:00\r\n\r\nimport { DFA } from \"./DFA\";\r\nimport { DFASerializer } from \"./DFASerializer\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\nexport class LexerDFASerializer extends DFASerializer {\r\n\tconstructor( @NotNull dfa: DFA) {\r\n\t\tsuper(dfa, VocabularyImpl.EMPTY_VOCABULARY);\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tprotected getEdgeLabel(i: number): string {\r\n\t\treturn \"'\" + String.fromCodePoint(i) + \"'\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.7099201-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\nimport { StarLoopbackState } from \"./StarLoopbackState\";\r\n\r\nexport class StarLoopEntryState extends DecisionState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic loopBackState!: StarLoopbackState;\r\n\r\n\t/**\r\n\t * Indicates whether this state can benefit from a precedence DFA during SLL\r\n\t * decision making.\r\n\t *\r\n\t * This is a computed property that is calculated during ATN deserialization\r\n\t * and stored for use in {@link ParserATNSimulator} and\r\n\t * {@link ParserInterpreter}.\r\n\t *\r\n\t * @see `DFA.isPrecedenceDfa`\r\n\t */\r\n\tpublic precedenceRuleDecision: boolean = false;\r\n\r\n\t/**\r\n\t * For precedence decisions, this set marks states *S* which have all\r\n\t * of the following characteristics:\r\n\t *\r\n\t * * One or more invocation sites of the current rule returns to\r\n\t * *S*.\r\n\t * * The closure from *S* includes the current decision without\r\n\t * passing through any rule invocations or stepping out of the current\r\n\t * rule.\r\n\t *\r\n\t * This field is not used when {@link #precedenceRuleDecision} is\r\n\t * `false`.\r\n\t */\r\n\tpublic precedenceLoopbackStates: BitSet = new BitSet();\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.STAR_LOOP_ENTRY;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:38.3567094-07:00\r\n\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { ATNConfigSet } from \"../atn/ATNConfigSet\";\r\nimport { ATNState } from \"../atn/ATNState\";\r\nimport { ATNType } from \"../atn/ATNType\";\r\nimport { DecisionState } from \"../atn/DecisionState\";\r\nimport { DFASerializer } from \"./DFASerializer\";\r\nimport { DFAState } from \"./DFAState\";\r\nimport { LexerATNSimulator } from \"../atn/LexerATNSimulator\";\r\nimport { LexerDFASerializer } from \"./LexerDFASerializer\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { StarLoopEntryState } from \"../atn/StarLoopEntryState\";\r\nimport { Token } from \"../Token\";\r\nimport { TokensStartState } from \"../atn/TokensStartState\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\nexport class DFA {\r\n\t/**\r\n\t * A set of all states in the `DFA`.\r\n\t *\r\n\t * Note that this collection of states holds the DFA states for both SLL and LL prediction. Only the start state\r\n\t * needs to be differentiated for these cases, which is tracked by the `s0` and `s0full` fields.\r\n\t */\r\n\t@NotNull\r\n\tpublic readonly states: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\r\n\tpublic s0: DFAState | undefined;\r\n\r\n\tpublic s0full: DFAState | undefined;\r\n\r\n\tpublic readonly decision: number;\r\n\r\n\t/** From which ATN state did we create this DFA? */\r\n\t@NotNull\r\n\tpublic atnStartState: ATNState;\r\n\t/**\r\n\t * Note: this field is accessed as `atnStartState.atn` in other targets. The TypeScript target keeps a separate copy\r\n\t * to avoid a number of additional null/undefined checks each time the ATN is accessed.\r\n\t */\r\n\t@NotNull\r\n\tpublic atn: ATN;\r\n\r\n\tprivate nextStateNumber: number = 0;\r\n\r\n\t/**\r\n\t * `true` if this DFA is for a precedence decision; otherwise,\r\n\t * `false`. This is the backing field for {@link #isPrecedenceDfa}.\r\n\t */\r\n\tprivate precedenceDfa: boolean;\r\n\r\n\t/**\r\n\t * Constructs a `DFA` instance associated with a lexer mode.\r\n\t *\r\n\t * The start state for a `DFA` constructed with this constructor should be a `TokensStartState`, which is the start\r\n\t * state for a lexer mode. The prediction made by this DFA determines the lexer rule which matches the current\r\n\t * input.\r\n\t *\r\n\t * @param atnStartState The start state for the mode.\r\n\t */\r\n\tconstructor(atnStartState: TokensStartState);\r\n\t/**\r\n\t * Constructs a `DFA` instance associated with a decision.\r\n\t *\r\n\t * @param atnStartState The decision associated with this DFA.\r\n\t * @param decision The decision number.\r\n\t */\r\n\tconstructor(atnStartState: DecisionState, decision: number);\r\n\tconstructor(@NotNull atnStartState: ATNState, decision: number = 0) {\r\n\t\tif (!atnStartState.atn) {\r\n\t\t\tthrow new Error(\"The ATNState must be associated with an ATN\");\r\n\t\t}\r\n\r\n\t\tthis.atnStartState = atnStartState;\r\n\t\tthis.atn = atnStartState.atn;\r\n\t\tthis.decision = decision;\r\n\r\n\t\t// Precedence DFAs are associated with the special precedence decision created for left-recursive rules which\r\n\t\t// evaluate their alternatives using a precedence hierarchy. When such a decision is encountered, we mark this\r\n\t\t// DFA instance as a precedence DFA and initialize the initial states s0 and s0full to special DFAState\r\n\t\t// instances which use outgoing edges to link to the actual start state used for each precedence level.\r\n\t\tlet isPrecedenceDfa: boolean = false;\r\n\t\tif (atnStartState instanceof StarLoopEntryState) {\r\n\t\t\tif (atnStartState.precedenceRuleDecision) {\r\n\t\t\t\tisPrecedenceDfa = true;\r\n\t\t\t\tthis.s0 = new DFAState(new ATNConfigSet());\r\n\t\t\t\tthis.s0full = new DFAState(new ATNConfigSet());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.precedenceDfa = isPrecedenceDfa;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether this DFA is a precedence DFA. Precedence DFAs use a special\r\n\t * start state {@link #s0} which is not stored in {@link #states}. The\r\n\t * {@link DFAState#edges} array for this start state contains outgoing edges\r\n\t * supplying individual start states corresponding to specific precedence\r\n\t * values.\r\n\t *\r\n\t * @returns `true` if this is a precedence DFA; otherwise,\r\n\t * `false`.\r\n\t * @see Parser.precedence\r\n\t */\r\n\tget isPrecedenceDfa(): boolean {\r\n\t\treturn this.precedenceDfa;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the start state for a specific precedence value.\r\n\t *\r\n\t * @param precedence The current precedence.\r\n\t * @returns The start state corresponding to the specified precedence, or\r\n\t * `undefined` if no start state exists for the specified precedence.\r\n\t *\r\n\t * @ if this is not a precedence DFA.\r\n\t * @see `isPrecedenceDfa`\r\n\t */\r\n\tpublic getPrecedenceStartState(precedence: number, fullContext: boolean): DFAState | undefined {\r\n\t\tif (!this.isPrecedenceDfa) {\r\n\t\t\tthrow new Error(\"Only precedence DFAs may contain a precedence start state.\");\r\n\t\t}\r\n\r\n\t\t// s0 and s0full are never null for a precedence DFA\r\n\t\tif (fullContext) {\r\n\t\t\treturn (this.s0full as DFAState).getTarget(precedence);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn (this.s0 as DFAState).getTarget(precedence);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set the start state for a specific precedence value.\r\n\t *\r\n\t * @param precedence The current precedence.\r\n\t * @param startState The start state corresponding to the specified\r\n\t * precedence.\r\n\t *\r\n\t * @ if this is not a precedence DFA.\r\n\t * @see `isPrecedenceDfa`\r\n\t */\r\n\tpublic setPrecedenceStartState(precedence: number, fullContext: boolean, startState: DFAState): void {\r\n\t\tif (!this.isPrecedenceDfa) {\r\n\t\t\tthrow new Error(\"Only precedence DFAs may contain a precedence start state.\");\r\n\t\t}\r\n\r\n\t\tif (precedence < 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (fullContext) {\r\n\t\t\t// s0full is never null for a precedence DFA\r\n\t\t\t(this.s0full as DFAState).setTarget(precedence, startState);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// s0 is never null for a precedence DFA\r\n\t\t\t(this.s0 as DFAState).setTarget(precedence, startState);\r\n\t\t}\r\n\t}\r\n\r\n\tget isEmpty(): boolean {\r\n\t\tif (this.isPrecedenceDfa) {\r\n\t\t\t// s0 and s0full are never null for a precedence DFA\r\n\t\t\treturn this.s0!.getEdgeMap().size === 0 && this.s0full!.getEdgeMap().size === 0;\r\n\t\t}\r\n\r\n\t\treturn this.s0 == null && this.s0full == null;\r\n\t}\r\n\r\n\tget isContextSensitive(): boolean {\r\n\t\tif (this.isPrecedenceDfa) {\r\n\t\t\t// s0full is never null for a precedence DFA\r\n\t\t\treturn (this.s0full as DFAState).getEdgeMap().size > 0;\r\n\t\t}\r\n\r\n\t\treturn this.s0full != null;\r\n\t}\r\n\r\n\tpublic addState(state: DFAState): DFAState {\r\n\t\tstate.stateNumber = this.nextStateNumber++;\r\n\t\treturn this.states.getOrAdd(state);\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(/*@NotNull*/ vocabulary: Vocabulary): string;\r\n\tpublic toString(/*@NotNull*/ vocabulary: Vocabulary, ruleNames: string[] | undefined): string;\r\n\tpublic toString(vocabulary?: Vocabulary, ruleNames?: string[]): string {\r\n\t\tif (!vocabulary) {\r\n\t\t\tvocabulary = VocabularyImpl.EMPTY_VOCABULARY;\r\n\t\t}\r\n\r\n\t\tif (!this.s0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet serializer: DFASerializer;\r\n\t\tif (ruleNames) {\r\n\t\t\tserializer = new DFASerializer(this, vocabulary, ruleNames, this.atnStartState.atn);\r\n\t\t} else {\r\n\t\t\tserializer = new DFASerializer(this, vocabulary);\r\n\t\t}\r\n\r\n\t\treturn serializer.toString();\r\n\t}\r\n\r\n\tpublic toLexerString(): string {\r\n\t\tif (!this.s0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet serializer: DFASerializer = new LexerDFASerializer(this);\r\n\t\treturn serializer.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.8389930-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class BasicState extends ATNState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.BASIC;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BasicState } from \"./BasicState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class InvalidState extends BasicState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.INVALID_TYPE;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.3060135-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull, Nullable } from \"../Decorators\";\r\nimport { Token } from \"../Token\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** A transition containing a set of values. */\r\nexport class SetTransition extends Transition {\r\n\t@NotNull\r\n\tpublic set: IntervalSet;\r\n\r\n\t// TODO (sam): should we really allow undefined here?\r\n\tconstructor(@NotNull target: ATNState, @Nullable set: IntervalSet) {\r\n\t\tsuper(target);\r\n\t\tif (set == null) {\r\n\t\t\tset = IntervalSet.of(Token.INVALID_TYPE);\r\n\t\t}\r\n\r\n\t\tthis.set = set;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.SET;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tget label(): IntervalSet {\r\n\t\treturn this.set;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn this.set.contains(symbol);\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn this.set.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.8483617-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull, Nullable } from \"../Decorators\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class NotSetTransition extends SetTransition {\r\n\tconstructor(@NotNull target: ATNState, @Nullable set: IntervalSet) {\r\n\t\tsuper(target, set);\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.NOT_SET;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn symbol >= minVocabSymbol\r\n\t\t\t&& symbol <= maxVocabSymbol\r\n\t\t\t&& !super.matches(symbol, minVocabSymbol, maxVocabSymbol);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"~\" + super.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.7513856-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The last node in the ATN for a rule, unless that rule is the start symbol.\r\n * In that case, there is one transition to EOF. Later, we might encode\r\n * references to all calls to this rule to compute FOLLOW sets for\r\n * error handling.\r\n */\r\nexport class RuleStopState extends ATNState {\r\n\r\n\t@Override\r\n\tget nonStopStateNumber(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.RULE_STOP;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.8294453-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { RuleStartState } from \"./RuleStartState\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** */\r\nexport class RuleTransition extends Transition {\r\n\t/** Ptr to the rule definition object for this rule ref */\r\n\tpublic ruleIndex: number; // no Rule object at runtime\r\n\r\n\tpublic precedence: number;\r\n\r\n\t/** What node to begin computations following ref to rule */\r\n\t@NotNull\r\n\tpublic followState: ATNState;\r\n\r\n\tpublic tailCall: boolean = false;\r\n\tpublic optimizedTailCall: boolean = false;\r\n\r\n\tconstructor(@NotNull ruleStart: RuleStartState, ruleIndex: number, precedence: number, @NotNull followState: ATNState) {\r\n\t\tsuper(ruleStart);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t\tthis.precedence = precedence;\r\n\t\tthis.followState = followState;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.RULE;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.9456839-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class WildcardTransition extends Transition {\r\n\tconstructor(@NotNull target: ATNState) {\r\n\t\tsuper(target);\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.WILDCARD;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn symbol >= minVocabSymbol && symbol <= maxVocabSymbol;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \".\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.4445360-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./AbstractPredicateTransition\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { NotSetTransition } from \"./NotSetTransition\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { Token } from \"../Token\";\r\nimport { Transition } from \"./Transition\";\r\nimport { WildcardTransition } from \"./WildcardTransition\";\r\n\r\nexport class LL1Analyzer {\r\n\t/** Special value added to the lookahead sets to indicate that we hit\r\n\t * a predicate during analysis if `seeThruPreds==false`.\r\n\t */\r\n\tpublic static readonly HIT_PRED: number = Token.INVALID_TYPE;\r\n\r\n\t@NotNull\r\n\tpublic atn: ATN;\r\n\r\n\tconstructor(@NotNull atn: ATN) { this.atn = atn; }\r\n\r\n\t/**\r\n\t * Calculates the SLL(1) expected lookahead set for each outgoing transition\r\n\t * of an {@link ATNState}. The returned array has one element for each\r\n\t * outgoing transition in `s`. If the closure from transition\r\n\t * *i* leads to a semantic predicate before matching a symbol, the\r\n\t * element at index *i* of the result will be `undefined`.\r\n\t *\r\n\t * @param s the ATN state\r\n\t * @returns the expected symbols for each outgoing transition of `s`.\r\n\t */\r\n\tpublic getDecisionLookahead(s: ATNState | undefined): Array | undefined {\r\n//\t\tSystem.out.println(\"LOOK(\"+s.stateNumber+\")\");\r\n\t\tif (s == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet look: Array = new Array(s.numberOfTransitions);\r\n\t\tfor (let alt = 0; alt < s.numberOfTransitions; alt++) {\r\n\t\t\tlet current: IntervalSet | undefined = new IntervalSet();\r\n\t\t\tlook[alt] = current;\r\n\t\t\tlet lookBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\t\tlet seeThruPreds: boolean = false; // fail to get lookahead upon pred\r\n\t\t\tthis._LOOK(s.transition(alt).target, undefined, PredictionContext.EMPTY_LOCAL,\r\n\t\t\t\tcurrent, lookBusy, new BitSet(), seeThruPreds, false);\r\n\t\t\t// Wipe out lookahead for this alternative if we found nothing\r\n\t\t\t// or we had a predicate when we !seeThruPreds\r\n\t\t\tif (current.size === 0 || current.contains(LL1Analyzer.HIT_PRED)) {\r\n\t\t\t\tcurrent = undefined;\r\n\t\t\t\tlook[alt] = current;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn look;\r\n\t}\r\n\r\n\t/**\r\n\t * Compute set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t *\r\n\t * If `ctx` is `undefined` and the end of the rule containing\r\n\t * `s` is reached, {@link Token#EPSILON} is added to the result set.\r\n\t * If `ctx` is not `undefined` and the end of the outermost rule is\r\n\t * reached, {@link Token#EOF} is added to the result set.\r\n\t *\r\n\t * @param s the ATN state\r\n\t * @param ctx the complete parser context, or `undefined` if the context\r\n\t * should be ignored\r\n\t *\r\n\t * @returns The set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t */\r\n\t// @NotNull\r\n\tpublic LOOK(/*@NotNull*/ s: ATNState, /*@NotNull*/ ctx: PredictionContext): IntervalSet;\r\n\r\n\t/**\r\n\t * Compute set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t *\r\n\t * If `ctx` is `undefined` and the end of the rule containing\r\n\t * `s` is reached, {@link Token#EPSILON} is added to the result set.\r\n\t * If `ctx` is not `PredictionContext#EMPTY_LOCAL` and the end of the outermost rule is\r\n\t * reached, {@link Token#EOF} is added to the result set.\r\n\t *\r\n\t * @param s the ATN state\r\n\t * @param stopState the ATN state to stop at. This can be a\r\n\t * {@link BlockEndState} to detect epsilon paths through a closure.\r\n\t * @param ctx the complete parser context, or `undefined` if the context\r\n\t * should be ignored\r\n\t *\r\n\t * @returns The set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t */\r\n\t// @NotNull\r\n\tpublic LOOK(/*@NotNull*/ s: ATNState, /*@NotNull*/ ctx: PredictionContext, stopState: ATNState | null): IntervalSet;\r\n\r\n\t@NotNull\r\n\tpublic LOOK(@NotNull s: ATNState, @NotNull ctx: PredictionContext, stopState?: ATNState | null): IntervalSet {\r\n\t\tif (stopState === undefined) {\r\n\t\t\tif (s.atn == null) {\r\n\t\t\t\tthrow new Error(\"Illegal state\");\r\n\t\t\t}\r\n\r\n\t\t\tstopState = s.atn.ruleToStopState[s.ruleIndex];\r\n\t\t} else if (stopState === null) {\r\n\t\t\t// This is an explicit request to pass undefined as the stopState to _LOOK. Used to distinguish an overload\r\n\t\t\t// from the method which simply omits the stopState parameter.\r\n\t\t\tstopState = undefined;\r\n\t\t}\r\n\r\n\t\tlet r: IntervalSet = new IntervalSet();\r\n\t\tlet seeThruPreds: boolean = true; // ignore preds; get all lookahead\r\n\t\tlet addEOF: boolean = true;\r\n\t\tthis._LOOK(s, stopState, ctx, r, new Array2DHashSet(), new BitSet(), seeThruPreds, addEOF);\r\n\t\treturn r;\r\n\t}\r\n\r\n\t/**\r\n\t * Compute set of tokens that can follow `s` in the ATN in the\r\n\t * specified `ctx`.\r\n\t *

        \r\n\t * If `ctx` is {@link PredictionContext#EMPTY_LOCAL} and\r\n\t * `stopState` or the end of the rule containing `s` is reached,\r\n\t * {@link Token#EPSILON} is added to the result set. If `ctx` is not\r\n\t * {@link PredictionContext#EMPTY_LOCAL} and `addEOF` is `true`\r\n\t * and `stopState` or the end of the outermost rule is reached,\r\n\t * {@link Token#EOF} is added to the result set.\r\n\t *\r\n\t * @param s the ATN state.\r\n\t * @param stopState the ATN state to stop at. This can be a\r\n\t * {@link BlockEndState} to detect epsilon paths through a closure.\r\n\t * @param ctx The outer context, or {@link PredictionContext#EMPTY_LOCAL} if\r\n\t * the outer context should not be used.\r\n\t * @param look The result lookahead set.\r\n\t * @param lookBusy A set used for preventing epsilon closures in the ATN\r\n\t * from causing a stack overflow. Outside code should pass\r\n\t * `new HashSet` for this argument.\r\n\t * @param calledRuleStack A set used for preventing left recursion in the\r\n\t * ATN from causing a stack overflow. Outside code should pass\r\n\t * `new BitSet()` for this argument.\r\n\t * @param seeThruPreds `true` to true semantic predicates as\r\n\t * implicitly `true` and \"see through them\", otherwise `false`\r\n\t * to treat semantic predicates as opaque and add {@link #HIT_PRED} to the\r\n\t * result if one is encountered.\r\n\t * @param addEOF Add {@link Token#EOF} to the result if the end of the\r\n\t * outermost context is reached. This parameter has no effect if `ctx`\r\n\t * is {@link PredictionContext#EMPTY_LOCAL}.\r\n\t */\r\n\tprotected _LOOK(\r\n\t\t@NotNull s: ATNState,\r\n\t\tstopState: ATNState | undefined,\r\n\t\t@NotNull ctx: PredictionContext,\r\n\t\t@NotNull look: IntervalSet,\r\n\t\t@NotNull lookBusy: Array2DHashSet,\r\n\t\t@NotNull calledRuleStack: BitSet,\r\n\t\tseeThruPreds: boolean,\r\n\t\taddEOF: boolean): void {\r\n//\t\tSystem.out.println(\"_LOOK(\"+s.stateNumber+\", ctx=\"+ctx);\r\n\t\tlet c: ATNConfig = ATNConfig.create(s, 0, ctx);\r\n\t\tif (!lookBusy.add(c)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (s === stopState) {\r\n\t\t\tif (PredictionContext.isEmptyLocal(ctx)) {\r\n\t\t\t\tlook.add(Token.EPSILON);\r\n\t\t\t\treturn;\r\n\t\t\t} else if (ctx.isEmpty) {\r\n\t\t\t\tif (addEOF) {\r\n\t\t\t\t\tlook.add(Token.EOF);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s instanceof RuleStopState) {\r\n\t\t\tif (ctx.isEmpty && !PredictionContext.isEmptyLocal(ctx)) {\r\n\t\t\t\tif (addEOF) {\r\n\t\t\t\t\tlook.add(Token.EOF);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tlet removed: boolean = calledRuleStack.get(s.ruleIndex);\r\n\t\t\ttry {\r\n\t\t\t\tcalledRuleStack.clear(s.ruleIndex);\r\n\t\t\t\tfor (let i = 0; i < ctx.size; i++) {\r\n\t\t\t\t\tif (ctx.getReturnState(i) === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet returnState: ATNState = this.atn.states[ctx.getReturnState(i)];\r\n//\t\t\t\t\tSystem.out.println(\"popping back to \"+retState);\r\n\t\t\t\t\tthis._LOOK(returnState, stopState, ctx.getParent(i), look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tif (removed) {\r\n\t\t\t\t\tcalledRuleStack.set(s.ruleIndex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet n: number = s.numberOfTransitions;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet t: Transition = s.transition(i);\r\n\t\t\tif (t instanceof RuleTransition) {\r\n\t\t\t\tif (calledRuleStack.get(t.ruleIndex)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet newContext: PredictionContext = ctx.getChild(t.followState.stateNumber);\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcalledRuleStack.set(t.ruleIndex);\r\n\t\t\t\t\tthis._LOOK(t.target, stopState, newContext, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tcalledRuleStack.clear(t.ruleIndex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (t instanceof AbstractPredicateTransition) {\r\n\t\t\t\tif (seeThruPreds) {\r\n\t\t\t\t\tthis._LOOK(t.target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlook.add(LL1Analyzer.HIT_PRED);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (t.isEpsilon) {\r\n\t\t\t\tthis._LOOK(t.target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);\r\n\t\t\t}\r\n\t\t\telse if (t instanceof WildcardTransition) {\r\n\t\t\t\tlook.addAll(IntervalSet.of(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType));\r\n\t\t\t}\r\n\t\t\telse {\r\n//\t\t\t\tSystem.out.println(\"adding \"+ t);\r\n\t\t\t\tlet set: IntervalSet | undefined = t.label;\r\n\t\t\t\tif (set != null) {\r\n\t\t\t\t\tif (t instanceof NotSetTransition) {\r\n\t\t\t\t\t\tset = set.complement(IntervalSet.of(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlook.addAll(set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.1063510-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNType } from \"./ATNType\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { InvalidState } from \"./InvalidState\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LL1Analyzer } from \"./LL1Analyzer\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleStartState } from \"./RuleStartState\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { Token } from \"../Token\";\r\nimport { TokensStartState } from \"./TokensStartState\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\n/** */\r\nexport class ATN {\r\n\t@NotNull\r\n\tpublic readonly states: ATNState[] = [];\r\n\r\n\t/** Each subrule/rule is a decision point and we must track them so we\r\n\t * can go back later and build DFA predictors for them. This includes\r\n\t * all the rules, subrules, optional blocks, ()+, ()* etc...\r\n\t */\r\n\t@NotNull\r\n\tpublic decisionToState: DecisionState[] = [];\r\n\r\n\t/**\r\n\t * Maps from rule index to starting state number.\r\n\t */\r\n\tpublic ruleToStartState!: RuleStartState[];\r\n\r\n\t/**\r\n\t * Maps from rule index to stop state number.\r\n\t */\r\n\tpublic ruleToStopState!: RuleStopState[];\r\n\r\n\t@NotNull\r\n\tpublic modeNameToStartState: Map =\r\n\t\tnew Map();\r\n\r\n\t/**\r\n\t * The type of the ATN.\r\n\t */\r\n\tpublic grammarType: ATNType;\r\n\r\n\t/**\r\n\t * The maximum value for any symbol recognized by a transition in the ATN.\r\n\t */\r\n\tpublic maxTokenType: number;\r\n\r\n\t/**\r\n\t * For lexer ATNs, this maps the rule index to the resulting token type.\r\n\t * For parser ATNs, this maps the rule index to the generated bypass token\r\n\t * type if the\r\n\t * {@link ATNDeserializationOptions#isGenerateRuleBypassTransitions}\r\n\t * deserialization option was specified; otherwise, this is `undefined`.\r\n\t */\r\n\tpublic ruleToTokenType!: Int32Array;\r\n\r\n\t/**\r\n\t * For lexer ATNs, this is an array of {@link LexerAction} objects which may\r\n\t * be referenced by action transitions in the ATN.\r\n\t */\r\n\tpublic lexerActions!: LexerAction[];\r\n\r\n\t@NotNull\r\n\tpublic modeToStartState: TokensStartState[] = [];\r\n\r\n\tprivate contextCache: Array2DHashMap =\r\n\t\tnew Array2DHashMap(ObjectEqualityComparator.INSTANCE);\r\n\r\n\t@NotNull\r\n\tpublic decisionToDFA: DFA[] = [];\r\n\t@NotNull\r\n\tpublic modeToDFA: DFA[] = [];\r\n\r\n\tpublic LL1Table: Map = new Map();\r\n\r\n\t/** Used for runtime deserialization of ATNs from strings */\r\n\tconstructor(@NotNull grammarType: ATNType, maxTokenType: number) {\r\n\t\tthis.grammarType = grammarType;\r\n\t\tthis.maxTokenType = maxTokenType;\r\n\t}\r\n\r\n\tpublic clearDFA(): void {\r\n\t\tthis.decisionToDFA = new Array(this.decisionToState.length);\r\n\t\tfor (let i = 0; i < this.decisionToDFA.length; i++) {\r\n\t\t\tthis.decisionToDFA[i] = new DFA(this.decisionToState[i], i);\r\n\t\t}\r\n\r\n\t\tthis.modeToDFA = new Array(this.modeToStartState.length);\r\n\t\tfor (let i = 0; i < this.modeToDFA.length; i++) {\r\n\t\t\tthis.modeToDFA[i] = new DFA(this.modeToStartState[i]);\r\n\t\t}\r\n\r\n\t\tthis.contextCache.clear();\r\n\t\tthis.LL1Table.clear();\r\n\t}\r\n\r\n\tget contextCacheSize(): number {\r\n\t\treturn this.contextCache.size;\r\n\t}\r\n\r\n\tpublic getCachedContext(context: PredictionContext): PredictionContext {\r\n\t\treturn PredictionContext.getCachedContext(context, this.contextCache, new PredictionContext.IdentityHashMap());\r\n\t}\r\n\r\n\tpublic getDecisionToDFA(): DFA[] {\r\n\t\tassert(this.decisionToDFA != null && this.decisionToDFA.length === this.decisionToState.length);\r\n\t\treturn this.decisionToDFA;\r\n\t}\r\n\r\n\t/** Compute the set of valid tokens that can occur starting in state `s`.\r\n\t * If `ctx` is {@link PredictionContext#EMPTY_LOCAL}, the set of tokens will not include what can follow\r\n\t * the rule surrounding `s`. In other words, the set will be\r\n\t * restricted to tokens reachable staying within `s`'s rule.\r\n\t */\r\n\t// @NotNull\r\n\tpublic nextTokens(s: ATNState, /*@NotNull*/ ctx: PredictionContext): IntervalSet;\r\n\r\n\t/**\r\n\t * Compute the set of valid tokens that can occur starting in `s` and\r\n\t * staying in same rule. {@link Token#EPSILON} is in set if we reach end of\r\n\t * rule.\r\n\t */\r\n\t// @NotNull\r\n\tpublic nextTokens(/*@NotNull*/ s: ATNState): IntervalSet;\r\n\r\n\t@NotNull\r\n\tpublic nextTokens(s: ATNState, ctx?: PredictionContext): IntervalSet {\r\n\t\tif (ctx) {\r\n\t\t\tlet anal: LL1Analyzer = new LL1Analyzer(this);\r\n\t\t\tlet next: IntervalSet = anal.LOOK(s, ctx);\r\n\t\t\treturn next;\r\n\t\t} else {\r\n\t\t\tif (s.nextTokenWithinRule) {\r\n\t\t\t\treturn s.nextTokenWithinRule;\r\n\t\t\t}\r\n\r\n\t\t\ts.nextTokenWithinRule = this.nextTokens(s, PredictionContext.EMPTY_LOCAL);\r\n\t\t\ts.nextTokenWithinRule.setReadonly(true);\r\n\t\t\treturn s.nextTokenWithinRule;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic addState(state: ATNState): void {\r\n\t\tstate.atn = this;\r\n\t\tstate.stateNumber = this.states.length;\r\n\t\tthis.states.push(state);\r\n\t}\r\n\r\n\tpublic removeState(@NotNull state: ATNState): void {\r\n\t\t// just replace the state, don't shift states in list\r\n\t\tlet invalidState = new InvalidState();\r\n\t\tinvalidState.atn = this;\r\n\t\tinvalidState.stateNumber = state.stateNumber;\r\n\t\tthis.states[state.stateNumber] = invalidState;\r\n\t}\r\n\r\n\tpublic defineMode(@NotNull name: string, @NotNull s: TokensStartState): void {\r\n\t\tthis.modeNameToStartState.set(name, s);\r\n\t\tthis.modeToStartState.push(s);\r\n\t\tthis.modeToDFA.push(new DFA(s));\r\n\t\tthis.defineDecisionState(s);\r\n\t}\r\n\r\n\tpublic defineDecisionState(@NotNull s: DecisionState): number {\r\n\t\tthis.decisionToState.push(s);\r\n\t\ts.decision = this.decisionToState.length - 1;\r\n\t\tthis.decisionToDFA.push(new DFA(s, s.decision));\r\n\t\treturn s.decision;\r\n\t}\r\n\r\n\tpublic getDecisionState(decision: number): DecisionState | undefined {\r\n\t\tif (this.decisionToState.length > 0) {\r\n\t\t\treturn this.decisionToState[decision];\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tget numberOfDecisions(): number {\r\n\t\treturn this.decisionToState.length;\r\n\t}\r\n\r\n\t/**\r\n\t * Computes the set of input symbols which could follow ATN state number\r\n\t * `stateNumber` in the specified full `context`. This method\r\n\t * considers the complete parser context, but does not evaluate semantic\r\n\t * predicates (i.e. all predicates encountered during the calculation are\r\n\t * assumed true). If a path in the ATN exists from the starting state to the\r\n\t * {@link RuleStopState} of the outermost context without matching any\r\n\t * symbols, {@link Token#EOF} is added to the returned set.\r\n\t *\r\n\t * If `context` is `undefined`, it is treated as\r\n\t * {@link ParserRuleContext#EMPTY}.\r\n\t *\r\n\t * Note that this does NOT give you the set of all tokens that could\r\n\t * appear at a given token position in the input phrase. In other words, it\r\n\t * does not answer:\r\n\t *\r\n\t * > Given a specific partial input phrase, return the set of all\r\n\t * > tokens that can follow the last token in the input phrase.\r\n\t *\r\n\t * The big difference is that with just the input, the parser could land\r\n\t * right in the middle of a lookahead decision. Getting all\r\n\t * *possible* tokens given a partial input stream is a separate\r\n\t * computation. See https://github.com/antlr/antlr4/issues/1428\r\n\t *\r\n\t * For this function, we are specifying an ATN state and call stack to\r\n\t * compute what token(s) can come next and specifically: outside of a\r\n\t * lookahead decision. That is what you want for error reporting and\r\n\t * recovery upon parse error.\r\n\t *\r\n\t * @param stateNumber the ATN state number\r\n\t * @param context the full parse context\r\n\t * @returns The set of potentially valid input symbols which could follow the\r\n\t * specified state in the specified context.\r\n\t * @ if the ATN does not contain a state with\r\n\t * number `stateNumber`\r\n\t */\r\n\t@NotNull\r\n\tpublic getExpectedTokens(stateNumber: number, context: RuleContext | undefined): IntervalSet {\r\n\t\tif (stateNumber < 0 || stateNumber >= this.states.length) {\r\n\t\t\tthrow new RangeError(\"Invalid state number.\");\r\n\t\t}\r\n\r\n\t\tlet ctx: RuleContext | undefined = context;\r\n\t\tlet s: ATNState = this.states[stateNumber];\r\n\t\tlet following: IntervalSet = this.nextTokens(s);\r\n\t\tif (!following.contains(Token.EPSILON)) {\r\n\t\t\treturn following;\r\n\t\t}\r\n\r\n\t\tlet expected: IntervalSet = new IntervalSet();\r\n\t\texpected.addAll(following);\r\n\t\texpected.remove(Token.EPSILON);\r\n\t\twhile (ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {\r\n\t\t\tlet invokingState: ATNState = this.states[ctx.invokingState];\r\n\t\t\tlet rt: RuleTransition = invokingState.transition(0) as RuleTransition;\r\n\t\t\tfollowing = this.nextTokens(rt.followState);\r\n\t\t\texpected.addAll(following);\r\n\t\t\texpected.remove(Token.EPSILON);\r\n\t\t\tctx = ctx._parent;\r\n\t\t}\r\n\r\n\t\tif (following.contains(Token.EPSILON)) {\r\n\t\t\texpected.add(Token.EOF);\r\n\t\t}\r\n\r\n\t\treturn expected;\r\n\t}\r\n}\r\n\r\nexport namespace ATN {\r\n\texport const INVALID_ALT_NUMBER: number = 0;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.7613038-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * This implementation of {@link LexerAction} is used for tracking input offsets\r\n * for position-dependent actions within a {@link LexerActionExecutor}.\r\n *\r\n * This action is not serialized as part of the ATN, and is only required for\r\n * position-dependent lexer actions which appear at a location other than the\r\n * end of a rule. For more information about DFA optimizations employed for\r\n * lexer actions, see {@link LexerActionExecutor#append} and\r\n * {@link LexerActionExecutor#fixOffsetBeforeMatch}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerIndexedCustomAction implements LexerAction {\r\n\tprivate readonly _offset: number;\r\n\tprivate readonly _action: LexerAction;\r\n\r\n\t/**\r\n\t * Constructs a new indexed custom action by associating a character offset\r\n\t * with a {@link LexerAction}.\r\n\t *\r\n\t * Note: This class is only required for lexer actions for which\r\n\t * {@link LexerAction#isPositionDependent} returns `true`.\r\n\t *\r\n\t * @param offset The offset into the input {@link CharStream}, relative to\r\n\t * the token start index, at which the specified lexer action should be\r\n\t * executed.\r\n\t * @param action The lexer action to execute at a particular offset in the\r\n\t * input {@link CharStream}.\r\n\t */\r\n\tconstructor(offset: number, @NotNull action: LexerAction) {\r\n\t\tthis._offset = offset;\r\n\t\tthis._action = action;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the location in the input {@link CharStream} at which the lexer\r\n\t * action should be executed. The value is interpreted as an offset relative\r\n\t * to the token start index.\r\n\t *\r\n\t * @returns The location in the input {@link CharStream} at which the lexer\r\n\t * action should be executed.\r\n\t */\r\n\tget offset(): number {\r\n\t\treturn this._offset;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the lexer action to execute.\r\n\t *\r\n\t * @returns A {@link LexerAction} object which executes the lexer action.\r\n\t */\r\n\t@NotNull\r\n\tget action(): LexerAction {\r\n\t\treturn this._action;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * @returns This method returns the result of calling {@link #getActionType}\r\n\t * on the {@link LexerAction} returned by {@link #getAction}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn this._action.actionType;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `true`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This method calls {@link #execute} on the result of {@link #getAction}\r\n\t * using the provided `lexer`.\r\n\t */\r\n\t@Override\r\n\tpublic execute(lexer: Lexer): void {\r\n\t\t// assume the input stream position was properly set by the calling code\r\n\t\tthis._action.execute(lexer);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this._offset);\r\n\t\thash = MurmurHash.update(hash, this._action);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerIndexedCustomAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._offset === obj._offset\r\n\t\t\t&& this._action.equals(obj._action);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.8810453-07:00\r\n\r\nimport { ArrayEqualityComparator } from \"../misc/ArrayEqualityComparator\";\r\nimport { CharStream } from \"../CharStream\";\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerIndexedCustomAction } from \"./LexerIndexedCustomAction\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Represents an executor for a sequence of lexer actions which traversed during\r\n * the matching operation of a lexer rule (token).\r\n *\r\n * The executor tracks position information for position-dependent lexer actions\r\n * efficiently, ensuring that actions appearing only at the end of the rule do\r\n * not cause bloating of the {@link DFA} created for the lexer.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerActionExecutor {\r\n\t@NotNull\r\n\tprivate _lexerActions: LexerAction[];\r\n\r\n\t/**\r\n\t * Caches the result of {@link #hashCode} since the hash code is an element\r\n\t * of the performance-critical {@link LexerATNConfig#hashCode} operation.\r\n\t */\r\n\tprivate cachedHashCode: number;\r\n\r\n\t/**\r\n\t * Constructs an executor for a sequence of {@link LexerAction} actions.\r\n\t * @param lexerActions The lexer actions to execute.\r\n\t */\r\n\tconstructor(@NotNull lexerActions: LexerAction[]) {\r\n\t\tthis._lexerActions = lexerActions;\r\n\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\tfor (let lexerAction of lexerActions) {\r\n\t\t\thash = MurmurHash.update(hash, lexerAction);\r\n\t\t}\r\n\r\n\t\tthis.cachedHashCode = MurmurHash.finish(hash, lexerActions.length);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a {@link LexerActionExecutor} which executes the actions for\r\n\t * the input `lexerActionExecutor` followed by a specified\r\n\t * `lexerAction`.\r\n\t *\r\n\t * @param lexerActionExecutor The executor for actions already traversed by\r\n\t * the lexer while matching a token within a particular\r\n\t * {@link ATNConfig}. If this is `undefined`, the method behaves as though\r\n\t * it were an empty executor.\r\n\t * @param lexerAction The lexer action to execute after the actions\r\n\t * specified in `lexerActionExecutor`.\r\n\t *\r\n\t * @returns A {@link LexerActionExecutor} for executing the combine actions\r\n\t * of `lexerActionExecutor` and `lexerAction`.\r\n\t */\r\n\t@NotNull\r\n\tpublic static append(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull lexerAction: LexerAction): LexerActionExecutor {\r\n\t\tif (!lexerActionExecutor) {\r\n\t\t\treturn new LexerActionExecutor([lexerAction]);\r\n\t\t}\r\n\r\n\t\tlet lexerActions = lexerActionExecutor._lexerActions.slice(0);\r\n\t\tlexerActions.push(lexerAction);\r\n\t\treturn new LexerActionExecutor(lexerActions);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a {@link LexerActionExecutor} which encodes the current offset\r\n\t * for position-dependent lexer actions.\r\n\t *\r\n\t * Normally, when the executor encounters lexer actions where\r\n\t * {@link LexerAction#isPositionDependent} returns `true`, it calls\r\n\t * {@link IntStream#seek} on the input {@link CharStream} to set the input\r\n\t * position to the *end* of the current token. This behavior provides\r\n\t * for efficient DFA representation of lexer actions which appear at the end\r\n\t * of a lexer rule, even when the lexer rule matches a variable number of\r\n\t * characters.\r\n\t *\r\n\t * Prior to traversing a match transition in the ATN, the current offset\r\n\t * from the token start index is assigned to all position-dependent lexer\r\n\t * actions which have not already been assigned a fixed offset. By storing\r\n\t * the offsets relative to the token start index, the DFA representation of\r\n\t * lexer actions which appear in the middle of tokens remains efficient due\r\n\t * to sharing among tokens of the same length, regardless of their absolute\r\n\t * position in the input stream.\r\n\t *\r\n\t * If the current executor already has offsets assigned to all\r\n\t * position-dependent lexer actions, the method returns `this`.\r\n\t *\r\n\t * @param offset The current offset to assign to all position-dependent\r\n\t * lexer actions which do not already have offsets assigned.\r\n\t *\r\n\t * @returns A {@link LexerActionExecutor} which stores input stream offsets\r\n\t * for all position-dependent lexer actions.\r\n\t */\r\n\tpublic fixOffsetBeforeMatch(offset: number): LexerActionExecutor {\r\n\t\tlet updatedLexerActions: LexerAction[] | undefined;\r\n\t\tfor (let i = 0; i < this._lexerActions.length; i++) {\r\n\t\t\tif (this._lexerActions[i].isPositionDependent && !(this._lexerActions[i] instanceof LexerIndexedCustomAction)) {\r\n\t\t\t\tif (!updatedLexerActions) {\r\n\t\t\t\t\tupdatedLexerActions = this._lexerActions.slice(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdatedLexerActions[i] = new LexerIndexedCustomAction(offset, this._lexerActions[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!updatedLexerActions) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\treturn new LexerActionExecutor(updatedLexerActions);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the lexer actions to be executed by this executor.\r\n\t * @returns The lexer actions to be executed by this executor.\r\n\t */\r\n\t@NotNull\r\n\tget lexerActions(): LexerAction[] {\r\n\t\treturn this._lexerActions;\r\n\t}\r\n\r\n\t/**\r\n\t * Execute the actions encapsulated by this executor within the context of a\r\n\t * particular {@link Lexer}.\r\n\t *\r\n\t * This method calls {@link IntStream#seek} to set the position of the\r\n\t * `input` {@link CharStream} prior to calling\r\n\t * {@link LexerAction#execute} on a position-dependent action. Before the\r\n\t * method returns, the input position will be restored to the same position\r\n\t * it was in when the method was invoked.\r\n\t *\r\n\t * @param lexer The lexer instance.\r\n\t * @param input The input stream which is the source for the current token.\r\n\t * When this method is called, the current {@link IntStream#index} for\r\n\t * `input` should be the start of the following token, i.e. 1\r\n\t * character past the end of the current token.\r\n\t * @param startIndex The token start index. This value may be passed to\r\n\t * {@link IntStream#seek} to set the `input` position to the beginning\r\n\t * of the token.\r\n\t */\r\n\tpublic execute(@NotNull lexer: Lexer, input: CharStream, startIndex: number): void {\r\n\t\tlet requiresSeek: boolean = false;\r\n\t\tlet stopIndex: number = input.index;\r\n\t\ttry {\r\n\t\t\tfor (let lexerAction of this._lexerActions) {\r\n\t\t\t\tif (lexerAction instanceof LexerIndexedCustomAction) {\r\n\t\t\t\t\tlet offset: number = lexerAction.offset;\r\n\t\t\t\t\tinput.seek(startIndex + offset);\r\n\t\t\t\t\tlexerAction = lexerAction.action;\r\n\t\t\t\t\trequiresSeek = (startIndex + offset) !== stopIndex;\r\n\t\t\t\t} else if (lexerAction.isPositionDependent) {\r\n\t\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t\t\trequiresSeek = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlexerAction.execute(lexer);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif (requiresSeek) {\r\n\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.cachedHashCode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerActionExecutor)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.cachedHashCode === obj.cachedHashCode\r\n\t\t\t&& ArrayEqualityComparator.INSTANCE.equals(this._lexerActions, obj._lexerActions);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.0961136-07:00\r\n\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\nexport class LexerNoViableAltException extends RecognitionException {\r\n\t//private static serialVersionUID: number = -730999203913001726L;\r\n\r\n\t/** Matching attempted at what input index? */\r\n\tprivate _startIndex: number;\r\n\r\n\t/** Which configurations did we try at input.index that couldn't match input.LA(1)? */\r\n\tprivate _deadEndConfigs?: ATNConfigSet;\r\n\r\n\tconstructor(\r\n\t\tlexer: Lexer | undefined,\r\n\t\t@NotNull input: CharStream,\r\n\t\tstartIndex: number,\r\n\t\tdeadEndConfigs: ATNConfigSet | undefined) {\r\n\t\tsuper(lexer, input);\r\n\t\tthis._startIndex = startIndex;\r\n\t\tthis._deadEndConfigs = deadEndConfigs;\r\n\t}\r\n\r\n\tget startIndex(): number {\r\n\t\treturn this._startIndex;\r\n\t}\r\n\r\n\tget deadEndConfigs(): ATNConfigSet | undefined {\r\n\t\treturn this._deadEndConfigs;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): CharStream {\r\n\t\treturn super.inputStream as CharStream;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet symbol = \"\";\r\n\t\tif (this._startIndex >= 0 && this._startIndex < this.inputStream.size) {\r\n\t\t\tsymbol = this.inputStream.getText(Interval.of(this._startIndex, this._startIndex));\r\n\t\t\tsymbol = Utils.escapeWhitespace(symbol, false);\r\n\t\t}\r\n\r\n\t\t// return String.format(Locale.getDefault(), \"%s('%s')\", LexerNoViableAltException.class.getSimpleName(), symbol);\r\n\t\treturn `LexerNoViableAltException('${symbol}')`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.9444556-07:00\r\n\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class OrderedATNConfigSet extends ATNConfigSet {\r\n\r\n\tconstructor();\r\n\tconstructor(set: ATNConfigSet, readonly: boolean);\r\n\tconstructor(set?: ATNConfigSet, readonly?: boolean) {\r\n\t\tif (set != null && readonly != null) {\r\n\t\t\tsuper(set, readonly);\r\n\t\t} else {\r\n\t\t\tsuper();\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic clone(readonly: boolean): ATNConfigSet {\r\n\t\tlet copy: OrderedATNConfigSet = new OrderedATNConfigSet(this, readonly);\r\n\t\tif (!readonly && this.isReadOnly) {\r\n\t\t\tcopy.addAll(this);\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected getKey(e: ATNConfig): { state: number, alt: number } {\r\n\t\t// This is a specially crafted key to ensure configurations are only merged if they are equal\r\n\t\treturn { state: 0, alt: e.hashCode() };\r\n\t}\r\n\r\n\t@Override\r\n\tprotected canMerge(left: ATNConfig, leftKey: { state: number, alt: number }, right: ATNConfig): boolean {\r\n\t\treturn left.equals(right);\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.1083066-07:00\r\n\r\nimport { AcceptStateInfo } from \"../dfa/AcceptStateInfo\";\r\nimport { ActionTransition } from \"./ActionTransition\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { CharStream } from \"../CharStream\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { IntStream } from \"../IntStream\";\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerActionExecutor } from \"./LexerActionExecutor\";\r\nimport { LexerNoViableAltException } from \"../LexerNoViableAltException\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { OrderedATNConfigSet } from \"./OrderedATNConfigSet\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredicateTransition } from \"./PredicateTransition\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { Token } from \"../Token\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\nimport * as assert from \"assert\";\r\n\r\n/** \"dup\" of ParserInterpreter */\r\nexport class LexerATNSimulator extends ATNSimulator {\r\n\tpublic optimize_tail_calls: boolean = true;\r\n\r\n\tprotected recog: Lexer | undefined;\r\n\r\n\t/** The current token's starting index into the character stream.\r\n\t * Shared across DFA to ATN simulation in case the ATN fails and the\r\n\t * DFA did not have a previous accept state. In this case, we use the\r\n\t * ATN-generated exception object.\r\n\t */\r\n\tprotected startIndex: number = -1;\r\n\r\n\t/** line number 1..n within the input */\r\n\tprivate _line: number = 1;\r\n\r\n\t/** The index of the character relative to the beginning of the line 0..n-1 */\r\n\tprivate _charPositionInLine: number = 0;\r\n\r\n\tprotected mode: number = Lexer.DEFAULT_MODE;\r\n\r\n\t/** Used during DFA/ATN exec to record the most recent accept configuration info */\r\n\t@NotNull\r\n\tprotected prevAccept: LexerATNSimulator.SimState = new LexerATNSimulator.SimState();\r\n\r\n\tconstructor(/*@NotNull*/ atn: ATN);\r\n\tconstructor(/*@NotNull*/ atn: ATN, recog: Lexer | undefined);\r\n\tconstructor(@NotNull atn: ATN, recog?: Lexer) {\r\n\t\tsuper(atn);\r\n\t\tthis.recog = recog;\r\n\t}\r\n\r\n\tpublic copyState(@NotNull simulator: LexerATNSimulator): void {\r\n\t\tthis._charPositionInLine = simulator.charPositionInLine;\r\n\t\tthis._line = simulator._line;\r\n\t\tthis.mode = simulator.mode;\r\n\t\tthis.startIndex = simulator.startIndex;\r\n\t}\r\n\r\n\tpublic match(@NotNull input: CharStream, mode: number): number {\r\n\t\tthis.mode = mode;\r\n\t\tlet mark: number = input.mark();\r\n\t\ttry {\r\n\t\t\tthis.startIndex = input.index;\r\n\t\t\tthis.prevAccept.reset();\r\n\t\t\tlet s0: DFAState | undefined = this.atn.modeToDFA[mode].s0;\r\n\t\t\tif (s0 == null) {\r\n\t\t\t\treturn this.matchATN(input);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn this.execATN(input, s0);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tinput.release(mark);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reset(): void {\r\n\t\tthis.prevAccept.reset();\r\n\t\tthis.startIndex = -1;\r\n\t\tthis._line = 1;\r\n\t\tthis._charPositionInLine = 0;\r\n\t\tthis.mode = Lexer.DEFAULT_MODE;\r\n\t}\r\n\r\n\tprotected matchATN(@NotNull input: CharStream): number {\r\n\t\tlet startState: ATNState = this.atn.modeToStartState[this.mode];\r\n\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`matchATN mode ${this.mode} start: ${startState}`);\r\n\t\t}\r\n\r\n\t\tlet old_mode: number = this.mode;\r\n\r\n\t\tlet s0_closure: ATNConfigSet = this.computeStartState(input, startState);\r\n\t\tlet suppressEdge: boolean = s0_closure.hasSemanticContext;\r\n\t\tif (suppressEdge) {\r\n\t\t\ts0_closure.hasSemanticContext = false;\r\n\t\t}\r\n\r\n\t\tlet next: DFAState = this.addDFAState(s0_closure);\r\n\t\tif (!suppressEdge) {\r\n\t\t\tlet dfa = this.atn.modeToDFA[this.mode];\r\n\t\t\tif (!dfa.s0) {\r\n\t\t\t\tdfa.s0 = next;\r\n\t\t\t} else {\r\n\t\t\t\tnext = dfa.s0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet predict: number = this.execATN(input, next);\r\n\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`DFA after matchATN: ${this.atn.modeToDFA[old_mode].toLexerString()}`);\r\n\t\t}\r\n\r\n\t\treturn predict;\r\n\t}\r\n\r\n\tprotected execATN(@NotNull input: CharStream, @NotNull ds0: DFAState): number {\r\n\t\t// console.log(\"enter exec index \"+input.index+\" from \"+ds0.configs);\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`start state closure=${ds0.configs}`);\r\n\t\t}\r\n\r\n\t\tif (ds0.isAcceptState) {\r\n\t\t\t// allow zero-length tokens\r\n\t\t\tthis.captureSimState(this.prevAccept, input, ds0);\r\n\t\t}\r\n\r\n\t\tlet t: number = input.LA(1);\r\n\t\t// @NotNull\r\n\t\tlet s: DFAState = ds0; // s is current/from DFA state\r\n\r\n\t\twhile (true) { // while more work\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(`execATN loop starting closure: ${s.configs}`);\r\n\t\t\t}\r\n\r\n\t\t\t// As we move src->trg, src->trg, we keep track of the previous trg to\r\n\t\t\t// avoid looking up the DFA state again, which is expensive.\r\n\t\t\t// If the previous target was already part of the DFA, we might\r\n\t\t\t// be able to avoid doing a reach operation upon t. If s!=null,\r\n\t\t\t// it means that semantic predicates didn't prevent us from\r\n\t\t\t// creating a DFA state. Once we know s!=null, we check to see if\r\n\t\t\t// the DFA state has an edge already for t. If so, we can just reuse\r\n\t\t\t// it's configuration set; there's no point in re-computing it.\r\n\t\t\t// This is kind of like doing DFA simulation within the ATN\r\n\t\t\t// simulation because DFA simulation is really just a way to avoid\r\n\t\t\t// computing reach/closure sets. Technically, once we know that\r\n\t\t\t// we have a previously added DFA state, we could jump over to\r\n\t\t\t// the DFA simulator. But, that would mean popping back and forth\r\n\t\t\t// a lot and making things more complicated algorithmically.\r\n\t\t\t// This optimization makes a lot of sense for loops within DFA.\r\n\t\t\t// A character will take us back to an existing DFA state\r\n\t\t\t// that already has lots of edges out of it. e.g., .* in comments.\r\n\t\t\tlet target: DFAState | undefined = this.getExistingTargetState(s, t);\r\n\t\t\tif (target == null) {\r\n\t\t\t\ttarget = this.computeTargetState(input, s, t);\r\n\t\t\t}\r\n\r\n\t\t\tif (target === ATNSimulator.ERROR) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// If this is a consumable input element, make sure to consume before\r\n\t\t\t// capturing the accept state so the input index, line, and char\r\n\t\t\t// position accurately reflect the state of the interpreter at the\r\n\t\t\t// end of the token.\r\n\t\t\tif (t !== IntStream.EOF) {\r\n\t\t\t\tthis.consume(input);\r\n\t\t\t}\r\n\r\n\t\t\tif (target.isAcceptState) {\r\n\t\t\t\tthis.captureSimState(this.prevAccept, input, target);\r\n\t\t\t\tif (t === IntStream.EOF) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tt = input.LA(1);\r\n\t\t\ts = target; // flip; current DFA target becomes new src/from state\r\n\t\t}\r\n\r\n\t\treturn this.failOrAccept(this.prevAccept, input, s.configs, t);\r\n\t}\r\n\r\n\t/**\r\n\t * Get an existing target state for an edge in the DFA. If the target state\r\n\t * for the edge has not yet been computed or is otherwise not available,\r\n\t * this method returns `undefined`.\r\n\t *\r\n\t * @param s The current DFA state\r\n\t * @param t The next input symbol\r\n\t * @returns The existing target DFA state for the given input symbol\r\n\t * `t`, or `undefined` if the target state for this edge is not\r\n\t * already cached\r\n\t */\r\n\tprotected getExistingTargetState(@NotNull s: DFAState, t: number): DFAState | undefined {\r\n\t\tlet target: DFAState | undefined = s.getTarget(t);\r\n\t\tif (LexerATNSimulator.debug && target != null) {\r\n\t\t\tconsole.log(\"reuse state \" + s.stateNumber +\r\n\t\t\t\t\" edge to \" + target.stateNumber);\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t}\r\n\r\n\t/**\r\n\t * Compute a target state for an edge in the DFA, and attempt to add the\r\n\t * computed state and corresponding edge to the DFA.\r\n\t *\r\n\t * @param input The input stream\r\n\t * @param s The current DFA state\r\n\t * @param t The next input symbol\r\n\t *\r\n\t * @returns The computed target DFA state for the given input symbol\r\n\t * `t`. If `t` does not lead to a valid DFA state, this method\r\n\t * returns {@link #ERROR}.\r\n\t */\r\n\t@NotNull\r\n\tprotected computeTargetState(@NotNull input: CharStream, @NotNull s: DFAState, t: number): DFAState {\r\n\t\tlet reach: ATNConfigSet = new OrderedATNConfigSet();\r\n\r\n\t\t// if we don't find an existing DFA state\r\n\t\t// Fill reach starting from closure, following t transitions\r\n\t\tthis.getReachableConfigSet(input, s.configs, reach, t);\r\n\r\n\t\tif (reach.isEmpty) { // we got nowhere on t from s\r\n\t\t\tif (!reach.hasSemanticContext) {\r\n\t\t\t\t// we got nowhere on t, don't throw out this knowledge; it'd\r\n\t\t\t\t// cause a failover from DFA later.\r\n\t\t\t\tthis.addDFAEdge(s, t, ATNSimulator.ERROR);\r\n\t\t\t}\r\n\r\n\t\t\t// stop when we can't match any more char\r\n\t\t\treturn ATNSimulator.ERROR;\r\n\t\t}\r\n\r\n\t\t// Add an edge from s to target DFA found/created for reach\r\n\t\treturn this.addDFAEdge(s, t, reach);\r\n\t}\r\n\r\n\tprotected failOrAccept(\r\n\t\tprevAccept: LexerATNSimulator.SimState, input: CharStream,\r\n\t\treach: ATNConfigSet, t: number): number {\r\n\t\tif (prevAccept.dfaState != null) {\r\n\t\t\tlet lexerActionExecutor: LexerActionExecutor | undefined = prevAccept.dfaState.lexerActionExecutor;\r\n\t\t\tthis.accept(input, lexerActionExecutor, this.startIndex,\r\n\t\t\t\tprevAccept.index, prevAccept.line, prevAccept.charPos);\r\n\t\t\treturn prevAccept.dfaState.prediction;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// if no accept and EOF is first char, return EOF\r\n\t\t\tif (t === IntStream.EOF && input.index === this.startIndex) {\r\n\t\t\t\treturn Token.EOF;\r\n\t\t\t}\r\n\r\n\t\t\tthrow new LexerNoViableAltException(this.recog, input, this.startIndex, reach);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Given a starting configuration set, figure out all ATN configurations\r\n\t * we can reach upon input `t`. Parameter `reach` is a return\r\n\t * parameter.\r\n\t */\r\n\tprotected getReachableConfigSet(@NotNull input: CharStream, @NotNull closure: ATNConfigSet, @NotNull reach: ATNConfigSet, t: number): void {\r\n\t\t// this is used to skip processing for configs which have a lower priority\r\n\t\t// than a config that already reached an accept state for the same rule\r\n\t\tlet skipAlt: number = ATN.INVALID_ALT_NUMBER;\r\n\t\tfor (let c of closure) {\r\n\t\t\tlet currentAltReachedAcceptState: boolean = c.alt === skipAlt;\r\n\t\t\tif (currentAltReachedAcceptState && c.hasPassedThroughNonGreedyDecision) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(`testing ${this.getTokenName(t)} at ${c.toString(this.recog, true)}`);\r\n\t\t\t}\r\n\r\n\t\t\tlet n: number = c.state.numberOfOptimizedTransitions;\r\n\t\t\tfor (let ti = 0; ti < n; ti++) { // for each optimized transition\r\n\t\t\t\tlet trans: Transition = c.state.getOptimizedTransition(ti);\r\n\t\t\t\tlet target: ATNState | undefined = this.getReachableTarget(trans, t);\r\n\t\t\t\tif (target != null) {\r\n\t\t\t\t\tlet lexerActionExecutor: LexerActionExecutor | undefined = c.lexerActionExecutor;\r\n\t\t\t\t\tlet config: ATNConfig;\r\n\t\t\t\t\tif (lexerActionExecutor != null) {\r\n\t\t\t\t\t\tlexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.index - this.startIndex);\r\n\t\t\t\t\t\tconfig = c.transform(target, true, lexerActionExecutor);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tassert(c.lexerActionExecutor == null);\r\n\t\t\t\t\t\tconfig = c.transform(target, true);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet treatEofAsEpsilon: boolean = t === IntStream.EOF;\r\n\t\t\t\t\tif (this.closure(input, config, reach, currentAltReachedAcceptState, true, treatEofAsEpsilon)) {\r\n\t\t\t\t\t\t// any remaining configs for this alt have a lower priority than\r\n\t\t\t\t\t\t// the one that just reached an accept state.\r\n\t\t\t\t\t\tskipAlt = c.alt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected accept(\r\n\t\t@NotNull input: CharStream, lexerActionExecutor: LexerActionExecutor | undefined,\r\n\t\tstartIndex: number, index: number, line: number, charPos: number): void {\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(`ACTION ${lexerActionExecutor}`);\r\n\t\t}\r\n\r\n\t\t// seek to after last char in token\r\n\t\tinput.seek(index);\r\n\t\tthis._line = line;\r\n\t\tthis._charPositionInLine = charPos;\r\n\r\n\t\tif (lexerActionExecutor != null && this.recog != null) {\r\n\t\t\tlexerActionExecutor.execute(this.recog, input, startIndex);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getReachableTarget(trans: Transition, t: number): ATNState | undefined {\r\n\t\tif (trans.matches(t, Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE)) {\r\n\t\t\treturn trans.target;\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected computeStartState(\r\n\t\t@NotNull input: CharStream,\r\n\t\t@NotNull p: ATNState): ATNConfigSet {\r\n\t\tlet initialContext: PredictionContext = PredictionContext.EMPTY_FULL;\r\n\t\tlet configs: ATNConfigSet = new OrderedATNConfigSet();\r\n\t\tfor (let i = 0; i < p.numberOfTransitions; i++) {\r\n\t\t\tlet target: ATNState = p.transition(i).target;\r\n\t\t\tlet c: ATNConfig = ATNConfig.create(target, i + 1, initialContext);\r\n\t\t\tthis.closure(input, c, configs, false, false, false);\r\n\t\t}\r\n\t\treturn configs;\r\n\t}\r\n\r\n\t/**\r\n\t * Since the alternatives within any lexer decision are ordered by\r\n\t * preference, this method stops pursuing the closure as soon as an accept\r\n\t * state is reached. After the first accept state is reached by depth-first\r\n\t * search from `config`, all other (potentially reachable) states for\r\n\t * this rule would have a lower priority.\r\n\t *\r\n\t * @returns `true` if an accept state is reached, otherwise\r\n\t * `false`.\r\n\t */\r\n\tprotected closure(@NotNull input: CharStream, @NotNull config: ATNConfig, @NotNull configs: ATNConfigSet, currentAltReachedAcceptState: boolean, speculative: boolean, treatEofAsEpsilon: boolean): boolean {\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(\"closure(\" + config.toString(this.recog, true) + \")\");\r\n\t\t}\r\n\r\n\t\tif (config.state instanceof RuleStopState) {\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tif (this.recog != null) {\r\n\t\t\t\t\tconsole.log(`closure at ${this.recog.ruleNames[config.state.ruleIndex]} rule stop ${config}`);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tconsole.log(`closure at rule stop ${config}`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet context: PredictionContext = config.context;\r\n\t\t\tif (context.isEmpty) {\r\n\t\t\t\tconfigs.add(config);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (context.hasEmpty) {\r\n\t\t\t\tconfigs.add(config.transform(config.state, true, PredictionContext.EMPTY_FULL));\r\n\t\t\t\tcurrentAltReachedAcceptState = true;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < context.size; i++) {\r\n\t\t\t\tlet returnStateNumber: number = context.getReturnState(i);\r\n\t\t\t\tif (returnStateNumber === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet newContext: PredictionContext = context.getParent(i); // \"pop\" return state\r\n\t\t\t\tlet returnState: ATNState = this.atn.states[returnStateNumber];\r\n\t\t\t\tlet c: ATNConfig = config.transform(returnState, false, newContext);\r\n\t\t\t\tcurrentAltReachedAcceptState = this.closure(input, c, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentAltReachedAcceptState;\r\n\t\t}\r\n\r\n\t\t// optimization\r\n\t\tif (!config.state.onlyHasEpsilonTransitions) {\r\n\t\t\tif (!currentAltReachedAcceptState || !config.hasPassedThroughNonGreedyDecision) {\r\n\t\t\t\tconfigs.add(config);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet p: ATNState = config.state;\r\n\t\tfor (let i = 0; i < p.numberOfOptimizedTransitions; i++) {\r\n\t\t\tlet t: Transition = p.getOptimizedTransition(i);\r\n\t\t\tlet c: ATNConfig | undefined = this.getEpsilonTarget(input, config, t, configs, speculative, treatEofAsEpsilon);\r\n\t\t\tif (c != null) {\r\n\t\t\t\tcurrentAltReachedAcceptState = this.closure(input, c, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn currentAltReachedAcceptState;\r\n\t}\r\n\r\n\t// side-effect: can alter configs.hasSemanticContext\r\n\tprotected getEpsilonTarget(\r\n\t\t@NotNull input: CharStream,\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull t: Transition,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tspeculative: boolean,\r\n\t\ttreatEofAsEpsilon: boolean): ATNConfig | undefined {\r\n\t\tlet c: ATNConfig | undefined;\r\n\r\n\t\tswitch (t.serializationType) {\r\n\t\tcase TransitionType.RULE:\r\n\t\t\tlet ruleTransition: RuleTransition = t as RuleTransition;\r\n\t\t\tif (this.optimize_tail_calls && ruleTransition.optimizedTailCall && !config.context.hasEmpty) {\r\n\t\t\t\tc = config.transform(t.target, true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlet newContext: PredictionContext = config.context.getChild(ruleTransition.followState.stateNumber);\r\n\t\t\t\tc = config.transform(t.target, true, newContext);\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\tthrow new Error(\"Precedence predicates are not supported in lexers.\");\r\n\r\n\t\tcase TransitionType.PREDICATE:\r\n\t\t\t/* Track traversing semantic predicates. If we traverse,\r\n\t\t\t\twe cannot add a DFA state for this \"reach\" computation\r\n\t\t\t\tbecause the DFA would not test the predicate again in the\r\n\t\t\t\tfuture. Rather than creating collections of semantic predicates\r\n\t\t\t\tlike v3 and testing them on prediction, v4 will test them on the\r\n\t\t\t\tfly all the time using the ATN not the DFA. This is slower but\r\n\t\t\t\tsemantically it's not used that often. One of the key elements to\r\n\t\t\t\tthis predicate mechanism is not adding DFA states that see\r\n\t\t\t\tpredicates immediately afterwards in the ATN. For example,\r\n\r\n\t\t\t\ta : ID {p1}? | ID {p2}? ;\r\n\r\n\t\t\t\tshould create the start state for rule 'a' (to save start state\r\n\t\t\t\tcompetition), but should not create target of ID state. The\r\n\t\t\t\tcollection of ATN states the following ID references includes\r\n\t\t\t\tstates reached by traversing predicates. Since this is when we\r\n\t\t\t\ttest them, we cannot cash the DFA state target of ID.\r\n\t\t\t*/\r\n\t\t\tlet pt: PredicateTransition = t as PredicateTransition;\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"EVAL rule \" + pt.ruleIndex + \":\" + pt.predIndex);\r\n\t\t\t}\r\n\t\t\tconfigs.hasSemanticContext = true;\r\n\t\t\tif (this.evaluatePredicate(input, pt.ruleIndex, pt.predIndex, speculative)) {\r\n\t\t\t\tc = config.transform(t.target, true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tc = undefined;\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ACTION:\r\n\t\t\tif (config.context.hasEmpty) {\r\n\t\t\t\t// execute actions anywhere in the start rule for a token.\r\n\t\t\t\t//\r\n\t\t\t\t// TODO: if the entry rule is invoked recursively, some\r\n\t\t\t\t// actions may be executed during the recursive call. The\r\n\t\t\t\t// problem can appear when hasEmpty is true but\r\n\t\t\t\t// isEmpty is false. In this case, the config needs to be\r\n\t\t\t\t// split into two contexts - one with just the empty path\r\n\t\t\t\t// and another with everything but the empty path.\r\n\t\t\t\t// Unfortunately, the current algorithm does not allow\r\n\t\t\t\t// getEpsilonTarget to return two configurations, so\r\n\t\t\t\t// additional modifications are needed before we can support\r\n\t\t\t\t// the split operation.\r\n\t\t\t\tlet lexerActionExecutor: LexerActionExecutor = LexerActionExecutor.append(config.lexerActionExecutor, this.atn.lexerActions[(t as ActionTransition).actionIndex]);\r\n\t\t\t\tc = config.transform(t.target, true, lexerActionExecutor);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// ignore actions in referenced rules\r\n\t\t\t\tc = config.transform(t.target, true);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\tcase TransitionType.EPSILON:\r\n\t\t\tc = config.transform(t.target, true);\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ATOM:\r\n\t\tcase TransitionType.RANGE:\r\n\t\tcase TransitionType.SET:\r\n\t\t\tif (treatEofAsEpsilon) {\r\n\t\t\t\tif (t.matches(IntStream.EOF, Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE)) {\r\n\t\t\t\t\tc = config.transform(t.target, false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tc = undefined;\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tc = undefined;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * Evaluate a predicate specified in the lexer.\r\n\t *\r\n\t * If `speculative` is `true`, this method was called before\r\n\t * {@link #consume} for the matched character. This method should call\r\n\t * {@link #consume} before evaluating the predicate to ensure position\r\n\t * sensitive values, including {@link Lexer#getText}, {@link Lexer#getLine},\r\n\t * and {@link Lexer#getCharPositionInLine}, properly reflect the current\r\n\t * lexer state. This method should restore `input` and the simulator\r\n\t * to the original state before returning (i.e. undo the actions made by the\r\n\t * call to {@link #consume}.\r\n\t *\r\n\t * @param input The input stream.\r\n\t * @param ruleIndex The rule containing the predicate.\r\n\t * @param predIndex The index of the predicate within the rule.\r\n\t * @param speculative `true` if the current index in `input` is\r\n\t * one character before the predicate's location.\r\n\t *\r\n\t * @returns `true` if the specified predicate evaluates to\r\n\t * `true`.\r\n\t */\r\n\tprotected evaluatePredicate(@NotNull input: CharStream, ruleIndex: number, predIndex: number, speculative: boolean): boolean {\r\n\t\t// assume true if no recognizer was provided\r\n\t\tif (this.recog == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (!speculative) {\r\n\t\t\treturn this.recog.sempred(undefined, ruleIndex, predIndex);\r\n\t\t}\r\n\r\n\t\tlet savedCharPositionInLine: number = this._charPositionInLine;\r\n\t\tlet savedLine: number = this._line;\r\n\t\tlet index: number = input.index;\r\n\t\tlet marker: number = input.mark();\r\n\t\ttry {\r\n\t\t\tthis.consume(input);\r\n\t\t\treturn this.recog.sempred(undefined, ruleIndex, predIndex);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tthis._charPositionInLine = savedCharPositionInLine;\r\n\t\t\tthis._line = savedLine;\r\n\t\t\tinput.seek(index);\r\n\t\t\tinput.release(marker);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected captureSimState(\r\n\t\t@NotNull settings: LexerATNSimulator.SimState,\r\n\t\t@NotNull input: CharStream,\r\n\t\t@NotNull dfaState: DFAState): void {\r\n\t\tsettings.index = input.index;\r\n\t\tsettings.line = this._line;\r\n\t\tsettings.charPos = this._charPositionInLine;\r\n\t\tsettings.dfaState = dfaState;\r\n\t}\r\n\r\n\t// @NotNull\r\n\tprotected addDFAEdge(/*@NotNull*/ p: DFAState, t: number, /*@NotNull*/ q: ATNConfigSet): DFAState;\r\n\tprotected addDFAEdge(/*@NotNull*/ p: DFAState, t: number, /*@NotNull*/ q: DFAState): void;\r\n\tprotected addDFAEdge(p: DFAState, t: number, q: ATNConfigSet | DFAState): DFAState | void {\r\n\t\tif (q instanceof ATNConfigSet) {\r\n\t\t\t/* leading to this call, ATNConfigSet.hasSemanticContext is used as a\r\n\t\t\t* marker indicating dynamic predicate evaluation makes this edge\r\n\t\t\t* dependent on the specific input sequence, so the static edge in the\r\n\t\t\t* DFA should be omitted. The target DFAState is still created since\r\n\t\t\t* execATN has the ability to resynchronize with the DFA state cache\r\n\t\t\t* following the predicate evaluation step.\r\n\t\t\t*\r\n\t\t\t* TJP notes: next time through the DFA, we see a pred again and eval.\r\n\t\t\t* If that gets us to a previously created (but dangling) DFA\r\n\t\t\t* state, we can continue in pure DFA mode from there.\r\n\t\t\t*/\r\n\t\t\tlet suppressEdge: boolean = q.hasSemanticContext;\r\n\t\t\tif (suppressEdge) {\r\n\t\t\t\tq.hasSemanticContext = false;\r\n\t\t\t}\r\n\r\n\t\t\t// @NotNull\r\n\t\t\tlet to: DFAState = this.addDFAState(q);\r\n\r\n\t\t\tif (suppressEdge) {\r\n\t\t\t\treturn to;\r\n\t\t\t}\r\n\r\n\t\t\tthis.addDFAEdge(p, t, to);\r\n\t\t\treturn to;\r\n\t\t} else {\r\n\t\t\tif (LexerATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"EDGE \" + p + \" -> \" + q + \" upon \" + String.fromCharCode(t));\r\n\t\t\t}\r\n\r\n\t\t\tif (p != null) {\r\n\t\t\t\tp.setTarget(t, q);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/** Add a new DFA state if there isn't one with this set of\r\n\t * \tconfigurations already. This method also detects the first\r\n\t * \tconfiguration containing an ATN rule stop state. Later, when\r\n\t * \ttraversing the DFA, we will know which rule to accept.\r\n\t */\r\n\t@NotNull\r\n\tprotected addDFAState(@NotNull configs: ATNConfigSet): DFAState {\r\n\t\t/* the lexer evaluates predicates on-the-fly; by this point configs\r\n\t\t * should not contain any configurations with unevaluated predicates.\r\n\t\t */\r\n\t\tassert(!configs.hasSemanticContext);\r\n\r\n\t\tlet proposed: DFAState = new DFAState(configs);\r\n\t\tlet existing: DFAState | undefined = this.atn.modeToDFA[this.mode].states.get(proposed);\r\n\t\tif (existing != null) {\r\n\t\t\treturn existing;\r\n\t\t}\r\n\r\n\t\tconfigs.optimizeConfigs(this);\r\n\t\tlet newState: DFAState = new DFAState(configs.clone(true));\r\n\r\n\t\tlet firstConfigWithRuleStopState: ATNConfig | undefined;\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\tfirstConfigWithRuleStopState = c;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (firstConfigWithRuleStopState != null) {\r\n\t\t\tlet prediction: number = this.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex];\r\n\t\t\tlet lexerActionExecutor: LexerActionExecutor | undefined = firstConfigWithRuleStopState.lexerActionExecutor;\r\n\t\t\tnewState.acceptStateInfo = new AcceptStateInfo(prediction, lexerActionExecutor);\r\n\t\t}\r\n\r\n\t\treturn this.atn.modeToDFA[this.mode].addState(newState);\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getDFA(mode: number): DFA {\r\n\t\treturn this.atn.modeToDFA[mode];\r\n\t}\r\n\r\n\t/** Get the text matched so far for the current token.\r\n\t */\r\n\t@NotNull\r\n\tpublic getText(@NotNull input: CharStream): string {\r\n\t\t// index is first lookahead char, don't include.\r\n\t\treturn input.getText(Interval.of(this.startIndex, input.index - 1));\r\n\t}\r\n\r\n\tget line(): number {\r\n\t\treturn this._line;\r\n\t}\r\n\r\n\tset line(line: number) {\r\n\t\tthis._line = line;\r\n\t}\r\n\r\n\tget charPositionInLine(): number {\r\n\t\treturn this._charPositionInLine;\r\n\t}\r\n\r\n\tset charPositionInLine(charPositionInLine: number) {\r\n\t\tthis._charPositionInLine = charPositionInLine;\r\n\t}\r\n\r\n\tpublic consume(@NotNull input: CharStream): void {\r\n\t\tlet curChar: number = input.LA(1);\r\n\t\tif (curChar === \"\\n\".charCodeAt(0)) {\r\n\t\t\tthis._line++;\r\n\t\t\tthis._charPositionInLine = 0;\r\n\t\t} else {\r\n\t\t\tthis._charPositionInLine++;\r\n\t\t}\r\n\t\tinput.consume();\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getTokenName(t: number): string {\r\n\t\tif (t === -1) {\r\n\t\t\treturn \"EOF\";\r\n\t\t}\r\n\t\t//if ( atn.g!=null ) return atn.g.getTokenDisplayName(t);\r\n\t\treturn \"'\" + String.fromCharCode(t) + \"'\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerATNSimulator {\r\n\texport const debug: boolean = false;\r\n\texport const dfa_debug: boolean = false;\r\n\r\n\t/** When we hit an accept state in either the DFA or the ATN, we\r\n\t * have to notify the character stream to start buffering characters\r\n\t * via {@link IntStream#mark} and record the current state. The current sim state\r\n\t * includes the current index into the input, the current line,\r\n\t * and current character position in that line. Note that the Lexer is\r\n\t * tracking the starting line and characterization of the token. These\r\n\t * variables track the \"state\" of the simulator when it hits an accept state.\r\n\t *\r\n\t * We track these variables separately for the DFA and ATN simulation\r\n\t * because the DFA simulation often has to fail over to the ATN\r\n\t * simulation. If the ATN simulation fails, we need the DFA to fall\r\n\t * back to its previously accepted state, if any. If the ATN succeeds,\r\n\t * then the ATN does the accept and the DFA simulator that invoked it\r\n\t * can simply return the predicted token type.\r\n\t */\r\n\texport class SimState {\r\n\t\tpublic index: number = -1;\r\n\t\tpublic line: number = 0;\r\n\t\tpublic charPos: number = -1;\r\n\t\tpublic dfaState?: DFAState;\r\n\r\n\t\tpublic reset(): void {\r\n\t\t\tthis.index = -1;\r\n\t\t\tthis.line = 0;\r\n\t\t\tthis.charPos = -1;\r\n\t\t\tthis.dfaState = undefined;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.7913318-07:00\r\n\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CommonTokenFactory } from \"./CommonTokenFactory\";\r\nimport { IntegerStack } from \"./misc/IntegerStack\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { LexerATNSimulator } from \"./atn/LexerATNSimulator\";\r\nimport { LexerNoViableAltException } from \"./LexerNoViableAltException\";\r\nimport { Override } from \"./Decorators\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/** A lexer is recognizer that draws input symbols from a character stream.\r\n * lexer grammars result in a subclass of this object. A Lexer object\r\n * uses simplified match() and error recovery mechanisms in the interest\r\n * of speed.\r\n */\r\nexport abstract class Lexer extends Recognizer\r\n\timplements TokenSource {\r\n\tpublic static readonly DEFAULT_MODE: number = 0;\r\n\tpublic static readonly MORE: number = -2;\r\n\tpublic static readonly SKIP: number = -3;\r\n\r\n\tstatic get DEFAULT_TOKEN_CHANNEL(): number {\r\n\t\treturn Token.DEFAULT_CHANNEL;\r\n\t}\r\n\r\n\tstatic get HIDDEN(): number {\r\n\t\treturn Token.HIDDEN_CHANNEL;\r\n\t}\r\n\r\n\tpublic static readonly MIN_CHAR_VALUE: number = 0x0000;\r\n\tpublic static readonly MAX_CHAR_VALUE: number = 0x10FFFF;\r\n\r\n\tpublic _input: CharStream;\r\n\r\n\tprotected _tokenFactorySourcePair: { source: TokenSource, stream: CharStream };\r\n\r\n\t/** How to create token objects */\r\n\tprotected _factory: TokenFactory = CommonTokenFactory.DEFAULT;\r\n\r\n\t/** The goal of all lexer rules/methods is to create a token object.\r\n\t * This is an instance variable as multiple rules may collaborate to\r\n\t * create a single token. nextToken will return this object after\r\n\t * matching lexer rule(s). If you subclass to allow multiple token\r\n\t * emissions, then set this to the last token to be matched or\r\n\t * something non-undefined so that the auto token emit mechanism will not\r\n\t * emit another token.\r\n\t */\r\n\tpublic _token: Token | undefined;\r\n\r\n\t/** What character index in the stream did the current token start at?\r\n\t * Needed, for example, to get the text for current token. Set at\r\n\t * the start of nextToken.\r\n\t */\r\n\tpublic _tokenStartCharIndex: number = -1;\r\n\r\n\t/** The line on which the first character of the token resides */\r\n\tpublic _tokenStartLine: number = 0;\r\n\r\n\t/** The character position of first character within the line */\r\n\tpublic _tokenStartCharPositionInLine: number = 0;\r\n\r\n\t/** Once we see EOF on char stream, next token will be EOF.\r\n\t * If you have DONE : EOF ; then you see DONE EOF.\r\n\t */\r\n\tpublic _hitEOF: boolean = false;\r\n\r\n\t/** The channel number for the current token */\r\n\tpublic _channel: number = 0;\r\n\r\n\t/** The token type for the current token */\r\n\tpublic _type: number = 0;\r\n\r\n\tpublic readonly _modeStack: IntegerStack = new IntegerStack();\r\n\tpublic _mode: number = Lexer.DEFAULT_MODE;\r\n\r\n\t/** You can set the text for the current token to override what is in\r\n\t * the input char buffer. Set `text` or can set this instance var.\r\n\t */\r\n\tpublic _text: string | undefined;\r\n\r\n\tconstructor(input: CharStream) {\r\n\t\tsuper();\r\n\t\tthis._input = input;\r\n\t\tthis._tokenFactorySourcePair = { source: this, stream: input };\r\n\t}\r\n\r\n\tpublic reset(): void;\r\n\tpublic reset(resetInput: boolean): void;\r\n\tpublic reset(resetInput?: boolean): void {\r\n\t\t// wack Lexer state variables\r\n\t\tif (resetInput === undefined || resetInput) {\r\n\t\t\tthis._input.seek(0); // rewind the input\r\n\t\t}\r\n\r\n\t\tthis._token = undefined;\r\n\t\tthis._type = Token.INVALID_TYPE;\r\n\t\tthis._channel = Token.DEFAULT_CHANNEL;\r\n\t\tthis._tokenStartCharIndex = -1;\r\n\t\tthis._tokenStartCharPositionInLine = -1;\r\n\t\tthis._tokenStartLine = -1;\r\n\t\tthis._text = undefined;\r\n\r\n\t\tthis._hitEOF = false;\r\n\t\tthis._mode = Lexer.DEFAULT_MODE;\r\n\t\tthis._modeStack.clear();\r\n\r\n\t\tthis.interpreter.reset();\r\n\t}\r\n\r\n\t/** Return a token from this source; i.e., match a token on the char\r\n\t * stream.\r\n\t */\r\n\t@Override\r\n\tpublic nextToken(): Token {\r\n\t\tif (this._input == null) {\r\n\t\t\tthrow new Error(\"nextToken requires a non-null input stream.\");\r\n\t\t}\r\n\r\n\t\t// Mark start location in char stream so unbuffered streams are\r\n\t\t// guaranteed at least have text of current token\r\n\t\tlet tokenStartMarker: number = this._input.mark();\r\n\t\ttry {\r\n\t\t\touter:\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (this._hitEOF) {\r\n\t\t\t\t\treturn this.emitEOF();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._token = undefined;\r\n\t\t\t\tthis._channel = Token.DEFAULT_CHANNEL;\r\n\t\t\t\tthis._tokenStartCharIndex = this._input.index;\r\n\t\t\t\tthis._tokenStartCharPositionInLine = this.interpreter.charPositionInLine;\r\n\t\t\t\tthis._tokenStartLine = this.interpreter.line;\r\n\t\t\t\tthis._text = undefined;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tthis._type = Token.INVALID_TYPE;\r\n//\t\t\t\tSystem.out.println(\"nextToken line \"+tokenStartLine+\" at \"+((char)input.LA(1))+\r\n//\t\t\t\t\t\t\t\t \" in mode \"+mode+\r\n//\t\t\t\t\t\t\t\t \" at index \"+input.index);\r\n\t\t\t\t\tlet ttype: number;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tttype = this.interpreter.match(this._input, this._mode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (e) {\r\n\t\t\t\t\t\tif (e instanceof LexerNoViableAltException) {\r\n\t\t\t\t\t\t\tthis.notifyListeners(e);\t\t// report error\r\n\t\t\t\t\t\t\tthis.recover(e);\r\n\t\t\t\t\t\t\tttype = Lexer.SKIP;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this._input.LA(1) === IntStream.EOF) {\r\n\t\t\t\t\t\tthis._hitEOF = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this._type === Token.INVALID_TYPE) {\r\n\t\t\t\t\t\tthis._type = ttype;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this._type === Lexer.SKIP) {\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (this._type === Lexer.MORE);\r\n\t\t\t\tif (this._token == null) {\r\n\t\t\t\t\treturn this.emit();\r\n\t\t\t\t}\r\n\t\t\t\treturn this._token;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\t// make sure we release marker after match or\r\n\t\t\t// unbuffered char stream will keep buffering\r\n\t\t\tthis._input.release(tokenStartMarker);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Instruct the lexer to skip creating a token for current lexer rule\r\n\t * and look for another token. nextToken() knows to keep looking when\r\n\t * a lexer rule finishes with token set to SKIP_TOKEN. Recall that\r\n\t * if token==undefined at end of any token rule, it creates one for you\r\n\t * and emits it.\r\n\t */\r\n\tpublic skip(): void {\r\n\t\tthis._type = Lexer.SKIP;\r\n\t}\r\n\r\n\tpublic more(): void {\r\n\t\tthis._type = Lexer.MORE;\r\n\t}\r\n\r\n\tpublic mode(m: number): void {\r\n\t\tthis._mode = m;\r\n\t}\r\n\r\n\tpublic pushMode(m: number): void {\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(\"pushMode \" + m);\r\n\t\t}\r\n\t\tthis._modeStack.push(this._mode);\r\n\t\tthis.mode(m);\r\n\t}\r\n\r\n\tpublic popMode(): number {\r\n\t\tif (this._modeStack.isEmpty) {\r\n\t\t\tthrow new Error(\"EmptyStackException\");\r\n\t\t}\r\n\t\tif (LexerATNSimulator.debug) {\r\n\t\t\tconsole.log(\"popMode back to \" + this._modeStack.peek());\r\n\t\t}\r\n\t\tthis.mode(this._modeStack.pop());\r\n\t\treturn this._mode;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenFactory(): TokenFactory {\r\n\t\treturn this._factory;\r\n\t}\r\n\r\n\t// @Override\r\n\tset tokenFactory(factory: TokenFactory) {\r\n\t\tthis._factory = factory;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): CharStream {\r\n\t\treturn this._input;\r\n\t}\r\n\r\n\t/** Set the char stream and reset the lexer */\r\n\tset inputStream(input: CharStream) {\r\n\t\tthis.reset(false);\r\n\t\tthis._input = input;\r\n\t\tthis._tokenFactorySourcePair = { source: this, stream: this._input };\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\treturn this._input.sourceName;\r\n\t}\r\n\r\n\r\n\t/** The standard method called to automatically emit a token at the\r\n\t * outermost lexical rule. The token object should point into the\r\n\t * char buffer start..stop. If there is a text override in 'text',\r\n\t * use that to set the token's text. Override this method to emit\r\n\t * custom Token objects or provide a new factory.\r\n\t */\r\n\tpublic emit(token: Token): Token;\r\n\r\n\t/** By default does not support multiple emits per nextToken invocation\r\n\t * for efficiency reasons. Subclass and override this method, nextToken,\r\n\t * and getToken (to push tokens into a list and pull from that list\r\n\t * rather than a single variable as this implementation does).\r\n\t */\r\n\tpublic emit(): Token;\r\n\r\n\tpublic emit(token?: Token): Token {\r\n\t\tif (!token) {\r\n\t\t\ttoken = this._factory.create(\r\n\t\t\t\tthis._tokenFactorySourcePair, this._type, this._text, this._channel,\r\n\t\t\t\tthis._tokenStartCharIndex, this.charIndex - 1, this._tokenStartLine,\r\n\t\t\t\tthis._tokenStartCharPositionInLine);\r\n\t\t}\r\n\t\tthis._token = token;\r\n\t\treturn token;\r\n\t}\r\n\r\n\tpublic emitEOF(): Token {\r\n\t\tlet cpos: number = this.charPositionInLine;\r\n\t\tlet line: number = this.line;\r\n\t\tlet eof: Token = this._factory.create(\r\n\t\t\tthis._tokenFactorySourcePair, Token.EOF, undefined,\r\n\t\t\tToken.DEFAULT_CHANNEL, this._input.index, this._input.index - 1,\r\n\t\t\tline, cpos);\r\n\t\tthis.emit(eof);\r\n\t\treturn eof;\r\n\t}\r\n\r\n\t@Override\r\n\tget line(): number {\r\n\t\treturn this.interpreter.line;\r\n\t}\r\n\r\n\tset line(line: number) {\r\n\t\tthis.interpreter.line = line;\r\n\t}\r\n\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\treturn this.interpreter.charPositionInLine;\r\n\t}\r\n\r\n\tset charPositionInLine(charPositionInLine: number) {\r\n\t\tthis.interpreter.charPositionInLine = charPositionInLine;\r\n\t}\r\n\r\n\t/** What is the index of the current character of lookahead? */\r\n\tget charIndex(): number {\r\n\t\treturn this._input.index;\r\n\t}\r\n\r\n\t/** Return the text matched so far for the current token or any\r\n\t * text override.\r\n\t */\r\n\tget text(): string {\r\n\t\tif (this._text != null) {\r\n\t\t\treturn this._text;\r\n\t\t}\r\n\t\treturn this.interpreter.getText(this._input);\r\n\t}\r\n\r\n\t/** Set the complete text of this token; it wipes any previous\r\n\t * changes to the text.\r\n\t */\r\n\tset text(text: string) {\r\n\t\tthis._text = text;\r\n\t}\r\n\r\n\t/** Override if emitting multiple tokens. */\r\n\tget token(): Token | undefined { return this._token; }\r\n\r\n\tset token(_token: Token | undefined) {\r\n\t\tthis._token = _token;\r\n\t}\r\n\r\n\tset type(ttype: number) {\r\n\t\tthis._type = ttype;\r\n\t}\r\n\r\n\tget type(): number {\r\n\t\treturn this._type;\r\n\t}\r\n\r\n\tset channel(channel: number) {\r\n\t\tthis._channel = channel;\r\n\t}\r\n\r\n\tget channel(): number {\r\n\t\treturn this._channel;\r\n\t}\r\n\r\n\tpublic abstract readonly channelNames: string[];\r\n\r\n\tpublic abstract readonly modeNames: string[];\r\n\r\n\t/** Return a list of all Token objects in input char stream.\r\n\t * Forces load of all tokens. Does not include EOF token.\r\n\t */\r\n\tpublic getAllTokens(): Token[] {\r\n\t\tlet tokens: Token[] = [];\r\n\t\tlet t: Token = this.nextToken();\r\n\t\twhile (t.type !== Token.EOF) {\r\n\t\t\ttokens.push(t);\r\n\t\t\tt = this.nextToken();\r\n\t\t}\r\n\t\treturn tokens;\r\n\t}\r\n\r\n\tpublic notifyListeners(e: LexerNoViableAltException): void {\r\n\t\tlet text: string = this._input.getText(\r\n\t\t\tInterval.of(this._tokenStartCharIndex, this._input.index));\r\n\t\tlet msg: string = \"token recognition error at: '\" +\r\n\t\t\tthis.getErrorDisplay(text) + \"'\";\r\n\r\n\t\tlet listener: ANTLRErrorListener = this.getErrorListenerDispatch();\r\n\t\tif (listener.syntaxError) {\r\n\t\t\tlistener.syntaxError(this, undefined, this._tokenStartLine, this._tokenStartCharPositionInLine, msg, e);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getErrorDisplay(s: string | number): string {\r\n\t\tif (typeof s === \"number\") {\r\n\t\t\tswitch (s) {\r\n\t\t\tcase Token.EOF:\r\n\t\t\t\treturn \"\";\r\n\t\t\tcase 0x0a:\r\n\t\t\t\treturn \"\\\\n\";\r\n\t\t\tcase 0x09:\r\n\t\t\t\treturn \"\\\\t\";\r\n\t\t\tcase 0x0d:\r\n\t\t\t\treturn \"\\\\r\";\r\n\t\t\t}\r\n\t\t\treturn String.fromCharCode(s);\r\n\t\t}\r\n\t\treturn s.replace(/\\n/g, \"\\\\n\")\r\n\t\t\t.replace(/\\t/g, \"\\\\t\")\r\n\t\t\t.replace(/\\r/g, \"\\\\r\");\r\n\t}\r\n\r\n\tpublic getCharErrorDisplay(c: number): string {\r\n\t\tlet s: string = this.getErrorDisplay(c);\r\n\t\treturn \"'\" + s + \"'\";\r\n\t}\r\n\r\n\t/** Lexers can normally match any char in it's vocabulary after matching\r\n\t * a token, so do the easy thing and just kill a character and hope\r\n\t * it all works out. You can instead use the rule invocation stack\r\n\t * to do sophisticated error recovery if you are in a fragment rule.\r\n\t */\r\n\tpublic recover(re: RecognitionException): void;\r\n\tpublic recover(re: LexerNoViableAltException): void;\r\n\tpublic recover(re: RecognitionException): void {\r\n\t\tif (re instanceof LexerNoViableAltException) {\r\n\t\t\tif (this._input.LA(1) !== IntStream.EOF) {\r\n\t\t\t\t// skip a char and try again\r\n\t\t\t\tthis.interpreter.consume(this._input);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"consuming char \"+(char)input.LA(1)+\" during recovery\");\r\n\t\t\t//re.printStackTrace();\r\n\t\t\t// TODO: Do we lose character or line position information?\r\n\t\t\tthis._input.consume();\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:40.8683480-07:00\r\n\r\nimport { ArrayEqualityComparator } from \"./ArrayEqualityComparator\";\r\nimport { IntegerList } from \"./IntegerList\";\r\nimport { Interval } from \"./Interval\";\r\nimport { IntSet } from \"./IntSet\";\r\nimport { Lexer } from \"../Lexer\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Token } from \"../Token\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\n\r\n/**\r\n * This class implements the {@link IntSet} backed by a sorted array of\r\n * non-overlapping intervals. It is particularly efficient for representing\r\n * large collections of numbers, where the majority of elements appear as part\r\n * of a sequential range of numbers that are all part of the set. For example,\r\n * the set { 1, 2, 3, 4, 7, 8 } may be represented as { [1, 4], [7, 8] }.\r\n *\r\n * This class is able to represent sets containing any combination of values in\r\n * the range {@link Integer#MIN_VALUE} to {@link Integer#MAX_VALUE}\r\n * (inclusive).\r\n */\r\nexport class IntervalSet implements IntSet {\r\n\tprivate static _COMPLETE_CHAR_SET: IntervalSet;\r\n\tstatic get COMPLETE_CHAR_SET(): IntervalSet {\r\n\t\tif (IntervalSet._COMPLETE_CHAR_SET === undefined) {\r\n\t\t\tIntervalSet._COMPLETE_CHAR_SET = IntervalSet.of(Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE);\r\n\t\t\tIntervalSet._COMPLETE_CHAR_SET.setReadonly(true);\r\n\t\t}\r\n\r\n\t\treturn IntervalSet._COMPLETE_CHAR_SET;\r\n\t}\r\n\r\n\tprivate static _EMPTY_SET: IntervalSet;\r\n\tstatic get EMPTY_SET(): IntervalSet {\r\n\t\tif (IntervalSet._EMPTY_SET == null) {\r\n\t\t\tIntervalSet._EMPTY_SET = new IntervalSet();\r\n\t\t\tIntervalSet._EMPTY_SET.setReadonly(true);\r\n\t\t}\r\n\r\n\t\treturn IntervalSet._EMPTY_SET;\r\n\t}\r\n\r\n\t/** The list of sorted, disjoint intervals. */\r\n\tprivate _intervals: Interval[];\r\n\r\n\tprivate readonly: boolean = false;\r\n\r\n\tconstructor(intervals?: Interval[]) {\r\n\t\tif (intervals != null) {\r\n\t\t\tthis._intervals = intervals.slice(0);\r\n\t\t} else {\r\n\t\t\tthis._intervals = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Create a set with all ints within range [a..b] (inclusive). If b is omitted, the set contains the single element\r\n\t * a.\r\n\t */\r\n\t@NotNull\r\n\tpublic static of(a: number, b: number = a): IntervalSet {\r\n\t\tlet s: IntervalSet = new IntervalSet();\r\n\t\ts.add(a, b);\r\n\t\treturn s;\r\n\t}\r\n\r\n\tpublic clear(): void {\r\n\t\tif (this.readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\tthis._intervals.length = 0;\r\n\t}\r\n\r\n\t/** Add interval; i.e., add all integers from a to b to set.\r\n\t * If b<a, do nothing.\r\n\t * Keep list in sorted order (by left range value).\r\n\t * If overlap, combine ranges. For example,\r\n\t * If this is {1..5, 10..20}, adding 6..7 yields\r\n\t * {1..5, 6..7, 10..20}. Adding 4..8 yields {1..8, 10..20}.\r\n\t */\r\n\tpublic add(a: number, b: number = a): void {\r\n\t\tthis.addRange(Interval.of(a, b));\r\n\t}\r\n\r\n\t// copy on write so we can cache a..a intervals and sets of that\r\n\tprotected addRange(addition: Interval): void {\r\n\t\tif (this.readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"add \"+addition+\" to \"+intervals.toString());\r\n\t\tif (addition.b < addition.a) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// find position in list\r\n\t\t// Use iterators as we modify list in place\r\n\t\tfor (let i: number = 0; i < this._intervals.length; i++) {\r\n\t\t\tlet r: Interval = this._intervals[i];\r\n\t\t\tif (addition.equals(r)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (addition.adjacent(r) || !addition.disjoint(r)) {\r\n\t\t\t\t// next to each other, make a single larger interval\r\n\t\t\t\tlet bigger: Interval = addition.union(r);\r\n\t\t\t\tthis._intervals[i] = bigger;\r\n\t\t\t\t// make sure we didn't just create an interval that\r\n\t\t\t\t// should be merged with next interval in list\r\n\t\t\t\twhile (i < this._intervals.length - 1) {\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tlet next: Interval = this._intervals[i];\r\n\t\t\t\t\tif (!bigger.adjacent(next) && bigger.disjoint(next)) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// if we bump up against or overlap next, merge\r\n\t\t\t\t\t// remove this one\r\n\t\t\t\t\tthis._intervals.splice(i, 1);\r\n\t\t\t\t\ti--;\r\n\t\t\t\t\t// move backwards to what we just set\r\n\t\t\t\t\tthis._intervals[i] = bigger.union(next);\r\n\t\t\t\t\t// set to 3 merged ones\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// first call to next after previous duplicates the result\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (addition.startsBeforeDisjoint(r)) {\r\n\t\t\t\t// insert before r\r\n\t\t\t\tthis._intervals.splice(i, 0, addition);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// if disjoint and after r, a future iteration will handle it\r\n\t\t}\r\n\r\n\t\t// ok, must be after last interval (and disjoint from last interval)\r\n\t\t// just add it\r\n\t\tthis._intervals.push(addition);\r\n\t}\r\n\r\n\t/** combine all sets in the array returned the or'd value */\r\n\tpublic static or(sets: IntervalSet[]): IntervalSet {\r\n\t\tlet r: IntervalSet = new IntervalSet();\r\n\t\tfor (let s of sets) {\r\n\t\t\tr.addAll(s);\r\n\t\t}\r\n\r\n\t\treturn r;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic addAll(set: IntSet): IntervalSet {\r\n\t\tif (set == null) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (set instanceof IntervalSet) {\r\n\t\t\tlet other: IntervalSet = set;\r\n\t\t\t// walk set and add each interval\r\n\t\t\tlet n: number = other._intervals.length;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet I: Interval = other._intervals[i];\r\n\t\t\t\tthis.add(I.a, I.b);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (let value of set.toArray()) {\r\n\t\t\t\tthis.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\tpublic complementRange(minElement: number, maxElement: number): IntervalSet {\r\n\t\treturn this.complement(IntervalSet.of(minElement, maxElement));\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tpublic complement(vocabulary: IntSet): IntervalSet {\r\n\t\tif (vocabulary.isNil) {\r\n\t\t\t// nothing in common with null set\r\n\t\t\treturn IntervalSet.EMPTY_SET;\r\n\t\t}\r\n\r\n\t\tlet vocabularyIS: IntervalSet;\r\n\t\tif (vocabulary instanceof IntervalSet) {\r\n\t\t\tvocabularyIS = vocabulary;\r\n\t\t} else {\r\n\t\t\tvocabularyIS = new IntervalSet();\r\n\t\t\tvocabularyIS.addAll(vocabulary);\r\n\t\t}\r\n\r\n\t\treturn vocabularyIS.subtract(this);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic subtract(a: IntSet): IntervalSet {\r\n\t\tif (a == null || a.isNil) {\r\n\t\t\treturn new IntervalSet(this._intervals);\r\n\t\t}\r\n\r\n\t\tif (a instanceof IntervalSet) {\r\n\t\t\treturn IntervalSet.subtract(this, a);\r\n\t\t}\r\n\r\n\t\tlet other: IntervalSet = new IntervalSet();\r\n\t\tother.addAll(a);\r\n\t\treturn IntervalSet.subtract(this, other);\r\n\t}\r\n\r\n\t/**\r\n\t * Compute the set difference between two interval sets. The specific\r\n\t * operation is `left - right`.\r\n\t */\r\n\t@NotNull\r\n\tpublic static subtract(left: IntervalSet, right: IntervalSet): IntervalSet {\r\n\t\tif (left.isNil) {\r\n\t\t\treturn new IntervalSet();\r\n\t\t}\r\n\r\n\t\tlet result: IntervalSet = new IntervalSet(left._intervals);\r\n\t\tif (right.isNil) {\r\n\t\t\t// right set has no elements; just return the copy of the current set\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\tlet resultI: number = 0;\r\n\t\tlet rightI: number = 0;\r\n\t\twhile (resultI < result._intervals.length && rightI < right._intervals.length) {\r\n\t\t\tlet resultInterval: Interval = result._intervals[resultI];\r\n\t\t\tlet rightInterval: Interval = right._intervals[rightI];\r\n\r\n\t\t\t// operation: (resultInterval - rightInterval) and update indexes\r\n\r\n\t\t\tif (rightInterval.b < resultInterval.a) {\r\n\t\t\t\trightI++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (rightInterval.a > resultInterval.b) {\r\n\t\t\t\tresultI++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet beforeCurrent: Interval | undefined;\r\n\t\t\tlet afterCurrent: Interval | undefined;\r\n\t\t\tif (rightInterval.a > resultInterval.a) {\r\n\t\t\t\tbeforeCurrent = new Interval(resultInterval.a, rightInterval.a - 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (rightInterval.b < resultInterval.b) {\r\n\t\t\t\tafterCurrent = new Interval(rightInterval.b + 1, resultInterval.b);\r\n\t\t\t}\r\n\r\n\t\t\tif (beforeCurrent) {\r\n\t\t\t\tif (afterCurrent) {\r\n\t\t\t\t\t// split the current interval into two\r\n\t\t\t\t\tresult._intervals[resultI] = beforeCurrent;\r\n\t\t\t\t\tresult._intervals.splice(resultI + 1, 0, afterCurrent);\r\n\t\t\t\t\tresultI++;\r\n\t\t\t\t\trightI++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// replace the current interval\r\n\t\t\t\t\tresult._intervals[resultI] = beforeCurrent;\r\n\t\t\t\t\tresultI++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (afterCurrent) {\r\n\t\t\t\t\t// replace the current interval\r\n\t\t\t\t\tresult._intervals[resultI] = afterCurrent;\r\n\t\t\t\t\trightI++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// remove the current interval (thus no need to increment resultI)\r\n\t\t\t\t\tresult._intervals.splice(resultI, 1);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// If rightI reached right.intervals.size, no more intervals to subtract from result.\r\n\t\t// If resultI reached result.intervals.size, we would be subtracting from an empty set.\r\n\t\t// Either way, we are done.\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic or(a: IntSet): IntervalSet {\r\n\t\tlet o: IntervalSet = new IntervalSet();\r\n\t\to.addAll(this);\r\n\t\to.addAll(a);\r\n\t\treturn o;\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tpublic and(other: IntSet): IntervalSet {\r\n\t\tif (other.isNil) { //|| !(other instanceof IntervalSet) ) {\r\n\t\t\t// nothing in common with null set\r\n\t\t\treturn new IntervalSet();\r\n\t\t}\r\n\r\n\t\tlet myIntervals: Interval[] = this._intervals;\r\n\t\tlet theirIntervals: Interval[] = (other as IntervalSet)._intervals;\r\n\t\tlet intersection: IntervalSet | undefined;\r\n\t\tlet mySize: number = myIntervals.length;\r\n\t\tlet theirSize: number = theirIntervals.length;\r\n\t\tlet i: number = 0;\r\n\t\tlet j: number = 0;\r\n\t\t// iterate down both interval lists looking for nondisjoint intervals\r\n\t\twhile (i < mySize && j < theirSize) {\r\n\t\t\tlet mine: Interval = myIntervals[i];\r\n\t\t\tlet theirs: Interval = theirIntervals[j];\r\n\t\t\t//System.out.println(\"mine=\"+mine+\" and theirs=\"+theirs);\r\n\t\t\tif (mine.startsBeforeDisjoint(theirs)) {\r\n\t\t\t\t// move this iterator looking for interval that might overlap\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\telse if (theirs.startsBeforeDisjoint(mine)) {\r\n\t\t\t\t// move other iterator looking for interval that might overlap\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse if (mine.properlyContains(theirs)) {\r\n\t\t\t\t// overlap, add intersection, get next theirs\r\n\t\t\t\tif (!intersection) {\r\n\t\t\t\t\tintersection = new IntervalSet();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tintersection.addRange(mine.intersection(theirs));\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse if (theirs.properlyContains(mine)) {\r\n\t\t\t\t// overlap, add intersection, get next mine\r\n\t\t\t\tif (!intersection) {\r\n\t\t\t\t\tintersection = new IntervalSet();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tintersection.addRange(mine.intersection(theirs));\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\telse if (!mine.disjoint(theirs)) {\r\n\t\t\t\t// overlap, add intersection\r\n\t\t\t\tif (!intersection) {\r\n\t\t\t\t\tintersection = new IntervalSet();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tintersection.addRange(mine.intersection(theirs));\r\n\t\t\t\t// Move the iterator of lower range [a..b], but not\r\n\t\t\t\t// the upper range as it may contain elements that will collide\r\n\t\t\t\t// with the next iterator. So, if mine=[0..115] and\r\n\t\t\t\t// theirs=[115..200], then intersection is 115 and move mine\r\n\t\t\t\t// but not theirs as theirs may collide with the next range\r\n\t\t\t\t// in thisIter.\r\n\t\t\t\t// move both iterators to next ranges\r\n\t\t\t\tif (mine.startsAfterNonDisjoint(theirs)) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (theirs.startsAfterNonDisjoint(mine)) {\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!intersection) {\r\n\t\t\treturn new IntervalSet();\r\n\t\t}\r\n\r\n\t\treturn intersection;\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tpublic contains(el: number): boolean {\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tlet l: number = 0;\r\n\t\tlet r: number = n - 1;\r\n\t\t// Binary search for the element in the (sorted, disjoint) array of intervals.\r\n\t\twhile (l <= r) {\r\n\t\t\tlet m: number = (l + r) >> 1;\r\n\t\t\tlet I: Interval = this._intervals[m];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (b < el) {\r\n\t\t\t\tl = m + 1;\r\n\t\t\t} else if (a > el) {\r\n\t\t\t\tr = m - 1;\r\n\t\t\t} else {\r\n\t\t\t\t// el >= a && el <= b\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/** {@inheritDoc} */\r\n\t@Override\r\n\tget isNil(): boolean {\r\n\t\treturn this._intervals == null || this._intervals.length === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the maximum value contained in the set if not isNil.\r\n\t *\r\n\t * @return the maximum value contained in the set.\r\n\t * @throws RangeError if set is empty\r\n\t */\r\n\tget maxElement(): number {\r\n\t\tif (this.isNil) {\r\n\t\t\tthrow new RangeError(\"set is empty\");\r\n\t\t}\r\n\r\n\t\tlet last: Interval = this._intervals[this._intervals.length - 1];\r\n\t\treturn last.b;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the minimum value contained in the set if not isNil.\r\n\t *\r\n\t * @return the minimum value contained in the set.\r\n\t * @throws RangeError if set is empty\r\n\t */\r\n\tget minElement(): number {\r\n\t\tif (this.isNil) {\r\n\t\t\tthrow new RangeError(\"set is empty\");\r\n\t\t}\r\n\r\n\t\treturn this._intervals[0].a;\r\n\t}\r\n\r\n\t/** Return a list of Interval objects. */\r\n\tget intervals(): Interval[] {\r\n\t\treturn this._intervals;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\thash = MurmurHash.update(hash, I.a);\r\n\t\t\thash = MurmurHash.update(hash, I.b);\r\n\t\t}\r\n\r\n\t\thash = MurmurHash.finish(hash, this._intervals.length * 2);\r\n\t\treturn hash;\r\n\t}\r\n\r\n\t/** Are two IntervalSets equal? Because all intervals are sorted\r\n\t * and disjoint, equals is a simple linear walk over both lists\r\n\t * to make sure they are the same. Interval.equals() is used\r\n\t * by the List.equals() method to check the ranges.\r\n\t */\r\n\t@Override\r\n\tpublic equals(o: any): boolean {\r\n\t\tif (o == null || !(o instanceof IntervalSet)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn ArrayEqualityComparator.INSTANCE.equals(this._intervals, o._intervals);\r\n\t}\r\n\r\n\tpublic toString(elemAreChar: boolean = false): string {\r\n\t\tlet buf: string = \"\";\r\n\t\tif (this._intervals == null || this._intervals.length === 0) {\r\n\t\t\treturn \"{}\";\r\n\t\t}\r\n\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"{\";\r\n\t\t}\r\n\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tbuf += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (a === b) {\r\n\t\t\t\tif (a === Token.EOF) {\r\n\t\t\t\t\tbuf += \"\";\r\n\t\t\t\t} else if (elemAreChar) {\r\n\t\t\t\t\tbuf += \"'\" + String.fromCodePoint(a) + \"'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += a;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (elemAreChar) {\r\n\t\t\t\t\tbuf += \"'\" + String.fromCodePoint(a) + \"'..'\" + String.fromCodePoint(b) + \"'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbuf += a + \"..\" + b;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"}\";\r\n\t\t}\r\n\r\n\t\treturn buf;\r\n\t}\r\n\r\n\tpublic toStringVocabulary( @NotNull vocabulary: Vocabulary): string {\r\n\t\tif (this._intervals == null || this._intervals.length === 0) {\r\n\t\t\treturn \"{}\";\r\n\t\t}\r\n\r\n\t\tlet buf: string = \"\";\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"{\";\r\n\t\t}\r\n\r\n\t\tlet first: boolean = true;\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tbuf += \", \";\r\n\t\t\t}\r\n\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (a === b) {\r\n\t\t\t\tbuf += this.elementName(vocabulary, a);\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = a; i <= b; i++) {\r\n\t\t\t\t\tif (i > a) {\r\n\t\t\t\t\t\tbuf += \", \";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbuf += this.elementName(vocabulary, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.size > 1) {\r\n\t\t\tbuf += \"}\";\r\n\t\t}\r\n\r\n\t\treturn buf;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected elementName( @NotNull vocabulary: Vocabulary, a: number): string {\r\n\t\tif (a === Token.EOF) {\r\n\t\t\treturn \"\";\r\n\t\t} else if (a === Token.EPSILON) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn vocabulary.getDisplayName(a);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\tlet n: number = 0;\r\n\t\tlet numIntervals: number = this._intervals.length;\r\n\t\tif (numIntervals === 1) {\r\n\t\t\tlet firstInterval: Interval = this._intervals[0];\r\n\t\t\treturn firstInterval.b - firstInterval.a + 1;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < numIntervals; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tn += (I.b - I.a + 1);\r\n\t\t}\r\n\r\n\t\treturn n;\r\n\t}\r\n\r\n\tpublic toIntegerList(): IntegerList {\r\n\t\tlet values: IntegerList = new IntegerList(this.size);\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tfor (let v = a; v <= b; v++) {\r\n\t\t\t\tvalues.add(v);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n\tpublic toSet(): Set {\r\n\t\tlet s: Set = new Set();\r\n\t\tfor (let I of this._intervals) {\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tfor (let v = a; v <= b; v++) {\r\n\t\t\t\ts.add(v);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\t}\r\n\r\n\tpublic toArray(): number[] {\r\n\t\tlet values: number[] = new Array();\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tfor (let v = a; v <= b; v++) {\r\n\t\t\t\tvalues.push(v);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic remove(el: number): void {\r\n\t\tif (this.readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\tlet n: number = this._intervals.length;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet I: Interval = this._intervals[i];\r\n\t\t\tlet a: number = I.a;\r\n\t\t\tlet b: number = I.b;\r\n\t\t\tif (el < a) {\r\n\t\t\t\tbreak; // list is sorted and el is before this interval; not here\r\n\t\t\t}\r\n\t\t\t// if whole interval x..x, rm\r\n\t\t\tif (el === a && el === b) {\r\n\t\t\t\tthis._intervals.splice(i, 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t// if on left edge x..b, adjust left\r\n\t\t\tif (el === a) {\r\n\t\t\t\tthis._intervals[i] = Interval.of(I.a + 1, I.b);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t// if on right edge a..x, adjust right\r\n\t\t\tif (el === b) {\r\n\t\t\t\tthis._intervals[i] = Interval.of(I.a, I.b - 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t// if in middle a..x..b, split interval\r\n\t\t\tif (el > a && el < b) { // found in this interval\r\n\t\t\t\tlet oldb: number = I.b;\r\n\t\t\t\tthis._intervals[i] = Interval.of(I.a, el - 1); // [a..x-1]\r\n\t\t\t\tthis.add(el + 1, oldb); // add [x+1..b]\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tget isReadonly(): boolean {\r\n\t\treturn this.readonly;\r\n\t}\r\n\r\n\tpublic setReadonly(readonly: boolean): void {\r\n\t\tif (this.readonly && !readonly) {\r\n\t\t\tthrow new Error(\"can't alter readonly IntervalSet\");\r\n\t\t}\r\n\r\n\t\tthis.readonly = readonly;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.8187912-07:00\r\n\r\nimport { NotNull } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ATNDeserializationOptions {\r\n\tprivate static _defaultOptions?: ATNDeserializationOptions;\r\n\r\n\tprivate readOnly: boolean = false;\r\n\tprivate verifyATN: boolean;\r\n\tprivate generateRuleBypassTransitions: boolean;\r\n\tprivate optimize: boolean;\r\n\r\n\tconstructor(options?: ATNDeserializationOptions) {\r\n\t\tif (options) {\r\n\t\t\tthis.verifyATN = options.verifyATN;\r\n\t\t\tthis.generateRuleBypassTransitions = options.generateRuleBypassTransitions;\r\n\t\t\tthis.optimize = options.optimize;\r\n\t\t} else {\r\n\t\t\tthis.verifyATN = true;\r\n\t\t\tthis.generateRuleBypassTransitions = false;\r\n\t\t\tthis.optimize = true;\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tstatic get defaultOptions(): ATNDeserializationOptions {\r\n\t\tif (ATNDeserializationOptions._defaultOptions == null) {\r\n\t\t\tATNDeserializationOptions._defaultOptions = new ATNDeserializationOptions();\r\n\t\t\tATNDeserializationOptions._defaultOptions.makeReadOnly();\r\n\t\t}\r\n\r\n\t\treturn ATNDeserializationOptions._defaultOptions;\r\n\t}\r\n\r\n\tget isReadOnly(): boolean {\r\n\t\treturn this.readOnly;\r\n\t}\r\n\r\n\tpublic makeReadOnly(): void {\r\n\t\tthis.readOnly = true;\r\n\t}\r\n\r\n\tget isVerifyATN(): boolean {\r\n\t\treturn this.verifyATN;\r\n\t}\r\n\r\n\tset isVerifyATN(verifyATN: boolean) {\r\n\t\tthis.throwIfReadOnly();\r\n\t\tthis.verifyATN = verifyATN;\r\n\t}\r\n\r\n\tget isGenerateRuleBypassTransitions(): boolean {\r\n\t\treturn this.generateRuleBypassTransitions;\r\n\t}\r\n\r\n\tset isGenerateRuleBypassTransitions(generateRuleBypassTransitions: boolean) {\r\n\t\tthis.throwIfReadOnly();\r\n\t\tthis.generateRuleBypassTransitions = generateRuleBypassTransitions;\r\n\t}\r\n\r\n\tget isOptimize(): boolean {\r\n\t\treturn this.optimize;\r\n\t}\r\n\r\n\tset isOptimize(optimize: boolean) {\r\n\t\tthis.throwIfReadOnly();\r\n\t\tthis.optimize = optimize;\r\n\t}\r\n\r\n\tprotected throwIfReadOnly(): void {\r\n\t\tif (this.isReadOnly) {\r\n\t\t\tthrow new Error(\"The object is read only.\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:24.7363448-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class ActionTransition extends Transition {\r\n\tpublic ruleIndex: number;\r\n\tpublic actionIndex: number;\r\n\tpublic isCtxDependent: boolean; // e.g., $i ref in action\r\n\r\n\tconstructor(@NotNull target: ATNState, ruleIndex: number, actionIndex: number = -1, isCtxDependent: boolean = false) {\r\n\t\tsuper(target);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t\tthis.actionIndex = actionIndex;\r\n\t\tthis.isCtxDependent = isCtxDependent;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.ACTION;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true; // we are to be ignored by analysis 'cept for predicates\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"action_\" + this.ruleIndex + \":\" + this.actionIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.6769122-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/** TODO: make all transitions sets? no, should remove set edges */\r\nexport class AtomTransition extends Transition {\r\n\t/** The token type or character value; or, signifies special label. */\r\n\tpublic _label: number;\r\n\r\n\tconstructor(@NotNull target: ATNState, label: number) {\r\n\t\tsuper(target);\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.ATOM;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tget label(): IntervalSet {\r\n\t\treturn IntervalSet.of(this._label);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn this._label === symbol;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn String(this.label);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.9930394-07:00\r\n\r\nimport { BlockEndState } from \"./BlockEndState\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The start of a regular `(...)` block. */\r\nexport abstract class BlockStartState extends DecisionState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic endState!: BlockEndState;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.7669801-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class BasicBlockStartState extends BlockStartState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.BLOCK_START;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:27.9125304-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** Terminal node of a simple `(a|b|c)` block. */\r\nexport class BlockEndState extends ATNState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic startState!: BlockStartState;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.BLOCK_END;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.6283213-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class EpsilonTransition extends Transition {\r\n\r\n\tprivate _outermostPrecedenceReturn: number;\r\n\r\n\tconstructor(@NotNull target: ATNState, outermostPrecedenceReturn: number = -1) {\r\n\t\tsuper(target);\r\n\t\tthis._outermostPrecedenceReturn = outermostPrecedenceReturn;\r\n\t}\r\n\r\n\t/**\r\n\t * @returns the rule index of a precedence rule for which this transition is\r\n\t * returning from, where the precedence value is 0; otherwise, -1.\r\n\t *\r\n\t * @see ATNConfig.isPrecedenceFilterSuppressed\r\n\t * @see ParserATNSimulator#applyPrecedenceFilter(ATNConfigSet, ParserRuleContext, PredictionContextCache)\r\n\t * @since 4.4.1\r\n\t */\r\n\tget outermostPrecedenceReturn(): number {\r\n\t\treturn this._outermostPrecedenceReturn;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.EPSILON;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \"epsilon\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.5634388-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `channel` lexer action by calling\r\n * {@link Lexer#setChannel} with the assigned channel.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerChannelAction implements LexerAction {\r\n\tprivate readonly _channel: number;\r\n\r\n\t/**\r\n\t * Constructs a new `channel` action with the specified channel value.\r\n\t * @param channel The channel value to pass to {@link Lexer#setChannel}.\r\n\t */\r\n\tconstructor(channel: number) {\r\n\t\tthis._channel = channel;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the channel to use for the {@link Token} created by the lexer.\r\n\t *\r\n\t * @returns The channel to use for the {@link Token} created by the lexer.\r\n\t */\r\n\tget channel(): number {\r\n\t\treturn this._channel;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#CHANNEL}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.CHANNEL;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#setChannel} with the\r\n\t * value provided by {@link #getChannel}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.channel = this._channel;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._channel);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerChannelAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._channel === obj._channel;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `channel(${this._channel})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.6567992-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Executes a custom lexer action by calling {@link Recognizer#action} with the\r\n * rule and action indexes assigned to the custom action. The implementation of\r\n * a custom action is added to the generated code for the lexer in an override\r\n * of {@link Recognizer#action} when the grammar is compiled.\r\n *\r\n * This class may represent embedded actions created with the `{...}`\r\n * syntax in ANTLR 4, as well as actions created for lexer commands where the\r\n * command argument could not be evaluated when the grammar was compiled.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerCustomAction implements LexerAction {\r\n\tprivate readonly _ruleIndex: number;\r\n\tprivate readonly _actionIndex: number;\r\n\r\n\t/**\r\n\t * Constructs a custom lexer action with the specified rule and action\r\n\t * indexes.\r\n\t *\r\n\t * @param ruleIndex The rule index to use for calls to\r\n\t * {@link Recognizer#action}.\r\n\t * @param actionIndex The action index to use for calls to\r\n\t * {@link Recognizer#action}.\r\n\t */\r\n\tconstructor(ruleIndex: number, actionIndex: number) {\r\n\t\tthis._ruleIndex = ruleIndex;\r\n\t\tthis._actionIndex = actionIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the rule index to use for calls to {@link Recognizer#action}.\r\n\t *\r\n\t * @returns The rule index for the custom action.\r\n\t */\r\n\tget ruleIndex(): number {\r\n\t\treturn this._ruleIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the action index to use for calls to {@link Recognizer#action}.\r\n\t *\r\n\t * @returns The action index for the custom action.\r\n\t */\r\n\tget actionIndex(): number {\r\n\t\treturn this._actionIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * @returns This method returns {@link LexerActionType#CUSTOM}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.CUSTOM;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether the lexer action is position-dependent. Position-dependent\r\n\t * actions may have different semantics depending on the {@link CharStream}\r\n\t * index at the time the action is executed.\r\n\t *\r\n\t * Custom actions are position-dependent since they may represent a\r\n\t * user-defined embedded action which makes calls to methods like\r\n\t * {@link Lexer#getText}.\r\n\t *\r\n\t * @returns This method returns `true`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * Custom actions are implemented by calling {@link Lexer#action} with the\r\n\t * appropriate rule and action indexes.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.action(undefined, this._ruleIndex, this._actionIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._ruleIndex);\r\n\t\thash = MurmurHash.update(hash, this._actionIndex);\r\n\t\treturn MurmurHash.finish(hash, 3);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerCustomAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._ruleIndex === obj._ruleIndex\r\n\t\t\t&& this._actionIndex === obj._actionIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.8653427-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `mode` lexer action by calling {@link Lexer#mode} with\r\n * the assigned mode.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerModeAction implements LexerAction {\r\n\tprivate readonly _mode: number;\r\n\r\n\t/**\r\n\t * Constructs a new `mode` action with the specified mode value.\r\n\t * @param mode The mode value to pass to {@link Lexer#mode}.\r\n\t */\r\n\tconstructor(mode: number) {\r\n\t\tthis._mode = mode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the lexer mode this action should transition the lexer to.\r\n\t *\r\n\t * @returns The lexer mode for this `mode` command.\r\n\t */\r\n\tget mode(): number {\r\n\t\treturn this._mode;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#MODE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.MODE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#mode} with the\r\n\t * value provided by {@link #getMode}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.mode(this._mode);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._mode);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerModeAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._mode === obj._mode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `mode(${this._mode})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:29.9613221-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `more` lexer action by calling {@link Lexer#more}.\r\n *\r\n * The `more` command does not have any parameters, so this action is\r\n * implemented as a singleton instance exposed by {@link #INSTANCE}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerMoreAction implements LexerAction {\r\n\t/**\r\n\t * Constructs the singleton instance of the lexer `more` command.\r\n\t */\r\n\tconstructor() {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#MORE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.MORE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#more}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.more();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\treturn MurmurHash.finish(hash, 1);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\treturn obj === this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"more\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerMoreAction {\r\n\t/**\r\n\t * Provides a singleton instance of this parameterless lexer action.\r\n\t */\r\n\texport const INSTANCE: LexerMoreAction = new LexerMoreAction();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.0449220-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `popMode` lexer action by calling {@link Lexer#popMode}.\r\n *\r\n * The `popMode` command does not have any parameters, so this action is\r\n * implemented as a singleton instance exposed by {@link #INSTANCE}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerPopModeAction implements LexerAction {\r\n\t/**\r\n\t * Constructs the singleton instance of the lexer `popMode` command.\r\n\t */\r\n\tconstructor() {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#POP_MODE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.POP_MODE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#popMode}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.popMode();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\treturn MurmurHash.finish(hash, 1);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\treturn obj === this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"popMode\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerPopModeAction {\r\n\t/**\r\n\t * Provides a singleton instance of this parameterless lexer action.\r\n\t */\r\n\texport const INSTANCE: LexerPopModeAction = new LexerPopModeAction();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.1378801-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `pushMode` lexer action by calling\r\n * {@link Lexer#pushMode} with the assigned mode.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerPushModeAction implements LexerAction {\r\n\tprivate readonly _mode: number;\r\n\r\n\t/**\r\n\t * Constructs a new `pushMode` action with the specified mode value.\r\n\t * @param mode The mode value to pass to {@link Lexer#pushMode}.\r\n\t */\r\n\tconstructor(mode: number) {\r\n\t\tthis._mode = mode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the lexer mode this action should transition the lexer to.\r\n\t *\r\n\t * @returns The lexer mode for this `pushMode` command.\r\n\t */\r\n\tget mode(): number {\r\n\t\treturn this._mode;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#PUSH_MODE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.PUSH_MODE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#pushMode} with the\r\n\t * value provided by {@link #getMode}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.pushMode(this._mode);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._mode);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerPushModeAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._mode === obj._mode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `pushMode(${this._mode})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.2324460-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `skip` lexer action by calling {@link Lexer#skip}.\r\n *\r\n * The `skip` command does not have any parameters, so this action is\r\n * implemented as a singleton instance exposed by {@link #INSTANCE}.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerSkipAction implements LexerAction {\r\n\t/**\r\n\t * Constructs the singleton instance of the lexer `skip` command.\r\n\t */\r\n\tconstructor() {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#SKIP}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.SKIP;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by calling {@link Lexer#skip}.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.skip();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\treturn MurmurHash.finish(hash, 1);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\treturn obj === this;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"skip\";\r\n\t}\r\n}\r\n\r\nexport namespace LexerSkipAction {\r\n\t/**\r\n\t * Provides a singleton instance of this parameterless lexer action.\r\n\t */\r\n\texport const INSTANCE: LexerSkipAction = new LexerSkipAction();\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.3204839-07:00\r\n\r\nimport { Lexer } from \"../Lexer\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\n\r\n/**\r\n * Implements the `type` lexer action by setting `Lexer.type`\r\n * with the assigned type.\r\n *\r\n * @author Sam Harwell\r\n * @since 4.2\r\n */\r\nexport class LexerTypeAction implements LexerAction {\r\n\tprivate readonly _type: number;\r\n\r\n\t/**\r\n\t * Constructs a new `type` action with the specified token type value.\r\n\t * @param type The type to assign to the token using `Lexer.type`.\r\n\t */\r\n\tconstructor(type: number) {\r\n\t\tthis._type = type;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the type to assign to a token created by the lexer.\r\n\t * @returns The type to assign to a token created by the lexer.\r\n\t */\r\n\tget type(): number {\r\n\t\treturn this._type;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns {@link LexerActionType#TYPE}.\r\n\t */\r\n\t@Override\r\n\tget actionType(): LexerActionType {\r\n\t\treturn LexerActionType.TYPE;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t * @returns This method returns `false`.\r\n\t */\r\n\t@Override\r\n\tget isPositionDependent(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This action is implemented by setting `Lexer.type` with the\r\n\t * value provided by `type`.\r\n\t */\r\n\t@Override\r\n\tpublic execute(@NotNull lexer: Lexer): void {\r\n\t\tlexer.type = this._type;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\tlet hash: number = MurmurHash.initialize();\r\n\t\thash = MurmurHash.update(hash, this.actionType);\r\n\t\thash = MurmurHash.update(hash, this._type);\r\n\t\treturn MurmurHash.finish(hash, 2);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof LexerTypeAction)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this._type === obj._type;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `type(${this._type})`;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.7737978-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** Mark the end of a * or + loop. */\r\nexport class LoopEndState extends ATNState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic loopBackState!: ATNState;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.LOOP_END;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.0710131-07:00\r\n\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { Override } from \"../Decorators\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\n/**\r\n * This class stores information about a configuration conflict.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ConflictInfo {\r\n\tprivate _conflictedAlts: BitSet;\r\n\r\n\tprivate exact: boolean;\r\n\r\n\tconstructor(conflictedAlts: BitSet, exact: boolean) {\r\n\t\tthis._conflictedAlts = conflictedAlts;\r\n\t\tthis.exact = exact;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the set of conflicting alternatives for the configuration set.\r\n\t */\r\n\tget conflictedAlts(): BitSet {\r\n\t\treturn this._conflictedAlts;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether or not the configuration conflict is an exact conflict.\r\n\t * An exact conflict occurs when the prediction algorithm determines that\r\n\t * the represented alternatives for a particular configuration set cannot be\r\n\t * further reduced by consuming additional input. After reaching an exact\r\n\t * conflict during an SLL prediction, only switch to full-context prediction\r\n\t * could reduce the set of viable alternatives. In LL prediction, an exact\r\n\t * conflict indicates a true ambiguity in the input.\r\n\t *\r\n\t * For the {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} prediction mode,\r\n\t * accept states are conflicting but not exact are treated as non-accept\r\n\t * states.\r\n\t */\r\n\tget isExact(): boolean {\r\n\t\treturn this.exact;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof ConflictInfo)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.isExact === obj.isExact\r\n\t\t\t&& Utils.equals(this.conflictedAlts, obj.conflictedAlts);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic hashCode(): number {\r\n\t\treturn this.conflictedAlts.hashCode();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.1433686-07:00\r\n\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { Override } from \"../Decorators\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleNode } from \"./RuleNode\";\r\nimport { Token } from \"../Token\";\r\n\r\nexport class TerminalNode implements ParseTree {\r\n\tpublic _symbol: Token;\r\n\tpublic _parent: RuleNode | undefined;\r\n\r\n\tconstructor(symbol: Token) {\r\n\t\tthis._symbol = symbol;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getChild(i: number): never {\r\n\t\tthrow new RangeError(\"Terminal Node has no children.\");\r\n\t}\r\n\r\n\tget symbol(): Token {\r\n\t\treturn this._symbol;\r\n\t}\r\n\r\n\t@Override\r\n\tget parent(): RuleNode | undefined {\r\n\t\treturn this._parent;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic setParent(parent: RuleContext): void {\r\n\t\tthis._parent = parent;\r\n\t}\r\n\r\n\t@Override\r\n\tget payload(): Token {\r\n\t\treturn this._symbol;\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceInterval(): Interval {\r\n\t\tlet tokenIndex: number = this._symbol.tokenIndex;\r\n\t\treturn new Interval(tokenIndex, tokenIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tget childCount(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic accept(visitor: ParseTreeVisitor): T {\r\n\t\treturn visitor.visitTerminal(this);\r\n\t}\r\n\r\n\t@Override\r\n\tget text(): string {\r\n\t\treturn this._symbol.text || \"\";\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toStringTree(parser?: Parser): string {\r\n\t\treturn this.toString();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (this._symbol.type === Token.EOF) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\treturn this._symbol.text || \"\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:47.4646355-07:00\r\n\r\nimport { Override } from \"../Decorators\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { TerminalNode } from \"./TerminalNode\";\r\nimport { Token } from \"../Token\";\r\n\r\n/** Represents a token that was consumed during resynchronization\r\n * rather than during a valid match operation. For example,\r\n * we will create this kind of a node during single token insertion\r\n * and deletion as well as during \"consume until error recovery set\"\r\n * upon no viable alternative exceptions.\r\n */\r\nexport class ErrorNode extends TerminalNode {\r\n\tconstructor(token: Token) {\r\n\t\tsuper(token);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic accept(visitor: ParseTreeVisitor): T {\r\n\t\treturn visitor.visitErrorNode(this);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:47.9232756-07:00\r\n\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { Parser } from \"../Parser\";\r\nimport { Interval } from \"../misc/Interval\";\r\n\r\nexport abstract class RuleNode implements ParseTree {\r\n\tpublic abstract readonly ruleContext: RuleContext;\r\n\r\n\t//@Override\r\n\tpublic abstract readonly parent: RuleNode | undefined;\r\n\r\n\tpublic abstract setParent(parent: RuleContext): void;\r\n\r\n\tpublic abstract getChild(i: number): ParseTree;\r\n\r\n\tpublic abstract accept(visitor: ParseTreeVisitor): T;\r\n\r\n\tpublic abstract readonly text: string;\r\n\r\n\tpublic abstract toStringTree(parser?: Parser | undefined): string;\r\n\r\n\tpublic abstract readonly sourceInterval: Interval;\r\n\r\n\tpublic abstract readonly payload: any;\r\n\r\n\tpublic abstract readonly childCount: number;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:48.3187865-07:00\r\n\r\nimport { Arrays } from \"../misc/Arrays\";\r\nimport { ATN } from \"../atn/ATN\";\r\nimport { CommonToken } from \"../CommonToken\";\r\nimport { ErrorNode } from \"./ErrorNode\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleNode } from \"./RuleNode\";\r\nimport { TerminalNode } from \"./TerminalNode\";\r\nimport { Token } from \"../Token\";\r\nimport { Tree } from \"./Tree\";\r\nimport * as Utils from \"../misc/Utils\";\r\n\r\n/** A set of utility routines useful for all kinds of ANTLR trees. */\r\nexport class Trees {\r\n\t/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the\r\n\t * node payloads to get the text for the nodes. Detect\r\n\t * parse trees and extract data appropriately.\r\n\t */\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree): string;\r\n\r\n\t/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the\r\n\t * node payloads to get the text for the nodes. Detect\r\n\t * parse trees and extract data appropriately.\r\n\t */\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree, recog: Parser | undefined): string;\r\n\r\n\t/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the\r\n\t * node payloads to get the text for the nodes.\r\n\t */\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree, /*@Nullable*/ ruleNames: string[] | undefined): string;\r\n\r\n\tpublic static toStringTree(/*@NotNull*/ t: Tree, arg2?: Parser | string[]): string;\r\n\tpublic static toStringTree(@NotNull t: Tree, arg2?: Parser | string[]): string {\r\n\t\tlet ruleNames: string[] | undefined;\r\n\t\tif (arg2 instanceof Parser) {\r\n\t\t\truleNames = arg2.ruleNames;\r\n\t\t} else {\r\n\t\t\truleNames = arg2;\r\n\t\t}\r\n\r\n\t\tlet s: string = Utils.escapeWhitespace(this.getNodeText(t, ruleNames), false);\r\n\t\tif (t.childCount === 0) {\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tlet buf = \"\";\r\n\t\tbuf += (\"(\");\r\n\t\ts = Utils.escapeWhitespace(this.getNodeText(t, ruleNames), false);\r\n\t\tbuf += (s);\r\n\t\tbuf += (\" \");\r\n\t\tfor (let i = 0; i < t.childCount; i++) {\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tbuf += (\" \");\r\n\t\t\t}\r\n\t\t\tbuf += (this.toStringTree(t.getChild(i), ruleNames));\r\n\t\t}\r\n\t\tbuf += (\")\");\r\n\t\treturn buf;\r\n\t}\r\n\r\n\tpublic static getNodeText(/*@NotNull*/ t: Tree, recog: Parser | undefined): string;\r\n\tpublic static getNodeText(/*@NotNull*/ t: Tree, ruleNames: string[] | undefined): string;\r\n\tpublic static getNodeText(t: Tree, arg2: Parser | string[] | undefined): string {\r\n\t\tlet ruleNames: string[] | undefined;\r\n\t\tif (arg2 instanceof Parser) {\r\n\t\t\truleNames = arg2.ruleNames;\r\n\t\t} else if (arg2) {\r\n\t\t\truleNames = arg2;\r\n\t\t} else {\r\n\t\t\t// no recog or rule names\r\n\t\t\tlet payload = t.payload;\r\n\t\t\tif (typeof payload.text === \"string\") {\r\n\t\t\t\treturn payload.text;\r\n\t\t\t}\r\n\t\t\treturn t.payload.toString();\r\n\t\t}\r\n\r\n\t\tif (t instanceof RuleNode) {\r\n\t\t\tlet ruleContext: RuleContext = t.ruleContext;\r\n\t\t\tlet ruleIndex: number = ruleContext.ruleIndex;\r\n\t\t\tlet ruleName: string = ruleNames[ruleIndex];\r\n\t\t\tlet altNumber: number = ruleContext.altNumber;\r\n\t\t\tif (altNumber !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\treturn ruleName + \":\" + altNumber;\r\n\t\t\t}\r\n\t\t\treturn ruleName;\r\n\t\t}\r\n\t\telse if (t instanceof ErrorNode) {\r\n\t\t\treturn t.toString();\r\n\t\t}\r\n\t\telse if (t instanceof TerminalNode) {\r\n\t\t\tlet symbol = t.symbol;\r\n\t\t\treturn symbol.text || \"\";\r\n\t\t}\r\n\t\tthrow new TypeError(\"Unexpected node type\");\r\n\t}\r\n\r\n\t/** Return ordered list of all children of this node */\r\n\tpublic static getChildren(t: ParseTree): ParseTree[];\r\n\tpublic static getChildren(t: Tree): Tree[];\r\n\tpublic static getChildren(t: Tree): Tree[] {\r\n\t\tlet kids: Tree[] = [];\r\n\t\tfor (let i = 0; i < t.childCount; i++) {\r\n\t\t\tkids.push(t.getChild(i));\r\n\t\t}\r\n\t\treturn kids;\r\n\t}\r\n\r\n\t/** Return a list of all ancestors of this node. The first node of\r\n\t * list is the root and the last is the parent of this node.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static getAncestors(t: ParseTree): ParseTree[];\r\n\tpublic static getAncestors(t: Tree): Tree[];\r\n\t@NotNull\r\n\tpublic static getAncestors(@NotNull t: Tree): Tree[] {\r\n\t\tlet ancestors: Tree[] = [];\r\n\t\tlet p = t.parent;\r\n\t\twhile (p) {\r\n\t\t\tancestors.unshift(p); // insert at start\r\n\t\t\tp = p.parent;\r\n\t\t}\r\n\t\treturn ancestors;\r\n\t}\r\n\r\n\t/** Return true if t is u's parent or a node on path to root from u.\r\n\t * Use === not equals().\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static isAncestorOf(t: Tree, u: Tree): boolean {\r\n\t\tif (!t || !u || !t.parent) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tlet p = u.parent;\r\n\t\twhile (p) {\r\n\t\t\tif (t === p) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tp = p.parent;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tpublic static findAllTokenNodes(t: ParseTree, ttype: number): ParseTree[] {\r\n\t\treturn Trees.findAllNodes(t, ttype, true);\r\n\t}\r\n\r\n\tpublic static findAllRuleNodes(t: ParseTree, ruleIndex: number): ParseTree[] {\r\n\t\treturn Trees.findAllNodes(t, ruleIndex, false);\r\n\t}\r\n\r\n\tpublic static findAllNodes(t: ParseTree, index: number, findTokens: boolean): ParseTree[] {\r\n\t\tlet nodes: ParseTree[] = [];\r\n\t\tTrees._findAllNodes(t, index, findTokens, nodes);\r\n\t\treturn nodes;\r\n\t}\r\n\r\n\tpublic static _findAllNodes(t: ParseTree, index: number, findTokens: boolean, nodes: ParseTree[]): void {\r\n\t\t// check this node (the root) first\r\n\t\tif (findTokens && t instanceof TerminalNode) {\r\n\t\t\tif (t.symbol.type === index) {\r\n\t\t\t\tnodes.push(t);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (!findTokens && t instanceof ParserRuleContext) {\r\n\t\t\tif (t.ruleIndex === index) {\r\n\t\t\t\tnodes.push(t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// check children\r\n\t\tfor (let i = 0; i < t.childCount; i++) {\r\n\t\t\tTrees._findAllNodes(t.getChild(i), index, findTokens, nodes);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Get all descendents; includes t itself.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static getDescendants(t: ParseTree): ParseTree[] {\r\n\t\tlet nodes: ParseTree[] = [];\r\n\r\n\t\tfunction recurse(e: ParseTree): void {\r\n\t\t\tnodes.push(e);\r\n\t\t\tconst n = e.childCount;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\trecurse(e.getChild(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trecurse(t);\r\n\t\treturn nodes;\r\n\t}\r\n\r\n\t/** Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex\r\n\t * inclusively using postorder traversal. Recursive depth-first-search.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tpublic static getRootOfSubtreeEnclosingRegion(\r\n\t\t@NotNull t: ParseTree,\r\n\t\tstartTokenIndex: number, // inclusive\r\n\t\tstopTokenIndex: number, // inclusive\r\n\t): ParserRuleContext | undefined {\r\n\t\tlet n: number = t.childCount;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet child: ParseTree = t.getChild(i);\r\n\t\t\tlet r = Trees.getRootOfSubtreeEnclosingRegion(child, startTokenIndex, stopTokenIndex);\r\n\t\t\tif (r) {\r\n\t\t\t\treturn r;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (t instanceof ParserRuleContext) {\r\n\t\t\tlet stopToken = t.stop;\r\n\t\t\tif (startTokenIndex >= t.start.tokenIndex && // is range fully contained in t?\r\n\t\t\t\t(stopToken == null || stopTokenIndex <= stopToken.tokenIndex)) {\r\n\t\t\t\t// note: r.stop==null likely implies that we bailed out of parser and there's nothing to the right\r\n\t\t\t\treturn t;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/** Replace any subtree siblings of root that are completely to left\r\n\t * or right of lookahead range with a CommonToken(Token.INVALID_TYPE,\"...\")\r\n\t * node. The source interval for t is not altered to suit smaller range!\r\n\t *\r\n\t * WARNING: destructive to t.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static stripChildrenOutOfRange(\r\n\t\tt: ParserRuleContext,\r\n\t\troot: ParserRuleContext,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number): void {\r\n\t\tif (!t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet count = t.childCount;\r\n\t\tfor (let i = 0; i < count; i++) {\r\n\t\t\tlet child = t.getChild(i);\r\n\t\t\tlet range: Interval = child.sourceInterval;\r\n\t\t\tif (child instanceof ParserRuleContext && (range.b < startIndex || range.a > stopIndex)) {\r\n\t\t\t\tif (Trees.isAncestorOf(child, root)) { // replace only if subtree doesn't have displayed root\r\n\t\t\t\t\tlet abbrev: CommonToken = new CommonToken(Token.INVALID_TYPE, \"...\");\r\n\t\t\t\t\tt.children![i] = new TerminalNode(abbrev); // HACK access to private\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/** Return first node satisfying the pred\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tpublic static findNodeSuchThat(t: ParseTree, pred: (tree: ParseTree) => boolean): ParseTree | undefined;\r\n\tpublic static findNodeSuchThat(t: Tree, pred: (tree: Tree) => boolean): Tree | undefined;\r\n\tpublic static findNodeSuchThat(t: Tree, pred: (tree: ParseTree) => boolean): Tree | undefined {\r\n\t\t// No type check needed as long as users only use one of the available overloads\r\n\t\tif (pred(t as ParseTree)) {\r\n\t\t\treturn t;\r\n\t\t}\r\n\r\n\t\tlet n: number = t.childCount;\r\n\t\tfor (let i = 0 ; i < n ; i++){\r\n\t\t\tlet u = Trees.findNodeSuchThat(t.getChild(i), pred as (tree: Tree) => boolean);\r\n\t\t\tif (u !== undefined) {\r\n\t\t\t\treturn u;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.3490837-07:00\r\n\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { Parser } from \"./Parser\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RuleNode } from \"./tree/RuleNode\";\r\nimport { ParseTree } from \"./tree/ParseTree\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Trees } from \"./tree/Trees\";\r\nimport { ParseTreeVisitor } from \"./tree/ParseTreeVisitor\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/** A rule context is a record of a single rule invocation.\r\n *\r\n * We form a stack of these context objects using the parent\r\n * pointer. A parent pointer of `undefined` indicates that the current\r\n * context is the bottom of the stack. The ParserRuleContext subclass\r\n * as a children list so that we can turn this data structure into a\r\n * tree.\r\n *\r\n * The root node always has a `undefined` pointer and invokingState of -1.\r\n *\r\n * Upon entry to parsing, the first invoked rule function creates a\r\n * context object (a subclass specialized for that rule such as\r\n * SContext) and makes it the root of a parse tree, recorded by field\r\n * Parser._ctx.\r\n *\r\n * public final SContext s() throws RecognitionException {\r\n * SContext _localctx = new SContext(_ctx, state); <-- create new node\r\n * enterRule(_localctx, 0, RULE_s); <-- push it\r\n * ...\r\n * exitRule(); <-- pop back to _localctx\r\n * return _localctx;\r\n * }\r\n *\r\n * A subsequent rule invocation of r from the start rule s pushes a\r\n * new context object for r whose parent points at s and use invoking\r\n * state is the state with r emanating as edge label.\r\n *\r\n * The invokingState fields from a context object to the root\r\n * together form a stack of rule indication states where the root\r\n * (bottom of the stack) has a -1 sentinel value. If we invoke start\r\n * symbol s then call r1, which calls r2, the would look like\r\n * this:\r\n *\r\n * SContext[-1] <- root node (bottom of the stack)\r\n * R1Context[p] <- p in rule s called r1\r\n * R2Context[q] <- q in rule r1 called r2\r\n *\r\n * So the top of the stack, _ctx, represents a call to the current\r\n * rule and it holds the return address from another rule that invoke\r\n * to this rule. To invoke a rule, we must always have a current context.\r\n *\r\n * The parent contexts are useful for computing lookahead sets and\r\n * getting error information.\r\n *\r\n * These objects are used during parsing and prediction.\r\n * For the special case of parsers, we use the subclass\r\n * ParserRuleContext.\r\n *\r\n * @see ParserRuleContext\r\n */\r\nexport class RuleContext extends RuleNode {\r\n\tpublic _parent: RuleContext | undefined;\r\n\tpublic invokingState: number;\r\n\r\n\tconstructor();\r\n\tconstructor(parent: RuleContext | undefined, invokingState: number);\r\n\tconstructor(parent?: RuleContext, invokingState?: number) {\r\n\t\tsuper();\r\n\t\tthis._parent = parent;\r\n\t\tthis.invokingState = invokingState != null ? invokingState : -1;\r\n\t}\r\n\r\n\tpublic static getChildContext(parent: RuleContext, invokingState: number): RuleContext {\r\n\t\treturn new RuleContext(parent, invokingState);\r\n\t}\r\n\r\n\tpublic depth(): number {\r\n\t\tlet n = 0;\r\n\t\tlet p: RuleContext | undefined = this;\r\n\t\twhile (p) {\r\n\t\t\tp = p._parent;\r\n\t\t\tn++;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\t/** A context is empty if there is no invoking state; meaning nobody called\r\n\t * current context.\r\n\t */\r\n\tget isEmpty(): boolean {\r\n\t\treturn this.invokingState === -1;\r\n\t}\r\n\r\n\t// satisfy the ParseTree / SyntaxTree interface\r\n\r\n\t@Override\r\n\tget sourceInterval(): Interval {\r\n\t\treturn Interval.INVALID;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleContext(): RuleContext { return this; }\r\n\r\n\t@Override\r\n\tget parent(): RuleContext | undefined { return this._parent; }\r\n\r\n\t/** @since 4.7. {@see ParseTree#setParent} comment */\r\n\t@Override\r\n\tpublic setParent(parent: RuleContext): void {\r\n\t\tthis._parent = parent;\r\n\t}\r\n\r\n\t@Override\r\n\tget payload(): RuleContext { return this; }\r\n\r\n\t/** Return the combined text of all child nodes. This method only considers\r\n\t * tokens which have been added to the parse tree.\r\n\t *\r\n\t * Since tokens on hidden channels (e.g. whitespace or comments) are not\r\n\t * added to the parse trees, they will not appear in the output of this\r\n\t * method.\r\n\t */\r\n\t@Override\r\n\tget text(): string {\r\n\t\tif (this.childCount === 0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tlet builder = \"\";\r\n\t\tfor (let i = 0; i < this.childCount; i++) {\r\n\t\t\tbuilder += this.getChild(i).text;\r\n\t\t}\r\n\r\n\t\treturn builder.toString();\r\n\t}\r\n\r\n\tget ruleIndex(): number { return -1; }\r\n\r\n\t/** For rule associated with this parse tree internal node, return\r\n\t * the outer alternative number used to match the input. Default\r\n\t * implementation does not compute nor store this alt num. Create\r\n\t * a subclass of ParserRuleContext with backing field and set\r\n\t * option contextSuperClass.\r\n\t * to set it.\r\n\t *\r\n\t * @since 4.5.3\r\n\t */\r\n\tget altNumber(): number { return ATN.INVALID_ALT_NUMBER; }\r\n\r\n\t/** Set the outer alternative number for this context node. Default\r\n\t * implementation does nothing to avoid backing field overhead for\r\n\t * trees that don't need it. Create\r\n\t * a subclass of ParserRuleContext with backing field and set\r\n\t * option contextSuperClass.\r\n\t *\r\n\t * @since 4.5.3\r\n\t */\r\n\tset altNumber(altNumber: number) {\r\n\t\t// intentionally ignored by the base implementation\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getChild(i: number): ParseTree {\r\n\t\tthrow new RangeError(\"i must be greater than or equal to 0 and less than childCount\");\r\n\t}\r\n\r\n\t@Override\r\n\tget childCount(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic accept(visitor: ParseTreeVisitor): T {\r\n\t\treturn visitor.visitChildren(this);\r\n\t}\r\n\r\n\t/** Print out a whole tree, not just a node, in LISP format\r\n\t * (root child1 .. childN). Print just a node if this is a leaf.\r\n\t * We have to know the recognizer so we can get rule names.\r\n\t */\r\n\tpublic toStringTree(recog: Parser): string;\r\n\r\n\t/** Print out a whole tree, not just a node, in LISP format\r\n\t * (root child1 .. childN). Print just a node if this is a leaf.\r\n\t */\r\n\tpublic toStringTree(ruleNames: string[] | undefined): string;\r\n\r\n\tpublic toStringTree(): string;\r\n\r\n\t@Override\r\n\tpublic toStringTree(recog?: Parser | string[]): string {\r\n\t\treturn Trees.toStringTree(this, recog);\r\n\t}\r\n\r\n\tpublic toString(): string;\r\n\tpublic toString(recog: Recognizer | undefined): string;\r\n\tpublic toString(ruleNames: string[] | undefined): string;\r\n\r\n\t// // recog undefined unless ParserRuleContext, in which case we use subclass toString(...)\r\n\tpublic toString(recog: Recognizer | undefined, stop: RuleContext | undefined): string;\r\n\r\n\tpublic toString(ruleNames: string[] | undefined, stop: RuleContext | undefined): string;\r\n\r\n\tpublic toString(\r\n\t\targ1?: Recognizer | string[],\r\n\t\tstop?: RuleContext)\r\n\t\t: string {\r\n\t\tconst ruleNames = (arg1 instanceof Recognizer) ? arg1.ruleNames : arg1;\r\n\t\tstop = stop || ParserRuleContext.emptyContext();\r\n\r\n\t\tlet buf = \"\";\r\n\t\tlet p: RuleContext | undefined = this;\r\n\t\tbuf += (\"[\");\r\n\t\twhile (p && p !== stop) {\r\n\t\t\tif (!ruleNames) {\r\n\t\t\t\tif (!p.isEmpty) {\r\n\t\t\t\t\tbuf += (p.invokingState);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlet ruleIndex: number = p.ruleIndex;\r\n\t\t\t\tlet ruleName: string = (ruleIndex >= 0 && ruleIndex < ruleNames.length)\r\n\t\t\t\t\t? ruleNames[ruleIndex] : ruleIndex.toString();\r\n\t\t\t\tbuf += (ruleName);\r\n\t\t\t}\r\n\r\n\t\t\tif (p._parent && (ruleNames || !p._parent.isEmpty)) {\r\n\t\t\t\tbuf += (\" \");\r\n\t\t\t}\r\n\r\n\t\t\tp = p._parent;\r\n\t\t}\r\n\r\n\t\tbuf += (\"]\");\r\n\t\treturn buf.toString();\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:56.6285494-07:00\r\nimport { ErrorNode } from \"./tree/ErrorNode\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParseTree } from \"./tree/ParseTree\";\r\nimport { ParseTreeListener } from \"./tree/ParseTreeListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { TerminalNode } from \"./tree/TerminalNode\";\r\nimport { Token } from \"./Token\";\r\n\r\n/** A rule invocation record for parsing.\r\n *\r\n * Contains all of the information about the current rule not stored in the\r\n * RuleContext. It handles parse tree children list, Any ATN state\r\n * tracing, and the default values available for rule invocations:\r\n * start, stop, rule index, current alt number.\r\n *\r\n * Subclasses made for each rule and grammar track the parameters,\r\n * return values, locals, and labels specific to that rule. These\r\n * are the objects that are returned from rules.\r\n *\r\n * Note text is not an actual field of a rule return value; it is computed\r\n * from start and stop using the input stream's toString() method. I\r\n * could add a ctor to this so that we can pass in and store the input\r\n * stream, but I'm not sure we want to do that. It would seem to be undefined\r\n * to get the .text property anyway if the rule matches tokens from multiple\r\n * input streams.\r\n *\r\n * I do not use getters for fields of objects that are used simply to\r\n * group values such as this aggregate. The getters/setters are there to\r\n * satisfy the superclass interface.\r\n */\r\nexport class ParserRuleContext extends RuleContext {\r\n\tprivate static readonly EMPTY: ParserRuleContext = new ParserRuleContext();\r\n\r\n\t/** If we are debugging or building a parse tree for a visitor,\r\n\t * we need to track all of the tokens and rule invocations associated\r\n\t * with this rule's context. This is empty for parsing w/o tree constr.\r\n\t * operation because we don't the need to track the details about\r\n\t * how we parse this rule.\r\n\t */\r\n\tpublic children?: ParseTree[];\r\n\r\n\t/** For debugging/tracing purposes, we want to track all of the nodes in\r\n\t * the ATN traversed by the parser for a particular rule.\r\n\t * This list indicates the sequence of ATN nodes used to match\r\n\t * the elements of the children list. This list does not include\r\n\t * ATN nodes and other rules used to match rule invocations. It\r\n\t * traces the rule invocation node itself but nothing inside that\r\n\t * other rule's ATN submachine.\r\n\t *\r\n\t * There is NOT a one-to-one correspondence between the children and\r\n\t * states list. There are typically many nodes in the ATN traversed\r\n\t * for each element in the children list. For example, for a rule\r\n\t * invocation there is the invoking state and the following state.\r\n\t *\r\n\t * The parser state property updates field s and adds it to this list\r\n\t * if we are debugging/tracing.\r\n\t *\r\n\t * This does not trace states visited during prediction.\r\n\t */\r\n//\tpublic Array states;\r\n\r\n\tpublic _start!: Token;\r\n\tpublic _stop: Token | undefined;\r\n\r\n\t/**\r\n\t * The exception that forced this rule to return. If the rule successfully\r\n\t * completed, this is `undefined`.\r\n\t */\r\n\tpublic exception?: RecognitionException;\r\n\r\n\tconstructor();\r\n\tconstructor(parent: ParserRuleContext | undefined, invokingStateNumber: number);\r\n\tconstructor(parent?: ParserRuleContext, invokingStateNumber?: number) {\r\n\t\tif (invokingStateNumber == null) {\r\n\t\t\tsuper();\r\n\t\t} else {\r\n\t\t\tsuper(parent, invokingStateNumber);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static emptyContext(): ParserRuleContext {\r\n\t\treturn ParserRuleContext.EMPTY;\r\n\t}\r\n\r\n\t/**\r\n\t * COPY a ctx (I'm deliberately not using copy constructor) to avoid\r\n\t * confusion with creating node with parent. Does not copy children\r\n\t * (except error leaves).\r\n\t *\r\n\t * This is used in the generated parser code to flip a generic XContext\r\n\t * node for rule X to a YContext for alt label Y. In that sense, it is not\r\n\t * really a generic copy function.\r\n\t *\r\n\t * If we do an error sync() at start of a rule, we might add error nodes\r\n\t * to the generic XContext so this function must copy those nodes to the\r\n\t * YContext as well else they are lost!\r\n\t */\r\n\tpublic copyFrom(ctx: ParserRuleContext): void {\r\n\t\tthis._parent = ctx._parent;\r\n\t\tthis.invokingState = ctx.invokingState;\r\n\r\n\t\tthis._start = ctx._start;\r\n\t\tthis._stop = ctx._stop;\r\n\r\n\t\t// copy any error nodes to alt label node\r\n\t\tif (ctx.children) {\r\n\t\t\tthis.children = [];\r\n\t\t\t// reset parent pointer for any error nodes\r\n\t\t\tfor (let child of ctx.children) {\r\n\t\t\t\tif (child instanceof ErrorNode) {\r\n\t\t\t\t\tthis.addChild(child);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Double dispatch methods for listeners\r\n\r\n\tpublic enterRule(listener: ParseTreeListener): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\tpublic exitRule(listener: ParseTreeListener): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t/** Add a parse tree node to this as a child. Works for\r\n\t * internal and leaf nodes. Does not set parent link;\r\n\t * other add methods must do that. Other addChild methods\r\n\t * call this.\r\n\t *\r\n\t * We cannot set the parent pointer of the incoming node\r\n\t * because the existing interfaces do not have a setParent()\r\n\t * method and I don't want to break backward compatibility for this.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic addAnyChild(t: T): T {\r\n\t\tif (!this.children) {\r\n\t\t\tthis.children = [t];\r\n\t\t} else {\r\n\t\t\tthis.children.push(t);\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/** Add a token leaf node child and force its parent to be this node. */\r\n\tpublic addChild(t: TerminalNode): void;\r\n\tpublic addChild(ruleInvocation: RuleContext): void;\r\n\t/**\r\n\t * Add a child to this node based upon matchedToken. It\r\n\t * creates a TerminalNodeImpl rather than using\r\n\t * {@link Parser#createTerminalNode(ParserRuleContext, Token)}. I'm leaving this\r\n\t * in for compatibility but the parser doesn't use this anymore.\r\n\t *\r\n\t * @deprecated Use another overload instead.\r\n\t */\r\n\tpublic addChild(matchedToken: Token): TerminalNode;\r\n\tpublic addChild(t: TerminalNode | RuleContext | Token): TerminalNode | void {\r\n\t\tlet result: TerminalNode | void;\r\n\t\tif (t instanceof TerminalNode) {\r\n\t\t\tt.setParent(this);\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\treturn;\r\n\t\t} else if (t instanceof RuleContext) {\r\n\t\t\t// Does not set parent link\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t// Deprecated code path\r\n\t\t\tt = new TerminalNode(t);\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\tt.setParent(this);\r\n\t\t\treturn t;\r\n\t\t}\r\n\t}\r\n\r\n\t/** Add an error node child and force its parent to be this node.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic addErrorNode(errorNode: ErrorNode): ErrorNode;\r\n\r\n\t/**\r\n\t * Add a child to this node based upon badToken. It\r\n\t * creates a ErrorNode rather than using\r\n\t * {@link Parser#createErrorNode(ParserRuleContext, Token)}. I'm leaving this\r\n\t * in for compatibility but the parser doesn't use this anymore.\r\n\t *\r\n\t * @deprecated Use another overload instead.\r\n\t */\r\n\tpublic addErrorNode(badToken: Token): ErrorNode;\r\n\tpublic addErrorNode(node: ErrorNode | Token): ErrorNode {\r\n\t\tif (node instanceof ErrorNode) {\r\n\t\t\tconst errorNode: ErrorNode = node;\r\n\t\t\terrorNode.setParent(this);\r\n\t\t\treturn this.addAnyChild(errorNode);\r\n\t\t} else {\r\n\t\t\t// deprecated path\r\n\t\t\tconst badToken: Token = node;\r\n\t\t\tlet t = new ErrorNode(badToken);\r\n\t\t\tthis.addAnyChild(t);\r\n\t\t\tt.setParent(this);\r\n\t\t\treturn t;\r\n\t\t}\r\n\t}\r\n\r\n//\tpublic void trace(int s) {\r\n//\t\tif ( states==null ) states = new ArrayList();\r\n//\t\tstates.add(s);\r\n//\t}\r\n\r\n\t/** Used by enterOuterAlt to toss out a RuleContext previously added as\r\n\t * we entered a rule. If we have # label, we will need to remove\r\n\t * generic ruleContext object.\r\n\t */\r\n\tpublic removeLastChild(): void {\r\n\t\tif (this.children) {\r\n\t\t\tthis.children.pop();\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\t/** Override to make type more specific */\r\n\tget parent(): ParserRuleContext | undefined {\r\n\t\tlet parent = super.parent;\r\n\t\tif (parent === undefined || parent instanceof ParserRuleContext) {\r\n\t\t\treturn parent;\r\n\t\t}\r\n\r\n\t\tthrow new TypeError(\"Invalid parent type for ParserRuleContext\");\r\n\t}\r\n\r\n\tpublic getChild(i: number): ParseTree;\r\n\tpublic getChild(i: number, ctxType: { new (...args: any[]): T; }): T;\r\n\t// Note: in TypeScript, order or arguments reversed\r\n\tpublic getChild(i: number, ctxType?: { new (...args: any[]): T; }): ParseTree {\r\n\t\tif (!this.children || i < 0 || i >= this.children.length) {\r\n\t\t\tthrow new RangeError(\"index parameter must be between >= 0 and <= number of children.\");\r\n\t\t}\r\n\r\n\t\tif (ctxType == null) {\r\n\t\t\treturn this.children[i];\r\n\t\t}\r\n\r\n\t\tlet result = this.tryGetChild(i, ctxType);\r\n\t\tif (result === undefined) {\r\n\t\t\tthrow new Error(\"The specified node does not exist\");\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic tryGetChild(i: number, ctxType: { new (...args: any[]): T; }): T | undefined {\r\n\t\tif (!this.children || i < 0 || i >= this.children.length) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet j: number = -1; // what node with ctxType have we found?\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof ctxType) {\r\n\t\t\t\tj++;\r\n\t\t\t\tif (j === i) {\r\n\t\t\t\t\treturn o;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic getToken(ttype: number, i: number): TerminalNode {\r\n\t\tlet result = this.tryGetToken(ttype, i);\r\n\t\tif (result === undefined) {\r\n\t\t\tthrow new Error(\"The specified token does not exist\");\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic tryGetToken(ttype: number, i: number): TerminalNode | undefined {\r\n\t\tif (!this.children || i < 0 || i >= this.children.length) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet j: number = -1; // what token with ttype have we found?\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof TerminalNode) {\r\n\t\t\t\tlet symbol: Token = o.symbol;\r\n\t\t\t\tif (symbol.type === ttype) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\tif (j === i) {\r\n\t\t\t\t\t\treturn o;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic getTokens(ttype: number): TerminalNode[] {\r\n\t\tlet tokens: TerminalNode[] = [];\r\n\r\n\t\tif (!this.children) {\r\n\t\t\treturn tokens;\r\n\t\t}\r\n\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof TerminalNode) {\r\n\t\t\t\tlet symbol = o.symbol;\r\n\t\t\t\tif (symbol.type === ttype) {\r\n\t\t\t\t\ttokens.push(o);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tokens;\r\n\t}\r\n\r\n\tget ruleContext(): this {\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// NOTE: argument order change from Java version\r\n\tpublic getRuleContext(i: number, ctxType: { new (...args: any[]): T; }): T {\r\n\t\treturn this.getChild(i, ctxType);\r\n\t}\r\n\r\n\tpublic tryGetRuleContext(i: number, ctxType: { new (...args: any[]): T; }): T | undefined {\r\n\t\treturn this.tryGetChild(i, ctxType);\r\n\t}\r\n\r\n\tpublic getRuleContexts(ctxType: { new (...args: any[]): T; }): T[] {\r\n\t\tlet contexts: T[] = [];\r\n\t\tif (!this.children) {\r\n\t\t\treturn contexts;\r\n\t\t}\r\n\r\n\t\tfor (let o of this.children) {\r\n\t\t\tif (o instanceof ctxType) {\r\n\t\t\t\tcontexts.push(o);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn contexts;\r\n\t}\r\n\r\n\t@Override\r\n\tget childCount() {\r\n\t\treturn this.children ? this.children.length : 0;\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceInterval(): Interval {\r\n\t\tif (!this._start) {\r\n\t\t\treturn Interval.INVALID;\r\n\t\t}\r\n\t\tif (!this._stop || this._stop.tokenIndex < this._start.tokenIndex) {\r\n\t\t\treturn Interval.of(this._start.tokenIndex, this._start.tokenIndex - 1); // empty\r\n\t\t}\r\n\t\treturn Interval.of(this._start.tokenIndex, this._stop.tokenIndex);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the initial token in this context.\r\n\t * Note that the range from start to stop is inclusive, so for rules that do not consume anything\r\n\t * (for example, zero length or error productions) this token may exceed stop.\r\n\t */\r\n\tget start(): Token { return this._start; }\r\n\t/**\r\n\t * Get the final token in this context.\r\n\t * Note that the range from start to stop is inclusive, so for rules that do not consume anything\r\n\t * (for example, zero length or error productions) this token may precede start.\r\n\t */\r\n\tget stop(): Token | undefined { return this._stop; }\r\n\r\n\t/** Used for rule context info debugging during parse-time, not so much for ATN debugging */\r\n\tpublic toInfoString(recognizer: Parser): string {\r\n\t\tlet rules: string[] =\r\n\t\t\trecognizer.getRuleInvocationStack(this).reverse();\r\n\t\treturn \"ParserRuleContext\" + rules + \"{\" +\r\n\t\t\t\"start=\" + this._start +\r\n\t\t\t\", stop=\" + this._stop +\r\n\t\t\t\"}\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.2673893-07:00\r\n\r\nimport { Array2DHashMap } from \"../misc/Array2DHashMap\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { EqualityComparator } from \"../misc/EqualityComparator\";\r\nimport { MurmurHash } from \"../misc/MurmurHash\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { Override } from \"../Decorators\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\n\r\n/**\r\n * This enumeration defines the prediction modes available in ANTLR 4 along with\r\n * utility methods for analyzing configuration sets for conflicts and/or\r\n * ambiguities.\r\n */\r\nexport enum PredictionMode {\r\n\t/**\r\n\t * The SLL(*) prediction mode. This prediction mode ignores the current\r\n\t * parser context when making predictions. This is the fastest prediction\r\n\t * mode, and provides correct results for many grammars. This prediction\r\n\t * mode is more powerful than the prediction mode provided by ANTLR 3, but\r\n\t * may result in syntax errors for grammar and input combinations which are\r\n\t * not SLL.\r\n\t *\r\n\t * When using this prediction mode, the parser will either return a correct\r\n\t * parse tree (i.e. the same parse tree that would be returned with the\r\n\t * {@link #LL} prediction mode), or it will report a syntax error. If a\r\n\t * syntax error is encountered when using the {@link #SLL} prediction mode,\r\n\t * it may be due to either an actual syntax error in the input or indicate\r\n\t * that the particular combination of grammar and input requires the more\r\n\t * powerful {@link #LL} prediction abilities to complete successfully.\r\n\t *\r\n\t * This prediction mode does not provide any guarantees for prediction\r\n\t * behavior for syntactically-incorrect inputs.\r\n\t */\r\n\tSLL,\r\n\t/**\r\n\t * The LL(*) prediction mode. This prediction mode allows the current parser\r\n\t * context to be used for resolving SLL conflicts that occur during\r\n\t * prediction. This is the fastest prediction mode that guarantees correct\r\n\t * parse results for all combinations of grammars with syntactically correct\r\n\t * inputs.\r\n\t *\r\n\t * When using this prediction mode, the parser will make correct decisions\r\n\t * for all syntactically-correct grammar and input combinations. However, in\r\n\t * cases where the grammar is truly ambiguous this prediction mode might not\r\n\t * report a precise answer for *exactly which* alternatives are\r\n\t * ambiguous.\r\n\t *\r\n\t * This prediction mode does not provide any guarantees for prediction\r\n\t * behavior for syntactically-incorrect inputs.\r\n\t */\r\n\tLL,\r\n\t/**\r\n\t * The LL(*) prediction mode with exact ambiguity detection. In addition to\r\n\t * the correctness guarantees provided by the {@link #LL} prediction mode,\r\n\t * this prediction mode instructs the prediction algorithm to determine the\r\n\t * complete and exact set of ambiguous alternatives for every ambiguous\r\n\t * decision encountered while parsing.\r\n\t *\r\n\t * This prediction mode may be used for diagnosing ambiguities during\r\n\t * grammar development. Due to the performance overhead of calculating sets\r\n\t * of ambiguous alternatives, this prediction mode should be avoided when\r\n\t * the exact results are not necessary.\r\n\t *\r\n\t * This prediction mode does not provide any guarantees for prediction\r\n\t * behavior for syntactically-incorrect inputs.\r\n\t */\r\n\tLL_EXACT_AMBIG_DETECTION,\r\n}\r\n\r\nexport namespace PredictionMode {\r\n\t/** A Map that uses just the state and the stack context as the key. */\r\n\t// NOTE: Base type used to be FlexibleHashMap\r\n\tclass AltAndContextMap extends Array2DHashMap {\r\n\t\tconstructor() {\r\n\t\t\tsuper(AltAndContextConfigEqualityComparator.INSTANCE);\r\n\t\t}\r\n\t}\r\n\r\n\tclass AltAndContextConfigEqualityComparator implements EqualityComparator {\r\n\t\tpublic static readonly INSTANCE: AltAndContextConfigEqualityComparator = new AltAndContextConfigEqualityComparator();\r\n\r\n\t\tprivate AltAndContextConfigEqualityComparator() {\r\n\t\t\t// intentionally empty\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * The hash code is only a function of the {@link ATNState#stateNumber}\r\n\t\t * and {@link ATNConfig#context}.\r\n\t\t */\r\n\t\t@Override\r\n\t\tpublic hashCode(o: ATNConfig): number {\r\n\t\t\tlet hashCode: number = MurmurHash.initialize(7);\r\n\t\t\thashCode = MurmurHash.update(hashCode, o.state.stateNumber);\r\n\t\t\thashCode = MurmurHash.update(hashCode, o.context);\r\n\t\t\thashCode = MurmurHash.finish(hashCode, 2);\r\n\t\t\treturn hashCode;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic equals(a: ATNConfig, b: ATNConfig): boolean {\r\n\t\t\tif (a === b) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif (a == null || b == null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn a.state.stateNumber === b.state.stateNumber\r\n\t\t\t\t&& a.context.equals(b.context);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if any configuration in `configs` is in a\r\n\t * {@link RuleStopState}. Configurations meeting this condition have reached\r\n\t * the end of the decision rule (local context) or end of start rule (full\r\n\t * context).\r\n\t *\r\n\t * @param configs the configuration set to test\r\n\t * @returns `true` if any configuration in `configs` is in a\r\n\t * {@link RuleStopState}, otherwise `false`\r\n\t */\r\n\texport function hasConfigInRuleStopState(configs: ATNConfigSet): boolean {\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if all configurations in `configs` are in a\r\n\t * {@link RuleStopState}. Configurations meeting this condition have reached\r\n\t * the end of the decision rule (local context) or end of start rule (full\r\n\t * context).\r\n\t *\r\n\t * @param configs the configuration set to test\r\n\t * @returns `true` if all configurations in `configs` are in a\r\n\t * {@link RuleStopState}, otherwise `false`\r\n\t */\r\n\texport function allConfigsInRuleStopStates(/*@NotNull*/ configs: ATNConfigSet): boolean {\r\n\t\tfor (let config of configs) {\r\n\t\t\tif (!(config.state instanceof RuleStopState)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.3871984-07:00\r\n\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class SimulatorState {\r\n\tpublic outerContext: ParserRuleContext;\r\n\r\n\tpublic s0: DFAState;\r\n\r\n\tpublic useContext: boolean;\r\n\tpublic remainingOuterContext: ParserRuleContext | undefined;\r\n\r\n\tconstructor(outerContext: ParserRuleContext, @NotNull s0: DFAState, useContext: boolean, remainingOuterContext: ParserRuleContext | undefined) {\r\n\t\tthis.outerContext = outerContext != null ? outerContext : ParserRuleContext.emptyContext();\r\n\t\tthis.s0 = s0;\r\n\t\tthis.useContext = useContext;\r\n\t\tthis.remainingOuterContext = remainingOuterContext;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:31.1989835-07:00\r\n\r\nimport { AcceptStateInfo } from \"../dfa/AcceptStateInfo\";\r\nimport { ActionTransition } from \"./ActionTransition\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { Arrays } from \"../misc/Arrays\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfig } from \"./ATNConfig\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { AtomTransition } from \"./AtomTransition\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { ConflictInfo } from \"./ConflictInfo\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { EpsilonTransition } from \"./EpsilonTransition\";\r\nimport { IntegerList } from \"../misc/IntegerList\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { IntStream } from \"../IntStream\";\r\nimport { NotNull, Nullable, Override } from \"../Decorators\";\r\nimport { NotSetTransition } from \"./NotSetTransition\";\r\nimport { NoViableAltException } from \"../NoViableAltException\";\r\nimport { ObjectEqualityComparator } from \"../misc/ObjectEqualityComparator\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\nimport { PrecedencePredicateTransition } from \"./PrecedencePredicateTransition\";\r\nimport { PredicateTransition } from \"./PredicateTransition\";\r\nimport { PredictionContext } from \"./PredictionContext\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { PredictionMode } from \"./PredictionMode\";\r\nimport { RuleContext } from \"../RuleContext\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { StarLoopEntryState } from \"./StarLoopEntryState\";\r\nimport { Token } from \"../Token\";\r\nimport { TokenStream } from \"../TokenStream\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\nimport { Vocabulary } from \"../Vocabulary\";\r\nimport { VocabularyImpl } from \"../VocabularyImpl\";\r\n\r\nimport * as assert from \"assert\";\r\n\r\nconst MAX_SHORT_VALUE = 0xFFFF;\r\nconst MIN_INTEGER_VALUE = -((1 << 31) >>> 0);\r\n\r\n/**\r\n * The embodiment of the adaptive LL(*), ALL(*), parsing strategy.\r\n *\r\n * The basic complexity of the adaptive strategy makes it harder to understand.\r\n * We begin with ATN simulation to build paths in a DFA. Subsequent prediction\r\n * requests go through the DFA first. If they reach a state without an edge for\r\n * the current symbol, the algorithm fails over to the ATN simulation to\r\n * complete the DFA path for the current input (until it finds a conflict state\r\n * or uniquely predicting state).\r\n *\r\n * All of that is done without using the outer context because we want to create\r\n * a DFA that is not dependent upon the rule invocation stack when we do a\r\n * prediction. One DFA works in all contexts. We avoid using context not\r\n * necessarily because it's slower, although it can be, but because of the DFA\r\n * caching problem. The closure routine only considers the rule invocation stack\r\n * created during prediction beginning in the decision rule. For example, if\r\n * prediction occurs without invoking another rule's ATN, there are no context\r\n * stacks in the configurations. When lack of context leads to a conflict, we\r\n * don't know if it's an ambiguity or a weakness in the strong LL(*) parsing\r\n * strategy (versus full LL(*)).\r\n *\r\n * When SLL yields a configuration set with conflict, we rewind the input and\r\n * retry the ATN simulation, this time using full outer context without adding\r\n * to the DFA. Configuration context stacks will be the full invocation stacks\r\n * from the start rule. If we get a conflict using full context, then we can\r\n * definitively say we have a true ambiguity for that input sequence. If we\r\n * don't get a conflict, it implies that the decision is sensitive to the outer\r\n * context. (It is not context-sensitive in the sense of context-sensitive\r\n * grammars.)\r\n *\r\n * The next time we reach this DFA state with an SLL conflict, through DFA\r\n * simulation, we will again retry the ATN simulation using full context mode.\r\n * This is slow because we can't save the results and have to \"interpret\" the\r\n * ATN each time we get that input.\r\n *\r\n * **CACHING FULL CONTEXT PREDICTIONS**\r\n *\r\n * We could cache results from full context to predicted alternative easily and\r\n * that saves a lot of time but doesn't work in presence of predicates. The set\r\n * of visible predicates from the ATN start state changes depending on the\r\n * context, because closure can fall off the end of a rule. I tried to cache\r\n * tuples (stack context, semantic context, predicted alt) but it was slower\r\n * than interpreting and much more complicated. Also required a huge amount of\r\n * memory. The goal is not to create the world's fastest parser anyway. I'd like\r\n * to keep this algorithm simple. By launching multiple threads, we can improve\r\n * the speed of parsing across a large number of files.\r\n *\r\n * There is no strict ordering between the amount of input used by SLL vs LL,\r\n * which makes it really hard to build a cache for full context. Let's say that\r\n * we have input A B C that leads to an SLL conflict with full context X. That\r\n * implies that using X we might only use A B but we could also use A B C D to\r\n * resolve conflict. Input A B C D could predict alternative 1 in one position\r\n * in the input and A B C E could predict alternative 2 in another position in\r\n * input. The conflicting SLL configurations could still be non-unique in the\r\n * full context prediction, which would lead us to requiring more input than the\r\n * original A B C.\tTo make a\tprediction cache work, we have to track\tthe exact\r\n * input\tused during the previous prediction. That amounts to a cache that maps\r\n * X to a specific DFA for that context.\r\n *\r\n * Something should be done for left-recursive expression predictions. They are\r\n * likely LL(1) + pred eval. Easier to do the whole SLL unless error and retry\r\n * with full LL thing Sam does.\r\n *\r\n * **AVOIDING FULL CONTEXT PREDICTION**\r\n *\r\n * We avoid doing full context retry when the outer context is empty, we did not\r\n * dip into the outer context by falling off the end of the decision state rule,\r\n * or when we force SLL mode.\r\n *\r\n * As an example of the not dip into outer context case, consider as super\r\n * constructor calls versus function calls. One grammar might look like\r\n * this:\r\n *\r\n * ```antlr\r\n * ctorBody\r\n * : '{' superCall? stat* '}'\r\n * ;\r\n * ```\r\n *\r\n * Or, you might see something like\r\n *\r\n * ```antlr\r\n * stat\r\n * : superCall ';'\r\n * | expression ';'\r\n * | ...\r\n * ;\r\n * ```\r\n *\r\n * In both cases I believe that no closure operations will dip into the outer\r\n * context. In the first case ctorBody in the worst case will stop at the '}'.\r\n * In the 2nd case it should stop at the ';'. Both cases should stay within the\r\n * entry rule and not dip into the outer context.\r\n *\r\n * **PREDICATES**\r\n *\r\n * Predicates are always evaluated if present in either SLL or LL both. SLL and\r\n * LL simulation deals with predicates differently. SLL collects predicates as\r\n * it performs closure operations like ANTLR v3 did. It delays predicate\r\n * evaluation until it reaches and accept state. This allows us to cache the SLL\r\n * ATN simulation whereas, if we had evaluated predicates on-the-fly during\r\n * closure, the DFA state configuration sets would be different and we couldn't\r\n * build up a suitable DFA.\r\n *\r\n * When building a DFA accept state during ATN simulation, we evaluate any\r\n * predicates and return the sole semantically valid alternative. If there is\r\n * more than 1 alternative, we report an ambiguity. If there are 0 alternatives,\r\n * we throw an exception. Alternatives without predicates act like they have\r\n * true predicates. The simple way to think about it is to strip away all\r\n * alternatives with false predicates and choose the minimum alternative that\r\n * remains.\r\n *\r\n * When we start in the DFA and reach an accept state that's predicated, we test\r\n * those and return the minimum semantically viable alternative. If no\r\n * alternatives are viable, we throw an exception.\r\n *\r\n * During full LL ATN simulation, closure always evaluates predicates and\r\n * on-the-fly. This is crucial to reducing the configuration set size during\r\n * closure. It hits a landmine when parsing with the Java grammar, for example,\r\n * without this on-the-fly evaluation.\r\n *\r\n * **SHARING DFA**\r\n *\r\n * All instances of the same parser share the same decision DFAs through a\r\n * static field. Each instance gets its own ATN simulator but they share the\r\n * same {@link ATN#decisionToDFA} field. They also share a\r\n * {@link PredictionContextCache} object that makes sure that all\r\n * {@link PredictionContext} objects are shared among the DFA states. This makes\r\n * a big size difference.\r\n *\r\n * **THREAD SAFETY**\r\n *\r\n * The {@link ParserATNSimulator} locks on the {@link ATN#decisionToDFA} field when\r\n * it adds a new DFA object to that array. {@link #addDFAEdge}\r\n * locks on the DFA for the current decision when setting the\r\n * {@link DFAState#edges} field. {@link #addDFAState} locks on\r\n * the DFA for the current decision when looking up a DFA state to see if it\r\n * already exists. We must make sure that all requests to add DFA states that\r\n * are equivalent result in the same shared DFA object. This is because lots of\r\n * threads will be trying to update the DFA at once. The\r\n * {@link #addDFAState} method also locks inside the DFA lock\r\n * but this time on the shared context cache when it rebuilds the\r\n * configurations' {@link PredictionContext} objects using cached\r\n * subgraphs/nodes. No other locking occurs, even during DFA simulation. This is\r\n * safe as long as we can guarantee that all threads referencing\r\n * `s.edge[t]` get the same physical target {@link DFAState}, or\r\n * `undefined`. Once into the DFA, the DFA simulation does not reference the\r\n * {@link DFA#states} map. It follows the {@link DFAState#edges} field to new\r\n * targets. The DFA simulator will either find {@link DFAState#edges} to be\r\n * `undefined`, to be non-`undefined` and `dfa.edges[t]` undefined, or\r\n * `dfa.edges[t]` to be non-undefined. The\r\n * {@link #addDFAEdge} method could be racing to set the field\r\n * but in either case the DFA simulator works; if `undefined`, and requests ATN\r\n * simulation. It could also race trying to get `dfa.edges[t]`, but either\r\n * way it will work because it's not doing a test and set operation.\r\n *\r\n * **Starting with SLL then failing to combined SLL/LL (Two-Stage\r\n * Parsing)**\r\n *\r\n * Sam pointed out that if SLL does not give a syntax error, then there is no\r\n * point in doing full LL, which is slower. We only have to try LL if we get a\r\n * syntax error. For maximum speed, Sam starts the parser set to pure SLL\r\n * mode with the {@link BailErrorStrategy}:\r\n *\r\n * ```\r\n * parser.interpreter.{@link #setPredictionMode setPredictionMode}`(`{@link PredictionMode#SLL}`)`;\r\n * parser.{@link Parser#setErrorHandler setErrorHandler}(new {@link BailErrorStrategy}());\r\n * ```\r\n *\r\n * If it does not get a syntax error, then we're done. If it does get a syntax\r\n * error, we need to retry with the combined SLL/LL strategy.\r\n *\r\n * The reason this works is as follows. If there are no SLL conflicts, then the\r\n * grammar is SLL (at least for that input set). If there is an SLL conflict,\r\n * the full LL analysis must yield a set of viable alternatives which is a\r\n * subset of the alternatives reported by SLL. If the LL set is a singleton,\r\n * then the grammar is LL but not SLL. If the LL set is the same size as the SLL\r\n * set, the decision is SLL. If the LL set has size > 1, then that decision\r\n * is truly ambiguous on the current input. If the LL set is smaller, then the\r\n * SLL conflict resolution might choose an alternative that the full LL would\r\n * rule out as a possibility based upon better context information. If that's\r\n * the case, then the SLL parse will definitely get an error because the full LL\r\n * analysis says it's not viable. If SLL conflict resolution chooses an\r\n * alternative within the LL set, them both SLL and LL would choose the same\r\n * alternative because they both choose the minimum of multiple conflicting\r\n * alternatives.\r\n *\r\n * Let's say we have a set of SLL conflicting alternatives `{1, 2, 3}` and\r\n * a smaller LL set called *s*. If *s* is `{2, 3}`, then SLL\r\n * parsing will get an error because SLL will pursue alternative 1. If\r\n * *s* is `{1, 2}` or `{1, 3}` then both SLL and LL will\r\n * choose the same alternative because alternative one is the minimum of either\r\n * set. If *s* is `{2}` or `{3}` then SLL will get a syntax\r\n * error. If *s* is `{1}` then SLL will succeed.\r\n *\r\n * Of course, if the input is invalid, then we will get an error for sure in\r\n * both SLL and LL parsing. Erroneous input will therefore require 2 passes over\r\n * the input.\r\n */\r\nexport class ParserATNSimulator extends ATNSimulator {\r\n\tpublic static debug: boolean = false;\r\n\tpublic static dfa_debug: boolean = false;\r\n\tpublic static retry_debug: boolean = false;\r\n\r\n\t@NotNull\r\n\tprivate predictionMode: PredictionMode = PredictionMode.LL;\r\n\tpublic force_global_context: boolean = false;\r\n\tpublic always_try_local_context: boolean = true;\r\n\r\n\t/**\r\n\t * Determines whether the DFA is used for full-context predictions. When\r\n\t * `true`, the DFA stores transition information for both full-context\r\n\t * and SLL parsing; otherwise, the DFA only stores SLL transition\r\n\t * information.\r\n\t *\r\n\t * For some grammars, enabling the full-context DFA can result in a\r\n\t * substantial performance improvement. However, this improvement typically\r\n\t * comes at the expense of memory used for storing the cached DFA states,\r\n\t * configuration sets, and prediction contexts.\r\n\t *\r\n\t * The default value is `false`.\r\n\t */\r\n\tpublic enable_global_context_dfa: boolean = false;\r\n\tpublic optimize_unique_closure: boolean = true;\r\n\tpublic optimize_ll1: boolean = true;\r\n\tpublic optimize_tail_calls: boolean = true;\r\n\tpublic tail_call_preserves_sll: boolean = true;\r\n\tpublic treat_sllk1_conflict_as_ambiguity: boolean = false;\r\n\r\n\tprotected _parser: Parser;\r\n\r\n\t/**\r\n\t * When `true`, ambiguous alternatives are reported when they are\r\n\t * encountered within {@link #execATN}. When `false`, these messages\r\n\t * are suppressed. The default is `false`.\r\n\t *\r\n\t * When messages about ambiguous alternatives are not required, setting this\r\n\t * to `false` enables additional internal optimizations which may lose\r\n\t * this information.\r\n\t */\r\n\tpublic reportAmbiguities: boolean = false;\r\n\r\n\t/** By default we do full context-sensitive LL(*) parsing not\r\n\t * Strong LL(*) parsing. If we fail with Strong LL(*) we\r\n\t * try full LL(*). That means we rewind and use context information\r\n\t * when closure operations fall off the end of the rule that\r\n\t * holds the decision were evaluating.\r\n\t */\r\n\tprotected userWantsCtxSensitive: boolean = true;\r\n\r\n\tprivate dfa?: DFA;\r\n\r\n\tconstructor(@NotNull atn: ATN, parser: Parser) {\r\n\t\tsuper(atn);\r\n\t\tthis._parser = parser;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getPredictionMode(): PredictionMode {\r\n\t\treturn this.predictionMode;\r\n\t}\r\n\r\n\tpublic setPredictionMode(@NotNull predictionMode: PredictionMode): void {\r\n\t\tthis.predictionMode = predictionMode;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reset(): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined): number;\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext: boolean): number;\r\n\tpublic adaptivePredict(\r\n\t\t@NotNull input: TokenStream,\r\n\t\tdecision: number,\r\n\t\touterContext: ParserRuleContext | undefined,\r\n\t\tuseContext?: boolean): number {\r\n\t\tif (useContext === undefined) {\r\n\t\t\tuseContext = false;\r\n\t\t}\r\n\r\n\t\tlet dfa: DFA = this.atn.decisionToDFA[decision];\r\n\t\tassert(dfa != null);\r\n\t\tif (this.optimize_ll1 && !dfa.isPrecedenceDfa && !dfa.isEmpty) {\r\n\t\t\tlet ll_1: number = input.LA(1);\r\n\t\t\tif (ll_1 >= 0 && ll_1 <= 0xFFFF) {\r\n\t\t\t\tlet key: number = ((decision << 16) >>> 0) + ll_1;\r\n\t\t\t\tlet alt: number | undefined = this.atn.LL1Table.get(key);\r\n\t\t\t\tif (alt != null) {\r\n\t\t\t\t\treturn alt;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dfa = dfa;\r\n\r\n\t\tif (this.force_global_context) {\r\n\t\t\tuseContext = true;\r\n\t\t}\r\n\t\telse if (!this.always_try_local_context) {\r\n\t\t\tuseContext = useContext || dfa.isContextSensitive;\r\n\t\t}\r\n\r\n\t\tthis.userWantsCtxSensitive = useContext || (this.predictionMode !== PredictionMode.SLL && outerContext != null && !this.atn.decisionToState[decision].sll);\r\n\t\tif (outerContext == null) {\r\n\t\t\touterContext = ParserRuleContext.emptyContext();\r\n\t\t}\r\n\r\n\t\tlet state: SimulatorState | undefined;\r\n\t\tif (!dfa.isEmpty) {\r\n\t\t\tstate = this.getStartState(dfa, input, outerContext, useContext);\r\n\t\t}\r\n\r\n\t\tif (state == null) {\r\n\t\t\tif (outerContext == null) {\r\n\t\t\t\touterContext = ParserRuleContext.emptyContext();\r\n\t\t\t}\r\n\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"ATN decision \" + dfa.decision +\r\n\t\t\t\t\t\" exec LA(1)==\" + this.getLookaheadName(input) +\r\n\t\t\t\t\t\", outerContext=\" + outerContext.toString(this._parser));\r\n\t\t\t}\r\n\r\n\t\t\tstate = this.computeStartState(dfa, outerContext, useContext);\r\n\t\t}\r\n\r\n\t\tlet m: number = input.mark();\r\n\t\tlet index: number = input.index;\r\n\t\ttry {\r\n\t\t\tlet alt: number = this.execDFA(dfa, input, index, state);\r\n\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"DFA after predictATN: \" + dfa.toString(this._parser.vocabulary, this._parser.ruleNames));\r\n\t\t\t}\r\n\t\t\treturn alt;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tthis.dfa = undefined;\r\n\t\t\tinput.seek(index);\r\n\t\t\tinput.release(m);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getStartState(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull input: TokenStream,\r\n\t\t@NotNull outerContext: ParserRuleContext,\r\n\t\tuseContext: boolean): SimulatorState | undefined {\r\n\r\n\t\tif (!useContext) {\r\n\t\t\tif (dfa.isPrecedenceDfa) {\r\n\t\t\t\t// the start state for a precedence DFA depends on the current\r\n\t\t\t\t// parser precedence, and is provided by a DFA method.\r\n\t\t\t\tlet state: DFAState | undefined = dfa.getPrecedenceStartState(this._parser.precedence, false);\r\n\t\t\t\tif (state == null) {\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn new SimulatorState(outerContext, state, false, outerContext);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (dfa.s0 == null) {\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn new SimulatorState(outerContext, dfa.s0, false, outerContext);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!this.enable_global_context_dfa) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet remainingContext: ParserRuleContext | undefined = outerContext;\r\n\t\tassert(outerContext != null);\r\n\t\tlet s0: DFAState | undefined;\r\n\t\tif (dfa.isPrecedenceDfa) {\r\n\t\t\ts0 = dfa.getPrecedenceStartState(this._parser.precedence, true);\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts0 = dfa.s0full;\r\n\t\t}\r\n\r\n\t\twhile (remainingContext != null && s0 != null && s0.isContextSensitive) {\r\n\t\t\tremainingContext = this.skipTailCalls(remainingContext);\r\n\t\t\ts0 = s0.getContextTarget(this.getReturnState(remainingContext));\r\n\t\t\tif (remainingContext.isEmpty) {\r\n\t\t\t\tassert(s0 == null || !s0.isContextSensitive);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tremainingContext = remainingContext.parent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s0 == null) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn new SimulatorState(outerContext, s0, useContext, remainingContext);\r\n\t}\r\n\r\n\tprotected execDFA(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull input: TokenStream, startIndex: number,\r\n\t\t@NotNull state: SimulatorState): number {\r\n\t\tlet outerContext: ParserRuleContext = state.outerContext;\r\n\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\tconsole.log(\"DFA decision \" + dfa.decision +\r\n\t\t\t\t\" exec LA(1)==\" + this.getLookaheadName(input) +\r\n\t\t\t\t\", outerContext=\" + outerContext.toString(this._parser));\r\n\t\t}\r\n\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\tconsole.log(dfa.toString(this._parser.vocabulary, this._parser.ruleNames));\r\n\t\t}\r\n\t\tlet s: DFAState = state.s0;\r\n\r\n\t\tlet t: number = input.LA(1);\r\n\t\tlet remainingOuterContext: ParserRuleContext | undefined = state.remainingOuterContext;\r\n\r\n\t\twhile (true) {\r\n\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\tconsole.log(\"DFA state \" + s.stateNumber + \" LA(1)==\" + this.getLookaheadName(input));\r\n\t\t\t}\r\n\t\t\tif (state.useContext) {\r\n\t\t\t\twhile (s.isContextSymbol(t)) {\r\n\t\t\t\t\tlet next: DFAState | undefined;\r\n\t\t\t\t\tif (remainingOuterContext != null) {\r\n\t\t\t\t\t\tremainingOuterContext = this.skipTailCalls(remainingOuterContext);\r\n\t\t\t\t\t\tnext = s.getContextTarget(this.getReturnState(remainingOuterContext));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (next == null) {\r\n\t\t\t\t\t\t// fail over to ATN\r\n\t\t\t\t\t\tlet initialState: SimulatorState = new SimulatorState(state.outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\t\t\treturn this.execATN(dfa, input, startIndex, initialState);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tassert(remainingOuterContext != null);\r\n\t\t\t\t\tremainingOuterContext = remainingOuterContext.parent;\r\n\t\t\t\t\ts = next;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.isAcceptState(s, state.useContext)) {\r\n\t\t\t\tif (s.predicates != null) {\r\n\t\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\t\tconsole.log(\"accept \" + s);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\t\tconsole.log(\"accept; predict \" + s.prediction + \" in state \" + s.stateNumber);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// keep going unless we're at EOF or state only has one alt number\r\n\t\t\t\t// mentioned in configs; check if something else could match\r\n\t\t\t\t// TODO: don't we always stop? only lexer would keep going\r\n\t\t\t\t// TODO: v3 dfa don't do this.\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// t is not updated if one of these states is reached\r\n\t\t\tassert(!this.isAcceptState(s, state.useContext));\r\n\r\n\t\t\t// if no edge, pop over to ATN interpreter, update DFA and return\r\n\t\t\tlet target: DFAState | undefined = this.getExistingTargetState(s, t);\r\n\t\t\tif (target == null) {\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug && t >= 0) {\r\n\t\t\t\t\tconsole.log(\"no edge for \" + this._parser.vocabulary.getDisplayName(t));\r\n\t\t\t\t}\r\n\t\t\t\tlet alt: number;\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tlet interval: Interval = Interval.of(startIndex, this._parser.inputStream.index);\r\n\t\t\t\t\tconsole.log(\"ATN exec upon \" +\r\n\t\t\t\t\t\tthis._parser.inputStream.getText(interval) +\r\n\t\t\t\t\t\t\" at DFA state \" + s.stateNumber);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet initialState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\talt = this.execATN(dfa, input, startIndex, initialState);\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tconsole.log(\"back from DFA update, alt=\" + alt + \", dfa=\\n\" + dfa.toString(this._parser.vocabulary, this._parser.ruleNames));\r\n\t\t\t\t\t//dump(dfa);\r\n\t\t\t\t}\r\n\t\t\t\t// action already executed\r\n\t\t\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tconsole.log(\"DFA decision \" + dfa.decision +\r\n\t\t\t\t\t\t\" predicts \" + alt);\r\n\t\t\t\t}\r\n\t\t\t\treturn alt; // we've updated DFA, exec'd action, and have our deepest answer\r\n\t\t\t}\r\n\t\t\telse if (target === ATNSimulator.ERROR) {\r\n\t\t\t\tlet errorState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\treturn this.handleNoViableAlt(input, startIndex, errorState);\r\n\t\t\t}\r\n\t\t\ts = target;\r\n\t\t\tif (!this.isAcceptState(s, state.useContext) && t !== IntStream.EOF) {\r\n\t\t\t\tinput.consume();\r\n\t\t\t\tt = input.LA(1);\r\n\t\t\t}\r\n\t\t}\r\n//\t\tif ( acceptState==null ) {\r\n//\t\t\tif ( debug ) System.out.println(\"!!! no viable alt in dfa\");\r\n//\t\t\treturn -1;\r\n//\t\t}\r\n\r\n\t\tif (!state.useContext && s.configs.conflictInfo != null) {\r\n\t\t\tif (dfa.atnStartState instanceof DecisionState) {\r\n\t\t\t\tif (!this.userWantsCtxSensitive ||\r\n\t\t\t\t\t(!s.configs.dipsIntoOuterContext && s.configs.isExactConflict) ||\r\n\t\t\t\t\t(this.treat_sllk1_conflict_as_ambiguity && input.index === startIndex)) {\r\n\t\t\t\t\t// we don't report the ambiguity again\r\n\t\t\t\t\t//if ( !this.acceptState.configset.hasSemanticContext ) {\r\n\t\t\t\t\t// \tthis.reportAmbiguity(dfa, acceptState, startIndex, input.index, acceptState.configset.conflictingAlts, acceptState.configset);\r\n\t\t\t\t\t//}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tassert(!state.useContext);\r\n\r\n\t\t\t\t\t// Before attempting full context prediction, check to see if there are\r\n\t\t\t\t\t// disambiguating or validating predicates to evaluate which allow an\r\n\t\t\t\t\t// immediate decision\r\n\t\t\t\t\tlet conflictingAlts: BitSet | undefined;\r\n\t\t\t\t\tlet predicates: DFAState.PredPrediction[] | undefined = s.predicates;\r\n\t\t\t\t\tif (predicates != null) {\r\n\t\t\t\t\t\tlet conflictIndex: number = input.index;\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconflictingAlts = this.evalSemanticContext(predicates, outerContext, true);\r\n\t\t\t\t\t\tif (conflictingAlts.cardinality() === 1) {\r\n\t\t\t\t\t\t\treturn conflictingAlts.nextSetBit(0);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\t// restore the index so reporting the fallback to full\r\n\t\t\t\t\t\t\t// context occurs with the index at the correct spot\r\n\t\t\t\t\t\t\tinput.seek(conflictIndex);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (this.reportAmbiguities) {\r\n\t\t\t\t\t\tlet conflictState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext);\r\n\t\t\t\t\t\tthis.reportAttemptingFullContext(dfa, conflictingAlts, conflictState, startIndex, input.index);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\treturn this.adaptivePredict(input, dfa.decision, outerContext, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Before jumping to prediction, check to see if there are\r\n\t\t// disambiguating or validating predicates to evaluate\r\n\t\tlet predicates: DFAState.PredPrediction[] | undefined = s.predicates;\r\n\t\tif (predicates != null) {\r\n\t\t\tlet stopIndex: number = input.index;\r\n\t\t\tif (startIndex !== stopIndex) {\r\n\t\t\t\tinput.seek(startIndex);\r\n\t\t\t}\r\n\r\n\t\t\tlet alts: BitSet = this.evalSemanticContext(predicates, outerContext, this.reportAmbiguities && this.predictionMode === PredictionMode.LL_EXACT_AMBIG_DETECTION);\r\n\t\t\tswitch (alts.cardinality()) {\r\n\t\t\tcase 0:\r\n\t\t\t\tthrow this.noViableAlt(input, outerContext, s.configs, startIndex);\r\n\r\n\t\t\tcase 1:\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t// report ambiguity after predicate evaluation to make sure the correct\r\n\t\t\t\t// set of ambig alts is reported.\r\n\t\t\t\tif (startIndex !== stopIndex) {\r\n\t\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.reportAmbiguity(dfa, s, startIndex, stopIndex, s.configs.isExactConflict, alts, s.configs);\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.dfa_debug) {\r\n\t\t\tconsole.log(\"DFA decision \" + dfa.decision +\r\n\t\t\t\t\" predicts \" + s.prediction);\r\n\t\t}\r\n\t\treturn s.prediction;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines if a particular DFA state should be treated as an accept state\r\n\t * for the current prediction mode. In addition to the `useContext`\r\n\t * parameter, the {@link #getPredictionMode()} method provides the\r\n\t * prediction mode controlling the prediction algorithm as a whole.\r\n\t *\r\n\t * The default implementation simply returns the value of\r\n\t * `DFAState.isAcceptState` except for conflict states when\r\n\t * `useContext` is `true` and {@link #getPredictionMode()} is\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}. In that case, only\r\n\t * conflict states where {@link ATNConfigSet#isExactConflict} is\r\n\t * `true` are considered accept states.\r\n\t *\r\n\t * @param state The DFA state to check.\r\n\t * @param useContext `true` if the prediction algorithm is currently\r\n\t * considering the full parser context; otherwise, `false` if the\r\n\t * algorithm is currently performing a local context prediction.\r\n\t *\r\n\t * @returns `true` if the specified `state` is an accept state;\r\n\t * otherwise, `false`.\r\n\t */\r\n\tprotected isAcceptState(state: DFAState, useContext: boolean): boolean {\r\n\t\tif (!state.isAcceptState) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (state.configs.conflictingAlts == null) {\r\n\t\t\t// unambiguous\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// More picky when we need exact conflicts\r\n\t\tif (useContext && this.predictionMode === PredictionMode.LL_EXACT_AMBIG_DETECTION) {\r\n\t\t\treturn state.configs.isExactConflict;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/** Performs ATN simulation to compute a predicted alternative based\r\n\t * upon the remaining input, but also updates the DFA cache to avoid\r\n\t * having to traverse the ATN again for the same input sequence.\r\n\t *\r\n\t * There are some key conditions we're looking for after computing a new\r\n\t * set of ATN configs (proposed DFA state):\r\n\t *\r\n\t * * if the set is empty, there is no viable alternative for current symbol\r\n\t * * does the state uniquely predict an alternative?\r\n\t * * does the state have a conflict that would prevent us from\r\n\t * putting it on the work list?\r\n\t * * if in non-greedy decision is there a config at a rule stop state?\r\n\t *\r\n\t * We also have some key operations to do:\r\n\t *\r\n\t * * add an edge from previous DFA state to potentially new DFA state, D,\r\n\t * upon current symbol but only if adding to work list, which means in all\r\n\t * cases except no viable alternative (and possibly non-greedy decisions?)\r\n\t * * collecting predicates and adding semantic context to DFA accept states\r\n\t * * adding rule context to context-sensitive DFA accept states\r\n\t * * consuming an input symbol\r\n\t * * reporting a conflict\r\n\t * * reporting an ambiguity\r\n\t * * reporting a context sensitivity\r\n\t * * reporting insufficient predicates\r\n\t *\r\n\t * We should isolate those operations, which are side-effecting, to the\r\n\t * main work loop. We can isolate lots of code into other functions, but\r\n\t * they should be side effect free. They can return package that\r\n\t * indicates whether we should report something, whether we need to add a\r\n\t * DFA edge, whether we need to augment accept state with semantic\r\n\t * context or rule invocation context. Actually, it seems like we always\r\n\t * add predicates if they exist, so that can simply be done in the main\r\n\t * loop for any accept state creation or modification request.\r\n\t *\r\n\t * cover these cases:\r\n\t * dead end\r\n\t * single alt\r\n\t * single alt + preds\r\n\t * conflict\r\n\t * conflict + preds\r\n\t *\r\n\t * TODO: greedy + those\r\n\t */\r\n\tprotected execATN(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull input: TokenStream, startIndex: number,\r\n\t\t@NotNull initialState: SimulatorState): number {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"execATN decision \" + dfa.decision + \" exec LA(1)==\" + this.getLookaheadName(input));\r\n\t\t}\r\n\r\n\t\tlet outerContext: ParserRuleContext = initialState.outerContext;\r\n\t\tlet useContext: boolean = initialState.useContext;\r\n\r\n\t\tlet t: number = input.LA(1);\r\n\r\n\t\tlet previous: SimulatorState = initialState;\r\n\r\n\t\tlet contextCache: PredictionContextCache = new PredictionContextCache();\r\n\t\twhile (true) { // while more work\r\n\t\t\tlet nextState: SimulatorState | undefined = this.computeReachSet(dfa, previous, t, contextCache);\r\n\t\t\tif (nextState == null) {\r\n\t\t\t\tthis.setDFAEdge(previous.s0, input.LA(1), ATNSimulator.ERROR);\r\n\t\t\t\treturn this.handleNoViableAlt(input, startIndex, previous);\r\n\t\t\t}\r\n\r\n\t\t\tlet D: DFAState = nextState.s0;\r\n\r\n\t\t\t// predicted alt => accept state\r\n\t\t\tassert(D.isAcceptState || D.prediction === ATN.INVALID_ALT_NUMBER);\r\n\t\t\t// conflicted => accept state\r\n\t\t\tassert(D.isAcceptState || D.configs.conflictInfo == null);\r\n\r\n\t\t\tif (this.isAcceptState(D, useContext)) {\r\n\t\t\t\tlet conflictingAlts: BitSet | undefined = D.configs.conflictingAlts;\r\n\t\t\t\tlet predictedAlt: number = conflictingAlts == null ? D.prediction : ATN.INVALID_ALT_NUMBER;\r\n\t\t\t\tif (predictedAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\t\tif (this.optimize_ll1\r\n\t\t\t\t\t\t&& input.index === startIndex\r\n\t\t\t\t\t\t&& !dfa.isPrecedenceDfa\r\n\t\t\t\t\t\t&& nextState.outerContext === nextState.remainingOuterContext\r\n\t\t\t\t\t\t&& dfa.decision >= 0\r\n\t\t\t\t\t\t&& !D.configs.hasSemanticContext) {\r\n\t\t\t\t\t\tif (t >= 0 && t <= MAX_SHORT_VALUE) {\r\n\t\t\t\t\t\t\tlet key: number = ((dfa.decision << 16) >>> 0) + t;\r\n\t\t\t\t\t\t\tthis.atn.LL1Table.set(key, predictedAlt);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (useContext && this.always_try_local_context) {\r\n\t\t\t\t\t\tthis.reportContextSensitivity(dfa, predictedAlt, nextState, startIndex, input.index);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpredictedAlt = D.prediction;\r\n//\t\t\t\tint k = input.index - startIndex + 1; // how much input we used\r\n//\t\t\t\tSystem.out.println(\"used k=\"+k);\r\n\t\t\t\tlet attemptFullContext: boolean = conflictingAlts != null && this.userWantsCtxSensitive;\r\n\t\t\t\tif (attemptFullContext) {\r\n\t\t\t\t\t// Only exact conflicts are known to be ambiguous when local\r\n\t\t\t\t\t// prediction does not step out of the decision rule.\r\n\t\t\t\t\tattemptFullContext = !useContext\r\n\t\t\t\t\t\t&& (D.configs.dipsIntoOuterContext || !D.configs.isExactConflict)\r\n\t\t\t\t\t\t&& (!this.treat_sllk1_conflict_as_ambiguity || input.index !== startIndex);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (D.configs.hasSemanticContext) {\r\n\t\t\t\t\tlet predPredictions: DFAState.PredPrediction[] | undefined = D.predicates;\r\n\t\t\t\t\tif (predPredictions != null) {\r\n\t\t\t\t\t\tlet conflictIndex: number = input.index;\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// use complete evaluation here if we'll want to retry with full context if still ambiguous\r\n\t\t\t\t\t\tconflictingAlts = this.evalSemanticContext(predPredictions, outerContext, attemptFullContext || this.reportAmbiguities);\r\n\t\t\t\t\t\tswitch (conflictingAlts.cardinality()) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\tthrow this.noViableAlt(input, outerContext, D.configs, startIndex);\r\n\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn conflictingAlts.nextSetBit(0);\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (conflictIndex !== startIndex) {\r\n\t\t\t\t\t\t\t// restore the index so reporting the fallback to full\r\n\t\t\t\t\t\t\t// context occurs with the index at the correct spot\r\n\t\t\t\t\t\t\tinput.seek(conflictIndex);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!attemptFullContext) {\r\n\t\t\t\t\tif (conflictingAlts != null) {\r\n\t\t\t\t\t\tif (this.reportAmbiguities && conflictingAlts.cardinality() > 1) {\r\n\t\t\t\t\t\t\tthis.reportAmbiguity(dfa, D, startIndex, input.index, D.configs.isExactConflict, conflictingAlts, D.configs);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpredictedAlt = conflictingAlts.nextSetBit(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn predictedAlt;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tassert(!useContext);\r\n\t\t\t\t\tassert(this.isAcceptState(D, false));\r\n\r\n\t\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\t\tconsole.log(\"RETRY with outerContext=\" + outerContext);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet fullContextState: SimulatorState = this.computeStartState(dfa, outerContext, true);\r\n\t\t\t\t\tif (this.reportAmbiguities) {\r\n\t\t\t\t\t\tthis.reportAttemptingFullContext(dfa, conflictingAlts, nextState, startIndex, input.index);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\treturn this.execATN(dfa, input, startIndex, fullContextState);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tprevious = nextState;\r\n\r\n\t\t\tif (t !== IntStream.EOF) {\r\n\t\t\t\tinput.consume();\r\n\t\t\t\tt = input.LA(1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This method is used to improve the localization of error messages by\r\n\t * choosing an alternative rather than throwing a\r\n\t * {@link NoViableAltException} in particular prediction scenarios where the\r\n\t * {@link #ERROR} state was reached during ATN simulation.\r\n\t *\r\n\t * The default implementation of this method uses the following\r\n\t * algorithm to identify an ATN configuration which successfully parsed the\r\n\t * decision entry rule. Choosing such an alternative ensures that the\r\n\t * {@link ParserRuleContext} returned by the calling rule will be complete\r\n\t * and valid, and the syntax error will be reported later at a more\r\n\t * localized location.\r\n\t *\r\n\t * * If no configuration in `configs` reached the end of the\r\n\t * decision rule, return {@link ATN#INVALID_ALT_NUMBER}.\r\n\t * * If all configurations in `configs` which reached the end of the\r\n\t * decision rule predict the same alternative, return that alternative.\r\n\t * * If the configurations in `configs` which reached the end of the\r\n\t * decision rule predict multiple alternatives (call this *S*),\r\n\t * choose an alternative in the following order.\r\n\t *\r\n\t * 1. Filter the configurations in `configs` to only those\r\n\t * configurations which remain viable after evaluating semantic predicates.\r\n\t * If the set of these filtered configurations which also reached the end of\r\n\t * the decision rule is not empty, return the minimum alternative\r\n\t * represented in this set.\r\n\t * 1. Otherwise, choose the minimum alternative in *S*.\r\n\t *\r\n\t * In some scenarios, the algorithm described above could predict an\r\n\t * alternative which will result in a {@link FailedPredicateException} in\r\n\t * parser. Specifically, this could occur if the *only* configuration\r\n\t * capable of successfully parsing to the end of the decision rule is\r\n\t * blocked by a semantic predicate. By choosing this alternative within\r\n\t * {@link #adaptivePredict} instead of throwing a\r\n\t * {@link NoViableAltException}, the resulting\r\n\t * {@link FailedPredicateException} in the parser will identify the specific\r\n\t * predicate which is preventing the parser from successfully parsing the\r\n\t * decision rule, which helps developers identify and correct logic errors\r\n\t * in semantic predicates.\r\n\t *\r\n\t * @param input The input {@link TokenStream}\r\n\t * @param startIndex The start index for the current prediction, which is\r\n\t * the input index where any semantic context in `configs` should be\r\n\t * evaluated\r\n\t * @param previous The ATN simulation state immediately before the\r\n\t * {@link #ERROR} state was reached\r\n\t *\r\n\t * @returns The value to return from {@link #adaptivePredict}, or\r\n\t * {@link ATN#INVALID_ALT_NUMBER} if a suitable alternative was not\r\n\t * identified and {@link #adaptivePredict} should report an error instead.\r\n\t */\r\n\tprotected handleNoViableAlt(@NotNull input: TokenStream, startIndex: number, @NotNull previous: SimulatorState): number {\r\n\t\tif (previous.s0 != null) {\r\n\t\t\tlet alts: BitSet = new BitSet();\r\n\t\t\tlet maxAlt: number = 0;\r\n\t\t\tfor (let config of previous.s0.configs) {\r\n\t\t\t\tif (config.reachesIntoOuterContext || config.state instanceof RuleStopState) {\r\n\t\t\t\t\talts.set(config.alt);\r\n\t\t\t\t\tmaxAlt = Math.max(maxAlt, config.alt);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tswitch (alts.cardinality()) {\r\n\t\t\tcase 0:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 1:\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif (!previous.s0.configs.hasSemanticContext) {\r\n\t\t\t\t\t// configs doesn't contain any predicates, so the predicate\r\n\t\t\t\t\t// filtering code below would be pointless\r\n\t\t\t\t\treturn alts.nextSetBit(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Try to find a configuration set that not only dipped into the outer\r\n\t\t\t\t * context, but also isn't eliminated by a predicate.\r\n\t\t\t\t */\r\n\t\t\t\tlet filteredConfigs: ATNConfigSet = new ATNConfigSet();\r\n\t\t\t\tfor (let config of previous.s0.configs) {\r\n\t\t\t\t\tif (config.reachesIntoOuterContext || config.state instanceof RuleStopState) {\r\n\t\t\t\t\t\tfilteredConfigs.add(config);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* The following code blocks are adapted from predicateDFAState with\r\n\t\t\t\t * the following key changes.\r\n\t\t\t\t *\r\n\t\t\t\t * 1. The code operates on an ATNConfigSet rather than a DFAState.\r\n\t\t\t\t * 2. Predicates are collected for all alternatives represented in\r\n\t\t\t\t * filteredConfigs, rather than restricting the evaluation to\r\n\t\t\t\t * conflicting and/or unique configurations.\r\n\t\t\t\t */\r\n\t\t\t\tlet altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(alts, filteredConfigs, maxAlt);\r\n\t\t\t\tif (altToPred != null) {\r\n\t\t\t\t\tlet predicates: DFAState.PredPrediction[] | undefined = this.getPredicatePredictions(alts, altToPred);\r\n\t\t\t\t\tif (predicates != null) {\r\n\t\t\t\t\t\tlet stopIndex: number = input.index;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tinput.seek(startIndex);\r\n\t\t\t\t\t\t\tlet filteredAlts: BitSet = this.evalSemanticContext(predicates, previous.outerContext, false);\r\n\t\t\t\t\t\t\tif (!filteredAlts.isEmpty) {\r\n\t\t\t\t\t\t\t\treturn filteredAlts.nextSetBit(0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfinally {\r\n\t\t\t\t\t\t\tinput.seek(stopIndex);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn alts.nextSetBit(0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthrow this.noViableAlt(input, previous.outerContext, previous.s0.configs, startIndex);\r\n\t}\r\n\r\n\tprotected computeReachSet(dfa: DFA, previous: SimulatorState, t: number, contextCache: PredictionContextCache): SimulatorState | undefined {\r\n\t\tlet useContext: boolean = previous.useContext;\r\n\t\tlet remainingGlobalContext: ParserRuleContext | undefined = previous.remainingOuterContext;\r\n\r\n\t\tlet s: DFAState = previous.s0;\r\n\t\tif (useContext) {\r\n\t\t\twhile (s.isContextSymbol(t)) {\r\n\t\t\t\tlet next: DFAState | undefined;\r\n\t\t\t\tif (remainingGlobalContext != null) {\r\n\t\t\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\t\t\tnext = s.getContextTarget(this.getReturnState(remainingGlobalContext));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (next == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tassert(remainingGlobalContext != null);\r\n\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\ts = next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tassert(!this.isAcceptState(s, useContext));\r\n\t\tif (this.isAcceptState(s, useContext)) {\r\n\t\t\treturn new SimulatorState(previous.outerContext, s, useContext, remainingGlobalContext);\r\n\t\t}\r\n\r\n\t\tlet s0: DFAState = s;\r\n\r\n\t\tlet target: DFAState | undefined = this.getExistingTargetState(s0, t);\r\n\t\tif (target == null) {\r\n\t\t\tlet result: [DFAState, ParserRuleContext | undefined] = this.computeTargetState(dfa, s0, remainingGlobalContext, t, useContext, contextCache);\r\n\t\t\ttarget = result[0];\r\n\t\t\tremainingGlobalContext = result[1];\r\n\t\t}\r\n\r\n\t\tif (target === ATNSimulator.ERROR) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tassert(!useContext || !target.configs.dipsIntoOuterContext);\r\n\t\treturn new SimulatorState(previous.outerContext, target, useContext, remainingGlobalContext);\r\n\t}\r\n\r\n\t/**\r\n\t * Get an existing target state for an edge in the DFA. If the target state\r\n\t * for the edge has not yet been computed or is otherwise not available,\r\n\t * this method returns `undefined`.\r\n\t *\r\n\t * @param s The current DFA state\r\n\t * @param t The next input symbol\r\n\t * @returns The existing target DFA state for the given input symbol\r\n\t * `t`, or `undefined` if the target state for this edge is not\r\n\t * already cached\r\n\t */\r\n\tprotected getExistingTargetState(@NotNull s: DFAState, t: number): DFAState | undefined {\r\n\t\treturn s.getTarget(t);\r\n\t}\r\n\r\n\t/**\r\n\t * Compute a target state for an edge in the DFA, and attempt to add the\r\n\t * computed state and corresponding edge to the DFA.\r\n\t *\r\n\t * @param dfa\r\n\t * @param s The current DFA state\r\n\t * @param remainingGlobalContext\r\n\t * @param t The next input symbol\r\n\t * @param useContext\r\n\t * @param contextCache\r\n\t *\r\n\t * @returns The computed target DFA state for the given input symbol\r\n\t * `t`. If `t` does not lead to a valid DFA state, this method\r\n\t * returns {@link #ERROR}.\r\n\t */\r\n\t@NotNull\r\n\tprotected computeTargetState(@NotNull dfa: DFA, @NotNull s: DFAState, remainingGlobalContext: ParserRuleContext | undefined, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] {\r\n\t\tlet closureConfigs: ATNConfig[] = s.configs.toArray();\r\n\t\tlet contextElements: IntegerList | undefined;\r\n\t\tlet reach: ATNConfigSet = new ATNConfigSet();\r\n\t\tlet stepIntoGlobal: boolean;\r\n\t\tdo {\r\n\t\t\tlet hasMoreContext: boolean = !useContext || remainingGlobalContext != null;\r\n\t\t\tif (!hasMoreContext) {\r\n\t\t\t\treach.isOutermostConfigSet = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet reachIntermediate: ATNConfigSet = new ATNConfigSet();\r\n\r\n\t\t\t/* Configurations already in a rule stop state indicate reaching the end\r\n\t\t\t * of the decision rule (local context) or end of the start rule (full\r\n\t\t\t * context). Once reached, these configurations are never updated by a\r\n\t\t\t * closure operation, so they are handled separately for the performance\r\n\t\t\t * advantage of having a smaller intermediate set when calling closure.\r\n\t\t\t *\r\n\t\t\t * For full-context reach operations, separate handling is required to\r\n\t\t\t * ensure that the alternative matching the longest overall sequence is\r\n\t\t\t * chosen when multiple such configurations can match the input.\r\n\t\t\t */\r\n\t\t\tlet skippedStopStates: ATNConfig[] | undefined;\r\n\r\n\t\t\tfor (let c of closureConfigs) {\r\n\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\tconsole.log(\"testing \" + this.getTokenName(t) + \" at \" + c.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\t\tassert(c.context.isEmpty);\r\n\t\t\t\t\tif (useContext && !c.reachesIntoOuterContext || t === IntStream.EOF) {\r\n\t\t\t\t\t\tif (skippedStopStates == null) {\r\n\t\t\t\t\t\t\tskippedStopStates = [];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tskippedStopStates.push(c);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet n: number = c.state.numberOfOptimizedTransitions;\r\n\t\t\t\tfor (let ti = 0; ti < n; ti++) { // for each optimized transition\r\n\t\t\t\t\tlet trans: Transition = c.state.getOptimizedTransition(ti);\r\n\t\t\t\t\tlet target: ATNState | undefined = this.getReachableTarget(c, trans, t);\r\n\t\t\t\t\tif (target != null) {\r\n\t\t\t\t\t\treachIntermediate.add(c.transform(target, false), contextCache);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* This block optimizes the reach operation for intermediate sets which\r\n\t\t\t * trivially indicate a termination state for the overall\r\n\t\t\t * adaptivePredict operation.\r\n\t\t\t *\r\n\t\t\t * The conditions assume that intermediate\r\n\t\t\t * contains all configurations relevant to the reach set, but this\r\n\t\t\t * condition is not true when one or more configurations have been\r\n\t\t\t * withheld in skippedStopStates, or when the current symbol is EOF.\r\n\t\t\t */\r\n\t\t\tif (this.optimize_unique_closure && skippedStopStates == null && t !== Token.EOF && reachIntermediate.uniqueAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\treachIntermediate.isOutermostConfigSet = reach.isOutermostConfigSet;\r\n\t\t\t\treach = reachIntermediate;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t/* If the reach set could not be trivially determined, perform a closure\r\n\t\t\t * operation on the intermediate set to compute its initial value.\r\n\t\t\t */\r\n\t\t\tlet collectPredicates: boolean = false;\r\n\t\t\tlet treatEofAsEpsilon: boolean = t === Token.EOF;\r\n\t\t\tthis.closure(reachIntermediate, reach, collectPredicates, hasMoreContext, contextCache, treatEofAsEpsilon);\r\n\t\t\tstepIntoGlobal = reach.dipsIntoOuterContext;\r\n\r\n\t\t\tif (t === IntStream.EOF) {\r\n\t\t\t\t/* After consuming EOF no additional input is possible, so we are\r\n\t\t\t\t * only interested in configurations which reached the end of the\r\n\t\t\t\t * decision rule (local context) or end of the start rule (full\r\n\t\t\t\t * context). Update reach to contain only these configurations. This\r\n\t\t\t\t * handles both explicit EOF transitions in the grammar and implicit\r\n\t\t\t\t * EOF transitions following the end of the decision or start rule.\r\n\t\t\t\t *\r\n\t\t\t\t * This is handled before the configurations in skippedStopStates,\r\n\t\t\t\t * because any configurations potentially added from that list are\r\n\t\t\t\t * already guaranteed to meet this condition whether or not it's\r\n\t\t\t\t * required.\r\n\t\t\t\t */\r\n\t\t\t\treach = this.removeAllConfigsNotInRuleStopState(reach, contextCache);\r\n\t\t\t}\r\n\r\n\t\t\t/* If skippedStopStates is not undefined, then it contains at least one\r\n\t\t\t * configuration. For full-context reach operations, these\r\n\t\t\t * configurations reached the end of the start rule, in which case we\r\n\t\t\t * only add them back to reach if no configuration during the current\r\n\t\t\t * closure operation reached such a state. This ensures adaptivePredict\r\n\t\t\t * chooses an alternative matching the longest overall sequence when\r\n\t\t\t * multiple alternatives are viable.\r\n\t\t\t */\r\n\t\t\tif (skippedStopStates != null && (!useContext || !PredictionMode.hasConfigInRuleStopState(reach))) {\r\n\t\t\t\tassert(skippedStopStates.length > 0);\r\n\t\t\t\tfor (let c of skippedStopStates) {\r\n\t\t\t\t\treach.add(c, contextCache);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (useContext && stepIntoGlobal) {\r\n\t\t\t\treach.clear();\r\n\r\n\t\t\t\t// We know remainingGlobalContext is not undefined at this point (why?)\r\n\t\t\t\tremainingGlobalContext = remainingGlobalContext as ParserRuleContext;\r\n\r\n\t\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\t\tlet nextContextElement: number = this.getReturnState(remainingGlobalContext);\r\n\t\t\t\tif (contextElements == null) {\r\n\t\t\t\t\tcontextElements = new IntegerList();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontextElements.add(nextContextElement);\r\n\t\t\t\tif (nextContextElement !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tfor (let i = 0; i < closureConfigs.length; i++) {\r\n\t\t\t\t\t\tclosureConfigs[i] = closureConfigs[i].appendContext(nextContextElement, contextCache);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (useContext && stepIntoGlobal);\r\n\r\n\t\tif (reach.isEmpty) {\r\n\t\t\tthis.setDFAEdge(s, t, ATNSimulator.ERROR);\r\n\t\t\treturn [ATNSimulator.ERROR, remainingGlobalContext];\r\n\t\t}\r\n\r\n\t\tlet result: DFAState = this.addDFAEdge(dfa, s, t, contextElements, reach, contextCache);\r\n\t\treturn [result, remainingGlobalContext];\r\n\t}\r\n\r\n\t/**\r\n\t * Return a configuration set containing only the configurations from\r\n\t * `configs` which are in a {@link RuleStopState}. If all\r\n\t * configurations in `configs` are already in a rule stop state, this\r\n\t * method simply returns `configs`.\r\n\t *\r\n\t * @param configs the configuration set to update\r\n\t * @param contextCache the {@link PredictionContext} cache\r\n\t *\r\n\t * @returns `configs` if all configurations in `configs` are in a\r\n\t * rule stop state, otherwise return a new configuration set containing only\r\n\t * the configurations from `configs` which are in a rule stop state\r\n\t */\r\n\t@NotNull\r\n\tprotected removeAllConfigsNotInRuleStopState(@NotNull configs: ATNConfigSet, contextCache: PredictionContextCache): ATNConfigSet {\r\n\t\tif (PredictionMode.allConfigsInRuleStopStates(configs)) {\r\n\t\t\treturn configs;\r\n\t\t}\r\n\r\n\t\tlet result: ATNConfigSet = new ATNConfigSet();\r\n\t\tfor (let config of configs) {\r\n\t\t\tif (!(config.state instanceof RuleStopState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tresult.add(config, contextCache);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected computeStartState(\r\n\t\tdfa: DFA,\r\n\t\tglobalContext: ParserRuleContext,\r\n\t\tuseContext: boolean): SimulatorState {\r\n\t\tlet s0: DFAState | undefined =\r\n\t\t\tdfa.isPrecedenceDfa ? dfa.getPrecedenceStartState(this._parser.precedence, useContext) :\r\n\t\t\t\tuseContext ? dfa.s0full :\r\n\t\t\t\t\tdfa.s0;\r\n\r\n\t\tif (s0 != null) {\r\n\t\t\tif (!useContext) {\r\n\t\t\t\treturn new SimulatorState(globalContext, s0, useContext, globalContext);\r\n\t\t\t}\r\n\r\n\t\t\ts0.setContextSensitive(this.atn);\r\n\t\t}\r\n\r\n\t\tlet decision: number = dfa.decision;\r\n\t\t// @NotNull\r\n\t\tlet p: ATNState = dfa.atnStartState;\r\n\r\n\t\tlet previousContext: number = 0;\r\n\t\tlet remainingGlobalContext: ParserRuleContext | undefined = globalContext;\r\n\t\tlet initialContext: PredictionContext = useContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL; // always at least the implicit call to start rule\r\n\t\tlet contextCache: PredictionContextCache = new PredictionContextCache();\r\n\t\tif (useContext) {\r\n\t\t\tif (!this.enable_global_context_dfa) {\r\n\t\t\t\twhile (remainingGlobalContext != null) {\r\n\t\t\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\t\t\tpreviousContext = PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpreviousContext = this.getReturnState(remainingGlobalContext);\r\n\t\t\t\t\t\tinitialContext = initialContext.appendSingleContext(previousContext, contextCache);\r\n\t\t\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\twhile (s0 != null && s0.isContextSensitive && remainingGlobalContext != null) {\r\n\t\t\t\tlet next: DFAState | undefined;\r\n\t\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\t\tnext = s0.getContextTarget(PredictionContext.EMPTY_FULL_STATE_KEY);\r\n\t\t\t\t\tpreviousContext = PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpreviousContext = this.getReturnState(remainingGlobalContext);\r\n\t\t\t\t\tnext = s0.getContextTarget(previousContext);\r\n\t\t\t\t\tinitialContext = initialContext.appendSingleContext(previousContext, contextCache);\r\n\t\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (next == null) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ts0 = next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (s0 != null && !s0.isContextSensitive) {\r\n\t\t\treturn new SimulatorState(globalContext, s0, useContext, remainingGlobalContext);\r\n\t\t}\r\n\r\n\t\tlet configs: ATNConfigSet = new ATNConfigSet();\r\n\t\twhile (true) {\r\n\t\t\tlet reachIntermediate: ATNConfigSet = new ATNConfigSet();\r\n\t\t\tlet n: number = p.numberOfTransitions;\r\n\t\t\tfor (let ti = 0; ti < n; ti++) {\r\n\t\t\t\t// for each transition\r\n\t\t\t\tlet target: ATNState = p.transition(ti).target;\r\n\t\t\t\treachIntermediate.add(ATNConfig.create(target, ti + 1, initialContext));\r\n\t\t\t}\r\n\r\n\t\t\tlet hasMoreContext: boolean = remainingGlobalContext != null;\r\n\t\t\tif (!hasMoreContext) {\r\n\t\t\t\tconfigs.isOutermostConfigSet = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet collectPredicates: boolean = true;\r\n\t\t\tthis.closure(reachIntermediate, configs, collectPredicates, hasMoreContext, contextCache, false);\r\n\t\t\tlet stepIntoGlobal: boolean = configs.dipsIntoOuterContext;\r\n\r\n\t\t\tlet next: DFAState;\r\n\t\t\tif (useContext && !this.enable_global_context_dfa) {\r\n\t\t\t\ts0 = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse if (s0 == null) {\r\n\t\t\t\tif (!dfa.isPrecedenceDfa) {\r\n\t\t\t\t\tnext = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\t\tif (useContext) {\r\n\t\t\t\t\t\tif (!dfa.s0full) {\r\n\t\t\t\t\t\t\tdfa.s0full = next;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnext = dfa.s0full;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (!dfa.s0) {\r\n\t\t\t\t\t\t\tdfa.s0 = next;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnext = dfa.s0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t/* If this is a precedence DFA, we use applyPrecedenceFilter\r\n\t\t\t\t\t * to convert the computed start state to a precedence start\r\n\t\t\t\t\t * state. We then use DFA.setPrecedenceStartState to set the\r\n\t\t\t\t\t * appropriate start state for the precedence level rather\r\n\t\t\t\t\t * than simply setting DFA.s0.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tconfigs = this.applyPrecedenceFilter(configs, globalContext, contextCache);\r\n\t\t\t\t\tnext = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\t\tdfa.setPrecedenceStartState(this._parser.precedence, useContext, next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (dfa.isPrecedenceDfa) {\r\n\t\t\t\t\tconfigs = this.applyPrecedenceFilter(configs, globalContext, contextCache);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext = this.addDFAState(dfa, configs, contextCache);\r\n\t\t\t\ts0.setContextTarget(previousContext, next);\r\n\t\t\t}\r\n\r\n\t\t\ts0 = next;\r\n\r\n\t\t\tif (!useContext || !stepIntoGlobal) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// TODO: make sure it distinguishes empty stack states\r\n\t\t\tnext.setContextSensitive(this.atn);\r\n\r\n\t\t\t// We know remainingGlobalContext is not undefined at this point (why?)\r\n\t\t\tremainingGlobalContext = remainingGlobalContext as ParserRuleContext;\r\n\r\n\t\t\tconfigs.clear();\r\n\t\t\tremainingGlobalContext = this.skipTailCalls(remainingGlobalContext);\r\n\t\t\tlet nextContextElement: number = this.getReturnState(remainingGlobalContext);\r\n\r\n\t\t\tif (remainingGlobalContext.isEmpty) {\r\n\t\t\t\tremainingGlobalContext = undefined;\r\n\t\t\t} else {\r\n\t\t\t\tremainingGlobalContext = remainingGlobalContext.parent;\r\n\t\t\t}\r\n\r\n\t\t\tif (nextContextElement !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\tinitialContext = initialContext.appendSingleContext(nextContextElement, contextCache);\r\n\t\t\t}\r\n\r\n\t\t\tpreviousContext = nextContextElement;\r\n\t\t}\r\n\r\n\t\treturn new SimulatorState(globalContext, s0, useContext, remainingGlobalContext);\r\n\t}\r\n\r\n\t/**\r\n\t * This method transforms the start state computed by\r\n\t * {@link #computeStartState} to the special start state used by a\r\n\t * precedence DFA for a particular precedence value. The transformation\r\n\t * process applies the following changes to the start state's configuration\r\n\t * set.\r\n\t *\r\n\t * 1. Evaluate the precedence predicates for each configuration using\r\n\t * {@link SemanticContext#evalPrecedence}.\r\n\t * 1. When {@link ATNConfig#isPrecedenceFilterSuppressed} is `false`,\r\n\t * remove all configurations which predict an alternative greater than 1,\r\n\t * for which another configuration that predicts alternative 1 is in the\r\n\t * same ATN state with the same prediction context. This transformation is\r\n\t * valid for the following reasons:\r\n\t *\r\n\t * * The closure block cannot contain any epsilon transitions which bypass\r\n\t * the body of the closure, so all states reachable via alternative 1 are\r\n\t * part of the precedence alternatives of the transformed left-recursive\r\n\t * rule.\r\n\t * * The \"primary\" portion of a left recursive rule cannot contain an\r\n\t * epsilon transition, so the only way an alternative other than 1 can exist\r\n\t * in a state that is also reachable via alternative 1 is by nesting calls\r\n\t * to the left-recursive rule, with the outer calls not being at the\r\n\t * preferred precedence level. The\r\n\t * {@link ATNConfig#isPrecedenceFilterSuppressed} property marks ATN\r\n\t * configurations which do not meet this condition, and therefore are not\r\n\t * eligible for elimination during the filtering process.\r\n\t *\r\n\t * The prediction context must be considered by this filter to address\r\n\t * situations like the following.\r\n\t *\r\n\t * ```antlr\r\n\t * grammar TA;\r\n\t * prog: statement* EOF;\r\n\t * statement: letterA | statement letterA 'b' ;\r\n\t * letterA: 'a';\r\n\t * ```\r\n\t *\r\n\t * If the above grammar, the ATN state immediately before the token\r\n\t * reference `'a'` in `letterA` is reachable from the left edge\r\n\t * of both the primary and closure blocks of the left-recursive rule\r\n\t * `statement`. The prediction context associated with each of these\r\n\t * configurations distinguishes between them, and prevents the alternative\r\n\t * which stepped out to `prog` (and then back in to `statement`\r\n\t * from being eliminated by the filter.\r\n\t *\r\n\t * @param configs The configuration set computed by\r\n\t * {@link #computeStartState} as the start state for the DFA.\r\n\t * @returns The transformed configuration set representing the start state\r\n\t * for a precedence DFA at a particular precedence level (determined by\r\n\t * calling {@link Parser#getPrecedence}).\r\n\t */\r\n\t@NotNull\r\n\tprotected applyPrecedenceFilter(@NotNull configs: ATNConfigSet, globalContext: ParserRuleContext, contextCache: PredictionContextCache): ATNConfigSet {\r\n\t\tlet statesFromAlt1: Map = new Map();\r\n\t\tlet configSet: ATNConfigSet = new ATNConfigSet();\r\n\t\tfor (let config of configs) {\r\n\t\t\t// handle alt 1 first\r\n\t\t\tif (config.alt !== 1) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet updatedContext: SemanticContext | undefined = config.semanticContext.evalPrecedence(this._parser, globalContext);\r\n\t\t\tif (updatedContext == null) {\r\n\t\t\t\t// the configuration was eliminated\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tstatesFromAlt1.set(config.state.stateNumber, config.context);\r\n\t\t\tif (updatedContext !== config.semanticContext) {\r\n\t\t\t\tconfigSet.add(config.transform(config.state, false, updatedContext), contextCache);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconfigSet.add(config, contextCache);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let config of configs) {\r\n\t\t\tif (config.alt === 1) {\r\n\t\t\t\t// already handled\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (!config.isPrecedenceFilterSuppressed) {\r\n\t\t\t\t/* In the future, this elimination step could be updated to also\r\n\t\t\t\t * filter the prediction context for alternatives predicting alt>1\r\n\t\t\t\t * (basically a graph subtraction algorithm).\r\n\t\t\t\t */\r\n\t\t\t\tlet context: PredictionContext | undefined = statesFromAlt1.get(config.state.stateNumber);\r\n\t\t\t\tif (context != null && context.equals(config.context)) {\r\n\t\t\t\t\t// eliminated\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconfigSet.add(config, contextCache);\r\n\t\t}\r\n\r\n\t\treturn configSet;\r\n\t}\r\n\r\n\tprotected getReachableTarget(@NotNull source: ATNConfig, @NotNull trans: Transition, ttype: number): ATNState | undefined {\r\n\t\tif (trans.matches(ttype, 0, this.atn.maxTokenType)) {\r\n\t\t\treturn trans.target;\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/** collect and set D's semantic context */\r\n\tprotected predicateDFAState(\r\n\t\tD: DFAState,\r\n\t\tconfigs: ATNConfigSet,\r\n\t\tnalts: number): DFAState.PredPrediction[] | undefined {\r\n\t\tlet conflictingAlts: BitSet | undefined = this.getConflictingAltsFromConfigSet(configs);\r\n\t\tif (!conflictingAlts) {\r\n\t\t\tthrow new Error(\"This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.\");\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"predicateDFAState \" + D);\r\n\t\t}\r\n\t\tlet altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(conflictingAlts, configs, nalts);\r\n\t\t// altToPred[uniqueAlt] is now our validating predicate (if any)\r\n\t\tlet predPredictions: DFAState.PredPrediction[] | undefined;\r\n\t\tif (altToPred != null) {\r\n\t\t\t// we have a validating predicate; test it\r\n\t\t\t// Update DFA so reach becomes accept state with predicate\r\n\t\t\tpredPredictions = this.getPredicatePredictions(conflictingAlts, altToPred);\r\n\t\t\tD.predicates = predPredictions;\r\n\t\t}\r\n\t\treturn predPredictions;\r\n\t}\r\n\r\n\tprotected getPredsForAmbigAlts(\r\n\t\t@NotNull ambigAlts: BitSet,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tnalts: number): SemanticContext[] | undefined {\r\n\t\t// REACH=[1|1|[]|0:0, 1|2|[]|0:1]\r\n\r\n\t\t/* altToPred starts as an array of all undefined contexts. The entry at index i\r\n\t\t * corresponds to alternative i. altToPred[i] may have one of three values:\r\n\t\t * 1. undefined: no ATNConfig c is found such that c.alt===i\r\n\t\t * 2. SemanticContext.NONE: At least one ATNConfig c exists such that\r\n\t\t * c.alt===i and c.semanticContext===SemanticContext.NONE. In other words,\r\n\t\t * alt i has at least one unpredicated config.\r\n\t\t * 3. Non-NONE Semantic Context: There exists at least one, and for all\r\n\t\t * ATNConfig c such that c.alt===i, c.semanticContext!==SemanticContext.NONE.\r\n\t\t *\r\n\t\t * From this, it is clear that NONE||anything==NONE.\r\n\t\t */\r\n\t\tlet altToPred: Array | undefined = new Array(nalts + 1);\r\n\t\tlet n: number = altToPred.length;\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (ambigAlts.get(c.alt)) {\r\n\t\t\t\taltToPred[c.alt] = SemanticContext.or(altToPred[c.alt], c.semanticContext);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet nPredAlts: number = 0;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tif (altToPred[i] == null) {\r\n\t\t\t\taltToPred[i] = SemanticContext.NONE;\r\n\t\t\t}\r\n\t\t\telse if (altToPred[i] !== SemanticContext.NONE) {\r\n\t\t\t\tnPredAlts++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// At this point we know `altToPred` doesn't contain any undefined entries\r\n\t\tlet result: SemanticContext[] | undefined = altToPred as SemanticContext[];\r\n\r\n\t\t// nonambig alts are undefined in result\r\n\t\tif (nPredAlts === 0) {\r\n\t\t\tresult = undefined;\r\n\t\t}\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"getPredsForAmbigAlts result \" + (result ? Arrays.toString(result) : \"undefined\"));\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tprotected getPredicatePredictions(ambigAlts: BitSet | undefined, altToPred: SemanticContext[]): DFAState.PredPrediction[] | undefined {\r\n\t\tlet pairs: DFAState.PredPrediction[] = [];\r\n\t\tlet containsPredicate: boolean = false;\r\n\t\tfor (let i = 1; i < altToPred.length; i++) {\r\n\t\t\tlet pred: SemanticContext = altToPred[i];\r\n\r\n\t\t\t// unpredicated is indicated by SemanticContext.NONE\r\n\t\t\tassert(pred != null);\r\n\r\n\t\t\t// find first unpredicated but ambig alternative, if any.\r\n\t\t\t// Only ambiguous alternatives will have SemanticContext.NONE.\r\n\t\t\t// Any unambig alts or ambig naked alts after first ambig naked are ignored\r\n\t\t\t// (undefined, i) means alt i is the default prediction\r\n\t\t\t// if no (undefined, i), then no default prediction.\r\n\t\t\tif (ambigAlts != null && ambigAlts.get(i) && pred === SemanticContext.NONE) {\r\n\t\t\t\tpairs.push(new DFAState.PredPrediction(pred, i));\r\n\t\t\t}\r\n\t\t\telse if (pred !== SemanticContext.NONE) {\r\n\t\t\t\tcontainsPredicate = true;\r\n\t\t\t\tpairs.push(new DFAState.PredPrediction(pred, i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!containsPredicate) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n//\t\tSystem.out.println(Arrays.toString(altToPred)+\"->\"+pairs);\r\n\t\treturn pairs;\r\n\t}\r\n\r\n\t/** Look through a list of predicate/alt pairs, returning alts for the\r\n\t * pairs that win. An `undefined` predicate indicates an alt containing an\r\n\t * unpredicated config which behaves as \"always true.\"\r\n\t */\r\n\tprotected evalSemanticContext(\r\n\t\t@NotNull predPredictions: DFAState.PredPrediction[],\r\n\t\touterContext: ParserRuleContext,\r\n\t\tcomplete: boolean): BitSet {\r\n\t\tlet predictions: BitSet = new BitSet();\r\n\t\tfor (let pair of predPredictions) {\r\n\t\t\tif (pair.pred === SemanticContext.NONE) {\r\n\t\t\t\tpredictions.set(pair.alt);\r\n\t\t\t\tif (!complete) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet evaluatedResult: boolean = this.evalSemanticContextImpl(pair.pred, outerContext, pair.alt);\r\n\t\t\tif (ParserATNSimulator.debug || ParserATNSimulator.dfa_debug) {\r\n\t\t\t\tconsole.log(\"eval pred \" + pair + \"=\" + evaluatedResult);\r\n\t\t\t}\r\n\r\n\t\t\tif (evaluatedResult) {\r\n\t\t\t\tif (ParserATNSimulator.debug || ParserATNSimulator.dfa_debug) {\r\n\t\t\t\t\tconsole.log(\"PREDICT \" + pair.alt);\r\n\t\t\t\t}\r\n\t\t\t\tpredictions.set(pair.alt);\r\n\t\t\t\tif (!complete) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn predictions;\r\n\t}\r\n\r\n\t/**\r\n\t * Evaluate a semantic context within a specific parser context.\r\n\t *\r\n\t * This method might not be called for every semantic context evaluated\r\n\t * during the prediction process. In particular, we currently do not\r\n\t * evaluate the following but it may change in the future:\r\n\t *\r\n\t * * Precedence predicates (represented by\r\n\t * {@link SemanticContext.PrecedencePredicate}) are not currently evaluated\r\n\t * through this method.\r\n\t * * Operator predicates (represented by {@link SemanticContext.AND} and\r\n\t * {@link SemanticContext.OR}) are evaluated as a single semantic\r\n\t * context, rather than evaluating the operands individually.\r\n\t * Implementations which require evaluation results from individual\r\n\t * predicates should override this method to explicitly handle evaluation of\r\n\t * the operands within operator predicates.\r\n\t *\r\n\t * @param pred The semantic context to evaluate\r\n\t * @param parserCallStack The parser context in which to evaluate the\r\n\t * semantic context\r\n\t * @param alt The alternative which is guarded by `pred`\r\n\t *\r\n\t * @since 4.3\r\n\t */\r\n\tprotected evalSemanticContextImpl(@NotNull pred: SemanticContext, parserCallStack: ParserRuleContext, alt: number): boolean {\r\n\t\treturn pred.eval(this._parser, parserCallStack);\r\n\t}\r\n\r\n\t/* TODO: If we are doing predicates, there is no point in pursuing\r\n\t\t closure operations if we reach a DFA state that uniquely predicts\r\n\t\t alternative. We will not be caching that DFA state and it is a\r\n\t\t waste to pursue the closure. Might have to advance when we do\r\n\t\t ambig detection thought :(\r\n\t\t */\r\n\r\n\tprotected closure(\r\n\t\tsourceConfigs: ATNConfigSet,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tcollectPredicates: boolean,\r\n\t\thasMoreContext: boolean,\r\n\t\t@Nullable contextCache: PredictionContextCache,\r\n\t\ttreatEofAsEpsilon: boolean): void {\r\n\t\tif (contextCache == null) {\r\n\t\t\tcontextCache = PredictionContextCache.UNCACHED;\r\n\t\t}\r\n\r\n\t\tlet currentConfigs: ATNConfigSet = sourceConfigs;\r\n\t\tlet closureBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE);\r\n\t\twhile (currentConfigs.size > 0) {\r\n\t\t\tlet intermediate: ATNConfigSet = new ATNConfigSet();\r\n\t\t\tfor (let config of currentConfigs) {\r\n\t\t\t\tthis.closureImpl(config, configs, intermediate, closureBusy, collectPredicates, hasMoreContext, contextCache, 0, treatEofAsEpsilon);\r\n\t\t\t}\r\n\r\n\t\t\tcurrentConfigs = intermediate;\r\n\t\t}\r\n\t}\r\n\r\n\tprotected closureImpl(\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\t@Nullable intermediate: ATNConfigSet,\r\n\t\t@NotNull closureBusy: Array2DHashSet,\r\n\t\tcollectPredicates: boolean,\r\n\t\thasMoreContexts: boolean,\r\n\t\t@NotNull contextCache: PredictionContextCache,\r\n\t\tdepth: number,\r\n\t\ttreatEofAsEpsilon: boolean): void {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"closure(\" + config.toString(this._parser, true) + \")\");\r\n\t\t}\r\n\r\n\t\tif (config.state instanceof RuleStopState) {\r\n\t\t\t// We hit rule end. If we have context info, use it\r\n\t\t\tif (!config.context.isEmpty) {\r\n\t\t\t\tlet hasEmpty: boolean = config.context.hasEmpty;\r\n\t\t\t\tlet nonEmptySize: number = config.context.size - (hasEmpty ? 1 : 0);\r\n\t\t\t\tfor (let i = 0; i < nonEmptySize; i++) {\r\n\t\t\t\t\tlet newContext: PredictionContext = config.context.getParent(i); // \"pop\" return state\r\n\t\t\t\t\tlet returnState: ATNState = this.atn.states[config.context.getReturnState(i)];\r\n\t\t\t\t\tlet c: ATNConfig = ATNConfig.create(returnState, config.alt, newContext, config.semanticContext);\r\n\t\t\t\t\t// While we have context to pop back from, we may have\r\n\t\t\t\t\t// gotten that context AFTER having fallen off a rule.\r\n\t\t\t\t\t// Make sure we track that we are now out of context.\r\n\t\t\t\t\tc.outerContextDepth = config.outerContextDepth;\r\n\t\t\t\t\tc.isPrecedenceFilterSuppressed = config.isPrecedenceFilterSuppressed;\r\n\t\t\t\t\tassert(depth > MIN_INTEGER_VALUE);\r\n\t\t\t\t\tthis.closureImpl(c, configs, intermediate, closureBusy, collectPredicates, hasMoreContexts, contextCache, depth - 1, treatEofAsEpsilon);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!hasEmpty || !hasMoreContexts) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig = config.transform(config.state, false, PredictionContext.EMPTY_LOCAL);\r\n\t\t\t}\r\n\t\t\telse if (!hasMoreContexts) {\r\n\t\t\t\tconfigs.add(config, contextCache);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// else if we have no context info, just chase follow links (if greedy)\r\n\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\tconsole.log(\"FALLING off rule \" +\r\n\t\t\t\t\t\tthis.getRuleName(config.state.ruleIndex));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (config.context === PredictionContext.EMPTY_FULL) {\r\n\t\t\t\t\t// no need to keep full context overhead when we step out\r\n\t\t\t\t\tconfig = config.transform(config.state, false, PredictionContext.EMPTY_LOCAL);\r\n\t\t\t\t}\r\n\t\t\t\telse if (!config.reachesIntoOuterContext && PredictionContext.isEmptyLocal(config.context)) {\r\n\t\t\t\t\t// add stop state when leaving decision rule for the first time\r\n\t\t\t\t\tconfigs.add(config, contextCache);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet p: ATNState = config.state;\r\n\t\t// optimization\r\n\t\tif (!p.onlyHasEpsilonTransitions) {\r\n\t\t\tconfigs.add(config, contextCache);\r\n\t\t\t// make sure to not return here, because EOF transitions can act as\r\n\t\t\t// both epsilon transitions and non-epsilon transitions.\r\n\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\tconsole.log(\"added config \" + configs);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < p.numberOfOptimizedTransitions; i++) {\r\n\t\t\t// This block implements first-edge elimination of ambiguous LR\r\n\t\t\t// alternatives as part of dynamic disambiguation during prediction.\r\n\t\t\t// See antlr/antlr4#1398.\r\n\t\t\tif (i === 0\r\n\t\t\t\t&& p.stateType === ATNStateType.STAR_LOOP_ENTRY\r\n\t\t\t\t&& (p as StarLoopEntryState).precedenceRuleDecision\r\n\t\t\t\t&& !config.context.hasEmpty) {\r\n\r\n\t\t\t\tlet precedenceDecision = p as StarLoopEntryState;\r\n\r\n\t\t\t\t// When suppress is true, it means the outgoing edge i==0 is\r\n\t\t\t\t// ambiguous with the outgoing edge i==1, and thus the closure\r\n\t\t\t\t// operation can dynamically disambiguate by suppressing this\r\n\t\t\t\t// edge during the closure operation.\r\n\t\t\t\tlet suppress: boolean = true;\r\n\t\t\t\tfor (let j: number = 0; j < config.context.size; j++) {\r\n\t\t\t\t\tif (!precedenceDecision.precedenceLoopbackStates.get(config.context.getReturnState(j))) {\r\n\t\t\t\t\t\tsuppress = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (suppress) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet t: Transition = p.getOptimizedTransition(i);\r\n\t\t\tlet continueCollecting: boolean =\r\n\t\t\t\t!(t instanceof ActionTransition) && collectPredicates;\r\n\t\t\tlet c: ATNConfig | undefined = this.getEpsilonTarget(config, t, continueCollecting, depth === 0, contextCache, treatEofAsEpsilon);\r\n\t\t\tif (c != null) {\r\n\t\t\t\tif (t instanceof RuleTransition) {\r\n\t\t\t\t\tif (intermediate != null && !collectPredicates) {\r\n\t\t\t\t\t\tintermediate.add(c, contextCache);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet newDepth: number = depth;\r\n\t\t\t\tif (config.state instanceof RuleStopState) {\r\n\t\t\t\t\t// target fell off end of rule; mark resulting c as having dipped into outer context\r\n\t\t\t\t\t// We can't get here if incoming config was rule stop and we had context\r\n\t\t\t\t\t// track how far we dip into outer context. Might\r\n\t\t\t\t\t// come in handy and we avoid evaluating context dependent\r\n\t\t\t\t\t// preds if this is > 0.\r\n\r\n\t\t\t\t\tif (this.dfa != null && this.dfa.isPrecedenceDfa) {\r\n\t\t\t\t\t\tlet outermostPrecedenceReturn: number = (t as EpsilonTransition).outermostPrecedenceReturn;\r\n\t\t\t\t\t\tif (outermostPrecedenceReturn === this.dfa.atnStartState.ruleIndex) {\r\n\t\t\t\t\t\t\tc.isPrecedenceFilterSuppressed = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tc.outerContextDepth = c.outerContextDepth + 1;\r\n\r\n\t\t\t\t\tif (!closureBusy.add(c)) {\r\n\t\t\t\t\t\t// avoid infinite recursion for right-recursive rules\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tassert(newDepth > MIN_INTEGER_VALUE);\r\n\t\t\t\t\tnewDepth--;\r\n\t\t\t\t\tif (ParserATNSimulator.debug) {\r\n\t\t\t\t\t\tconsole.log(\"dips into outer ctx: \" + c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (t instanceof RuleTransition) {\r\n\t\t\t\t\tif (this.optimize_tail_calls && t.optimizedTailCall && (!this.tail_call_preserves_sll || !PredictionContext.isEmptyLocal(config.context))) {\r\n\t\t\t\t\t\tassert(c.context === config.context);\r\n\t\t\t\t\t\tif (newDepth === 0) {\r\n\t\t\t\t\t\t\t// the pop/push of a tail call would keep the depth\r\n\t\t\t\t\t\t\t// constant, except we latch if it goes negative\r\n\t\t\t\t\t\t\tnewDepth--;\r\n\t\t\t\t\t\t\tif (!this.tail_call_preserves_sll && PredictionContext.isEmptyLocal(config.context)) {\r\n\t\t\t\t\t\t\t\t// make sure the SLL config \"dips into the outer context\" or prediction may not fall back to LL on conflict\r\n\t\t\t\t\t\t\t\tc.outerContextDepth = c.outerContextDepth + 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// latch when newDepth goes negative - once we step out of the entry context we can't return\r\n\t\t\t\t\t\tif (newDepth >= 0) {\r\n\t\t\t\t\t\t\tnewDepth++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (!t.isEpsilon && !closureBusy.add(c)) {\r\n\t\t\t\t\t\t// avoid infinite recursion for EOF* and EOF+\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.closureImpl(c, configs, intermediate, closureBusy, continueCollecting, hasMoreContexts, contextCache, newDepth, treatEofAsEpsilon);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getRuleName(index: number): string {\r\n\t\tif (this._parser != null && index >= 0) {\r\n\t\t\treturn this._parser.ruleNames[index];\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tprotected getEpsilonTarget(@NotNull config: ATNConfig, @NotNull t: Transition, collectPredicates: boolean, inContext: boolean, contextCache: PredictionContextCache, treatEofAsEpsilon: boolean): ATNConfig | undefined {\r\n\t\tswitch (t.serializationType) {\r\n\t\tcase TransitionType.RULE:\r\n\t\t\treturn this.ruleTransition(config, t as RuleTransition, contextCache);\r\n\r\n\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\treturn this.precedenceTransition(config, t as PrecedencePredicateTransition, collectPredicates, inContext);\r\n\r\n\t\tcase TransitionType.PREDICATE:\r\n\t\t\treturn this.predTransition(config, t as PredicateTransition, collectPredicates, inContext);\r\n\r\n\t\tcase TransitionType.ACTION:\r\n\t\t\treturn this.actionTransition(config, t as ActionTransition);\r\n\r\n\t\tcase TransitionType.EPSILON:\r\n\t\t\treturn config.transform(t.target, false);\r\n\r\n\t\tcase TransitionType.ATOM:\r\n\t\tcase TransitionType.RANGE:\r\n\t\tcase TransitionType.SET:\r\n\t\t\t// EOF transitions act like epsilon transitions after the first EOF\r\n\t\t\t// transition is traversed\r\n\t\t\tif (treatEofAsEpsilon) {\r\n\t\t\t\tif (t.matches(Token.EOF, 0, 1)) {\r\n\t\t\t\t\treturn config.transform(t.target, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn undefined;\r\n\r\n\t\tdefault:\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected actionTransition(@NotNull config: ATNConfig, @NotNull t: ActionTransition): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ACTION edge \" + t.ruleIndex + \":\" + t.actionIndex);\r\n\t\t}\r\n\t\treturn config.transform(t.target, false);\r\n\t}\r\n\r\n\t@Nullable\r\n\tprotected precedenceTransition(\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull pt: PrecedencePredicateTransition,\r\n\t\tcollectPredicates: boolean,\r\n\t\tinContext: boolean): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"PRED (collectPredicates=\" + collectPredicates + \") \" +\r\n\t\t\t\tpt.precedence + \">=_p\" +\r\n\t\t\t\t\", ctx dependent=true\");\r\n\t\t\tif (this._parser != null) {\r\n\t\t\t\tconsole.log(\"context surrounding pred is \" +\r\n\t\t\t\t\tthis._parser.getRuleInvocationStack());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet c: ATNConfig;\r\n\t\tif (collectPredicates && inContext) {\r\n\t\t\tlet newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate);\r\n\t\t\tc = config.transform(pt.target, false, newSemCtx);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tc = config.transform(pt.target, false);\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"config from pred transition=\" + c);\r\n\t\t}\r\n\t\treturn c;\r\n\t}\r\n\r\n\t@Nullable\r\n\tprotected predTransition(\r\n\t\t@NotNull config: ATNConfig,\r\n\t\t@NotNull pt: PredicateTransition,\r\n\t\tcollectPredicates: boolean,\r\n\t\tinContext: boolean): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"PRED (collectPredicates=\" + collectPredicates + \") \" +\r\n\t\t\t\tpt.ruleIndex + \":\" + pt.predIndex +\r\n\t\t\t\t\", ctx dependent=\" + pt.isCtxDependent);\r\n\t\t\tif (this._parser != null) {\r\n\t\t\t\tconsole.log(\"context surrounding pred is \" +\r\n\t\t\t\t\tthis._parser.getRuleInvocationStack());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet c: ATNConfig;\r\n\t\tif (collectPredicates &&\r\n\t\t\t(!pt.isCtxDependent || (pt.isCtxDependent && inContext))) {\r\n\t\t\tlet newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate);\r\n\t\t\tc = config.transform(pt.target, false, newSemCtx);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tc = config.transform(pt.target, false);\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"config from pred transition=\" + c);\r\n\t\t}\r\n\t\treturn c;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected ruleTransition(@NotNull config: ATNConfig, @NotNull t: RuleTransition, @Nullable contextCache: PredictionContextCache): ATNConfig {\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"CALL rule \" + this.getRuleName(t.target.ruleIndex) +\r\n\t\t\t\t\", ctx=\" + config.context);\r\n\t\t}\r\n\r\n\t\tlet returnState: ATNState = t.followState;\r\n\t\tlet newContext: PredictionContext;\r\n\r\n\t\tif (this.optimize_tail_calls && t.optimizedTailCall && (!this.tail_call_preserves_sll || !PredictionContext.isEmptyLocal(config.context))) {\r\n\t\t\tnewContext = config.context;\r\n\t\t}\r\n\t\telse if (contextCache != null) {\r\n\t\t\tnewContext = contextCache.getChild(config.context, returnState.stateNumber);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnewContext = config.context.getChild(returnState.stateNumber);\r\n\t\t}\r\n\r\n\t\treturn config.transform(t.target, false, newContext);\r\n\t}\r\n\r\n\tprivate static STATE_ALT_SORT_COMPARATOR: (o1: ATNConfig, o2: ATNConfig) => number =\r\n\t\t(o1: ATNConfig, o2: ATNConfig): number => {\r\n\t\t\tlet diff: number = o1.state.nonStopStateNumber - o2.state.nonStopStateNumber;\r\n\t\t\tif (diff !== 0) {\r\n\t\t\t\treturn diff;\r\n\t\t\t}\r\n\r\n\t\t\tdiff = o1.alt - o2.alt;\r\n\t\t\tif (diff !== 0) {\r\n\t\t\t\treturn diff;\r\n\t\t\t}\r\n\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\tprivate isConflicted(@NotNull configset: ATNConfigSet, contextCache: PredictionContextCache): ConflictInfo | undefined {\r\n\t\tif (configset.uniqueAlt !== ATN.INVALID_ALT_NUMBER || configset.size <= 1) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet configs: ATNConfig[] = configset.toArray();\r\n\t\tconfigs.sort(ParserATNSimulator.STATE_ALT_SORT_COMPARATOR);\r\n\r\n\t\tlet exact: boolean = !configset.dipsIntoOuterContext;\r\n\t\tlet alts: BitSet = new BitSet();\r\n\t\tlet minAlt: number = configs[0].alt;\r\n\t\talts.set(minAlt);\r\n\r\n\t\t/* Quick checks come first (single pass, no context joining):\r\n\t\t * 1. Make sure first config in the sorted list predicts the minimum\r\n\t\t * represented alternative.\r\n\t\t * 2. Make sure every represented state has at least one configuration\r\n\t\t * which predicts the minimum represented alternative.\r\n\t\t * 3. (exact only) make sure every represented state has at least one\r\n\t\t * configuration which predicts each represented alternative.\r\n\t\t */\r\n\r\n\t\t// quick check 1 & 2 => if we assume #1 holds and check #2 against the\r\n\t\t// minAlt from the first state, #2 will fail if the assumption was\r\n\t\t// incorrect\r\n\t\tlet currentState: number = configs[0].state.nonStopStateNumber;\r\n\t\tfor (let config of configs) {\r\n\t\t\tlet stateNumber: number = config.state.nonStopStateNumber;\r\n\t\t\tif (stateNumber !== currentState) {\r\n\t\t\t\tif (config.alt !== minAlt) {\r\n\t\t\t\t\treturn undefined;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentState = stateNumber;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet representedAlts: BitSet;\r\n\t\tif (exact) {\r\n\t\t\tcurrentState = configs[0].state.nonStopStateNumber;\r\n\r\n\t\t\t// get the represented alternatives of the first state\r\n\t\t\trepresentedAlts = new BitSet();\r\n\t\t\tlet maxAlt: number = minAlt;\r\n\t\t\tfor (let config of configs) {\r\n\t\t\t\tif (config.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet alt: number = config.alt;\r\n\t\t\t\trepresentedAlts.set(alt);\r\n\t\t\t\tmaxAlt = alt;\r\n\t\t\t}\r\n\r\n\t\t\t// quick check #3:\r\n\t\t\tcurrentState = configs[0].state.nonStopStateNumber;\r\n\t\t\tlet currentAlt: number = minAlt;\r\n\t\t\tfor (let config of configs) {\r\n\t\t\t\tlet stateNumber: number = config.state.nonStopStateNumber;\r\n\t\t\t\tlet alt: number = config.alt;\r\n\t\t\t\tif (stateNumber !== currentState) {\r\n\t\t\t\t\tif (currentAlt !== maxAlt) {\r\n\t\t\t\t\t\texact = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcurrentState = stateNumber;\r\n\t\t\t\t\tcurrentAlt = minAlt;\r\n\t\t\t\t}\r\n\t\t\t\telse if (alt !== currentAlt) {\r\n\t\t\t\t\tif (alt !== representedAlts.nextSetBit(currentAlt + 1)) {\r\n\t\t\t\t\t\texact = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcurrentAlt = alt;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcurrentState = configs[0].state.nonStopStateNumber;\r\n\t\tlet firstIndexCurrentState: number = 0;\r\n\t\tlet lastIndexCurrentStateMinAlt: number = 0;\r\n\t\tlet joinedCheckContext: PredictionContext = configs[0].context;\r\n\t\tfor (let i = 1; i < configs.length; i++) {\r\n\t\t\tlet config: ATNConfig = configs[i];\r\n\t\t\tif (config.alt !== minAlt) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (config.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tlastIndexCurrentStateMinAlt = i;\r\n\t\t\tjoinedCheckContext = contextCache.join(joinedCheckContext, configs[i].context);\r\n\t\t}\r\n\r\n\t\tfor (let i = lastIndexCurrentStateMinAlt + 1; i < configs.length; i++) {\r\n\t\t\tlet config: ATNConfig = configs[i];\r\n\t\t\tlet state: ATNState = config.state;\r\n\t\t\talts.set(config.alt);\r\n\t\t\tif (state.nonStopStateNumber !== currentState) {\r\n\t\t\t\tcurrentState = state.nonStopStateNumber;\r\n\t\t\t\tfirstIndexCurrentState = i;\r\n\t\t\t\tlastIndexCurrentStateMinAlt = i;\r\n\t\t\t\tjoinedCheckContext = config.context;\r\n\t\t\t\tfor (let j = firstIndexCurrentState + 1; j < configs.length; j++) {\r\n\t\t\t\t\tlet config2: ATNConfig = configs[j];\r\n\t\t\t\t\tif (config2.alt !== minAlt) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (config2.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlastIndexCurrentStateMinAlt = j;\r\n\t\t\t\t\tjoinedCheckContext = contextCache.join(joinedCheckContext, config2.context);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ti = lastIndexCurrentStateMinAlt;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet joinedCheckContext2: PredictionContext = config.context;\r\n\t\t\tlet currentAlt: number = config.alt;\r\n\t\t\tlet lastIndexCurrentStateCurrentAlt: number = i;\r\n\t\t\tfor (let j = lastIndexCurrentStateCurrentAlt + 1; j < configs.length; j++) {\r\n\t\t\t\tlet config2: ATNConfig = configs[j];\r\n\t\t\t\tif (config2.alt !== currentAlt) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (config2.state.nonStopStateNumber !== currentState) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlastIndexCurrentStateCurrentAlt = j;\r\n\t\t\t\tjoinedCheckContext2 = contextCache.join(joinedCheckContext2, config2.context);\r\n\t\t\t}\r\n\r\n\t\t\ti = lastIndexCurrentStateCurrentAlt;\r\n\r\n\t\t\tlet check: PredictionContext = contextCache.join(joinedCheckContext, joinedCheckContext2);\r\n\t\t\tif (!joinedCheckContext.equals(check)) {\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\r\n\t\t\t// update exact if necessary\r\n\t\t\texact = exact && joinedCheckContext.equals(joinedCheckContext2);\r\n\t\t}\r\n\r\n\t\treturn new ConflictInfo(alts, exact);\r\n\t}\r\n\r\n\tprotected getConflictingAltsFromConfigSet(configs: ATNConfigSet): BitSet | undefined {\r\n\t\tlet conflictingAlts: BitSet | undefined = configs.conflictingAlts;\r\n\t\tif (conflictingAlts == null && configs.uniqueAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\tconflictingAlts = new BitSet();\r\n\t\t\tconflictingAlts.set(configs.uniqueAlt);\r\n\t\t}\r\n\r\n\t\treturn conflictingAlts;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getTokenName(t: number): string {\r\n\t\tif (t === Token.EOF) {\r\n\t\t\treturn \"EOF\";\r\n\t\t}\r\n\r\n\t\tlet vocabulary: Vocabulary = this._parser != null ? this._parser.vocabulary : VocabularyImpl.EMPTY_VOCABULARY;\r\n\t\tlet displayName: string = vocabulary.getDisplayName(t);\r\n\t\tif (displayName === String(t)) {\r\n\t\t\treturn displayName;\r\n\t\t}\r\n\r\n\t\treturn displayName + \"<\" + t + \">\";\r\n\t}\r\n\r\n\tpublic getLookaheadName(input: TokenStream): string {\r\n\t\treturn this.getTokenName(input.LA(1));\r\n\t}\r\n\r\n\tpublic dumpDeadEndConfigs(@NotNull nvae: NoViableAltException): void {\r\n\t\tconsole.log(\"dead end configs: \");\r\n\t\tlet deadEndConfigs = nvae.deadEndConfigs;\r\n\t\tif (!deadEndConfigs) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (let c of deadEndConfigs) {\r\n\t\t\tlet trans: string = \"no edges\";\r\n\t\t\tif (c.state.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\tlet t: Transition = c.state.getOptimizedTransition(0);\r\n\t\t\t\tif (t instanceof AtomTransition) {\r\n\t\t\t\t\ttrans = \"Atom \" + this.getTokenName(t._label);\r\n\t\t\t\t}\r\n\t\t\t\telse if (t instanceof SetTransition) {\r\n\t\t\t\t\tlet not: boolean = t instanceof NotSetTransition;\r\n\t\t\t\t\ttrans = (not ? \"~\" : \"\") + \"Set \" + t.set.toString();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconsole.log(c.toString(this._parser, true) + \":\" + trans);\r\n\t\t}\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected noViableAlt(\r\n\t\t@NotNull input: TokenStream,\r\n\t\t@NotNull outerContext: ParserRuleContext,\r\n\t\t@NotNull configs: ATNConfigSet,\r\n\t\tstartIndex: number): NoViableAltException {\r\n\t\treturn new NoViableAltException(this._parser, input,\r\n\t\t\tinput.get(startIndex),\r\n\t\t\tinput.LT(1),\r\n\t\t\tconfigs, outerContext);\r\n\t}\r\n\r\n\tprotected getUniqueAlt(@NotNull configs: Iterable): number {\r\n\t\tlet alt: number = ATN.INVALID_ALT_NUMBER;\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (alt === ATN.INVALID_ALT_NUMBER) {\r\n\t\t\t\talt = c.alt; // found first alt\r\n\t\t\t}\r\n\t\t\telse if (c.alt !== alt) {\r\n\t\t\t\treturn ATN.INVALID_ALT_NUMBER;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn alt;\r\n\t}\r\n\r\n\tprotected configWithAltAtStopState(@NotNull configs: Iterable, alt: number): boolean {\r\n\t\tfor (let c of configs) {\r\n\t\t\tif (c.alt === alt) {\r\n\t\t\t\tif (c.state instanceof RuleStopState) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected addDFAEdge(\r\n\t\t@NotNull dfa: DFA,\r\n\t\t@NotNull fromState: DFAState,\r\n\t\tt: number,\r\n\t\tcontextTransitions: IntegerList | undefined,\r\n\t\t@NotNull toConfigs: ATNConfigSet,\r\n\t\tcontextCache: PredictionContextCache): DFAState {\r\n\t\tassert(contextTransitions == null || contextTransitions.isEmpty || dfa.isContextSensitive);\r\n\r\n\t\tlet from: DFAState = fromState;\r\n\t\tlet to: DFAState = this.addDFAState(dfa, toConfigs, contextCache);\r\n\r\n\t\tif (contextTransitions != null) {\r\n\t\t\tfor (let context of contextTransitions.toArray()) {\r\n\t\t\t\tif (context === PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\t\t\tif (from.configs.isOutermostConfigSet) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom.setContextSensitive(this.atn);\r\n\t\t\t\tfrom.setContextSymbol(t);\r\n\t\t\t\tlet next: DFAState | undefined = from.getContextTarget(context);\r\n\t\t\t\tif (next != null) {\r\n\t\t\t\t\tfrom = next;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext = this.addDFAContextState(dfa, from.configs, context, contextCache);\r\n\t\t\t\tassert(context !== PredictionContext.EMPTY_FULL_STATE_KEY || next.configs.isOutermostConfigSet);\r\n\t\t\t\tfrom.setContextTarget(context, next);\r\n\t\t\t\tfrom = next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"EDGE \" + from + \" -> \" + to + \" upon \" + this.getTokenName(t));\r\n\t\t}\r\n\t\tthis.setDFAEdge(from, t, to);\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"DFA=\\n\" + dfa.toString(this._parser != null ? this._parser.vocabulary : VocabularyImpl.EMPTY_VOCABULARY, this._parser != null ? this._parser.ruleNames : undefined));\r\n\t\t}\r\n\t\treturn to;\r\n\t}\r\n\r\n\tprotected setDFAEdge(@Nullable p: DFAState, t: number, @Nullable q: DFAState): void {\r\n\t\tif (p != null) {\r\n\t\t\tp.setTarget(t, q);\r\n\t\t}\r\n\t}\r\n\r\n\t/** See comment on LexerInterpreter.addDFAState. */\r\n\t@NotNull\r\n\tprotected addDFAContextState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet, returnContext: number, contextCache: PredictionContextCache): DFAState {\r\n\t\tif (returnContext !== PredictionContext.EMPTY_FULL_STATE_KEY) {\r\n\t\t\tlet contextConfigs: ATNConfigSet = new ATNConfigSet();\r\n\t\t\tfor (let config of configs) {\r\n\t\t\t\tcontextConfigs.add(config.appendContext(returnContext, contextCache));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.addDFAState(dfa, contextConfigs, contextCache);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tassert(!configs.isOutermostConfigSet, \"Shouldn't be adding a duplicate edge.\");\r\n\t\t\tconfigs = configs.clone(true);\r\n\t\t\tconfigs.isOutermostConfigSet = true;\r\n\t\t\treturn this.addDFAState(dfa, configs, contextCache);\r\n\t\t}\r\n\t}\r\n\r\n\t/** See comment on LexerInterpreter.addDFAState. */\r\n\t@NotNull\r\n\tprotected addDFAState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet, contextCache: PredictionContextCache): DFAState {\r\n\t\tlet enableDfa: boolean = this.enable_global_context_dfa || !configs.isOutermostConfigSet;\r\n\t\tif (enableDfa) {\r\n\t\t\tif (!configs.isReadOnly) {\r\n\t\t\t\tconfigs.optimizeConfigs(this);\r\n\t\t\t}\r\n\r\n\t\t\tlet proposed: DFAState = this.createDFAState(dfa, configs);\r\n\t\t\tlet existing: DFAState | undefined = dfa.states.get(proposed);\r\n\t\t\tif (existing != null) {\r\n\t\t\t\treturn existing;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!configs.isReadOnly) {\r\n\t\t\tif (configs.conflictInfo == null) {\r\n\t\t\t\tconfigs.conflictInfo = this.isConflicted(configs, contextCache);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet newState: DFAState = this.createDFAState(dfa, configs.clone(true));\r\n\t\t// getDecisionState won't return undefined when we request a known valid decision\r\n\t\tlet decisionState: DecisionState = this.atn.getDecisionState(dfa.decision) as DecisionState;\r\n\t\tlet predictedAlt: number = this.getUniqueAlt(configs);\r\n\t\tif (predictedAlt !== ATN.INVALID_ALT_NUMBER) {\r\n\t\t\tnewState.acceptStateInfo = new AcceptStateInfo(predictedAlt);\r\n\t\t} else if (configs.conflictingAlts != null) {\r\n\t\t\tlet conflictingAlts = configs.conflictingAlts;\r\n\t\t\tif (conflictingAlts) {\r\n\t\t\t\tnewState.acceptStateInfo = new AcceptStateInfo(conflictingAlts.nextSetBit(0));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (newState.isAcceptState && configs.hasSemanticContext) {\r\n\t\t\tthis.predicateDFAState(newState, configs, decisionState.numberOfTransitions);\r\n\t\t}\r\n\r\n\t\tif (!enableDfa) {\r\n\t\t\treturn newState;\r\n\t\t}\r\n\r\n\t\tlet added: DFAState = dfa.addState(newState);\r\n\t\tif (ParserATNSimulator.debug && added === newState) {\r\n\t\t\tconsole.log(\"adding new DFA state: \" + newState);\r\n\t\t}\r\n\t\treturn added;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected createDFAState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet): DFAState {\r\n\t\treturn new DFAState(configs);\r\n\t}\r\n\r\n\tprotected reportAttemptingFullContext(@NotNull dfa: DFA, conflictingAlts: BitSet | undefined, @NotNull conflictState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) {\r\n\t\t\tlet interval: Interval = Interval.of(startIndex, stopIndex);\r\n\t\t\tconsole.log(\"reportAttemptingFullContext decision=\" + dfa.decision + \":\" + conflictState.s0.configs +\r\n\t\t\t\t\", input=\" + this._parser.inputStream.getText(interval));\r\n\t\t}\r\n\t\tif (this._parser != null) {\r\n\t\t\tlet listener = this._parser.getErrorListenerDispatch();\r\n\t\t\tif (listener.reportAttemptingFullContext) {\r\n\t\t\t\tlistener.reportAttemptingFullContext(this._parser, dfa, startIndex, stopIndex, conflictingAlts, conflictState);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected reportContextSensitivity(@NotNull dfa: DFA, prediction: number, @NotNull acceptState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) {\r\n\t\t\tlet interval: Interval = Interval.of(startIndex, stopIndex);\r\n\t\t\tconsole.log(\"reportContextSensitivity decision=\" + dfa.decision + \":\" + acceptState.s0.configs +\r\n\t\t\t\t\", input=\" + this._parser.inputStream.getText(interval));\r\n\t\t}\r\n\t\tif (this._parser != null) {\r\n\t\t\tlet listener = this._parser.getErrorListenerDispatch();\r\n\t\t\tif (listener.reportContextSensitivity) {\r\n\t\t\t\tlistener.reportContextSensitivity(this._parser, dfa, startIndex, stopIndex, prediction, acceptState);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/** If context sensitive parsing, we know it's ambiguity not conflict */\r\n\tprotected reportAmbiguity(\r\n\t\t@NotNull dfa: DFA,\r\n\t\tD: DFAState, // the DFA state from execATN(): void that had SLL conflicts\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\t@NotNull ambigAlts: BitSet,\r\n\t\t@NotNull configs: ATNConfigSet) // configs that LL not SLL considered conflicting\r\n\t{\r\n\t\tif (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) {\r\n\t\t\tlet interval: Interval = Interval.of(startIndex, stopIndex);\r\n\t\t\tconsole.log(\"reportAmbiguity \" +\r\n\t\t\t\tambigAlts + \":\" + configs +\r\n\t\t\t\t\", input=\" + this._parser.inputStream.getText(interval));\r\n\t\t}\r\n\t\tif (this._parser != null) {\r\n\t\t\tlet listener = this._parser.getErrorListenerDispatch();\r\n\t\t\tif (listener.reportAmbiguity) {\r\n\t\t\t\tlistener.reportAmbiguity(this._parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getReturnState(context: RuleContext): number {\r\n\t\tif (context.isEmpty) {\r\n\t\t\treturn PredictionContext.EMPTY_FULL_STATE_KEY;\r\n\t\t}\r\n\r\n\t\tlet state: ATNState = this.atn.states[context.invokingState];\r\n\t\tlet transition: RuleTransition = state.transition(0) as RuleTransition;\r\n\t\treturn transition.followState.stateNumber;\r\n\t}\r\n\r\n\tprotected skipTailCalls(context: ParserRuleContext): ParserRuleContext {\r\n\t\tif (!this.optimize_tail_calls) {\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\twhile (!context.isEmpty) {\r\n\t\t\tlet state: ATNState = this.atn.states[context.invokingState];\r\n\t\t\tassert(state.numberOfTransitions === 1 && state.transition(0).serializationType === TransitionType.RULE);\r\n\t\t\tlet transition: RuleTransition = state.transition(0) as RuleTransition;\r\n\t\t\tif (!transition.tailCall) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// This method requires that the root ancestor of the ParserRuleContext be empty. If we make it to this\r\n\t\t\t// line, we know the current node is not empty, which means it does have a parent.\r\n\t\t\tcontext = context.parent as ParserRuleContext;\r\n\t\t}\r\n\r\n\t\treturn context;\r\n\t}\r\n\r\n\t/**\r\n\t * @since 4.3\r\n\t */\r\n\tget parser(): Parser {\r\n\t\treturn this._parser;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:34.9572142-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\nimport { PlusLoopbackState } from \"./PlusLoopbackState\";\r\n\r\n/** Start of `(A|B|...)+` loop. Technically a decision state, but\r\n * we don't use for code generation; somebody might need it, so I'm defining\r\n * it for completeness. In reality, the {@link PlusLoopbackState} node is the\r\n * real decision-making note for `A+`.\r\n */\r\nexport class PlusBlockStartState extends BlockStartState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic loopBackState!: PlusLoopbackState;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.PLUS_BLOCK_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.0257730-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** Decision state for `A+` and `(A|B)+`. It has two transitions:\r\n * one to the loop back to start of the block and one to exit.\r\n */\r\nexport class PlusLoopbackState extends DecisionState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.PLUS_LOOP_BACK;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.0994191-07:00\r\n\r\nimport { AbstractPredicateTransition } from \"./AbstractPredicateTransition\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class PrecedencePredicateTransition extends AbstractPredicateTransition {\r\n\tpublic precedence: number;\r\n\r\n\tconstructor( @NotNull target: ATNState, precedence: number) {\r\n\t\tsuper(target);\r\n\t\tthis.precedence = precedence;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.PRECEDENCE;\r\n\t}\r\n\r\n\t@Override\r\n\tget isEpsilon(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget predicate(): SemanticContext.PrecedencePredicate {\r\n\t\treturn new SemanticContext.PrecedencePredicate(this.precedence);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this.precedence + \" >= _p\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.5959980-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { Override, NotNull } from \"../Decorators\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\n\r\nexport class RangeTransition extends Transition {\r\n\tpublic from: number;\r\n\tpublic to: number;\r\n\r\n\tconstructor(@NotNull target: ATNState, from: number, to: number) {\r\n\t\tsuper(target);\r\n\t\tthis.from = from;\r\n\t\tthis.to = to;\r\n\t}\r\n\r\n\t@Override\r\n\tget serializationType(): TransitionType {\r\n\t\treturn TransitionType.RANGE;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tget label(): IntervalSet {\r\n\t\treturn IntervalSet.of(this.from, this.to);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {\r\n\t\treturn symbol >= this.from && symbol <= this.to;\r\n\t}\r\n\r\n\t@Override\r\n\t@NotNull\r\n\tpublic toString(): string {\r\n\t\treturn \"'\" + String.fromCodePoint(this.from) + \"'..'\" + String.fromCodePoint(this.to) + \"'\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.6806851-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\n\r\nexport class RuleStartState extends ATNState {\r\n\t// This is always set during ATN deserialization\r\n\tpublic stopState!: RuleStopState;\r\n\tpublic isPrecedenceRule: boolean = false;\r\n\tpublic leftFactored: boolean = false;\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.RULE_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.5657409-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The block that begins a closure loop. */\r\nexport class StarBlockStartState extends BlockStartState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.STAR_BLOCK_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.6368726-07:00\r\n\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { Override } from \"../Decorators\";\r\nimport { StarLoopEntryState } from \"./StarLoopEntryState\";\r\n\r\nexport class StarLoopbackState extends ATNState {\r\n\tget loopEntryState(): StarLoopEntryState {\r\n\t\treturn this.transition(0).target as StarLoopEntryState;\r\n\t}\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.STAR_LOOP_BACK;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:37.7814046-07:00\r\n\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { Override } from \"../Decorators\";\r\n\r\n/** The Tokens rule start state linking to each lexer rule start state */\r\nexport class TokensStartState extends DecisionState {\r\n\r\n\t@Override\r\n\tget stateType(): ATNStateType {\r\n\t\treturn ATNStateType.TOKEN_START;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { Equatable } from \"./Stubs\";\r\nimport { MurmurHash } from \"./MurmurHash\";\r\n\r\nexport class UUID implements Equatable {\r\n\tprivate readonly data: Uint32Array;\r\n\r\n\tconstructor(mostSigBits: number, moreSigBits: number, lessSigBits: number, leastSigBits: number) {\r\n\t\tthis.data = new Uint32Array(4);\r\n\t\tthis.data[0] = mostSigBits;\r\n\t\tthis.data[1] = moreSigBits;\r\n\t\tthis.data[2] = lessSigBits;\r\n\t\tthis.data[3] = leastSigBits;\r\n\t}\r\n\r\n\tpublic static fromString(data: string): UUID {\r\n\t\tif (!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(data)) {\r\n\t\t\tthrow new Error(\"Incorrectly formatted UUID\");\r\n\t\t}\r\n\r\n\t\tlet segments = data.split(\"-\");\r\n\t\tlet mostSigBits = parseInt(segments[0], 16);\r\n\t\tlet moreSigBits = ((parseInt(segments[1], 16) << 16) >>> 0) + parseInt(segments[2], 16);\r\n\t\tlet lessSigBits = ((parseInt(segments[3], 16) << 16) >>> 0) + parseInt(segments[4].substr(0, 4), 16);\r\n\t\tlet leastSigBits = parseInt(segments[4].substr(-8), 16);\r\n\t\treturn new UUID(mostSigBits, moreSigBits, lessSigBits, leastSigBits);\r\n\t}\r\n\r\n\tpublic hashCode(): number {\r\n\t\treturn MurmurHash.hashCode([this.data[0], this.data[1], this.data[2], this.data[3]]);\r\n\t}\r\n\r\n\tpublic equals(obj: any): boolean {\r\n\t\tif (obj === this) {\r\n\t\t\treturn true;\r\n\t\t} else if (!(obj instanceof UUID)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn this.data[0] === obj.data[0]\r\n\t\t\t&& this.data[1] === obj.data[1]\r\n\t\t\t&& this.data[2] === obj.data[2]\r\n\t\t\t&& this.data[3] === obj.data[3];\r\n\t}\r\n\r\n\tpublic toString(): string {\r\n\t\treturn (\"00000000\" + this.data[0].toString(16)).substr(-8)\r\n\t\t\t+ \"-\" + (\"0000\" + (this.data[1] >>> 16).toString(16)).substr(-4)\r\n\t\t\t+ \"-\" + (\"0000\" + this.data[1].toString(16)).substr(-4)\r\n\t\t\t+ \"-\" + (\"0000\" + (this.data[2] >>> 16).toString(16)).substr(-4)\r\n\t\t\t+ \"-\" + (\"0000\" + this.data[2].toString(16)).substr(-4)\r\n\t\t\t+ (\"00000000\" + this.data[3].toString(16)).substr(-8);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:25.9683447-07:00\r\n\r\nimport { ActionTransition } from \"./ActionTransition\";\r\nimport { Array2DHashSet } from \"../misc/Array2DHashSet\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNDeserializationOptions } from \"./ATNDeserializationOptions\";\r\nimport { ATNState } from \"./ATNState\";\r\nimport { ATNStateType } from \"./ATNStateType\";\r\nimport { ATNType } from \"./ATNType\";\r\nimport { AtomTransition } from \"./AtomTransition\";\r\nimport { BasicBlockStartState } from \"./BasicBlockStartState\";\r\nimport { BasicState } from \"./BasicState\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { BlockEndState } from \"./BlockEndState\";\r\nimport { BlockStartState } from \"./BlockStartState\";\r\nimport { DecisionState } from \"./DecisionState\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { EpsilonTransition } from \"./EpsilonTransition\";\r\nimport { Interval } from \"../misc/Interval\";\r\nimport { IntervalSet } from \"../misc/IntervalSet\";\r\nimport { InvalidState } from \"./InvalidState\";\r\nimport { LexerAction } from \"./LexerAction\";\r\nimport { LexerActionType } from \"./LexerActionType\";\r\nimport { LexerChannelAction } from \"./LexerChannelAction\";\r\nimport { LexerCustomAction } from \"./LexerCustomAction\";\r\nimport { LexerModeAction } from \"./LexerModeAction\";\r\nimport { LexerMoreAction } from \"./LexerMoreAction\";\r\nimport { LexerPopModeAction } from \"./LexerPopModeAction\";\r\nimport { LexerPushModeAction } from \"./LexerPushModeAction\";\r\nimport { LexerSkipAction } from \"./LexerSkipAction\";\r\nimport { LexerTypeAction } from \"./LexerTypeAction\";\r\nimport { LoopEndState } from \"./LoopEndState\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { NotSetTransition } from \"./NotSetTransition\";\r\nimport { ParserATNSimulator } from \"./ParserATNSimulator\";\r\nimport { PlusBlockStartState } from \"./PlusBlockStartState\";\r\nimport { PlusLoopbackState } from \"./PlusLoopbackState\";\r\nimport { PrecedencePredicateTransition } from \"./PrecedencePredicateTransition\";\r\nimport { PredicateTransition } from \"./PredicateTransition\";\r\nimport { RangeTransition } from \"./RangeTransition\";\r\nimport { RuleStartState } from \"./RuleStartState\";\r\nimport { RuleStopState } from \"./RuleStopState\";\r\nimport { RuleTransition } from \"./RuleTransition\";\r\nimport { SetTransition } from \"./SetTransition\";\r\nimport { StarBlockStartState } from \"./StarBlockStartState\";\r\nimport { StarLoopbackState } from \"./StarLoopbackState\";\r\nimport { StarLoopEntryState } from \"./StarLoopEntryState\";\r\nimport { Token } from \"../Token\";\r\nimport { TokensStartState } from \"./TokensStartState\";\r\nimport { Transition } from \"./Transition\";\r\nimport { TransitionType } from \"./TransitionType\";\r\nimport { UUID } from \"../misc/UUID\";\r\nimport { WildcardTransition } from \"./WildcardTransition\";\r\n\r\ninterface UnicodeDeserializer {\r\n\t// Wrapper for readInt() or readInt32()\r\n\treadUnicode(data: Uint16Array, p: number): number;\r\n\r\n\t// Work around Java not allowing mutation of captured variables\r\n\t// by returning amount by which to increment p after each read\r\n\treadonly size: number;\r\n}\r\n\r\nconst enum UnicodeDeserializingMode {\r\n\tUNICODE_BMP,\r\n\tUNICODE_SMP,\r\n}\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ATNDeserializer {\r\n\tstatic get SERIALIZED_VERSION(): number {\r\n\t\t/* This value should never change. Updates following this version are\r\n\t\t * reflected as change in the unique ID SERIALIZED_UUID.\r\n\t\t */\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t/* WARNING: DO NOT MERGE THESE LINES. If UUIDs differ during a merge,\r\n\t * resolve the conflict by generating a new ID!\r\n\t */\r\n\r\n\t/**\r\n\t * This is the earliest supported serialized UUID.\r\n\t */\r\n\tprivate static readonly BASE_SERIALIZED_UUID: UUID = UUID.fromString(\"E4178468-DF95-44D0-AD87-F22A5D5FB6D3\");\r\n\t/**\r\n\t * This UUID indicates an extension of {@link #ADDED_PRECEDENCE_TRANSITIONS}\r\n\t * for the addition of lexer actions encoded as a sequence of\r\n\t * {@link LexerAction} instances.\r\n\t */\r\n\tprivate static readonly ADDED_LEXER_ACTIONS: UUID = UUID.fromString(\"AB35191A-1603-487E-B75A-479B831EAF6D\");\r\n\t/**\r\n\t * This UUID indicates the serialized ATN contains two sets of\r\n\t * IntervalSets, where the second set's values are encoded as\r\n\t * 32-bit integers to support the full Unicode SMP range up to U+10FFFF.\r\n\t */\r\n\tprivate static readonly ADDED_UNICODE_SMP: UUID = UUID.fromString(\"C23FEA89-0605-4f51-AFB8-058BCAB8C91B\");\r\n\t/**\r\n\t * This list contains all of the currently supported UUIDs, ordered by when\r\n\t * the feature first appeared in this branch.\r\n\t */\r\n\tprivate static readonly SUPPORTED_UUIDS: UUID[] = [\r\n\t\tATNDeserializer.BASE_SERIALIZED_UUID,\r\n\t\tATNDeserializer.ADDED_LEXER_ACTIONS,\r\n\t\tATNDeserializer.ADDED_UNICODE_SMP,\r\n\t];\r\n\r\n\t/**\r\n\t * This is the current serialized UUID.\r\n\t */\r\n\tprivate static readonly SERIALIZED_UUID: UUID = ATNDeserializer.ADDED_UNICODE_SMP;\r\n\r\n\t@NotNull\r\n\tprivate readonly deserializationOptions: ATNDeserializationOptions;\r\n\r\n\tconstructor(deserializationOptions?: ATNDeserializationOptions) {\r\n\t\tif (deserializationOptions === undefined) {\r\n\t\t\tdeserializationOptions = ATNDeserializationOptions.defaultOptions;\r\n\t\t}\r\n\r\n\t\tthis.deserializationOptions = deserializationOptions;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines if a particular serialized representation of an ATN supports\r\n\t * a particular feature, identified by the {@link UUID} used for serializing\r\n\t * the ATN at the time the feature was first introduced.\r\n\t *\r\n\t * @param feature The {@link UUID} marking the first time the feature was\r\n\t * supported in the serialized ATN.\r\n\t * @param actualUuid The {@link UUID} of the actual serialized ATN which is\r\n\t * currently being deserialized.\r\n\t * @returns `true` if the `actualUuid` value represents a\r\n\t * serialized ATN at or after the feature identified by `feature` was\r\n\t * introduced; otherwise, `false`.\r\n\t */\r\n\tprotected static isFeatureSupported(feature: UUID, actualUuid: UUID): boolean {\r\n\t\tlet featureIndex: number = ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(feature));\r\n\t\tif (featureIndex < 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(actualUuid)) >= featureIndex;\r\n\t}\r\n\r\n\tprivate static getUnicodeDeserializer(mode: UnicodeDeserializingMode): UnicodeDeserializer {\r\n\t\tif (mode === UnicodeDeserializingMode.UNICODE_BMP) {\r\n\t\t\treturn {\r\n\t\t\t\treadUnicode: (data: Uint16Array, p: number): number => {\r\n\t\t\t\t\treturn ATNDeserializer.toInt(data[p]);\r\n\t\t\t\t},\r\n\t\t\t\tsize: 1,\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\treturn {\r\n\t\t\t\treadUnicode: (data: Uint16Array, p: number): number => {\r\n\t\t\t\t\treturn ATNDeserializer.toInt32(data, p);\r\n\t\t\t\t},\r\n\t\t\t\tsize: 2,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tpublic deserialize(@NotNull data: Uint16Array): ATN {\r\n\t\tdata = data.slice(0);\r\n\r\n\t\t// Each Uint16 value in data is shifted by +2 at the entry to this method. This is an encoding optimization\r\n\t\t// targeting the serialized values 0 and -1 (serialized to 0xFFFF), each of which are very common in the\r\n\t\t// serialized form of the ATN. In the modified UTF-8 that Java uses for compiled string literals, these two\r\n\t\t// character values have multi-byte forms. By shifting each value by +2, they become characters 2 and 1 prior to\r\n\t\t// writing the string, each of which have single-byte representations. Since the shift occurs in the tool during\r\n\t\t// ATN serialization, each target is responsible for adjusting the values during deserialization.\r\n\t\t//\r\n\t\t// As a special case, note that the first element of data is not adjusted because it contains the major version\r\n\t\t// number of the serialized ATN, which was fixed at 3 at the time the value shifting was implemented.\r\n\t\tfor (let i = 1; i < data.length; i++) {\r\n\t\t\tdata[i] = (data[i] - 2) & 0xFFFF;\r\n\t\t}\r\n\r\n\t\tlet p: number = 0;\r\n\t\tlet version: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tif (version !== ATNDeserializer.SERIALIZED_VERSION) {\r\n\t\t\tlet reason = `Could not deserialize ATN with version ${version} (expected ${ATNDeserializer.SERIALIZED_VERSION}).`;\r\n\t\t\tthrow new Error(reason);\r\n\t\t}\r\n\r\n\t\tlet uuid: UUID = ATNDeserializer.toUUID(data, p);\r\n\t\tp += 8;\r\n\t\tif (ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(uuid)) < 0) {\r\n\t\t\tlet reason = `Could not deserialize ATN with UUID ${uuid} (expected ${ATNDeserializer.SERIALIZED_UUID} or a legacy UUID).`;\r\n\t\t\tthrow new Error(reason);\r\n\t\t}\r\n\r\n\t\tlet supportsLexerActions: boolean = ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_LEXER_ACTIONS, uuid);\r\n\r\n\t\tlet grammarType: ATNType = ATNDeserializer.toInt(data[p++]);\r\n\t\tlet maxTokenType: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tlet atn: ATN = new ATN(grammarType, maxTokenType);\r\n\r\n\t\t//\r\n\t\t// STATES\r\n\t\t//\r\n\t\tlet loopBackStateNumbers: Array<[LoopEndState, number]> = [];\r\n\t\tlet endStateNumbers: Array<[BlockStartState, number]> = [];\r\n\t\tlet nstates: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nstates; i++) {\r\n\t\t\tlet stype: ATNStateType = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t// ignore bad type of states\r\n\t\t\tif (stype === ATNStateType.INVALID_TYPE) {\r\n\t\t\t\tatn.addState(new InvalidState());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet ruleIndex: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tif (ruleIndex === 0xFFFF) {\r\n\t\t\t\truleIndex = -1;\r\n\t\t\t}\r\n\r\n\t\t\tlet s: ATNState = this.stateFactory(stype, ruleIndex);\r\n\t\t\tif (stype === ATNStateType.LOOP_END) { // special case\r\n\t\t\t\tlet loopBackStateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\tloopBackStateNumbers.push([s as LoopEndState, loopBackStateNumber]);\r\n\t\t\t}\r\n\t\t\telse if (s instanceof BlockStartState) {\r\n\t\t\t\tlet endStateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\tendStateNumbers.push([s, endStateNumber]);\r\n\t\t\t}\r\n\t\t\tatn.addState(s);\r\n\t\t}\r\n\r\n\t\t// delay the assignment of loop back and end states until we know all the state instances have been initialized\r\n\t\tfor (let pair of loopBackStateNumbers) {\r\n\t\t\tpair[0].loopBackState = atn.states[pair[1]];\r\n\t\t}\r\n\r\n\t\tfor (let pair of endStateNumbers) {\r\n\t\t\tpair[0].endState = atn.states[pair[1]] as BlockEndState;\r\n\t\t}\r\n\r\n\t\tlet numNonGreedyStates: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < numNonGreedyStates; i++) {\r\n\t\t\tlet stateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t(atn.states[stateNumber] as DecisionState).nonGreedy = true;\r\n\t\t}\r\n\r\n\t\tlet numSllDecisions: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < numSllDecisions; i++) {\r\n\t\t\tlet stateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t(atn.states[stateNumber] as DecisionState).sll = true;\r\n\t\t}\r\n\r\n\t\tlet numPrecedenceStates: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < numPrecedenceStates; i++) {\r\n\t\t\tlet stateNumber: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t(atn.states[stateNumber] as RuleStartState).isPrecedenceRule = true;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// RULES\r\n\t\t//\r\n\t\tlet nrules: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tif (atn.grammarType === ATNType.LEXER) {\r\n\t\t\tatn.ruleToTokenType = new Int32Array(nrules);\r\n\t\t}\r\n\r\n\t\tatn.ruleToStartState = new Array(nrules);\r\n\t\tfor (let i = 0; i < nrules; i++) {\r\n\t\t\tlet s: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tlet startState: RuleStartState = atn.states[s] as RuleStartState;\r\n\t\t\tstartState.leftFactored = ATNDeserializer.toInt(data[p++]) !== 0;\r\n\t\t\tatn.ruleToStartState[i] = startState;\r\n\t\t\tif (atn.grammarType === ATNType.LEXER) {\r\n\t\t\t\tlet tokenType: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\tif (tokenType === 0xFFFF) {\r\n\t\t\t\t\ttokenType = Token.EOF;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tatn.ruleToTokenType[i] = tokenType;\r\n\r\n\t\t\t\tif (!ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_LEXER_ACTIONS, uuid)) {\r\n\t\t\t\t\t// this piece of unused metadata was serialized prior to the\r\n\t\t\t\t\t// addition of LexerAction\r\n\t\t\t\t\tlet actionIndexIgnored: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tif (actionIndexIgnored === 0xFFFF) {\r\n\t\t\t\t\t\tactionIndexIgnored = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tatn.ruleToStopState = new Array(nrules);\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (!(state instanceof RuleStopState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tatn.ruleToStopState[state.ruleIndex] = state;\r\n\t\t\tatn.ruleToStartState[state.ruleIndex].stopState = state;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// MODES\r\n\t\t//\r\n\t\tlet nmodes: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nmodes; i++) {\r\n\t\t\tlet s: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tatn.modeToStartState.push(atn.states[s] as TokensStartState);\r\n\t\t}\r\n\r\n\t\tatn.modeToDFA = new Array(nmodes);\r\n\t\tfor (let i = 0; i < nmodes; i++) {\r\n\t\t\tatn.modeToDFA[i] = new DFA(atn.modeToStartState[i]);\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// SETS\r\n\t\t//\r\n\t\tlet sets: IntervalSet[] = [];\r\n\r\n\t\t// First, read all sets with 16-bit Unicode code points <= U+FFFF.\r\n\t\tp = this.deserializeSets(data, p, sets, ATNDeserializer.getUnicodeDeserializer(UnicodeDeserializingMode.UNICODE_BMP));\r\n\r\n\t\t// Next, if the ATN was serialized with the Unicode SMP feature,\r\n\t\t// deserialize sets with 32-bit arguments <= U+10FFFF.\r\n\t\tif (ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_UNICODE_SMP, uuid)) {\r\n\t\t\tp = this.deserializeSets(data, p, sets, ATNDeserializer.getUnicodeDeserializer(UnicodeDeserializingMode.UNICODE_SMP));\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// EDGES\r\n\t\t//\r\n\t\tlet nedges: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nedges; i++) {\r\n\t\t\tlet src: number = ATNDeserializer.toInt(data[p]);\r\n\t\t\tlet trg: number = ATNDeserializer.toInt(data[p + 1]);\r\n\t\t\tlet ttype: number = ATNDeserializer.toInt(data[p + 2]);\r\n\t\t\tlet arg1: number = ATNDeserializer.toInt(data[p + 3]);\r\n\t\t\tlet arg2: number = ATNDeserializer.toInt(data[p + 4]);\r\n\t\t\tlet arg3: number = ATNDeserializer.toInt(data[p + 5]);\r\n\t\t\tlet trans: Transition = this.edgeFactory(atn, ttype, src, trg, arg1, arg2, arg3, sets);\r\n\t\t\t// console.log(`EDGE ${trans.constructor.name} ${src}->${trg} ${Transition.serializationNames[ttype]} ${arg1},${arg2},${arg3}`);\r\n\t\t\tlet srcState: ATNState = atn.states[src];\r\n\t\t\tsrcState.addTransition(trans);\r\n\t\t\tp += 6;\r\n\t\t}\r\n\r\n\t\t// edges for rule stop states can be derived, so they aren't serialized\r\n\t\tinterface T { stopState: number; returnState: number; outermostPrecedenceReturn: number; }\r\n\t\tlet returnTransitionsSet = new Array2DHashSet({\r\n\t\t\thashCode: (o: T) => o.stopState ^ o.returnState ^ o.outermostPrecedenceReturn,\r\n\r\n\t\t\tequals: (a: T, b: T): boolean => {\r\n\t\t\t\treturn a.stopState === b.stopState\r\n\t\t\t\t\t&& a.returnState === b.returnState\r\n\t\t\t\t\t&& a.outermostPrecedenceReturn === b.outermostPrecedenceReturn;\r\n\t\t\t},\r\n\t\t});\r\n\t\tlet returnTransitions: T[] = [];\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tlet returningToLeftFactored: boolean = state.ruleIndex >= 0 && atn.ruleToStartState[state.ruleIndex].leftFactored;\r\n\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\tlet t: Transition = state.transition(i);\r\n\t\t\t\tif (!(t instanceof RuleTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet ruleTransition: RuleTransition = t;\r\n\t\t\t\tlet returningFromLeftFactored: boolean = atn.ruleToStartState[ruleTransition.target.ruleIndex].leftFactored;\r\n\t\t\t\tif (!returningFromLeftFactored && returningToLeftFactored) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet outermostPrecedenceReturn: number = -1;\r\n\t\t\t\tif (atn.ruleToStartState[ruleTransition.target.ruleIndex].isPrecedenceRule) {\r\n\t\t\t\t\tif (ruleTransition.precedence === 0) {\r\n\t\t\t\t\t\toutermostPrecedenceReturn = ruleTransition.target.ruleIndex;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet current = { stopState: ruleTransition.target.ruleIndex, returnState: ruleTransition.followState.stateNumber, outermostPrecedenceReturn };\r\n\t\t\t\tif (returnTransitionsSet.add(current)) {\r\n\t\t\t\t\treturnTransitions.push(current);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add all elements from returnTransitions to the ATN\r\n\t\tfor (let returnTransition of returnTransitions) {\r\n\t\t\tlet transition = new EpsilonTransition(atn.states[returnTransition.returnState], returnTransition.outermostPrecedenceReturn);\r\n\t\t\tatn.ruleToStopState[returnTransition.stopState].addTransition(transition);\r\n\t\t}\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (state instanceof BlockStartState) {\r\n\t\t\t\t// we need to know the end state to set its start state\r\n\t\t\t\tif (state.endState === undefined) {\r\n\t\t\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// block end states can only be associated to a single block start state\r\n\t\t\t\tif (state.endState.startState !== undefined) {\r\n\t\t\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstate.endState.startState = state;\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof PlusLoopbackState) {\r\n\t\t\t\tlet loopbackState: PlusLoopbackState = state;\r\n\t\t\t\tfor (let i = 0; i < loopbackState.numberOfTransitions; i++) {\r\n\t\t\t\t\tlet target: ATNState = loopbackState.transition(i).target;\r\n\t\t\t\t\tif (target instanceof PlusBlockStartState) {\r\n\t\t\t\t\t\ttarget.loopBackState = loopbackState;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (state instanceof StarLoopbackState) {\r\n\t\t\t\tlet loopbackState: StarLoopbackState = state;\r\n\t\t\t\tfor (let i = 0; i < loopbackState.numberOfTransitions; i++) {\r\n\t\t\t\t\tlet target: ATNState = loopbackState.transition(i).target;\r\n\t\t\t\t\tif (target instanceof StarLoopEntryState) {\r\n\t\t\t\t\t\ttarget.loopBackState = loopbackState;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// DECISIONS\r\n\t\t//\r\n\t\tlet ndecisions: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 1; i <= ndecisions; i++) {\r\n\t\t\tlet s: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\tlet decState: DecisionState = atn.states[s] as DecisionState;\r\n\t\t\tatn.decisionToState.push(decState);\r\n\t\t\tdecState.decision = i - 1;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// LEXER ACTIONS\r\n\t\t//\r\n\t\tif (atn.grammarType === ATNType.LEXER) {\r\n\t\t\tif (supportsLexerActions) {\r\n\t\t\t\tatn.lexerActions = new Array(ATNDeserializer.toInt(data[p++]));\r\n\t\t\t\tfor (let i = 0; i < atn.lexerActions.length; i++) {\r\n\t\t\t\t\tlet actionType: LexerActionType = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tlet data1: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tif (data1 === 0xFFFF) {\r\n\t\t\t\t\t\tdata1 = -1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet data2: number = ATNDeserializer.toInt(data[p++]);\r\n\t\t\t\t\tif (data2 === 0xFFFF) {\r\n\t\t\t\t\t\tdata2 = -1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet lexerAction: LexerAction = this.lexerActionFactory(actionType, data1, data2);\r\n\r\n\t\t\t\t\tatn.lexerActions[i] = lexerAction;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// for compatibility with older serialized ATNs, convert the old\r\n\t\t\t\t// serialized action index for action transitions to the new\r\n\t\t\t\t// form, which is the index of a LexerCustomAction\r\n\t\t\t\tlet legacyLexerActions: LexerAction[] = [];\r\n\t\t\t\tfor (let state of atn.states) {\r\n\t\t\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\t\t\tlet transition: Transition = state.transition(i);\r\n\t\t\t\t\t\tif (!(transition instanceof ActionTransition)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlet ruleIndex: number = transition.ruleIndex;\r\n\t\t\t\t\t\tlet actionIndex: number = transition.actionIndex;\r\n\t\t\t\t\t\tlet lexerAction: LexerCustomAction = new LexerCustomAction(ruleIndex, actionIndex);\r\n\t\t\t\t\t\tstate.setTransition(i, new ActionTransition(transition.target, ruleIndex, legacyLexerActions.length, false));\r\n\t\t\t\t\t\tlegacyLexerActions.push(lexerAction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tatn.lexerActions = legacyLexerActions;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markPrecedenceDecisions(atn);\r\n\r\n\t\tatn.decisionToDFA = new Array(ndecisions);\r\n\t\tfor (let i = 0; i < ndecisions; i++) {\r\n\t\t\tatn.decisionToDFA[i] = new DFA(atn.decisionToState[i], i);\r\n\t\t}\r\n\r\n\t\tif (this.deserializationOptions.isVerifyATN) {\r\n\t\t\tthis.verifyATN(atn);\r\n\t\t}\r\n\r\n\t\tif (this.deserializationOptions.isGenerateRuleBypassTransitions && atn.grammarType === ATNType.PARSER) {\r\n\t\t\tatn.ruleToTokenType = new Int32Array(atn.ruleToStartState.length);\r\n\t\t\tfor (let i = 0; i < atn.ruleToStartState.length; i++) {\r\n\t\t\t\tatn.ruleToTokenType[i] = atn.maxTokenType + i + 1;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < atn.ruleToStartState.length; i++) {\r\n\t\t\t\tlet bypassStart: BasicBlockStartState = new BasicBlockStartState();\r\n\t\t\t\tbypassStart.ruleIndex = i;\r\n\t\t\t\tatn.addState(bypassStart);\r\n\r\n\t\t\t\tlet bypassStop: BlockEndState = new BlockEndState();\r\n\t\t\t\tbypassStop.ruleIndex = i;\r\n\t\t\t\tatn.addState(bypassStop);\r\n\r\n\t\t\t\tbypassStart.endState = bypassStop;\r\n\t\t\t\tatn.defineDecisionState(bypassStart);\r\n\r\n\t\t\t\tbypassStop.startState = bypassStart;\r\n\r\n\t\t\t\tlet endState: ATNState | undefined;\r\n\t\t\t\tlet excludeTransition: Transition | undefined;\r\n\t\t\t\tif (atn.ruleToStartState[i].isPrecedenceRule) {\r\n\t\t\t\t\t// wrap from the beginning of the rule to the StarLoopEntryState\r\n\t\t\t\t\tendState = undefined;\r\n\t\t\t\t\tfor (let state of atn.states) {\r\n\t\t\t\t\t\tif (state.ruleIndex !== i) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (!(state instanceof StarLoopEntryState)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlet maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target;\r\n\t\t\t\t\t\tif (!(maybeLoopEndState instanceof LoopEndState)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.transition(0).target instanceof RuleStopState) {\r\n\t\t\t\t\t\t\tendState = state;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!endState) {\r\n\t\t\t\t\t\tthrow new Error(\"Couldn't identify final state of the precedence rule prefix section.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\texcludeTransition = (endState as StarLoopEntryState).loopBackState.transition(0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tendState = atn.ruleToStopState[i];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// all non-excluded transitions that currently target end state need to target blockEnd instead\r\n\t\t\t\tfor (let state of atn.states) {\r\n\t\t\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\t\t\tlet transition = state.transition(i);\r\n\t\t\t\t\t\tif (transition === excludeTransition) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (transition.target === endState) {\r\n\t\t\t\t\t\t\ttransition.target = bypassStop;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// all transitions leaving the rule start state need to leave blockStart instead\r\n\t\t\t\twhile (atn.ruleToStartState[i].numberOfTransitions > 0) {\r\n\t\t\t\t\tlet transition: Transition = atn.ruleToStartState[i].removeTransition(atn.ruleToStartState[i].numberOfTransitions - 1);\r\n\t\t\t\t\tbypassStart.addTransition(transition);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// link the new states\r\n\t\t\t\tatn.ruleToStartState[i].addTransition(new EpsilonTransition(bypassStart));\r\n\t\t\t\tbypassStop.addTransition(new EpsilonTransition(endState));\r\n\r\n\t\t\t\tlet matchState: ATNState = new BasicState();\r\n\t\t\t\tatn.addState(matchState);\r\n\t\t\t\tmatchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i]));\r\n\t\t\t\tbypassStart.addTransition(new EpsilonTransition(matchState));\r\n\t\t\t}\r\n\r\n\t\t\tif (this.deserializationOptions.isVerifyATN) {\r\n\t\t\t\t// reverify after modification\r\n\t\t\t\tthis.verifyATN(atn);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.deserializationOptions.isOptimize) {\r\n\t\t\twhile (true) {\r\n\t\t\t\tlet optimizationCount: number = 0;\r\n\t\t\t\toptimizationCount += ATNDeserializer.inlineSetRules(atn);\r\n\t\t\t\toptimizationCount += ATNDeserializer.combineChainedEpsilons(atn);\r\n\t\t\t\tlet preserveOrder: boolean = atn.grammarType === ATNType.LEXER;\r\n\t\t\t\toptimizationCount += ATNDeserializer.optimizeSets(atn, preserveOrder);\r\n\t\t\t\tif (optimizationCount === 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.deserializationOptions.isVerifyATN) {\r\n\t\t\t\t// reverify after modification\r\n\t\t\t\tthis.verifyATN(atn);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tATNDeserializer.identifyTailCalls(atn);\r\n\r\n\t\treturn atn;\r\n\t}\r\n\r\n\tprivate deserializeSets(data: Uint16Array, p: number, sets: IntervalSet[], unicodeDeserializer: UnicodeDeserializer): number {\r\n\t\tlet nsets: number = ATNDeserializer.toInt(data[p++]);\r\n\t\tfor (let i = 0; i < nsets; i++) {\r\n\t\t\tlet nintervals: number = ATNDeserializer.toInt(data[p]);\r\n\t\t\tp++;\r\n\t\t\tlet set: IntervalSet = new IntervalSet();\r\n\t\t\tsets.push(set);\r\n\r\n\t\t\tlet containsEof: boolean = ATNDeserializer.toInt(data[p++]) !== 0;\r\n\t\t\tif (containsEof) {\r\n\t\t\t\tset.add(-1);\r\n\t\t\t}\r\n\r\n\t\t\tfor (let j: number = 0; j < nintervals; j++) {\r\n\t\t\t\tlet a: number = unicodeDeserializer.readUnicode(data, p);\r\n\t\t\t\tp += unicodeDeserializer.size;\r\n\t\t\t\tlet b: number = unicodeDeserializer.readUnicode(data, p);\r\n\t\t\t\tp += unicodeDeserializer.size;\r\n\t\t\t\tset.add(a, b);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn p;\r\n\t}\r\n\r\n\t/**\r\n\t * Analyze the {@link StarLoopEntryState} states in the specified ATN to set\r\n\t * the {@link StarLoopEntryState#precedenceRuleDecision} field to the\r\n\t * correct value.\r\n\t *\r\n\t * @param atn The ATN.\r\n\t */\r\n\tprotected markPrecedenceDecisions(@NotNull atn: ATN): void {\r\n\t\t// Map rule index -> precedence decision for that rule\r\n\t\tlet rulePrecedenceDecisions = new Map();\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (!(state instanceof StarLoopEntryState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t/* We analyze the ATN to determine if this ATN decision state is the\r\n\t\t\t * decision for the closure block that determines whether a\r\n\t\t\t * precedence rule should continue or complete.\r\n\t\t\t */\r\n\t\t\tif (atn.ruleToStartState[state.ruleIndex].isPrecedenceRule) {\r\n\t\t\t\tlet maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target;\r\n\t\t\t\tif (maybeLoopEndState instanceof LoopEndState) {\r\n\t\t\t\t\tif (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.transition(0).target instanceof RuleStopState) {\r\n\t\t\t\t\t\trulePrecedenceDecisions.set(state.ruleIndex, state);\r\n\t\t\t\t\t\tstate.precedenceRuleDecision = true;\r\n\t\t\t\t\t\tstate.precedenceLoopbackStates = new BitSet(atn.states.length);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// After marking precedence decisions, we go back through and fill in\r\n\t\t// StarLoopEntryState.precedenceLoopbackStates.\r\n\t\tfor (let precedenceDecision of rulePrecedenceDecisions) {\r\n\t\t\tfor (let transition of atn.ruleToStopState[precedenceDecision[0]].getTransitions()) {\r\n\t\t\t\tif (transition.serializationType !== TransitionType.EPSILON) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet epsilonTransition = transition as EpsilonTransition;\r\n\t\t\t\tif (epsilonTransition.outermostPrecedenceReturn !== -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprecedenceDecision[1].precedenceLoopbackStates.set(transition.target.stateNumber);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected verifyATN(atn: ATN): void {\r\n\t\t// verify assumptions\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tthis.checkCondition(state !== undefined, \"ATN states should not be undefined.\");\r\n\t\t\tif (state.stateType === ATNStateType.INVALID_TYPE) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tthis.checkCondition(state.onlyHasEpsilonTransitions || state.numberOfTransitions <= 1);\r\n\r\n\t\t\tif (state instanceof PlusBlockStartState) {\r\n\t\t\t\tthis.checkCondition(state.loopBackState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof StarLoopEntryState) {\r\n\t\t\t\tlet starLoopEntryState: StarLoopEntryState = state;\r\n\t\t\t\tthis.checkCondition(starLoopEntryState.loopBackState !== undefined);\r\n\t\t\t\tthis.checkCondition(starLoopEntryState.numberOfTransitions === 2);\r\n\r\n\t\t\t\tif (starLoopEntryState.transition(0).target instanceof StarBlockStartState) {\r\n\t\t\t\t\tthis.checkCondition(starLoopEntryState.transition(1).target instanceof LoopEndState);\r\n\t\t\t\t\tthis.checkCondition(!starLoopEntryState.nonGreedy);\r\n\t\t\t\t}\r\n\t\t\t\telse if (starLoopEntryState.transition(0).target instanceof LoopEndState) {\r\n\t\t\t\t\tthis.checkCondition(starLoopEntryState.transition(1).target instanceof StarBlockStartState);\r\n\t\t\t\t\tthis.checkCondition(starLoopEntryState.nonGreedy);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthrow new Error(\"IllegalStateException\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof StarLoopbackState) {\r\n\t\t\t\tthis.checkCondition(state.numberOfTransitions === 1);\r\n\t\t\t\tthis.checkCondition(state.transition(0).target instanceof StarLoopEntryState);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof LoopEndState) {\r\n\t\t\t\tthis.checkCondition(state.loopBackState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof RuleStartState) {\r\n\t\t\t\tthis.checkCondition(state.stopState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof BlockStartState) {\r\n\t\t\t\tthis.checkCondition(state.endState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof BlockEndState) {\r\n\t\t\t\tthis.checkCondition(state.startState !== undefined);\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof DecisionState) {\r\n\t\t\t\tlet decisionState: DecisionState = state;\r\n\t\t\t\tthis.checkCondition(decisionState.numberOfTransitions <= 1 || decisionState.decision >= 0);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.checkCondition(state.numberOfTransitions <= 1 || state instanceof RuleStopState);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected checkCondition(condition: boolean, message?: string): void {\r\n\t\tif (!condition) {\r\n\t\t\tthrow new Error(\"IllegalStateException: \" + message);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static inlineSetRules(atn: ATN): number {\r\n\t\tlet inlinedCalls: number = 0;\r\n\r\n\t\tlet ruleToInlineTransition = new Array(atn.ruleToStartState.length);\r\n\t\tfor (let i = 0; i < atn.ruleToStartState.length; i++) {\r\n\t\t\tlet startState: RuleStartState = atn.ruleToStartState[i];\r\n\t\t\tlet middleState: ATNState = startState;\r\n\t\t\twhile (middleState.onlyHasEpsilonTransitions\r\n\t\t\t\t&& middleState.numberOfOptimizedTransitions === 1\r\n\t\t\t\t&& middleState.getOptimizedTransition(0).serializationType === TransitionType.EPSILON) {\r\n\t\t\t\tmiddleState = middleState.getOptimizedTransition(0).target;\r\n\t\t\t}\r\n\r\n\t\t\tif (middleState.numberOfOptimizedTransitions !== 1) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet matchTransition: Transition = middleState.getOptimizedTransition(0);\r\n\t\t\tlet matchTarget: ATNState = matchTransition.target;\r\n\t\t\tif (matchTransition.isEpsilon\r\n\t\t\t\t|| !matchTarget.onlyHasEpsilonTransitions\r\n\t\t\t\t|| matchTarget.numberOfOptimizedTransitions !== 1\r\n\t\t\t\t|| !(matchTarget.getOptimizedTransition(0).target instanceof RuleStopState)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tswitch (matchTransition.serializationType) {\r\n\t\t\tcase TransitionType.ATOM:\r\n\t\t\tcase TransitionType.RANGE:\r\n\t\t\tcase TransitionType.SET:\r\n\t\t\t\truleToInlineTransition[i] = matchTransition;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase TransitionType.NOT_SET:\r\n\t\t\tcase TransitionType.WILDCARD:\r\n\t\t\t\t// not implemented yet\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (state.ruleIndex < 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet optimizedTransitions: Transition[] | undefined;\r\n\t\t\tfor (let i = 0; i < state.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet transition: Transition = state.getOptimizedTransition(i);\r\n\t\t\t\tif (!(transition instanceof RuleTransition)) {\r\n\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet ruleTransition: RuleTransition = transition;\r\n\t\t\t\tlet effective: Transition | undefined = ruleToInlineTransition[ruleTransition.target.ruleIndex];\r\n\t\t\t\tif (effective === undefined) {\r\n\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (optimizedTransitions === undefined) {\r\n\t\t\t\t\toptimizedTransitions = [];\r\n\t\t\t\t\tfor (let j = 0; j < i; j++) {\r\n\t\t\t\t\t\toptimizedTransitions.push(state.getOptimizedTransition(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinlinedCalls++;\r\n\t\t\t\tlet target: ATNState = ruleTransition.followState;\r\n\t\t\t\tlet intermediateState: ATNState = new BasicState();\r\n\t\t\t\tintermediateState.setRuleIndex(target.ruleIndex);\r\n\t\t\t\tatn.addState(intermediateState);\r\n\t\t\t\toptimizedTransitions.push(new EpsilonTransition(intermediateState));\r\n\r\n\t\t\t\tswitch (effective.serializationType) {\r\n\t\t\t\tcase TransitionType.ATOM:\r\n\t\t\t\t\tintermediateState.addTransition(new AtomTransition(target, (effective as AtomTransition)._label));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase TransitionType.RANGE:\r\n\t\t\t\t\tintermediateState.addTransition(new RangeTransition(target, (effective as RangeTransition).from, (effective as RangeTransition).to));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase TransitionType.SET:\r\n\t\t\t\t\tintermediateState.addTransition(new SetTransition(target, (effective as SetTransition).label));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Error(\"UnsupportedOperationException\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\tif (state.isOptimized) {\r\n\t\t\t\t\twhile (state.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\t\t\tstate.removeOptimizedTransition(state.numberOfOptimizedTransitions - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let transition of optimizedTransitions) {\r\n\t\t\t\t\tstate.addOptimizedTransition(transition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ATN runtime optimizer removed \" + inlinedCalls + \" rule invocations by inlining sets.\");\r\n\t\t}\r\n\r\n\t\treturn inlinedCalls;\r\n\t}\r\n\r\n\tprivate static combineChainedEpsilons(atn: ATN): number {\r\n\t\tlet removedEdges: number = 0;\r\n\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tif (!state.onlyHasEpsilonTransitions || state instanceof RuleStopState) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet optimizedTransitions: Transition[] | undefined;\r\n\t\t\tnextTransition:\r\n\t\t\tfor (let i = 0; i < state.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet transition: Transition = state.getOptimizedTransition(i);\r\n\t\t\t\tlet intermediate: ATNState = transition.target;\r\n\t\t\t\tif (transition.serializationType !== TransitionType.EPSILON\r\n\t\t\t\t\t|| (transition as EpsilonTransition).outermostPrecedenceReturn !== -1\r\n\t\t\t\t\t|| intermediate.stateType !== ATNStateType.BASIC\r\n\t\t\t\t\t|| !intermediate.onlyHasEpsilonTransitions) {\r\n\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontinue nextTransition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let j = 0; j < intermediate.numberOfOptimizedTransitions; j++) {\r\n\t\t\t\t\tif (intermediate.getOptimizedTransition(j).serializationType !== TransitionType.EPSILON\r\n\t\t\t\t\t\t|| (intermediate.getOptimizedTransition(j) as EpsilonTransition).outermostPrecedenceReturn !== -1) {\r\n\t\t\t\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\t\t\t\toptimizedTransitions.push(transition);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcontinue nextTransition;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tremovedEdges++;\r\n\t\t\t\tif (optimizedTransitions === undefined) {\r\n\t\t\t\t\toptimizedTransitions = [];\r\n\t\t\t\t\tfor (let j = 0; j < i; j++) {\r\n\t\t\t\t\t\toptimizedTransitions.push(state.getOptimizedTransition(j));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let j = 0; j < intermediate.numberOfOptimizedTransitions; j++) {\r\n\t\t\t\t\tlet target: ATNState = intermediate.getOptimizedTransition(j).target;\r\n\t\t\t\t\toptimizedTransitions.push(new EpsilonTransition(target));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (optimizedTransitions !== undefined) {\r\n\t\t\t\tif (state.isOptimized) {\r\n\t\t\t\t\twhile (state.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\t\t\tstate.removeOptimizedTransition(state.numberOfOptimizedTransitions - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let transition of optimizedTransitions) {\r\n\t\t\t\t\tstate.addOptimizedTransition(transition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ATN runtime optimizer removed \" + removedEdges + \" transitions by combining chained epsilon transitions.\");\r\n\t\t}\r\n\r\n\t\treturn removedEdges;\r\n\t}\r\n\r\n\tprivate static optimizeSets(atn: ATN, preserveOrder: boolean): number {\r\n\t\tif (preserveOrder) {\r\n\t\t\t// this optimization currently doesn't preserve edge order.\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tlet removedPaths: number = 0;\r\n\t\tlet decisions: DecisionState[] = atn.decisionToState;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tlet setTransitions: IntervalSet = new IntervalSet();\r\n\t\t\tfor (let i = 0; i < decision.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet epsTransition: Transition = decision.getOptimizedTransition(i);\r\n\t\t\t\tif (!(epsTransition instanceof EpsilonTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (epsTransition.target.numberOfOptimizedTransitions !== 1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet transition: Transition = epsTransition.target.getOptimizedTransition(0);\r\n\t\t\t\tif (!(transition.target instanceof BlockEndState)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (transition instanceof NotSetTransition) {\r\n\t\t\t\t\t// TODO: not yet implemented\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (transition instanceof AtomTransition\r\n\t\t\t\t\t|| transition instanceof RangeTransition\r\n\t\t\t\t\t|| transition instanceof SetTransition) {\r\n\t\t\t\t\tsetTransitions.add(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (setTransitions.size <= 1) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet optimizedTransitions: Transition[] = [];\r\n\t\t\tfor (let i = 0; i < decision.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tif (!setTransitions.contains(i)) {\r\n\t\t\t\t\toptimizedTransitions.push(decision.getOptimizedTransition(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet blockEndState: ATNState = decision.getOptimizedTransition(setTransitions.minElement).target.getOptimizedTransition(0).target;\r\n\t\t\tlet matchSet: IntervalSet = new IntervalSet();\r\n\t\t\tfor (let interval of setTransitions.intervals) {\r\n\t\t\t\tfor (let j = interval.a; j <= interval.b; j++) {\r\n\t\t\t\t\tlet matchTransition: Transition = decision.getOptimizedTransition(j).target.getOptimizedTransition(0);\r\n\t\t\t\t\tif (matchTransition instanceof NotSetTransition) {\r\n\t\t\t\t\t\tthrow new Error(\"Not yet implemented.\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmatchSet.addAll(matchTransition.label as IntervalSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet newTransition: Transition;\r\n\t\t\tif (matchSet.intervals.length === 1) {\r\n\t\t\t\tif (matchSet.size === 1) {\r\n\t\t\t\t\tnewTransition = new AtomTransition(blockEndState, matchSet.minElement);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlet matchInterval: Interval = matchSet.intervals[0];\r\n\t\t\t\t\tnewTransition = new RangeTransition(blockEndState, matchInterval.a, matchInterval.b);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnewTransition = new SetTransition(blockEndState, matchSet);\r\n\t\t\t}\r\n\r\n\t\t\tlet setOptimizedState: ATNState = new BasicState();\r\n\t\t\tsetOptimizedState.setRuleIndex(decision.ruleIndex);\r\n\t\t\tatn.addState(setOptimizedState);\r\n\r\n\t\t\tsetOptimizedState.addTransition(newTransition);\r\n\t\t\toptimizedTransitions.push(new EpsilonTransition(setOptimizedState));\r\n\r\n\t\t\tremovedPaths += decision.numberOfOptimizedTransitions - optimizedTransitions.length;\r\n\r\n\t\t\tif (decision.isOptimized) {\r\n\t\t\t\twhile (decision.numberOfOptimizedTransitions > 0) {\r\n\t\t\t\t\tdecision.removeOptimizedTransition(decision.numberOfOptimizedTransitions - 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (let transition of optimizedTransitions) {\r\n\t\t\t\tdecision.addOptimizedTransition(transition);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ParserATNSimulator.debug) {\r\n\t\t\tconsole.log(\"ATN runtime optimizer removed \" + removedPaths + \" paths by collapsing sets.\");\r\n\t\t}\r\n\r\n\t\treturn removedPaths;\r\n\t}\r\n\r\n\tprivate static identifyTailCalls(atn: ATN): void {\r\n\t\tfor (let state of atn.states) {\r\n\t\t\tfor (let i = 0; i < state.numberOfTransitions; i++) {\r\n\t\t\t\tlet transition = state.transition(i);\r\n\t\t\t\tif (!(transition instanceof RuleTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttransition.tailCall = this.testTailCall(atn, transition, false);\r\n\t\t\t\ttransition.optimizedTailCall = this.testTailCall(atn, transition, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!state.isOptimized) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < state.numberOfOptimizedTransitions; i++) {\r\n\t\t\t\tlet transition = state.getOptimizedTransition(i);\r\n\t\t\t\tif (!(transition instanceof RuleTransition)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttransition.tailCall = this.testTailCall(atn, transition, false);\r\n\t\t\t\ttransition.optimizedTailCall = this.testTailCall(atn, transition, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static testTailCall(atn: ATN, transition: RuleTransition, optimizedPath: boolean): boolean {\r\n\t\tif (!optimizedPath && transition.tailCall) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (optimizedPath && transition.optimizedTailCall) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tlet reachable: BitSet = new BitSet(atn.states.length);\r\n\t\tlet worklist: ATNState[] = [];\r\n\t\tworklist.push(transition.followState);\r\n\t\twhile (true) {\r\n\t\t\tlet state = worklist.pop();\r\n\t\t\tif (!state) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (reachable.get(state.stateNumber)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (state instanceof RuleStopState) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (!state.onlyHasEpsilonTransitions) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tlet transitionCount = optimizedPath ? state.numberOfOptimizedTransitions : state.numberOfTransitions;\r\n\t\t\tfor (let i = 0; i < transitionCount; i++) {\r\n\t\t\t\tlet t = optimizedPath ? state.getOptimizedTransition(i) : state.transition(i);\r\n\t\t\t\tif (t.serializationType !== TransitionType.EPSILON) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tworklist.push(t.target);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\tprotected static toInt(c: number): number {\r\n\t\treturn c;\r\n\t}\r\n\r\n\tprotected static toInt32(data: Uint16Array, offset: number): number {\r\n\t\treturn (data[offset] | (data[offset + 1] << 16)) >>> 0;\r\n\t}\r\n\r\n\tprotected static toUUID(data: Uint16Array, offset: number): UUID {\r\n\t\tlet leastSigBits: number = ATNDeserializer.toInt32(data, offset);\r\n\t\tlet lessSigBits: number = ATNDeserializer.toInt32(data, offset + 2);\r\n\t\tlet moreSigBits: number = ATNDeserializer.toInt32(data, offset + 4);\r\n\t\tlet mostSigBits: number = ATNDeserializer.toInt32(data, offset + 6);\r\n\t\treturn new UUID(mostSigBits, moreSigBits, lessSigBits, leastSigBits);\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected edgeFactory(\r\n\t\t@NotNull atn: ATN,\r\n\t\ttype: TransitionType, src: number, trg: number,\r\n\t\targ1: number, arg2: number, arg3: number,\r\n\t\tsets: IntervalSet[]): Transition {\r\n\t\tlet target: ATNState = atn.states[trg];\r\n\t\tswitch (type) {\r\n\t\t\tcase TransitionType.EPSILON: return new EpsilonTransition(target);\r\n\t\t\tcase TransitionType.RANGE:\r\n\t\t\t\tif (arg3 !== 0) {\r\n\t\t\t\t\treturn new RangeTransition(target, Token.EOF, arg2);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn new RangeTransition(target, arg1, arg2);\r\n\t\t\t\t}\r\n\t\t\tcase TransitionType.RULE:\r\n\t\t\t\tlet rt: RuleTransition = new RuleTransition(atn.states[arg1] as RuleStartState, arg2, arg3, target);\r\n\t\t\t\treturn rt;\r\n\t\t\tcase TransitionType.PREDICATE:\r\n\t\t\t\tlet pt: PredicateTransition = new PredicateTransition(target, arg1, arg2, arg3 !== 0);\r\n\t\t\t\treturn pt;\r\n\t\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\t\treturn new PrecedencePredicateTransition(target, arg1);\r\n\t\t\tcase TransitionType.ATOM:\r\n\t\t\t\tif (arg3 !== 0) {\r\n\t\t\t\t\treturn new AtomTransition(target, Token.EOF);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn new AtomTransition(target, arg1);\r\n\t\t\t\t}\r\n\t\t\tcase TransitionType.ACTION:\r\n\t\t\t\tlet a: ActionTransition = new ActionTransition(target, arg1, arg2, arg3 !== 0);\r\n\t\t\t\treturn a;\r\n\t\t\tcase TransitionType.SET: return new SetTransition(target, sets[arg1]);\r\n\t\t\tcase TransitionType.NOT_SET: return new NotSetTransition(target, sets[arg1]);\r\n\t\t\tcase TransitionType.WILDCARD: return new WildcardTransition(target);\r\n\t\t}\r\n\r\n\t\tthrow new Error(\"The specified transition type is not valid.\");\r\n\t}\r\n\r\n\tprotected stateFactory(type: ATNStateType, ruleIndex: number): ATNState {\r\n\t\tlet s: ATNState;\r\n\t\tswitch (type) {\r\n\t\t\tcase ATNStateType.INVALID_TYPE: return new InvalidState();\r\n\t\t\tcase ATNStateType.BASIC: s = new BasicState(); break;\r\n\t\t\tcase ATNStateType.RULE_START: s = new RuleStartState(); break;\r\n\t\t\tcase ATNStateType.BLOCK_START: s = new BasicBlockStartState(); break;\r\n\t\t\tcase ATNStateType.PLUS_BLOCK_START: s = new PlusBlockStartState(); break;\r\n\t\t\tcase ATNStateType.STAR_BLOCK_START: s = new StarBlockStartState(); break;\r\n\t\t\tcase ATNStateType.TOKEN_START: s = new TokensStartState(); break;\r\n\t\t\tcase ATNStateType.RULE_STOP: s = new RuleStopState(); break;\r\n\t\t\tcase ATNStateType.BLOCK_END: s = new BlockEndState(); break;\r\n\t\t\tcase ATNStateType.STAR_LOOP_BACK: s = new StarLoopbackState(); break;\r\n\t\t\tcase ATNStateType.STAR_LOOP_ENTRY: s = new StarLoopEntryState(); break;\r\n\t\t\tcase ATNStateType.PLUS_LOOP_BACK: s = new PlusLoopbackState(); break;\r\n\t\t\tcase ATNStateType.LOOP_END: s = new LoopEndState(); break;\r\n\t\t\tdefault:\r\n\t\t\t\tlet message: string = `The specified state type ${type} is not valid.`;\r\n\t\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\ts.ruleIndex = ruleIndex;\r\n\t\treturn s;\r\n\t}\r\n\r\n\tprotected lexerActionFactory(type: LexerActionType, data1: number, data2: number): LexerAction {\r\n\t\tswitch (type) {\r\n\t\tcase LexerActionType.CHANNEL:\r\n\t\t\treturn new LexerChannelAction(data1);\r\n\r\n\t\tcase LexerActionType.CUSTOM:\r\n\t\t\treturn new LexerCustomAction(data1, data2);\r\n\r\n\t\tcase LexerActionType.MODE:\r\n\t\t\treturn new LexerModeAction(data1);\r\n\r\n\t\tcase LexerActionType.MORE:\r\n\t\t\treturn LexerMoreAction.INSTANCE;\r\n\r\n\t\tcase LexerActionType.POP_MODE:\r\n\t\t\treturn LexerPopModeAction.INSTANCE;\r\n\r\n\t\tcase LexerActionType.PUSH_MODE:\r\n\t\t\treturn new LexerPushModeAction(data1);\r\n\r\n\t\tcase LexerActionType.SKIP:\r\n\t\t\treturn LexerSkipAction.INSTANCE;\r\n\r\n\t\tcase LexerActionType.TYPE:\r\n\t\t\treturn new LexerTypeAction(data1);\r\n\r\n\t\tdefault:\r\n\t\t\tlet message: string = `The specified lexer action type ${type} is not valid.`;\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:31.0349605-07:00\r\n\r\nimport { DecisionInfo } from \"./DecisionInfo\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { ProfilingATNSimulator } from \"./ProfilingATNSimulator\";\r\n\r\n/**\r\n * This class provides access to specific and aggregate statistics gathered\r\n * during profiling of a parser.\r\n *\r\n * @since 4.3\r\n */\r\nexport class ParseInfo {\r\n\tprotected atnSimulator: ProfilingATNSimulator;\r\n\r\n\tconstructor(@NotNull atnSimulator: ProfilingATNSimulator) {\r\n\t\tthis.atnSimulator = atnSimulator;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets an array of {@link DecisionInfo} instances containing the profiling\r\n\t * information gathered for each decision in the ATN.\r\n\t *\r\n\t * @returns An array of {@link DecisionInfo} instances, indexed by decision\r\n\t * number.\r\n\t */\r\n\t@NotNull\r\n\tpublic getDecisionInfo(): DecisionInfo[] {\r\n\t\treturn this.atnSimulator.getDecisionInfo();\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the decision numbers for decisions that required one or more\r\n\t * full-context predictions during parsing. These are decisions for which\r\n\t * {@link DecisionInfo#LL_Fallback} is non-zero.\r\n\t *\r\n\t * @returns A list of decision numbers which required one or more\r\n\t * full-context predictions during parsing.\r\n\t */\r\n\t@NotNull\r\n\tpublic getLLDecisions(): number[] {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet LL: number[] = [];\r\n\t\tfor (let i = 0; i < decisions.length; i++) {\r\n\t\t\tlet fallBack: number = decisions[i].LL_Fallback;\r\n\t\t\tif (fallBack > 0) {\r\n\t\t\t\tLL.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn LL;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total time spent during prediction across all decisions made\r\n\t * during parsing. This value is the sum of\r\n\t * {@link DecisionInfo#timeInPrediction} for all decisions.\r\n\t */\r\n\tpublic getTotalTimeInPrediction(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet t: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tt += decision.timeInPrediction;\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of SLL lookahead operations across all decisions\r\n\t * made during parsing. This value is the sum of\r\n\t * {@link DecisionInfo#SLL_TotalLook} for all decisions.\r\n\t */\r\n\tpublic getTotalSLLLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.SLL_TotalLook;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of LL lookahead operations across all decisions\r\n\t * made during parsing. This value is the sum of\r\n\t * {@link DecisionInfo#LL_TotalLook} for all decisions.\r\n\t */\r\n\tpublic getTotalLLLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.LL_TotalLook;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of ATN lookahead operations for SLL prediction\r\n\t * across all decisions made during parsing.\r\n\t */\r\n\tpublic getTotalSLLATNLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.SLL_ATNTransitions;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of ATN lookahead operations for LL prediction\r\n\t * across all decisions made during parsing.\r\n\t */\r\n\tpublic getTotalLLATNLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.LL_ATNTransitions;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of ATN lookahead operations for SLL and LL\r\n\t * prediction across all decisions made during parsing.\r\n\t *\r\n\t * This value is the sum of {@link #getTotalSLLATNLookaheadOps} and\r\n\t * {@link #getTotalLLATNLookaheadOps}.\r\n\t */\r\n\tpublic getTotalATNLookaheadOps(): number {\r\n\t\tlet decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo();\r\n\t\tlet k: number = 0;\r\n\t\tfor (let decision of decisions) {\r\n\t\t\tk += decision.SLL_ATNTransitions;\r\n\t\t\tk += decision.LL_ATNTransitions;\r\n\t\t}\r\n\r\n\t\treturn k;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the total number of DFA states stored in the DFA cache for all\r\n\t * decisions in the ATN.\r\n\t */\r\n\tpublic getDFASize(): number;\r\n\r\n\t/**\r\n\t * Gets the total number of DFA states stored in the DFA cache for a\r\n\t * particular decision.\r\n\t */\r\n\tpublic getDFASize(decision: number): number;\r\n\r\n\tpublic getDFASize(decision?: number): number {\r\n\t\tif (decision) {\r\n\t\t\tlet decisionToDFA: DFA = this.atnSimulator.atn.decisionToDFA[decision];\r\n\t\t\treturn decisionToDFA.states.size;\r\n\t\t} else {\r\n\t\t\tlet n: number = 0;\r\n\t\t\tlet decisionToDFA: DFA[] = this.atnSimulator.atn.decisionToDFA;\r\n\t\t\tfor (let i = 0; i < decisionToDFA.length; i++) {\r\n\t\t\t\tn += this.getDFASize(i);\r\n\t\t\t}\r\n\r\n\t\t\treturn n;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:56.9812284-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { Parser } from \"./Parser\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { ProxyErrorListener } from \"./ProxyErrorListener\";\r\nimport { ParserErrorListener } from \"./ParserErrorListener\";\r\nimport { SimulatorState } from \"./atn/SimulatorState\";\r\nimport { Token } from \"./Token\";\r\nimport { Override } from \"./Decorators\";\r\n\r\n/**\r\n * @author Sam Harwell\r\n */\r\nexport class ProxyParserErrorListener extends ProxyErrorListener\r\n\timplements ParserErrorListener {\r\n\r\n\tconstructor(delegates: ParserErrorListener[]) {\r\n\t\tsuper(delegates);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAmbiguity(\r\n\t\trecognizer: Parser,\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\tambigAlts: BitSet | undefined,\r\n\t\tconfigs: ATNConfigSet): void {\r\n\t\tthis.getDelegates()\r\n\t\t\t.forEach((listener) => {\r\n\t\t\t\tif (listener.reportAmbiguity) {\r\n\t\t\t\t\tlistener.reportAmbiguity(\r\n\t\t\t\t\t\trecognizer,\r\n\t\t\t\t\t\tdfa,\r\n\t\t\t\t\t\tstartIndex,\r\n\t\t\t\t\t\tstopIndex,\r\n\t\t\t\t\t\texact,\r\n\t\t\t\t\t\tambigAlts,\r\n\t\t\t\t\t\tconfigs);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAttemptingFullContext(\r\n\t\trecognizer: Parser,\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tconflictingAlts: BitSet | undefined,\r\n\t\tconflictState: SimulatorState): void {\r\n\t\tthis.getDelegates()\r\n\t\t\t.forEach((listener) => {\r\n\t\t\t\tif (listener.reportAttemptingFullContext) {\r\n\t\t\t\t\tlistener.reportAttemptingFullContext(\r\n\t\t\t\t\t\trecognizer,\r\n\t\t\t\t\t\tdfa,\r\n\t\t\t\t\t\tstartIndex,\r\n\t\t\t\t\t\tstopIndex,\r\n\t\t\t\t\t\tconflictingAlts,\r\n\t\t\t\t\t\tconflictState);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportContextSensitivity(\r\n\t\trecognizer: Parser,\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tprediction: number,\r\n\t\tacceptState: SimulatorState): void {\r\n\t\tthis.getDelegates()\r\n\t\t\t.forEach((listener) => {\r\n\t\t\t\tif (listener.reportContextSensitivity) {\r\n\t\t\t\t\tlistener.reportContextSensitivity(\r\n\t\t\t\t\t\trecognizer,\r\n\t\t\t\t\t\tdfa,\r\n\t\t\t\t\t\tstartIndex,\r\n\t\t\t\t\t\tstopIndex,\r\n\t\t\t\t\t\tprediction,\r\n\t\t\t\t\t\tacceptState);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport function isHighSurrogate(ch: number): boolean {\r\n\treturn ch >= 0xD800 && ch <= 0xDBFF;\r\n}\r\n\r\nexport function isLowSurrogate(ch: number): boolean {\r\n\treturn ch >= 0xDC00 && ch <= 0xDFFF;\r\n}\r\n\r\nexport function isSupplementaryCodePoint(ch: number): boolean {\r\n\treturn ch >= 0x10000;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport * as assert from \"assert\";\r\nimport * as Character from \"./misc/Character\";\r\n\r\n/**\r\n * Wrapper for `Uint8Array` / `Uint16Array` / `Int32Array`.\r\n */\r\nexport class CodePointBuffer {\r\n\tprivate readonly buffer: Uint8Array | Uint16Array | Int32Array;\r\n\tprivate _position: number;\r\n\tprivate _size: number;\r\n\r\n\tconstructor(buffer: Uint8Array | Uint16Array | Int32Array, size: number) {\r\n\t\tthis.buffer = buffer;\r\n\t\tthis._position = 0;\r\n\t\tthis._size = size;\r\n\t}\r\n\r\n\tpublic static withArray(buffer: Uint8Array | Uint16Array | Int32Array): CodePointBuffer {\r\n\t\treturn new CodePointBuffer(buffer, buffer.length);\r\n\t}\r\n\r\n\tpublic get position(): number {\r\n\t\treturn this._position;\r\n\t}\r\n\r\n\tpublic set position(newPosition: number) {\r\n\t\tif (newPosition < 0 || newPosition > this._size) {\r\n\t\t\tthrow new RangeError();\r\n\t\t}\r\n\r\n\t\tthis._position = newPosition;\r\n\t}\r\n\r\n\tpublic get remaining(): number {\r\n\t\treturn this._size - this.position;\r\n\t}\r\n\r\n\tpublic get(offset: number): number {\r\n\t\treturn this.buffer[offset];\r\n\t}\r\n\r\n\tpublic array(): Uint8Array | Uint16Array | Int32Array {\r\n\t\treturn this.buffer.slice(0, this._size);\r\n\t}\r\n\r\n\tpublic static builder(initialBufferSize: number): CodePointBuffer.Builder {\r\n\t\treturn new CodePointBuffer.Builder(initialBufferSize);\r\n\t}\r\n}\r\n\r\nexport namespace CodePointBuffer {\r\n\tconst enum Type {\r\n\t\tBYTE,\r\n\t\tCHAR,\r\n\t\tINT,\r\n\t}\r\n\r\n\texport class Builder {\r\n\t\tprivate type: Type;\r\n\t\tprivate buffer: Uint8Array | Uint16Array | Int32Array;\r\n\t\tprivate prevHighSurrogate: number;\r\n\t\tprivate position: number;\r\n\r\n\t\tconstructor(initialBufferSize: number) {\r\n\t\t\tthis.type = Type.BYTE;\r\n\t\t\tthis.buffer = new Uint8Array(initialBufferSize);\r\n\t\t\tthis.prevHighSurrogate = -1;\r\n\t\t\tthis.position = 0;\r\n\t\t}\r\n\r\n\t\tpublic build(): CodePointBuffer {\r\n\t\t\treturn new CodePointBuffer(this.buffer, this.position);\r\n\t\t}\r\n\r\n\t\tprivate static roundUpToNextPowerOfTwo(i: number): number {\r\n\t\t\tlet nextPowerOfTwo: number = 32 - Math.clz32(i - 1);\r\n\t\t\treturn Math.pow(2, nextPowerOfTwo);\r\n\t\t}\r\n\r\n\t\tpublic ensureRemaining(remainingNeeded: number): void {\r\n\t\t\tswitch (this.type) {\r\n\t\t\t\tcase Type.BYTE:\r\n\t\t\t\t\tif (this.buffer.length - this.position < remainingNeeded) {\r\n\t\t\t\t\t\tlet newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded);\r\n\t\t\t\t\t\tlet newBuffer: Uint8Array = new Uint8Array(newCapacity);\r\n\t\t\t\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\t\t\t\t\t\tthis.buffer = newBuffer;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.CHAR:\r\n\t\t\t\t\tif (this.buffer.length - this.position < remainingNeeded) {\r\n\t\t\t\t\t\tlet newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded);\r\n\t\t\t\t\t\tlet newBuffer: Uint16Array = new Uint16Array(newCapacity);\r\n\t\t\t\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\t\t\t\t\t\tthis.buffer = newBuffer;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.INT:\r\n\t\t\t\t\tif (this.buffer.length - this.position < remainingNeeded) {\r\n\t\t\t\t\t\tlet newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded);\r\n\t\t\t\t\t\tlet newBuffer: Int32Array = new Int32Array(newCapacity);\r\n\t\t\t\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\t\t\t\t\t\tthis.buffer = newBuffer;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic append(utf16In: Uint16Array): void {\r\n\t\t\tthis.ensureRemaining(utf16In.length);\r\n\t\t\tthis.appendArray(utf16In);\r\n\t\t}\r\n\r\n\t\tprivate appendArray(utf16In: Uint16Array): void {\r\n\t\t\tswitch (this.type) {\r\n\t\t\t\tcase Type.BYTE:\r\n\t\t\t\t\tthis.appendArrayByte(utf16In);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.CHAR:\r\n\t\t\t\t\tthis.appendArrayChar(utf16In);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Type.INT:\r\n\t\t\t\t\tthis.appendArrayInt(utf16In);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprivate appendArrayByte(utf16In: Uint16Array): void {\r\n\t\t\tassert(this.prevHighSurrogate === -1);\r\n\r\n\t\t\tlet input: Uint16Array = utf16In;\r\n\t\t\tlet inOffset: number = 0;\r\n\t\t\tlet inLimit: number = utf16In.length;\r\n\r\n\t\t\tlet outByte = this.buffer;\r\n\t\t\tlet outOffset: number = this.position;\r\n\r\n\t\t\twhile (inOffset < inLimit) {\r\n\t\t\t\tlet c: number = input[inOffset];\r\n\t\t\t\tif (c <= 0xFF) {\r\n\t\t\t\t\toutByte[outOffset] = c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tutf16In = utf16In.subarray(inOffset, inLimit);\r\n\t\t\t\t\tthis.position = outOffset;\r\n\t\t\t\t\tif (!Character.isHighSurrogate(c)) {\r\n\t\t\t\t\t\tthis.byteToCharBuffer(utf16In.length);\r\n\t\t\t\t\t\tthis.appendArrayChar(utf16In);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.byteToIntBuffer(utf16In.length);\r\n\t\t\t\t\t\tthis.appendArrayInt(utf16In);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinOffset++;\r\n\t\t\t\toutOffset++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.position = outOffset;\r\n\t\t}\r\n\r\n\t\tprivate appendArrayChar(utf16In: Uint16Array): void {\r\n\t\t\tassert(this.prevHighSurrogate === -1);\r\n\r\n\t\t\tlet input: Uint16Array = utf16In;\r\n\t\t\tlet inOffset: number = 0;\r\n\t\t\tlet inLimit: number = utf16In.length;\r\n\r\n\t\t\tlet outChar = this.buffer;\r\n\t\t\tlet outOffset: number = this.position;\r\n\r\n\t\t\twhile (inOffset < inLimit) {\r\n\t\t\t\tlet c: number = input[inOffset];\r\n\t\t\t\tif (!Character.isHighSurrogate(c)) {\r\n\t\t\t\t\toutChar[outOffset] = c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tutf16In = utf16In.subarray(inOffset, inLimit);\r\n\t\t\t\t\tthis.position = outOffset;\r\n\t\t\t\t\tthis.charToIntBuffer(utf16In.length);\r\n\t\t\t\t\tthis.appendArrayInt(utf16In);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinOffset++;\r\n\t\t\t\toutOffset++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.position = outOffset;\r\n\t\t}\r\n\r\n\t\tprivate appendArrayInt(utf16In: Uint16Array): void {\r\n\t\t\tlet input: Uint16Array = utf16In;\r\n\t\t\tlet inOffset: number = 0;\r\n\t\t\tlet inLimit: number = utf16In.length;\r\n\r\n\t\t\tlet outInt = this.buffer;\r\n\t\t\tlet outOffset = this.position;\r\n\r\n\t\t\twhile (inOffset < inLimit) {\r\n\t\t\t\tlet c: number = input[inOffset];\r\n\t\t\t\tinOffset++;\r\n\t\t\t\tif (this.prevHighSurrogate !== -1) {\r\n\t\t\t\t\tif (Character.isLowSurrogate(c)) {\r\n\t\t\t\t\t\toutInt[outOffset] = String.fromCharCode(this.prevHighSurrogate, c).codePointAt(0)!;\r\n\t\t\t\t\t\toutOffset++;\r\n\t\t\t\t\t\tthis.prevHighSurrogate = -1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Dangling high surrogate\r\n\t\t\t\t\t\toutInt[outOffset] = this.prevHighSurrogate;\r\n\t\t\t\t\t\toutOffset++;\r\n\t\t\t\t\t\tif (Character.isHighSurrogate(c)) {\r\n\t\t\t\t\t\t\tthis.prevHighSurrogate = c;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\toutInt[outOffset] = c;\r\n\t\t\t\t\t\t\toutOffset++;\r\n\t\t\t\t\t\t\tthis.prevHighSurrogate = -1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (Character.isHighSurrogate(c)) {\r\n\t\t\t\t\tthis.prevHighSurrogate = c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutInt[outOffset] = c;\r\n\t\t\t\t\toutOffset++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.prevHighSurrogate !== -1) {\r\n\t\t\t\t// Dangling high surrogate\r\n\t\t\t\toutInt[outOffset] = this.prevHighSurrogate;\r\n\t\t\t\toutOffset++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.position = outOffset;\r\n\t\t}\r\n\r\n\t\tprivate byteToCharBuffer(toAppend: number): void {\r\n\t\t\t// CharBuffers hold twice as much per unit as ByteBuffers, so start with half the capacity.\r\n\t\t\tlet newBuffer: Uint16Array = new Uint16Array(Math.max(this.position + toAppend, this.buffer.length >> 1));\r\n\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\r\n\t\t\tthis.type = Type.CHAR;\r\n\t\t\tthis.buffer = newBuffer;\r\n\t\t}\r\n\r\n\t\tprivate byteToIntBuffer(toAppend: number): void {\r\n\t\t\t// IntBuffers hold four times as much per unit as ByteBuffers, so start with one quarter the capacity.\r\n\t\t\tlet newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 2));\r\n\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\r\n\t\t\tthis.type = Type.INT;\r\n\t\t\tthis.buffer = newBuffer;\r\n\t\t}\r\n\r\n\t\tprivate charToIntBuffer(toAppend: number): void {\r\n\t\t\t// IntBuffers hold two times as much per unit as ByteBuffers, so start with one half the capacity.\r\n\t\t\tlet newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 1));\r\n\t\t\tnewBuffer.set(this.buffer.subarray(0, this.position), 0);\r\n\r\n\t\t\tthis.type = Type.INT;\r\n\t\t\tthis.buffer = newBuffer;\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport * as assert from \"assert\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CodePointBuffer } from \"./CodePointBuffer\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\n\r\n/**\r\n * Alternative to {@link ANTLRInputStream} which treats the input\r\n * as a series of Unicode code points, instead of a series of UTF-16\r\n * code units.\r\n *\r\n * Use this if you need to parse input which potentially contains\r\n * Unicode values > U+FFFF.\r\n */\r\nexport class CodePointCharStream implements CharStream {\r\n\tprivate readonly _array: Uint8Array | Uint16Array | Int32Array;\r\n\tprivate readonly _size: number;\r\n\tprivate readonly _name: string;\r\n\r\n\tprivate _position: number;\r\n\r\n\t// Use the factory method {@link #fromBuffer(CodePointBuffer)} to\r\n\t// construct instances of this type.\r\n\tprotected constructor(array: Uint8Array | Uint16Array | Int32Array, position: number, remaining: number, name: string) {\r\n\t\t// TODO\r\n\t\tassert(position === 0);\r\n\t\tthis._array = array;\r\n\t\tthis._size = remaining;\r\n\t\tthis._name = name;\r\n\t\tthis._position = 0;\r\n\t}\r\n\r\n\tpublic get internalStorage(): Uint8Array | Uint16Array | Int32Array {\r\n\t\treturn this._array;\r\n\t}\r\n\r\n\t/**\r\n\t * Constructs a {@link CodePointCharStream} which provides access\r\n\t * to the Unicode code points stored in {@code codePointBuffer}.\r\n\t */\r\n\tpublic static fromBuffer(codePointBuffer: CodePointBuffer): CodePointCharStream;\r\n\r\n\t/**\r\n\t * Constructs a named {@link CodePointCharStream} which provides access\r\n\t * to the Unicode code points stored in {@code codePointBuffer}.\r\n\t */\r\n\tpublic static fromBuffer(codePointBuffer: CodePointBuffer, name: string): CodePointCharStream;\r\n\tpublic static fromBuffer(codePointBuffer: CodePointBuffer, name?: string): CodePointCharStream {\r\n\t\tif (name === undefined || name.length === 0) {\r\n\t\t\tname = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t\t}\r\n\r\n\t\t// Java lacks generics on primitive types.\r\n\t\t//\r\n\t\t// To avoid lots of calls to virtual methods in the\r\n\t\t// very hot codepath of LA() below, we construct one\r\n\t\t// of three concrete subclasses.\r\n\t\t//\r\n\t\t// The concrete subclasses directly access the code\r\n\t\t// points stored in the underlying array (byte[],\r\n\t\t// char[], or int[]), so we can avoid lots of virtual\r\n\t\t// method calls to ByteBuffer.get(offset).\r\n\t\treturn new CodePointCharStream(\r\n\t\t\tcodePointBuffer.array(),\r\n\t\t\tcodePointBuffer.position,\r\n\t\t\tcodePointBuffer.remaining,\r\n\t\t\tname);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic consume(): void {\r\n\t\tif (this._size - this._position === 0) {\r\n\t\t\tassert(this.LA(1) === IntStream.EOF);\r\n\t\t\tthrow new RangeError(\"cannot consume EOF\");\r\n\t\t}\r\n\r\n\t\tthis._position++;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get index(): number {\r\n\t\treturn this._position;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get size(): number {\r\n\t\treturn this._size;\r\n\t}\r\n\r\n\t/** mark/release do nothing; we have entire buffer */\r\n\t@Override\r\n\tpublic mark(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic release(marker: number): void {\r\n\t\t// No default implementation since this stream buffers the entire input\r\n\t}\r\n\r\n\t@Override\r\n\tpublic seek(index: number): void {\r\n\t\tthis._position = index;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get sourceName(): string {\r\n\t\treturn this._name;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this.getText(Interval.of(0, this.size - 1));\r\n\t}\r\n\r\n\t@Override\r\n\tpublic LA(i: number): number {\r\n\t\tlet offset: number;\r\n\t\tswitch (Math.sign(i)) {\r\n\t\t\tcase -1:\r\n\t\t\t\toffset = this.index + i;\r\n\t\t\t\tif (offset < 0) {\r\n\t\t\t\t\treturn IntStream.EOF;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this._array[offset];\r\n\r\n\t\t\tcase 0:\r\n\t\t\t\t// Undefined\r\n\t\t\t\treturn 0;\r\n\r\n\t\t\tcase 1:\r\n\t\t\t\toffset = this.index + i - 1;\r\n\t\t\t\tif (offset >= this.size) {\r\n\t\t\t\t\treturn IntStream.EOF;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this._array[offset];\r\n\t\t}\r\n\r\n\t\tthrow new RangeError(\"Not reached\");\r\n\t}\r\n\r\n\t/** Return the UTF-16 encoded string for the given interval */\r\n\t@Override\r\n\tpublic getText(interval: Interval): string {\r\n\t\tconst startIdx: number = Math.min(interval.a, this.size);\r\n\t\tconst len: number = Math.min(interval.b - interval.a + 1, this.size - startIdx);\r\n\r\n\t\tif (this._array instanceof Int32Array) {\r\n\t\t\treturn String.fromCodePoint(...Array.from(this._array.subarray(startIdx, startIdx + len)));\r\n\t\t} else {\r\n\t\t\treturn String.fromCharCode(...Array.from(this._array.subarray(startIdx, startIdx + len)));\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nimport { CodePointBuffer } from \"./CodePointBuffer\";\r\nimport { CodePointCharStream } from \"./CodePointCharStream\";\r\nimport { IntStream } from \"./IntStream\";\r\n\r\n// const DEFAULT_BUFFER_SIZE: number = 4096;\r\n\r\n/** This class represents the primary interface for creating {@link CharStream}s\r\n * from a variety of sources as of 4.7. The motivation was to support\r\n * Unicode code points > U+FFFF. {@link ANTLRInputStream} and\r\n * {@link ANTLRFileStream} are now deprecated in favor of the streams created\r\n * by this interface.\r\n *\r\n * DEPRECATED: {@code new ANTLRFileStream(\"myinputfile\")}\r\n * NEW: {@code CharStreams.fromFileName(\"myinputfile\")}\r\n *\r\n * WARNING: If you use both the deprecated and the new streams, you will see\r\n * a nontrivial performance degradation. This speed hit is because the\r\n * {@link Lexer}'s internal code goes from a monomorphic to megamorphic\r\n * dynamic dispatch to get characters from the input stream. Java's\r\n * on-the-fly compiler (JIT) is unable to perform the same optimizations\r\n * so stick with either the old or the new streams, if performance is\r\n * a primary concern. See the extreme debugging and spelunking\r\n * needed to identify this issue in our timing rig:\r\n *\r\n * https://github.com/antlr/antlr4/pull/1781\r\n *\r\n * The ANTLR character streams still buffer all the input when you create\r\n * the stream, as they have done for ~20 years. If you need unbuffered\r\n * access, please note that it becomes challenging to create\r\n * parse trees. The parse tree has to point to tokens which will either\r\n * point into a stale location in an unbuffered stream or you have to copy\r\n * the characters out of the buffer into the token. That defeats the purpose\r\n * of unbuffered input. Per the ANTLR book, unbuffered streams are primarily\r\n * useful for processing infinite streams *during the parse.*\r\n *\r\n * The new streams also use 8-bit buffers when possible so this new\r\n * interface supports character streams that use half as much memory\r\n * as the old {@link ANTLRFileStream}, which assumed 16-bit characters.\r\n *\r\n * A big shout out to Ben Hamilton (github bhamiltoncx) for his superhuman\r\n * efforts across all targets to get true Unicode 3.1 support for U+10FFFF.\r\n *\r\n * @since 4.7\r\n */\r\nexport namespace CharStreams {\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a path to a UTF-8\r\n\t// * encoded file on disk.\r\n\t// *\r\n\t// * Reads the entire contents of the file into the result before returning.\r\n\t// */\r\n\t// export function fromFile(file: File): CharStream;\r\n\t// export function fromFile(file: File, charset: Charset): CharStream;\r\n\t// export function fromFile(file: File, charset?: Charset): CharStream {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \tlet size: number = file.length();\r\n\t// \treturn fromStream(new FileInputStream(file), charset, file.toString(), size);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a string containing a\r\n\t// * path to a UTF-8 file on disk.\r\n\t// *\r\n\t// * Reads the entire contents of the file into the result before returning.\r\n\t// */\r\n\t// export function fromFileName(fileName: string): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a string containing a\r\n\t// * path to a file on disk and the charset of the bytes\r\n\t// * contained in the file.\r\n\t// *\r\n\t// * Reads the entire contents of the file into the result before returning.\r\n\t// */\r\n\t// export function fromFileName(fileName: string, charset: Charset): CharStream;\r\n\t// export function fromFileName(fileName: string, charset?: Charset): CharStream {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \treturn fromFile(new File(fileName), charset);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link InputStream}\r\n\t// * containing UTF-8 bytes.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code InputStream} into\r\n\t// * the result before returning, then closes the {@code InputStream}.\r\n\t// */\r\n\t// export function fromStream(is: InputStream): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link InputStream} and the\r\n\t// * charset of the bytes contained in the stream.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code InputStream} into\r\n\t// * the result before returning, then closes the {@code InputStream}.\r\n\t// */\r\n\t// export function fromStream(is: InputStream, charset: Charset): CharStream;\r\n\r\n\t// export function fromStream(is: InputStream, charset: Charset, sourceName: string, inputSize: number): CharStream;\r\n\t// export function fromStream(is: InputStream, charset?: Charset, sourceName?: string, inputSize?: number): CharStream {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \tif (sourceName === undefined) {\r\n\t// \t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t// \t}\r\n\r\n\t// \tif (inputSize === undefined) {\r\n\t// \t\tinputSize = -1;\r\n\t// \t}\r\n\r\n\t// \treturn fromChannel(\r\n\t// \t\tChannels.newChannel(is),\r\n\t// \t\tcharset,\r\n\t// \t\tDEFAULT_BUFFER_SIZE,\r\n\t// \t\tCodingErrorAction.REPLACE,\r\n\t// \t\tsourceName,\r\n\t// \t\tinputSize);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link ReadableByteChannel}\r\n\t// * containing UTF-8 bytes.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code channel} into\r\n\t// * the result before returning, then closes the {@code channel}.\r\n\t// */\r\n\t// export function fromChannel(channel: ReadableByteChannel): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link ReadableByteChannel} and the\r\n\t// * charset of the bytes contained in the channel.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code channel} into\r\n\t// * the result before returning, then closes the {@code channel}.\r\n\t// */\r\n\t// export function fromChannel(channel: ReadableByteChannel, charset: Charset): CharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given an opened {@link ReadableByteChannel}\r\n\t// * containing UTF-8 bytes.\r\n\t// *\r\n\t// * Reads the entire contents of the {@code channel} into\r\n\t// * the result before returning, then closes the {@code channel}.\r\n\t// */\r\n\t// export function fromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset: Charset,\r\n\t// \tbufferSize: number,\r\n\t// \tdecodingErrorAction: CodingErrorAction,\r\n\t// \tsourceName: string): CodePointCharStream;\r\n\r\n\t// export function fromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset: Charset,\r\n\t// \tbufferSize: number,\r\n\t// \tdecodingErrorAction: CodingErrorAction,\r\n\t// \tsourceName: string,\r\n\t// \tinputSize: number): CodePointCharStream;\r\n\t// export function fromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset?: Charset,\r\n\t// \tbufferSize?: number,\r\n\t// \tdecodingErrorAction?: CodingErrorAction,\r\n\t// \tsourceName?: string,\r\n\t// \tinputSize?: number): CodePointCharStream\r\n\t// {\r\n\t// \tif (charset === undefined) {\r\n\t// \t\tcharset = Charset.forName(\"UTF-8\");\r\n\t// \t}\r\n\r\n\t// \tif (bufferSize === undefined) {\r\n\t// \t\tbufferSize = DEFAULT_BUFFER_SIZE;\r\n\t// \t}\r\n\r\n\t// \tif (decodingErrorAction === undefined) {\r\n\t// \t\tdecodingErrorAction = CodingErrorAction.REPLACE;\r\n\t// \t}\r\n\r\n\t// \tif (sourceName === undefined || sourceName.length === 0) {\r\n\t// \t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t// \t}\r\n\r\n\t// \tif (inputSize === undefined) {\r\n\t// \t\tinputSize = -1;\r\n\t// \t}\r\n\r\n\t// \tlet codePointBuffer: CodePointBuffer = bufferFromChannel(channel, charset, bufferSize, decodingErrorAction, inputSize);\r\n\t// \treturn CodePointCharStream.fromBuffer(codePointBuffer, sourceName);\r\n\t// }\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a {@link Reader}. Closes\r\n\t// * the reader before returning.\r\n\t// */\r\n\t// export function fromReader(r: Reader): CodePointCharStream;\r\n\r\n\t// /**\r\n\t// * Creates a {@link CharStream} given a {@link Reader} and its\r\n\t// * source name. Closes the reader before returning.\r\n\t// */\r\n\t// export function fromReader(r: Reader, sourceName: string): CodePointCharStream;\r\n\t// export function fromReader(r: Reader, sourceName?: string): CodePointCharStream {\r\n\t// \tif (sourceName === undefined) {\r\n\t// \t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t// \t}\r\n\r\n\t// \ttry {\r\n\t// \t\tlet codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(DEFAULT_BUFFER_SIZE);\r\n\t// \t\tlet charBuffer: CharBuffer = CharBuffer.allocate(DEFAULT_BUFFER_SIZE);\r\n\t// \t\twhile ((r.read(charBuffer)) !== -1) {\r\n\t// \t\t\tcharBuffer.flip();\r\n\t// \t\t\tcodePointBufferBuilder.append(charBuffer);\r\n\t// \t\t\tcharBuffer.compact();\r\n\t// \t\t}\r\n\r\n\t// \t\treturn CodePointCharStream.fromBuffer(codePointBufferBuilder.build(), sourceName);\r\n\t// \t} finally {\r\n\t// \t\tr.close();\r\n\t// \t}\r\n\t// }\r\n\r\n\t/**\r\n\t * Creates a {@link CharStream} given a {@link String}.\r\n\t */\r\n\texport function fromString(s: string): CodePointCharStream;\r\n\r\n\t/**\r\n\t * Creates a {@link CharStream} given a {@link String} and the {@code sourceName}\r\n\t * from which it came.\r\n\t */\r\n\texport function fromString(s: string, sourceName: string): CodePointCharStream;\r\n\texport function fromString(s: string, sourceName?: string): CodePointCharStream {\r\n\t\tif (sourceName === undefined || sourceName.length === 0) {\r\n\t\t\tsourceName = IntStream.UNKNOWN_SOURCE_NAME;\r\n\t\t}\r\n\r\n\t\t// Initial guess assumes no code points > U+FFFF: one code\r\n\t\t// point for each code unit in the string\r\n\t\tlet codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(s.length);\r\n\r\n\t\t// TODO: CharBuffer.wrap(String) rightfully returns a read-only buffer\r\n\t\t// which doesn't expose its array, so we make a copy.\r\n\t\tlet cb: Uint16Array = new Uint16Array(s.length);\r\n\t\tfor (let i = 0; i < s.length; i++) {\r\n\t\t\tcb[i] = s.charCodeAt(i);\r\n\t\t}\r\n\r\n\t\tcodePointBufferBuilder.append(cb);\r\n\t\treturn CodePointCharStream.fromBuffer(codePointBufferBuilder.build(), sourceName);\r\n\t}\r\n\r\n\t// export function bufferFromChannel(\r\n\t// \tchannel: ReadableByteChannel,\r\n\t// \tcharset: Charset,\r\n\t// \tbufferSize: number,\r\n\t// \tdecodingErrorAction: CodingErrorAction,\r\n\t// \tinputSize: number): CodePointBuffer {\r\n\t// \ttry {\r\n\t// \t\tlet utf8BytesIn: Uint8Array = new Uint8Array(bufferSize);\r\n\t// \t\tlet utf16CodeUnitsOut: Uint16Array = new Uint16Array(bufferSize);\r\n\t// \t\tif (inputSize === -1) {\r\n\t// \t\t\tinputSize = bufferSize;\r\n\t// \t\t} else if (inputSize > Integer.MAX_VALUE) {\r\n\t// \t\t\t// ByteBuffer et al don't support long sizes\r\n\t// \t\t\tthrow new RangeError(`inputSize ${inputSize} larger than max ${Integer.MAX_VALUE}`);\r\n\t// \t\t}\r\n\r\n\t// \t\tlet codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(inputSize);\r\n\t// \t\tlet decoder: CharsetDecoder = charset\r\n\t// \t\t\t\t.newDecoder()\r\n\t// \t\t\t\t.onMalformedInput(decodingErrorAction)\r\n\t// \t\t\t\t.onUnmappableCharacter(decodingErrorAction);\r\n\r\n\t// \t\tlet endOfInput: boolean = false;\r\n\t// \t\twhile (!endOfInput) {\r\n\t// \t\t\tlet bytesRead: number = channel.read(utf8BytesIn);\r\n\t// \t\t\tendOfInput = (bytesRead === -1);\r\n\t// \t\t\tutf8BytesIn.flip();\r\n\t// \t\t\tlet result: CoderResult = decoder.decode(\r\n\t// \t\t\t\tutf8BytesIn,\r\n\t// \t\t\t\tutf16CodeUnitsOut,\r\n\t// \t\t\t\tendOfInput);\r\n\t// \t\t\tif (result.isError() && decodingErrorAction === CodingErrorAction.REPORT) {\r\n\t// \t\t\t\tresult.throwException();\r\n\t// \t\t\t}\r\n\r\n\t// \t\t\tutf16CodeUnitsOut.flip();\r\n\t// \t\t\tcodePointBufferBuilder.append(utf16CodeUnitsOut);\r\n\t// \t\t\tutf8BytesIn.compact();\r\n\t// \t\t\tutf16CodeUnitsOut.compact();\r\n\t// \t\t}\r\n\t// \t\t// Handle any bytes at the end of the file which need to\r\n\t// \t\t// be represented as errors or substitution characters.\r\n\t// \t\tlet flushResult: CoderResult = decoder.flush(utf16CodeUnitsOut);\r\n\t// \t\tif (flushResult.isError() && decodingErrorAction === CodingErrorAction.REPORT) {\r\n\t// \t\t\tflushResult.throwException();\r\n\t// \t\t}\r\n\r\n\t// \t\tutf16CodeUnitsOut.flip();\r\n\t// \t\tcodePointBufferBuilder.append(utf16CodeUnitsOut);\r\n\r\n\t// \t\treturn codePointBufferBuilder.build();\r\n\t// \t}\r\n\t// \tfinally {\r\n\t// \t\tchannel.close();\r\n\t// \t}\r\n\t// }\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:49.6074365-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport { CommonToken } from \"./CommonToken\";\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { WritableToken } from \"./WritableToken\";\r\n\r\n/**\r\n * This implementation of {@link TokenStream} loads tokens from a\r\n * {@link TokenSource} on-demand, and places the tokens in a buffer to provide\r\n * access to any previous token by index.\r\n *\r\n * This token stream ignores the value of {@link Token#getChannel}. If your\r\n * parser requires the token stream filter tokens to only those on a particular\r\n * channel, such as {@link Token#DEFAULT_CHANNEL} or\r\n * {@link Token#HIDDEN_CHANNEL}, use a filtering token stream such a\r\n * {@link CommonTokenStream}.\r\n */\r\nexport class BufferedTokenStream implements TokenStream {\r\n\t/**\r\n\t * The {@link TokenSource} from which tokens for this stream are fetched.\r\n\t */\r\n\t@NotNull\r\n\tprivate _tokenSource: TokenSource;\r\n\r\n\t/**\r\n\t * A collection of all tokens fetched from the token source. The list is\r\n\t * considered a complete view of the input once {@link #fetchedEOF} is set\r\n\t * to `true`.\r\n\t */\r\n\tprotected tokens: Token[] = [];\r\n\r\n\t/**\r\n\t * The index into {@link #tokens} of the current token (next token to\r\n\t * {@link #consume}). {@link #tokens}`[`{@link #p}`]` should be\r\n\t * {@link #LT LT(1)}.\r\n\t *\r\n\t * This field is set to -1 when the stream is first constructed or when\r\n\t * {@link #setTokenSource} is called, indicating that the first token has\r\n\t * not yet been fetched from the token source. For additional information,\r\n\t * see the documentation of {@link IntStream} for a description of\r\n\t * Initializing Methods.\r\n\t */\r\n\tprotected p: number = -1;\r\n\r\n\t/**\r\n\t * Indicates whether the {@link Token#EOF} token has been fetched from\r\n\t * {@link #tokenSource} and added to {@link #tokens}. This field improves\r\n\t * performance for the following cases:\r\n\t *\r\n\t * * {@link #consume}: The lookahead check in {@link #consume} to prevent\r\n\t * consuming the EOF symbol is optimized by checking the values of\r\n\t * {@link #fetchedEOF} and {@link #p} instead of calling {@link #LA}.\r\n\t * * {@link #fetch}: The check to prevent adding multiple EOF symbols into\r\n\t * {@link #tokens} is trivial with this field.\r\n\t */\r\n\tprotected fetchedEOF: boolean = false;\r\n\r\n\tconstructor(@NotNull tokenSource: TokenSource) {\r\n\t\tif (tokenSource == null) {\r\n\t\t\tthrow new Error(\"tokenSource cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._tokenSource = tokenSource;\r\n\t}\r\n\r\n\t@Override\r\n\tget tokenSource(): TokenSource {\r\n\t\treturn this._tokenSource;\r\n\t}\r\n\r\n\t/** Reset this token stream by setting its token source. */\r\n\tset tokenSource(tokenSource: TokenSource) {\r\n\t\tthis._tokenSource = tokenSource;\r\n\t\tthis.tokens.length = 0;\r\n\t\tthis.p = -1;\r\n\t\tthis.fetchedEOF = false;\r\n\t}\r\n\r\n\t@Override\r\n\tget index(): number {\r\n\t\treturn this.p;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic mark(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic release(marker: number): void {\r\n\t\t// no resources to release\r\n\t}\r\n\r\n\t@Override\r\n\tpublic seek(index: number): void {\r\n\t\tthis.lazyInit();\r\n\t\tthis.p = this.adjustSeekIndex(index);\r\n\t}\r\n\r\n\t@Override\r\n\tget size(): number {\r\n\t\treturn this.tokens.length;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic consume(): void {\r\n\t\tlet skipEofCheck: boolean;\r\n\t\tif (this.p >= 0) {\r\n\t\t\tif (this.fetchedEOF) {\r\n\t\t\t\t// the last token in tokens is EOF. skip check if p indexes any\r\n\t\t\t\t// fetched token except the last.\r\n\t\t\t\tskipEofCheck = this.p < this.tokens.length - 1;\r\n\t\t\t} else {\r\n\t\t\t\t// no EOF token in tokens. skip check if p indexes a fetched token.\r\n\t\t\t\tskipEofCheck = this.p < this.tokens.length;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// not yet initialized\r\n\t\t\tskipEofCheck = false;\r\n\t\t}\r\n\r\n\t\tif (!skipEofCheck && this.LA(1) === Token.EOF) {\r\n\t\t\tthrow new Error(\"cannot consume EOF\");\r\n\t\t}\r\n\r\n\t\tif (this.sync(this.p + 1)) {\r\n\t\t\tthis.p = this.adjustSeekIndex(this.p + 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Make sure index `i` in tokens has a token.\r\n\t *\r\n\t * @returns `true` if a token is located at index `i`, otherwise\r\n\t * `false`.\r\n\t * @see #get(int i)\r\n\t */\r\n\tprotected sync(i: number): boolean {\r\n\t\tassert(i >= 0);\r\n\t\tlet n: number = i - this.tokens.length + 1; // how many more elements we need?\r\n\t\t//System.out.println(\"sync(\"+i+\") needs \"+n);\r\n\t\tif (n > 0) {\r\n\t\t\tlet fetched: number = this.fetch(n);\r\n\t\t\treturn fetched >= n;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/** Add `n` elements to buffer.\r\n\t *\r\n\t * @returns The actual number of elements added to the buffer.\r\n\t */\r\n\tprotected fetch(n: number): number {\r\n\t\tif (this.fetchedEOF) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tlet t: Token = this.tokenSource.nextToken();\r\n\t\t\tif (this.isWritableToken(t)) {\r\n\t\t\t\tt.tokenIndex = this.tokens.length;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tokens.push(t);\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tthis.fetchedEOF = true;\r\n\t\t\t\treturn i + 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn n;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic get(i: number): Token {\r\n\t\tif (i < 0 || i >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(\"token index \" + i + \" out of range 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t/** Get all tokens from start..stop inclusively. */\r\n\tpublic getRange(start: number, stop: number): Token[] {\r\n\t\tif (start < 0 || stop < 0) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tthis.lazyInit();\r\n\t\tlet subset: Token[] = new Array();\r\n\t\tif (stop >= this.tokens.length) {\r\n\t\t\tstop = this.tokens.length - 1;\r\n\t\t}\r\n\r\n\t\tfor (let i = start; i <= stop; i++) {\r\n\t\t\tlet t: Token = this.tokens[i];\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tsubset.push(t);\r\n\t\t}\r\n\r\n\t\treturn subset;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic LA(i: number): number {\r\n\t\tlet token = this.LT(i);\r\n\t\tif (!token) {\r\n\t\t\treturn Token.INVALID_TYPE;\r\n\t\t}\r\n\r\n\t\treturn token.type;\r\n\t}\r\n\r\n\tprotected tryLB(k: number): Token | undefined {\r\n\t\tif ((this.p - k) < 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this.tokens[this.p - k];\r\n\t}\r\n\r\n\t@NotNull\r\n\t@Override\r\n\tpublic LT(k: number): Token {\r\n\t\tlet result = this.tryLT(k);\r\n\t\tif (result === undefined) {\r\n\t\t\tthrow new RangeError(\"requested lookback index out of range\");\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tpublic tryLT(k: number): Token | undefined {\r\n\t\tthis.lazyInit();\r\n\t\tif (k === 0) {\r\n\t\t\tthrow new RangeError(\"0 is not a valid lookahead index\");\r\n\t\t}\r\n\r\n\t\tif (k < 0) {\r\n\t\t\treturn this.tryLB(-k);\r\n\t\t}\r\n\r\n\t\tlet i: number = this.p + k - 1;\r\n\t\tthis.sync(i);\r\n\t\tif (i >= this.tokens.length) {\r\n\t\t\t// return EOF token\r\n\t\t\t// EOF must be last token\r\n\t\t\treturn this.tokens[this.tokens.length - 1];\r\n\t\t}\r\n\r\n\t\t//\t\tif ( i>range ) range = i;\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t/**\r\n\t * Allowed derived classes to modify the behavior of operations which change\r\n\t * the current stream position by adjusting the target token index of a seek\r\n\t * operation. The default implementation simply returns `i`. If an\r\n\t * exception is thrown in this method, the current stream index should not be\r\n\t * changed.\r\n\t *\r\n\t * For example, {@link CommonTokenStream} overrides this method to ensure that\r\n\t * the seek target is always an on-channel token.\r\n\t *\r\n\t * @param i The target token index.\r\n\t * @returns The adjusted target token index.\r\n\t */\r\n\tprotected adjustSeekIndex(i: number): number {\r\n\t\treturn i;\r\n\t}\r\n\r\n\tprotected lazyInit(): void {\r\n\t\tif (this.p === -1) {\r\n\t\t\tthis.setup();\r\n\t\t}\r\n\t}\r\n\r\n\tprotected setup(): void {\r\n\t\tthis.sync(0);\r\n\t\tthis.p = this.adjustSeekIndex(0);\r\n\t}\r\n\r\n\tpublic getTokens(): Token[];\r\n\r\n\tpublic getTokens(start: number, stop: number): Token[];\r\n\r\n\tpublic getTokens(start: number, stop: number, types: Set): Token[];\r\n\r\n\tpublic getTokens(start: number, stop: number, ttype: number): Token[];\r\n\r\n\t/** Given a start and stop index, return a `List` of all tokens in\r\n\t * the token type `BitSet`. Return an empty array if no tokens were found. This\r\n\t * method looks at both on and off channel tokens.\r\n\t */\r\n\tpublic getTokens(start?: number, stop?: number, types?: Set | number): Token[] {\r\n\t\tthis.lazyInit();\r\n\r\n\t\tif (start === undefined) {\r\n\t\t\tassert(stop === undefined && types === undefined);\r\n\t\t\treturn this.tokens;\r\n\t\t} else if (stop === undefined) {\r\n\t\t\tstop = this.tokens.length - 1;\r\n\t\t}\r\n\r\n\t\tif (start < 0 || stop >= this.tokens.length || stop < 0 || start >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(\"start \" + start + \" or stop \" + stop + \" not in 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\tif (start > stop) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tif (types === undefined) {\r\n\t\t\treturn this.tokens.slice(start, stop + 1);\r\n\t\t} else if (typeof types === \"number\") {\r\n\t\t\ttypes = new Set().add(types);\r\n\t\t}\r\n\r\n\t\tlet typesSet = types;\r\n\r\n\t\t// list = tokens[start:stop]:{T t, t.type in types}\r\n\t\tlet filteredTokens: Token[] = this.tokens.slice(start, stop + 1);\r\n\t\tfilteredTokens = filteredTokens.filter((value) => typesSet.has(value.type));\r\n\r\n\t\treturn filteredTokens;\r\n\t}\r\n\r\n\t/**\r\n\t * Given a starting index, return the index of the next token on channel.\r\n\t * Return `i` if `tokens[i]` is on channel. Return the index of\r\n\t * the EOF token if there are no tokens on channel between `i` and\r\n\t * EOF.\r\n\t */\r\n\tprotected nextTokenOnChannel(i: number, channel: number): number {\r\n\t\tthis.sync(i);\r\n\t\tif (i >= this.size) {\r\n\t\t\treturn this.size - 1;\r\n\t\t}\r\n\r\n\t\tlet token: Token = this.tokens[i];\r\n\t\twhile (token.channel !== channel) {\r\n\t\t\tif (token.type === Token.EOF) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\r\n\t\t\ti++;\r\n\t\t\tthis.sync(i);\r\n\t\t\ttoken = this.tokens[i];\r\n\t\t}\r\n\r\n\t\treturn i;\r\n\t}\r\n\r\n\t/**\r\n\t * Given a starting index, return the index of the previous token on\r\n\t * channel. Return `i` if `tokens[i]` is on channel. Return -1\r\n\t * if there are no tokens on channel between `i` and 0.\r\n\t *\r\n\t * If `i` specifies an index at or after the EOF token, the EOF token\r\n\t * index is returned. This is due to the fact that the EOF token is treated\r\n\t * as though it were on every channel.\r\n\t */\r\n\tprotected previousTokenOnChannel(i: number, channel: number): number {\r\n\t\tthis.sync(i);\r\n\t\tif (i >= this.size) {\r\n\t\t\t// the EOF token is on every channel\r\n\t\t\treturn this.size - 1;\r\n\t\t}\r\n\r\n\t\twhile (i >= 0) {\r\n\t\t\tlet token: Token = this.tokens[i];\r\n\t\t\tif (token.type === Token.EOF || token.channel === channel) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\r\n\t\t\ti--;\r\n\t\t}\r\n\r\n\t\treturn i;\r\n\t}\r\n\r\n\t/** Collect all tokens on specified channel to the right of\r\n\t * the current token up until we see a token on {@link Lexer#DEFAULT_TOKEN_CHANNEL} or\r\n\t * EOF. If `channel` is `-1`, find any non default channel token.\r\n\t */\r\n\tpublic getHiddenTokensToRight(tokenIndex: number, channel: number = -1): Token[] {\r\n\t\tthis.lazyInit();\r\n\t\tif (tokenIndex < 0 || tokenIndex >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(tokenIndex + \" not in 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\tlet nextOnChannel: number = this.nextTokenOnChannel(tokenIndex + 1, Lexer.DEFAULT_TOKEN_CHANNEL);\r\n\t\tlet to: number;\r\n\t\tlet from: number = tokenIndex + 1;\r\n\t\t// if none onchannel to right, nextOnChannel=-1 so set to = last token\r\n\t\tif (nextOnChannel === -1) {\r\n\t\t\tto = this.size - 1;\r\n\t\t} else {\r\n\t\t\tto = nextOnChannel;\r\n\t\t}\r\n\r\n\t\treturn this.filterForChannel(from, to, channel);\r\n\t}\r\n\r\n\t/** Collect all tokens on specified channel to the left of\r\n\t * the current token up until we see a token on {@link Lexer#DEFAULT_TOKEN_CHANNEL}.\r\n\t * If `channel` is `-1`, find any non default channel token.\r\n\t */\r\n\tpublic getHiddenTokensToLeft(tokenIndex: number, channel: number = -1): Token[] {\r\n\t\tthis.lazyInit();\r\n\t\tif (tokenIndex < 0 || tokenIndex >= this.tokens.length) {\r\n\t\t\tthrow new RangeError(tokenIndex + \" not in 0..\" + (this.tokens.length - 1));\r\n\t\t}\r\n\r\n\t\tif (tokenIndex === 0) {\r\n\t\t\t// obviously no tokens can appear before the first token\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tlet prevOnChannel: number = this.previousTokenOnChannel(tokenIndex - 1, Lexer.DEFAULT_TOKEN_CHANNEL);\r\n\t\tif (prevOnChannel === tokenIndex - 1) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\t// if none onchannel to left, prevOnChannel=-1 then from=0\r\n\t\tlet from: number = prevOnChannel + 1;\r\n\t\tlet to: number = tokenIndex - 1;\r\n\r\n\t\treturn this.filterForChannel(from, to, channel);\r\n\t}\r\n\r\n\tprotected filterForChannel(from: number, to: number, channel: number): Token[] {\r\n\t\tlet hidden: Token[] = new Array();\r\n\t\tfor (let i = from; i <= to; i++) {\r\n\t\t\tlet t: Token = this.tokens[i];\r\n\t\t\tif (channel === -1) {\r\n\t\t\t\tif (t.channel !== Lexer.DEFAULT_TOKEN_CHANNEL) {\r\n\t\t\t\t\thidden.push(t);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (t.channel === channel) {\r\n\t\t\t\t\thidden.push(t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn hidden;\r\n\t}\r\n\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\treturn this.tokenSource.sourceName;\r\n\t}\r\n\r\n\t/** Get the text of all tokens in this buffer. */\r\n\tpublic getText(): string;\r\n\tpublic getText(interval: Interval): string;\r\n\tpublic getText(context: RuleContext): string;\r\n\t@NotNull\r\n\t@Override\r\n\tpublic getText(interval?: Interval | RuleContext): string {\r\n\t\tif (interval === undefined) {\r\n\t\t\tinterval = Interval.of(0, this.size - 1);\r\n\t\t} else if (!(interval instanceof Interval)) {\r\n\t\t\t// Note: the more obvious check for 'instanceof RuleContext' results in a circular dependency problem\r\n\t\t\tinterval = interval.sourceInterval;\r\n\t\t}\r\n\r\n\t\tlet start: number = interval.a;\r\n\t\tlet stop: number = interval.b;\r\n\t\tif (start < 0 || stop < 0) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tthis.fill();\r\n\t\tif (stop >= this.tokens.length) {\r\n\t\t\tstop = this.tokens.length - 1;\r\n\t\t}\r\n\r\n\t\tlet buf: string = \"\";\r\n\t\tfor (let i = start; i <= stop; i++) {\r\n\t\t\tlet t: Token = this.tokens[i];\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tbuf += t.text;\r\n\t\t}\r\n\r\n\t\treturn buf.toString();\r\n\t}\r\n\r\n\t@NotNull\r\n\t@Override\r\n\tpublic getTextFromRange(start: any, stop: any): string {\r\n\t\tif (this.isToken(start) && this.isToken(stop)) {\r\n\t\t\treturn this.getText(Interval.of(start.tokenIndex, stop.tokenIndex));\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\t/** Get all tokens from lexer until EOF. */\r\n\tpublic fill(): void {\r\n\t\tthis.lazyInit();\r\n\t\tconst blockSize: number = 1000;\r\n\t\twhile (true) {\r\n\t\t\tlet fetched: number = this.fetch(blockSize);\r\n\t\t\tif (fetched < blockSize) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// TODO: Figure out a way to make this more flexible?\r\n\tprivate isWritableToken(t: Token): t is WritableToken {\r\n\t\treturn t instanceof CommonToken;\r\n\t}\r\n\r\n\t// TODO: Figure out a way to make this more flexible?\r\n\tprivate isToken(t: any): t is Token {\r\n\t\treturn t instanceof CommonToken;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.3953157-07:00\r\n\r\nimport { BufferedTokenStream } from \"./BufferedTokenStream\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * This class extends {@link BufferedTokenStream} with functionality to filter\r\n * token streams to tokens on a particular channel (tokens where\r\n * {@link Token#getChannel} returns a particular value).\r\n *\r\n * This token stream provides access to all tokens by index or when calling\r\n * methods like {@link #getText}. The channel filtering is only used for code\r\n * accessing tokens via the lookahead methods {@link #LA}, {@link #LT}, and\r\n * {@link #LB}.\r\n *\r\n * By default, tokens are placed on the default channel\r\n * ({@link Token#DEFAULT_CHANNEL}), but may be reassigned by using the\r\n * `->channel(HIDDEN)` lexer command, or by using an embedded action to\r\n * call {@link Lexer#setChannel}.\r\n *\r\n * Note: lexer rules which use the `->skip` lexer command or call\r\n * {@link Lexer#skip} do not produce tokens at all, so input text matched by\r\n * such a rule will not be available as part of the token stream, regardless of\r\n * channel.\r\n */\r\nexport class CommonTokenStream extends BufferedTokenStream {\r\n\t/**\r\n\t * Specifies the channel to use for filtering tokens.\r\n\t *\r\n\t * The default value is {@link Token#DEFAULT_CHANNEL}, which matches the\r\n\t * default channel assigned to tokens created by the lexer.\r\n\t */\r\n\tprotected channel: number;\r\n\r\n\t/**\r\n\t * Constructs a new {@link CommonTokenStream} using the specified token\r\n\t * source and filtering tokens to the specified channel. Only tokens whose\r\n\t * {@link Token#getChannel} matches `channel` or have the\r\n\t * `Token.type` equal to {@link Token#EOF} will be returned by the\r\n\t * token stream lookahead methods.\r\n\t *\r\n\t * @param tokenSource The token source.\r\n\t * @param channel The channel to use for filtering tokens.\r\n\t */\r\n\tconstructor(@NotNull tokenSource: TokenSource, channel: number = Token.DEFAULT_CHANNEL) {\r\n\t\tsuper(tokenSource);\r\n\t\tthis.channel = channel;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected adjustSeekIndex(i: number): number {\r\n\t\treturn this.nextTokenOnChannel(i, this.channel);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected tryLB(k: number): Token | undefined {\r\n\t\tif ((this.p - k) < 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tlet i: number = this.p;\r\n\t\tlet n: number = 1;\r\n\t\t// find k good tokens looking backwards\r\n\t\twhile (n <= k && i > 0) {\r\n\t\t\t// skip off-channel tokens\r\n\t\t\ti = this.previousTokenOnChannel(i - 1, this.channel);\r\n\t\t\tn++;\r\n\t\t}\r\n\r\n\t\tif (i < 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t@Override\r\n\tpublic tryLT(k: number): Token | undefined {\r\n\t\t//System.out.println(\"enter LT(\"+k+\")\");\r\n\t\tthis.lazyInit();\r\n\t\tif (k === 0) {\r\n\t\t\tthrow new RangeError(\"0 is not a valid lookahead index\");\r\n\t\t}\r\n\r\n\t\tif (k < 0) {\r\n\t\t\treturn this.tryLB(-k);\r\n\t\t}\r\n\r\n\t\tlet i: number = this.p;\r\n\t\tlet n: number = 1; // we know tokens[p] is a good one\r\n\t\t// find k good tokens\r\n\t\twhile (n < k) {\r\n\t\t\t// skip off-channel tokens, but make sure to not look past EOF\r\n\t\t\tif (this.sync(i + 1)) {\r\n\t\t\t\ti = this.nextTokenOnChannel(i + 1, this.channel);\r\n\t\t\t}\r\n\t\t\tn++;\r\n\t\t}\r\n\r\n\t\t//\t\tif ( i>range ) range = i;\r\n\t\treturn this.tokens[i];\r\n\t}\r\n\r\n\t/** Count EOF just once. */\r\n\tpublic getNumberOfOnChannelTokens(): number {\r\n\t\tlet n: number = 0;\r\n\t\tthis.fill();\r\n\t\tfor (let t of this.tokens) {\r\n\t\t\tif (t.channel === this.channel) {\r\n\t\t\t\tn++;\r\n\t\t\t}\r\n\r\n\t\t\tif (t.type === Token.EOF) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn n;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.1916955-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { CommonTokenFactory } from \"./CommonTokenFactory\";\r\nimport { NotNull, Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * Provides an implementation of {@link TokenSource} as a wrapper around a list\r\n * of {@link Token} objects.\r\n *\r\n * If the final token in the list is an {@link Token#EOF} token, it will be used\r\n * as the EOF token for every call to {@link #nextToken} after the end of the\r\n * list is reached. Otherwise, an EOF token will be created.\r\n */\r\nexport class ListTokenSource implements TokenSource {\r\n\t/**\r\n\t * The wrapped collection of {@link Token} objects to return.\r\n\t */\r\n\tprotected tokens: Token[];\r\n\r\n\t/**\r\n\t * The name of the input source. If this value is `undefined`, a call to\r\n\t * {@link #getSourceName} should return the source name used to create the\r\n\t * the next token in {@link #tokens} (or the previous token if the end of\r\n\t * the input has been reached).\r\n\t */\r\n\tprivate _sourceName?: string;\r\n\r\n\t/**\r\n\t * The index into {@link #tokens} of token to return by the next call to\r\n\t * {@link #nextToken}. The end of the input is indicated by this value\r\n\t * being greater than or equal to the number of items in {@link #tokens}.\r\n\t */\r\n\tprotected i: number = 0;\r\n\r\n\t/**\r\n\t * This field caches the EOF token for the token source.\r\n\t */\r\n\tprotected eofToken?: Token;\r\n\r\n\t/**\r\n\t * This is the backing field for {@link #getTokenFactory} and\r\n\t * {@link setTokenFactory}.\r\n\t */\r\n\tprivate _factory: TokenFactory = CommonTokenFactory.DEFAULT;\r\n\r\n\t/**\r\n\t * Constructs a new {@link ListTokenSource} instance from the specified\r\n\t * collection of {@link Token} objects and source name.\r\n\t *\r\n\t * @param tokens The collection of {@link Token} objects to provide as a\r\n\t * {@link TokenSource}.\r\n\t * @param sourceName The name of the {@link TokenSource}. If this value is\r\n\t * `undefined`, {@link #getSourceName} will attempt to infer the name from\r\n\t * the next {@link Token} (or the previous token if the end of the input has\r\n\t * been reached).\r\n\t *\r\n\t * @exception NullPointerException if `tokens` is `undefined`\r\n\t */\r\n\tconstructor(@NotNull tokens: Token[], sourceName?: string) {\r\n\t\tif (tokens == null) {\r\n\t\t\tthrow new Error(\"tokens cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis.tokens = tokens;\r\n\t\tthis._sourceName = sourceName;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\tif (this.i < this.tokens.length) {\r\n\t\t\treturn this.tokens[this.i].charPositionInLine;\r\n\t\t} else if (this.eofToken != null) {\r\n\t\t\treturn this.eofToken.charPositionInLine;\r\n\t\t} else if (this.tokens.length > 0) {\r\n\t\t\t// have to calculate the result from the line/column of the previous\r\n\t\t\t// token, along with the text of the token.\r\n\t\t\tlet lastToken: Token = this.tokens[this.tokens.length - 1];\r\n\t\t\tlet tokenText: string | undefined = lastToken.text;\r\n\t\t\tif (tokenText != null) {\r\n\t\t\t\tlet lastNewLine: number = tokenText.lastIndexOf(\"\\n\");\r\n\t\t\t\tif (lastNewLine >= 0) {\r\n\t\t\t\t\treturn tokenText.length - lastNewLine - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn lastToken.charPositionInLine + lastToken.stopIndex - lastToken.startIndex + 1;\r\n\t\t}\r\n\r\n\t\t// only reach this if tokens is empty, meaning EOF occurs at the first\r\n\t\t// position in the input\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tpublic nextToken(): Token {\r\n\t\tif (this.i >= this.tokens.length) {\r\n\t\t\tif (this.eofToken == null) {\r\n\t\t\t\tlet start: number = -1;\r\n\t\t\t\tif (this.tokens.length > 0) {\r\n\t\t\t\t\tlet previousStop: number = this.tokens[this.tokens.length - 1].stopIndex;\r\n\t\t\t\t\tif (previousStop !== -1) {\r\n\t\t\t\t\t\tstart = previousStop + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet stop: number = Math.max(-1, start - 1);\r\n\t\t\t\tthis.eofToken = this._factory.create({ source: this, stream: this.inputStream }, Token.EOF, \"EOF\", Token.DEFAULT_CHANNEL, start, stop, this.line, this.charPositionInLine);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.eofToken;\r\n\t\t}\r\n\r\n\t\tlet t: Token = this.tokens[this.i];\r\n\t\tif (this.i === this.tokens.length - 1 && t.type === Token.EOF) {\r\n\t\t\tthis.eofToken = t;\r\n\t\t}\r\n\r\n\t\tthis.i++;\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget line(): number {\r\n\t\tif (this.i < this.tokens.length) {\r\n\t\t\treturn this.tokens[this.i].line;\r\n\t\t} else if (this.eofToken != null) {\r\n\t\t\treturn this.eofToken.line;\r\n\t\t} else if (this.tokens.length > 0) {\r\n\t\t\t// have to calculate the result from the line/column of the previous\r\n\t\t\t// token, along with the text of the token.\r\n\t\t\tlet lastToken: Token = this.tokens[this.tokens.length - 1];\r\n\t\t\tlet line: number = lastToken.line;\r\n\r\n\t\t\tlet tokenText: string | undefined = lastToken.text;\r\n\t\t\tif (tokenText != null) {\r\n\t\t\t\tfor (let i = 0; i < tokenText.length; i++) {\r\n\t\t\t\t\tif (tokenText.charAt(i) === \"\\n\") {\r\n\t\t\t\t\t\tline++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// if no text is available, assume the token did not contain any newline characters.\r\n\t\t\treturn line;\r\n\t\t}\r\n\r\n\t\t// only reach this if tokens is empty, meaning EOF occurs at the first\r\n\t\t// position in the input\r\n\t\treturn 1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget inputStream(): CharStream | undefined {\r\n\t\tif (this.i < this.tokens.length) {\r\n\t\t\treturn this.tokens[this.i].inputStream;\r\n\t\t} else if (this.eofToken != null) {\r\n\t\t\treturn this.eofToken.inputStream;\r\n\t\t} else if (this.tokens.length > 0) {\r\n\t\t\treturn this.tokens[this.tokens.length - 1].inputStream;\r\n\t\t}\r\n\r\n\t\t// no input stream information is available\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tget sourceName(): string {\r\n\t\tif (this._sourceName) {\r\n\t\t\treturn this._sourceName;\r\n\t\t}\r\n\r\n\t\tlet inputStream: CharStream | undefined = this.inputStream;\r\n\t\tif (inputStream != null) {\r\n\t\t\treturn inputStream.sourceName;\r\n\t\t}\r\n\r\n\t\treturn \"List\";\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t// @Override\r\n\tset tokenFactory(@NotNull factory: TokenFactory) {\r\n\t\tthis._factory = factory;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\t@NotNull\r\n\tget tokenFactory(): TokenFactory {\r\n\t\treturn this._factory;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:42.1346951-07:00\r\n\r\nexport class MultiMap extends Map {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic map(key: K, value: V): void {\r\n\t\tlet elementsForKey = super.get(key);\r\n\t\tif (!elementsForKey) {\r\n\t\t\telementsForKey = [] as V[];\r\n\t\t\tsuper.set(key, elementsForKey);\r\n\t\t}\r\n\t\telementsForKey.push(value);\r\n\t}\r\n\r\n\tpublic getPairs(): Array<[K, V]> {\r\n\t\tlet pairs: Array<[K, V]> = [];\r\n\t\tthis.forEach((values: V[], key: K) => {\r\n\t\t\tvalues.forEach((v) => {\r\n\t\t\t\tpairs.push([key, v]);\r\n\t\t\t});\r\n\t\t});\r\n\t\treturn pairs;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:42.5447085-07:00\r\n\r\n/**\r\n * This exception is thrown to cancel a parsing operation. This exception does\r\n * not extend {@link RecognitionException}, allowing it to bypass the standard\r\n * error recovery mechanisms. {@link BailErrorStrategy} throws this exception in\r\n * response to a parse error.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class ParseCancellationException extends Error {\r\n\t// private static serialVersionUID: number = -3529552099366979683L;\r\n\tpublic readonly stack?: string;\r\n\r\n\tconstructor(public cause: Error) {\r\n\t\tsuper(cause.message);\r\n\t\tthis.stack = cause.stack;\r\n\t}\r\n\r\n\tpublic getCause(): Error {\r\n\t\treturn this.cause;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.5898546-07:00\r\n\r\nimport { Override } from \"./Decorators\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/**\r\n * This class extends {@link ParserRuleContext} by allowing the value of\r\n * {@link #getRuleIndex} to be explicitly set for the context.\r\n *\r\n * {@link ParserRuleContext} does not include field storage for the rule index\r\n * since the context classes created by the code generator override the\r\n * {@link #getRuleIndex} method to return the correct value for that context.\r\n * Since the parser interpreter does not use the context classes generated for a\r\n * parser, this class (with slightly more memory overhead per node) is used to\r\n * provide equivalent functionality.\r\n */\r\nexport class InterpreterRuleContext extends ParserRuleContext {\r\n\t/**\r\n\t * This is the backing field for {@link #getRuleIndex}.\r\n\t */\r\n\tprivate _ruleIndex: number;\r\n\r\n\tconstructor(ruleIndex: number);\r\n\r\n\t/**\r\n\t * Constructs a new {@link InterpreterRuleContext} with the specified\r\n\t * parent, invoking state, and rule index.\r\n\t *\r\n\t * @param ruleIndex The rule index for the current context.\r\n\t * @param parent The parent context.\r\n\t * @param invokingStateNumber The invoking state number.\r\n\t */\r\n\tconstructor(ruleIndex: number, parent: ParserRuleContext | undefined, invokingStateNumber: number);\r\n\r\n\tconstructor(ruleIndex: number, parent?: ParserRuleContext, invokingStateNumber?: number) {\r\n\t\tif (invokingStateNumber !== undefined) {\r\n\t\t\tsuper(parent, invokingStateNumber);\r\n\t\t} else {\r\n\t\t\tsuper();\r\n\t\t}\r\n\r\n\t\tthis._ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleIndex(): number {\r\n\t\treturn this._ruleIndex;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:53.1043451-07:00\r\n\r\nimport { ActionTransition } from \"./atn/ActionTransition\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { ATNStateType } from \"./atn/ATNStateType\";\r\nimport { AtomTransition } from \"./atn/AtomTransition\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DecisionState } from \"./atn/DecisionState\";\r\nimport { FailedPredicateException } from \"./FailedPredicateException\";\r\nimport { InputMismatchException } from \"./InputMismatchException\";\r\nimport { InterpreterRuleContext } from \"./InterpreterRuleContext\";\r\nimport { LoopEndState } from \"./atn/LoopEndState\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserATNSimulator } from \"./atn/ParserATNSimulator\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { PrecedencePredicateTransition } from \"./atn/PrecedencePredicateTransition\";\r\nimport { PredicateTransition } from \"./atn/PredicateTransition\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleStartState } from \"./atn/RuleStartState\";\r\nimport { RuleTransition } from \"./atn/RuleTransition\";\r\nimport { StarLoopEntryState } from \"./atn/StarLoopEntryState\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { Transition } from \"./atn/Transition\";\r\nimport { TransitionType } from \"./atn/TransitionType\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\n\r\n/** A parser simulator that mimics what ANTLR's generated\r\n * parser code does. A ParserATNSimulator is used to make\r\n * predictions via adaptivePredict but this class moves a pointer through the\r\n * ATN to simulate parsing. ParserATNSimulator just\r\n * makes us efficient rather than having to backtrack, for example.\r\n *\r\n * This properly creates parse trees even for left recursive rules.\r\n *\r\n * We rely on the left recursive rule invocation and special predicate\r\n * transitions to make left recursive rules work.\r\n *\r\n * See TestParserInterpreter for examples.\r\n */\r\nexport class ParserInterpreter extends Parser {\r\n\tprotected _grammarFileName: string;\r\n\tprotected _atn: ATN;\r\n\t/** This identifies StarLoopEntryState's that begin the (...)*\r\n\t * precedence loops of left recursive rules.\r\n\t */\r\n\tprotected pushRecursionContextStates: BitSet;\r\n\r\n\tprotected _ruleNames: string[];\r\n\t@NotNull\r\n\tprivate _vocabulary: Vocabulary;\r\n\r\n\t/** This stack corresponds to the _parentctx, _parentState pair of locals\r\n\t * that would exist on call stack frames with a recursive descent parser;\r\n\t * in the generated function for a left-recursive rule you'd see:\r\n\t *\r\n\t * private EContext e(int _p) {\r\n\t * ParserRuleContext _parentctx = _ctx; // Pair.a\r\n\t * int _parentState = state; // Pair.b\r\n\t * ...\r\n\t * }\r\n\t *\r\n\t * Those values are used to create new recursive rule invocation contexts\r\n\t * associated with left operand of an alt like \"expr '*' expr\".\r\n\t */\r\n\tprotected readonly _parentContextStack: Array<[ParserRuleContext, number]> = [];\r\n\r\n\t/** We need a map from (decision,inputIndex)->forced alt for computing ambiguous\r\n\t * parse trees. For now, we allow exactly one override.\r\n\t */\r\n\tprotected overrideDecision: number = -1;\r\n\tprotected overrideDecisionInputIndex: number = -1;\r\n\tprotected overrideDecisionAlt: number = -1;\r\n\tprotected overrideDecisionReached: boolean = false; // latch and only override once; error might trigger infinite loop\r\n\r\n\t/** What is the current context when we override a decisions? This tells\r\n\t * us what the root of the parse tree is when using override\r\n\t * for an ambiguity/lookahead check.\r\n\t */\r\n\tprotected _overrideDecisionRoot?: InterpreterRuleContext = undefined;\r\n\r\n\tprotected _rootContext!: InterpreterRuleContext;\r\n\r\n\t/** A copy constructor that creates a new parser interpreter by reusing\r\n\t * the fields of a previous interpreter.\r\n\t *\r\n\t * @param old The interpreter to copy\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tconstructor(/*@NotNull*/ old: ParserInterpreter);\r\n\tconstructor(\r\n\t\tgrammarFileName: string, /*@NotNull*/ vocabulary: Vocabulary,\r\n\t\truleNames: string[], atn: ATN, input: TokenStream);\r\n\tconstructor(\r\n\t\tgrammarFileName: ParserInterpreter | string, @NotNull vocabulary?: Vocabulary,\r\n\t\truleNames?: string[], atn?: ATN, input?: TokenStream) {\r\n\t\tsuper(grammarFileName instanceof ParserInterpreter ? grammarFileName.inputStream : input!);\r\n\t\tif (grammarFileName instanceof ParserInterpreter) {\r\n\t\t\tlet old: ParserInterpreter = grammarFileName;\r\n\t\t\tthis._grammarFileName = old._grammarFileName;\r\n\t\t\tthis._atn = old._atn;\r\n\t\t\tthis.pushRecursionContextStates = old.pushRecursionContextStates;\r\n\t\t\tthis._ruleNames = old._ruleNames;\r\n\t\t\tthis._vocabulary = old._vocabulary;\r\n\t\t\tthis.interpreter = new ParserATNSimulator(this._atn, this);\r\n\t\t} else {\r\n\t\t\t// The second constructor requires non-null arguments\r\n\t\t\tvocabulary = vocabulary!;\r\n\t\t\truleNames = ruleNames!;\r\n\t\t\tatn = atn!;\r\n\r\n\t\t\tthis._grammarFileName = grammarFileName;\r\n\t\t\tthis._atn = atn;\r\n\t\t\tthis._ruleNames = ruleNames.slice(0);\r\n\t\t\tthis._vocabulary = vocabulary;\r\n\r\n\t\t\t// identify the ATN states where pushNewRecursionContext() must be called\r\n\t\t\tthis.pushRecursionContextStates = new BitSet(atn.states.length);\r\n\t\t\tfor (let state of atn.states) {\r\n\t\t\t\tif (!(state instanceof StarLoopEntryState)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (state.precedenceRuleDecision) {\r\n\t\t\t\t\tthis.pushRecursionContextStates.set(state.stateNumber);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// get atn simulator that knows how to do predictions\r\n\t\t\tthis.interpreter = new ParserATNSimulator(atn, this);\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reset(resetInput?: boolean): void {\r\n\t\tif (resetInput === undefined) {\r\n\t\t\tsuper.reset();\r\n\t\t} else {\r\n\t\t\tsuper.reset(resetInput);\r\n\t\t}\r\n\r\n\t\tthis.overrideDecisionReached = false;\r\n\t\tthis._overrideDecisionRoot = undefined;\r\n\t}\r\n\r\n\t@Override\r\n\tget atn(): ATN {\r\n\t\treturn this._atn;\r\n\t}\r\n\r\n\t@Override\r\n\tget vocabulary(): Vocabulary {\r\n\t\treturn this._vocabulary;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleNames(): string[] {\r\n\t\treturn this._ruleNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget grammarFileName(): string {\r\n\t\treturn this._grammarFileName;\r\n\t}\r\n\r\n\t/** Begin parsing at startRuleIndex */\r\n\tpublic parse(startRuleIndex: number): ParserRuleContext {\r\n\t\tlet startRuleStartState: RuleStartState = this._atn.ruleToStartState[startRuleIndex];\r\n\r\n\t\tthis._rootContext = this.createInterpreterRuleContext(undefined, ATNState.INVALID_STATE_NUMBER, startRuleIndex);\r\n\t\tif (startRuleStartState.isPrecedenceRule) {\r\n\t\t\tthis.enterRecursionRule(this._rootContext, startRuleStartState.stateNumber, startRuleIndex, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.enterRule(this._rootContext, startRuleStartState.stateNumber, startRuleIndex);\r\n\t\t}\r\n\r\n\t\twhile (true) {\r\n\t\t\tlet p: ATNState = this.atnState;\r\n\t\t\tswitch (p.stateType) {\r\n\t\t\tcase ATNStateType.RULE_STOP:\r\n\t\t\t\t// pop; return from rule\r\n\t\t\t\tif (this._ctx.isEmpty) {\r\n\t\t\t\t\tif (startRuleStartState.isPrecedenceRule) {\r\n\t\t\t\t\t\tlet result: ParserRuleContext = this._ctx;\r\n\t\t\t\t\t\tlet parentContext: [ParserRuleContext, number] = this._parentContextStack.pop() !;\r\n\t\t\t\t\t\tthis.unrollRecursionContexts(parentContext[0]);\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.exitRule();\r\n\t\t\t\t\t\treturn this._rootContext;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.visitRuleStopState(p);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.visitState(p);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (e) {\r\n\t\t\t\t\tif (e instanceof RecognitionException) {\r\n\t\t\t\t\t\tthis.state = this._atn.ruleToStopState[p.ruleIndex].stateNumber;\r\n\t\t\t\t\t\tthis.context.exception = e;\r\n\t\t\t\t\t\tthis.errorHandler.reportError(this, e);\r\n\t\t\t\t\t\tthis.recover(e);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic enterRecursionRule(localctx: ParserRuleContext, state: number, ruleIndex: number, precedence: number): void {\r\n\t\tthis._parentContextStack.push([this._ctx, localctx.invokingState]);\r\n\t\tsuper.enterRecursionRule(localctx, state, ruleIndex, precedence);\r\n\t}\r\n\r\n\tprotected get atnState(): ATNState {\r\n\t\treturn this._atn.states[this.state];\r\n\t}\r\n\r\n\tprotected visitState(p: ATNState): void {\r\n\t\tlet predictedAlt: number = 1;\r\n\t\tif (p.numberOfTransitions > 1) {\r\n\t\t\tpredictedAlt = this.visitDecisionState(p as DecisionState);\r\n\t\t}\r\n\r\n\t\tlet transition: Transition = p.transition(predictedAlt - 1);\r\n\t\tswitch (transition.serializationType) {\r\n\t\tcase TransitionType.EPSILON:\r\n\t\t\tif (this.pushRecursionContextStates.get(p.stateNumber) &&\r\n\t\t\t\t!(transition.target instanceof LoopEndState)) {\r\n\t\t\t\t// We are at the start of a left recursive rule's (...)* loop\r\n\t\t\t\t// and we're not taking the exit branch of loop.\r\n\t\t\t\tlet parentContext = this._parentContextStack[this._parentContextStack.length - 1];\r\n\t\t\t\tlet localctx: InterpreterRuleContext =\r\n\t\t\t\t\tthis.createInterpreterRuleContext(parentContext[0], parentContext[1], this._ctx.ruleIndex);\r\n\t\t\t\tthis.pushNewRecursionContext(localctx,\r\n\t\t\t\t\tthis._atn.ruleToStartState[p.ruleIndex].stateNumber,\r\n\t\t\t\t\tthis._ctx.ruleIndex);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ATOM:\r\n\t\t\tthis.match((transition as AtomTransition)._label);\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.RANGE:\r\n\t\tcase TransitionType.SET:\r\n\t\tcase TransitionType.NOT_SET:\r\n\t\t\tif (!transition.matches(this._input.LA(1), Token.MIN_USER_TOKEN_TYPE, 65535)) {\r\n\t\t\t\tthis.recoverInline();\r\n\t\t\t}\r\n\t\t\tthis.matchWildcard();\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.WILDCARD:\r\n\t\t\tthis.matchWildcard();\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.RULE:\r\n\t\t\tlet ruleStartState: RuleStartState = transition.target as RuleStartState;\r\n\t\t\tlet ruleIndex: number = ruleStartState.ruleIndex;\r\n\t\t\tlet newctx: InterpreterRuleContext = this.createInterpreterRuleContext(this._ctx, p.stateNumber, ruleIndex);\r\n\t\t\tif (ruleStartState.isPrecedenceRule) {\r\n\t\t\t\tthis.enterRecursionRule(newctx, ruleStartState.stateNumber, ruleIndex, (transition as RuleTransition).precedence);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.enterRule(newctx, transition.target.stateNumber, ruleIndex);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.PREDICATE:\r\n\t\t\tlet predicateTransition: PredicateTransition = transition as PredicateTransition;\r\n\t\t\tif (!this.sempred(this._ctx, predicateTransition.ruleIndex, predicateTransition.predIndex)) {\r\n\t\t\t\tthrow new FailedPredicateException(this);\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.ACTION:\r\n\t\t\tlet actionTransition: ActionTransition = transition as ActionTransition;\r\n\t\t\tthis.action(this._ctx, actionTransition.ruleIndex, actionTransition.actionIndex);\r\n\t\t\tbreak;\r\n\r\n\t\tcase TransitionType.PRECEDENCE:\r\n\t\t\tif (!this.precpred(this._ctx, (transition as PrecedencePredicateTransition).precedence)) {\r\n\t\t\t\tlet precedence = (transition as PrecedencePredicateTransition).precedence;\r\n\t\t\t\tthrow new FailedPredicateException(this, `precpred(_ctx, ${precedence})`);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new Error(\"UnsupportedOperationException: Unrecognized ATN transition type.\");\r\n\t\t}\r\n\r\n\t\tthis.state = transition.target.stateNumber;\r\n\t}\r\n\r\n\t/** Method visitDecisionState() is called when the interpreter reaches\r\n\t * a decision state (instance of DecisionState). It gives an opportunity\r\n\t * for subclasses to track interesting things.\r\n\t */\r\n\tprotected visitDecisionState(p: DecisionState): number {\r\n\t\tlet predictedAlt: number;\r\n\t\tthis.errorHandler.sync(this);\r\n\t\tlet decision: number = p.decision;\r\n\t\tif (decision === this.overrideDecision && this._input.index === this.overrideDecisionInputIndex && !this.overrideDecisionReached) {\r\n\t\t\tpredictedAlt = this.overrideDecisionAlt;\r\n\t\t\tthis.overrideDecisionReached = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tpredictedAlt = this.interpreter.adaptivePredict(this._input, decision, this._ctx);\r\n\t\t}\r\n\t\treturn predictedAlt;\r\n\t}\r\n\r\n\t/** Provide simple \"factory\" for InterpreterRuleContext's.\r\n\t * @since 4.5.1\r\n\t */\r\n\tprotected createInterpreterRuleContext(\r\n\t\tparent: ParserRuleContext | undefined,\r\n\t\tinvokingStateNumber: number,\r\n\t\truleIndex: number): InterpreterRuleContext {\r\n\t\treturn new InterpreterRuleContext(ruleIndex, parent, invokingStateNumber);\r\n\t}\r\n\r\n\tprotected visitRuleStopState(p: ATNState): void {\r\n\t\tlet ruleStartState: RuleStartState = this._atn.ruleToStartState[p.ruleIndex];\r\n\t\tif (ruleStartState.isPrecedenceRule) {\r\n\t\t\tlet parentContext: [ParserRuleContext, number] = this._parentContextStack.pop()!;\r\n\t\t\tthis.unrollRecursionContexts(parentContext[0]);\r\n\t\t\tthis.state = parentContext[1];\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.exitRule();\r\n\t\t}\r\n\r\n\t\tlet ruleTransition: RuleTransition = this._atn.states[this.state].transition(0) as RuleTransition;\r\n\t\tthis.state = ruleTransition.followState.stateNumber;\r\n\t}\r\n\r\n\t/** Override this parser interpreters normal decision-making process\r\n\t * at a particular decision and input token index. Instead of\r\n\t * allowing the adaptive prediction mechanism to choose the\r\n\t * first alternative within a block that leads to a successful parse,\r\n\t * force it to take the alternative, 1..n for n alternatives.\r\n\t *\r\n\t * As an implementation limitation right now, you can only specify one\r\n\t * override. This is sufficient to allow construction of different\r\n\t * parse trees for ambiguous input. It means re-parsing the entire input\r\n\t * in general because you're never sure where an ambiguous sequence would\r\n\t * live in the various parse trees. For example, in one interpretation,\r\n\t * an ambiguous input sequence would be matched completely in expression\r\n\t * but in another it could match all the way back to the root.\r\n\t *\r\n\t * s : e '!'? ;\r\n\t * e : ID\r\n\t * | ID '!'\r\n\t * ;\r\n\t *\r\n\t * Here, x! can be matched as (s (e ID) !) or (s (e ID !)). In the first\r\n\t * case, the ambiguous sequence is fully contained only by the root.\r\n\t * In the second case, the ambiguous sequences fully contained within just\r\n\t * e, as in: (e ID !).\r\n\t *\r\n\t * Rather than trying to optimize this and make\r\n\t * some intelligent decisions for optimization purposes, I settled on\r\n\t * just re-parsing the whole input and then using\r\n\t * {link Trees#getRootOfSubtreeEnclosingRegion} to find the minimal\r\n\t * subtree that contains the ambiguous sequence. I originally tried to\r\n\t * record the call stack at the point the parser detected and ambiguity but\r\n\t * left recursive rules create a parse tree stack that does not reflect\r\n\t * the actual call stack. That impedance mismatch was enough to make\r\n\t * it it challenging to restart the parser at a deeply nested rule\r\n\t * invocation.\r\n\t *\r\n\t * Only parser interpreters can override decisions so as to avoid inserting\r\n\t * override checking code in the critical ALL(*) prediction execution path.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tpublic addDecisionOverride(decision: number, tokenIndex: number, forcedAlt: number): void {\r\n\t\tthis.overrideDecision = decision;\r\n\t\tthis.overrideDecisionInputIndex = tokenIndex;\r\n\t\tthis.overrideDecisionAlt = forcedAlt;\r\n\t}\r\n\r\n\tget overrideDecisionRoot(): InterpreterRuleContext | undefined {\r\n\t\treturn this._overrideDecisionRoot;\r\n\t}\r\n\r\n\t/** Rely on the error handler for this parser but, if no tokens are consumed\r\n\t * to recover, add an error node. Otherwise, nothing is seen in the parse\r\n\t * tree.\r\n\t */\r\n\tprotected recover(e: RecognitionException): void {\r\n\t\tlet i: number = this._input.index;\r\n\t\tthis.errorHandler.recover(this, e);\r\n\t\tif (this._input.index === i) {\r\n\t\t\t// no input consumed, better add an error node\r\n\t\t\tlet tok: Token | undefined = e.getOffendingToken();\r\n\t\t\tif (!tok) {\r\n\t\t\t\tthrow new Error(\"Expected exception to have an offending token\");\r\n\t\t\t}\r\n\r\n\t\t\tlet source = tok.tokenSource;\r\n\t\t\tlet stream = source !== undefined ? source.inputStream : undefined;\r\n\t\t\tlet sourcePair = { source, stream };\r\n\r\n\t\t\tif (e instanceof InputMismatchException) {\r\n\t\t\t\tlet expectedTokens = e.expectedTokens;\r\n\t\t\t\tif (expectedTokens === undefined) {\r\n\t\t\t\t\tthrow new Error(\"Expected the exception to provide expected tokens\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet expectedTokenType: number = Token.INVALID_TYPE;\r\n\t\t\t\tif (!expectedTokens.isNil) {\r\n\t\t\t\t\t// get any element\r\n\t\t\t\t\texpectedTokenType = expectedTokens.minElement;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet errToken: Token =\r\n\t\t\t\t\tthis.tokenFactory.create(sourcePair,\r\n\t\t\t\t\t\texpectedTokenType, tok.text,\r\n\t\t\t\t\t\tToken.DEFAULT_CHANNEL,\r\n\t\t\t\t\t\t-1, -1, // invalid start/stop\r\n\t\t\t\t\t\ttok.line, tok.charPositionInLine);\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, errToken));\r\n\t\t\t}\r\n\t\t\telse { // NoViableAlt\r\n\t\t\t\tlet source = tok.tokenSource;\r\n\t\t\t\tlet errToken: Token =\r\n\t\t\t\t\tthis.tokenFactory.create(sourcePair,\r\n\t\t\t\t\t\tToken.INVALID_TYPE, tok.text,\r\n\t\t\t\t\t\tToken.DEFAULT_CHANNEL,\r\n\t\t\t\t\t\t-1, -1, // invalid start/stop\r\n\t\t\t\t\t\ttok.line, tok.charPositionInLine);\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, errToken));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected recoverInline(): Token {\r\n\t\treturn this._errHandler.recoverInline(this);\r\n\t}\r\n\r\n\t/** Return the root of the parse, which can be useful if the parser\r\n\t * bails out. You still can access the top node. Note that,\r\n\t * because of the way left recursive rules add children, it's possible\r\n\t * that the root will not have any children if the start rule immediately\r\n\t * called and left recursive rule that fails.\r\n\t *\r\n\t * @since 4.5.1\r\n\t */\r\n\tget rootContext(): InterpreterRuleContext {\r\n\t\treturn this._rootContext;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { MultiMap } from \"../../misc/MultiMap\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { ParseTreePattern } from \"./ParseTreePattern\";\r\n\r\n/**\r\n * Represents the result of matching a {@link ParseTree} against a tree pattern.\r\n */\r\nexport class ParseTreeMatch {\r\n\t/**\r\n\t * This is the backing field for `tree`.\r\n\t */\r\n\tprivate _tree: ParseTree;\r\n\r\n\t/**\r\n\t * This is the backing field for `pattern`.\r\n\t */\r\n\tprivate _pattern: ParseTreePattern;\r\n\r\n\t/**\r\n\t * This is the backing field for `labels`.\r\n\t */\r\n\tprivate _labels: MultiMap;\r\n\r\n\t/**\r\n\t * This is the backing field for `mismatchedNode`.\r\n\t */\r\n\tprivate _mismatchedNode?: ParseTree;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link ParseTreeMatch} from the specified\r\n\t * parse tree and pattern.\r\n\t *\r\n\t * @param tree The parse tree to match against the pattern.\r\n\t * @param pattern The parse tree pattern.\r\n\t * @param labels A mapping from label names to collections of\r\n\t * {@link ParseTree} objects located by the tree pattern matching process.\r\n\t * @param mismatchedNode The first node which failed to match the tree\r\n\t * pattern during the matching process.\r\n\t *\r\n\t * @throws {@link Error} if `tree` is not defined\r\n\t * @throws {@link Error} if `pattern` is not defined\r\n\t * @throws {@link Error} if `labels` is not defined\r\n\t */\r\n\tconstructor(\r\n\t\t@NotNull tree: ParseTree,\r\n\t\t@NotNull pattern: ParseTreePattern,\r\n\t\t@NotNull labels: MultiMap,\r\n\t\tmismatchedNode: ParseTree | undefined) {\r\n\t\tif (!tree) {\r\n\t\t\tthrow new Error(\"tree cannot be null\");\r\n\t\t}\r\n\r\n\t\tif (!pattern) {\r\n\t\t\tthrow new Error(\"pattern cannot be null\");\r\n\t\t}\r\n\r\n\t\tif (!labels) {\r\n\t\t\tthrow new Error(\"labels cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._tree = tree;\r\n\t\tthis._pattern = pattern;\r\n\t\tthis._labels = labels;\r\n\t\tthis._mismatchedNode = mismatchedNode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the last node associated with a specific `label`.\r\n\t *\r\n\t * For example, for pattern ``, `get(\"id\")` returns the\r\n\t * node matched for that `ID`. If more than one node\r\n\t * matched the specified label, only the last is returned. If there is\r\n\t * no node associated with the label, this returns `undefined`.\r\n\t *\r\n\t * Pattern tags like `` and `` without labels are\r\n\t * considered to be labeled with `ID` and `expr`, respectively.\r\n\t *\r\n\t * @param label The label to check.\r\n\t *\r\n\t * @returns The last {@link ParseTree} to match a tag with the specified\r\n\t * label, or `undefined` if no parse tree matched a tag with the label.\r\n\t */\r\n\tpublic get(label: string): ParseTree | undefined {\r\n\t\tlet parseTrees = this._labels.get(label);\r\n\t\tif (!parseTrees || parseTrees.length === 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\treturn parseTrees[parseTrees.length - 1]; // return last if multiple\r\n\t}\r\n\r\n\t/**\r\n\t * Return all nodes matching a rule or token tag with the specified label.\r\n\t *\r\n\t * If the `label` is the name of a parser rule or token in the\r\n\t * grammar, the resulting list will contain both the parse trees matching\r\n\t * rule or tags explicitly labeled with the label and the complete set of\r\n\t * parse trees matching the labeled and unlabeled tags in the pattern for\r\n\t * the parser rule or token. For example, if `label` is `\"foo\"`,\r\n\t * the result will contain *all* of the following.\r\n\t *\r\n\t * * Parse tree nodes matching tags of the form `` and\r\n\t * ``.\r\n\t * * Parse tree nodes matching tags of the form ``.\r\n\t * * Parse tree nodes matching tags of the form ``.\r\n\t *\r\n\t * @param label The label.\r\n\t *\r\n\t * @returns A collection of all {@link ParseTree} nodes matching tags with\r\n\t * the specified `label`. If no nodes matched the label, an empty list\r\n\t * is returned.\r\n\t */\r\n\t@NotNull\r\n\tpublic getAll(@NotNull label: string): ParseTree[] {\r\n\t\tconst nodes = this._labels.get(label);\r\n\t\tif (!nodes) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\treturn nodes;\r\n\t}\r\n\r\n\t/**\r\n\t * Return a mapping from label → [list of nodes].\r\n\t *\r\n\t * The map includes special entries corresponding to the names of rules and\r\n\t * tokens referenced in tags in the original pattern. For additional\r\n\t * information, see the description of {@link #getAll(String)}.\r\n\t *\r\n\t * @returns A mapping from labels to parse tree nodes. If the parse tree\r\n\t * pattern did not contain any rule or token tags, this map will be empty.\r\n\t */\r\n\t@NotNull\r\n\tget labels(): MultiMap {\r\n\t\treturn this._labels;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the node at which we first detected a mismatch.\r\n\t *\r\n\t * @returns the node at which we first detected a mismatch, or `undefined`\r\n\t * if the match was successful.\r\n\t */\r\n\tget mismatchedNode(): ParseTree | undefined {\r\n\t\treturn this._mismatchedNode;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value indicating whether the match operation succeeded.\r\n\t *\r\n\t * @returns `true` if the match operation succeeded; otherwise,\r\n\t * `false`.\r\n\t */\r\n\tget succeeded(): boolean {\r\n\t\treturn !this._mismatchedNode;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tree pattern we are matching against.\r\n\t *\r\n\t * @returns The tree pattern we are matching against.\r\n\t */\r\n\t@NotNull\r\n\tget pattern(): ParseTreePattern {\r\n\t\treturn this._pattern;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the parse tree we are trying to match to a pattern.\r\n\t *\r\n\t * @returns The {@link ParseTree} we are trying to match to a pattern.\r\n\t */\r\n\t@NotNull\r\n\tget tree(): ParseTree {\r\n\t\treturn this._tree;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn `Match ${\r\n\t\t\tthis.succeeded ? \"succeeded\" : \"failed\"}; found ${\r\n\t\t\tthis.labels.size} labels`;\r\n\t}\r\n}\r\n", "// Generated from XPathLexer.g4 by ANTLR 4.9.0-SNAPSHOT\r\n\r\n\r\nimport { ATN } from \"../../atn/ATN\";\r\nimport { ATNDeserializer } from \"../../atn/ATNDeserializer\";\r\nimport { CharStream } from \"../../CharStream\";\r\nimport { Lexer } from \"../../Lexer\";\r\nimport { LexerATNSimulator } from \"../../atn/LexerATNSimulator\";\r\nimport { NotNull } from \"../../Decorators\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { RuleContext } from \"../../RuleContext\";\r\nimport { Vocabulary } from \"../../Vocabulary\";\r\nimport { VocabularyImpl } from \"../../VocabularyImpl\";\r\n\r\nimport * as Utils from \"../../misc/Utils\";\r\n\r\n\r\nexport class XPathLexer extends Lexer {\r\n\tpublic static readonly TOKEN_REF = 1;\r\n\tpublic static readonly RULE_REF = 2;\r\n\tpublic static readonly ANYWHERE = 3;\r\n\tpublic static readonly ROOT = 4;\r\n\tpublic static readonly WILDCARD = 5;\r\n\tpublic static readonly BANG = 6;\r\n\tpublic static readonly ID = 7;\r\n\tpublic static readonly STRING = 8;\r\n\r\n\t// tslint:disable:no-trailing-whitespace\r\n\tpublic static readonly channelNames: string[] = [\r\n\t\t\"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\",\r\n\t];\r\n\r\n\t// tslint:disable:no-trailing-whitespace\r\n\tpublic static readonly modeNames: string[] = [\r\n\t\t\"DEFAULT_MODE\",\r\n\t];\r\n\r\n\tpublic static readonly ruleNames: string[] = [\r\n\t\t\"ANYWHERE\", \"ROOT\", \"WILDCARD\", \"BANG\", \"ID\", \"NameChar\", \"NameStartChar\", \r\n\t\t\"STRING\",\r\n\t];\r\n\r\n\tprivate static readonly _LITERAL_NAMES: Array = [\r\n\t\tundefined, undefined, undefined, \"'//'\", \"'/'\", \"'*'\", \"'!'\",\r\n\t];\r\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\r\n\t\tundefined, \"TOKEN_REF\", \"RULE_REF\", \"ANYWHERE\", \"ROOT\", \"WILDCARD\", \"BANG\", \r\n\t\t\"ID\", \"STRING\",\r\n\t];\r\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(XPathLexer._LITERAL_NAMES, XPathLexer._SYMBOLIC_NAMES, []);\r\n\r\n\t// @Override\r\n\t// @NotNull\r\n\tpublic get vocabulary(): Vocabulary {\r\n\t\treturn XPathLexer.VOCABULARY;\r\n\t}\r\n\t// tslint:enable:no-trailing-whitespace\r\n\r\n\r\n\tconstructor(input: CharStream) {\r\n\t\tsuper(input);\r\n\t\tthis._interp = new LexerATNSimulator(XPathLexer._ATN, this);\r\n\t}\r\n\r\n\t// @Override\r\n\tpublic get grammarFileName(): string { return \"XPathLexer.g4\"; }\r\n\r\n\t// @Override\r\n\tpublic get ruleNames(): string[] { return XPathLexer.ruleNames; }\r\n\r\n\t// @Override\r\n\tpublic get serializedATN(): string { return XPathLexer._serializedATN; }\r\n\r\n\t// @Override\r\n\tpublic get channelNames(): string[] { return XPathLexer.channelNames; }\r\n\r\n\t// @Override\r\n\tpublic get modeNames(): string[] { return XPathLexer.modeNames; }\r\n\r\n\t// @Override\r\n\tpublic action(_localctx: RuleContext, ruleIndex: number, actionIndex: number): void {\r\n\t\tswitch (ruleIndex) {\r\n\t\tcase 4:\r\n\t\t\tthis.ID_action(_localctx, actionIndex);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tprivate ID_action(_localctx: RuleContext, actionIndex: number): void {\r\n\t\tswitch (actionIndex) {\r\n\t\tcase 0:\r\n\r\n\t\t\tlet text = this.text;\r\n\t\t\tif (text.charAt(0) === text.charAt(0).toUpperCase()) {\r\n\t\t\t\tthis.type = XPathLexer.TOKEN_REF;\r\n\t\t\t} else {\r\n\t\t\t\tthis.type = XPathLexer.RULE_REF;\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static readonly _serializedATNSegments: number = 2;\r\n\tprivate static readonly _serializedATNSegment0: string =\r\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x02\\n2\\b\\x01\\x04\" +\r\n\t\t\"\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\\x04\" +\r\n\t\t\"\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\" +\r\n\t\t\"\\x03\\x04\\x03\\x04\\x03\\x05\\x03\\x05\\x03\\x06\\x03\\x06\\x07\\x06\\x1F\\n\\x06\\f\\x06\" +\r\n\t\t\"\\x0E\\x06\\\"\\v\\x06\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\b\\x03\\b\\x03\\t\\x03\" +\r\n\t\t\"\\t\\x07\\t,\\n\\t\\f\\t\\x0E\\t/\\v\\t\\x03\\t\\x03\\t\\x03-\\x02\\x02\\n\\x03\\x02\\x05\\x05\" +\r\n\t\t\"\\x02\\x06\\x07\\x02\\x07\\t\\x02\\b\\v\\x02\\t\\r\\x02\\x02\\x0F\\x02\\x02\\x11\\x02\\n\\x03\" +\r\n\t\t\"\\x02\\x02\\x04\\u02B6\\x02\\x02\\x02\\n\\x02\\x10\\x02\\x1D\\x022\\x02;\\x02C\\x02\\\\\" +\r\n\t\t\"\\x02a\\x02a\\x02c\\x02|\\x02\\x81\\x02\\xA1\\x02\\xAC\\x02\\xAC\\x02\\xAF\\x02\\xAF\\x02\" +\r\n\t\t\"\\xB7\\x02\\xB7\\x02\\xBC\\x02\\xBC\\x02\\xC2\\x02\\xD8\\x02\\xDA\\x02\\xF8\\x02\\xFA\\x02\" +\r\n\t\t\"\\u02C3\\x02\\u02C8\\x02\\u02D3\\x02\\u02E2\\x02\\u02E6\\x02\\u02EE\\x02\\u02EE\\x02\" +\r\n\t\t\"\\u02F0\\x02\\u02F0\\x02\\u0302\\x02\\u0376\\x02\\u0378\\x02\\u0379\\x02\\u037C\\x02\" +\r\n\t\t\"\\u037F\\x02\\u0381\\x02\\u0381\\x02\\u0388\\x02\\u0388\\x02\\u038A\\x02\\u038C\\x02\" +\r\n\t\t\"\\u038E\\x02\\u038E\\x02\\u0390\\x02\\u03A3\\x02\\u03A5\\x02\\u03F7\\x02\\u03F9\\x02\" +\r\n\t\t\"\\u0483\\x02\\u0485\\x02\\u0489\\x02\\u048C\\x02\\u0531\\x02\\u0533\\x02\\u0558\\x02\" +\r\n\t\t\"\\u055B\\x02\\u055B\\x02\\u0563\\x02\\u0589\\x02\\u0593\\x02\\u05BF\\x02\\u05C1\\x02\" +\r\n\t\t\"\\u05C1\\x02\\u05C3\\x02\\u05C4\\x02\\u05C6\\x02\\u05C7\\x02\\u05C9\\x02\\u05C9\\x02\" +\r\n\t\t\"\\u05D2\\x02\\u05EC\\x02\\u05F2\\x02\\u05F4\\x02\\u0602\\x02\\u0607\\x02\\u0612\\x02\" +\r\n\t\t\"\\u061C\\x02\\u061E\\x02\\u061E\\x02\\u0622\\x02\\u066B\\x02\\u0670\\x02\\u06D5\\x02\" +\r\n\t\t\"\\u06D7\\x02\\u06DF\\x02\\u06E1\\x02\\u06EA\\x02\\u06EC\\x02\\u06FE\\x02\\u0701\\x02\" +\r\n\t\t\"\\u0701\\x02\\u0711\\x02\\u074C\\x02\\u074F\\x02\\u07B3\\x02\\u07C2\\x02\\u07F7\\x02\" +\r\n\t\t\"\\u07FC\\x02\\u07FC\\x02\\u0802\\x02\\u082F\\x02\\u0842\\x02\\u085D\\x02\\u08A2\\x02\" +\r\n\t\t\"\\u08B6\\x02\\u08B8\\x02\\u08BF\\x02\\u08D6\\x02\\u0965\\x02\\u0968\\x02\\u0971\\x02\" +\r\n\t\t\"\\u0973\\x02\\u0985\\x02\\u0987\\x02\\u098E\\x02\\u0991\\x02\\u0992\\x02\\u0995\\x02\" +\r\n\t\t\"\\u09AA\\x02\\u09AC\\x02\\u09B2\\x02\\u09B4\\x02\\u09B4\\x02\\u09B8\\x02\\u09BB\\x02\" +\r\n\t\t\"\\u09BE\\x02\\u09C6\\x02\\u09C9\\x02\\u09CA\\x02\\u09CD\\x02\\u09D0\\x02\\u09D9\\x02\" +\r\n\t\t\"\\u09D9\\x02\\u09DE\\x02\\u09DF\\x02\\u09E1\\x02\\u09E5\\x02\\u09E8\\x02\\u09F3\\x02\" +\r\n\t\t\"\\u0A03\\x02\\u0A05\\x02\\u0A07\\x02\\u0A0C\\x02\\u0A11\\x02\\u0A12\\x02\\u0A15\\x02\" +\r\n\t\t\"\\u0A2A\\x02\\u0A2C\\x02\\u0A32\\x02\\u0A34\\x02\\u0A35\\x02\\u0A37\\x02\\u0A38\\x02\" +\r\n\t\t\"\\u0A3A\\x02\\u0A3B\\x02\\u0A3E\\x02\\u0A3E\\x02\\u0A40\\x02\\u0A44\\x02\\u0A49\\x02\" +\r\n\t\t\"\\u0A4A\\x02\\u0A4D\\x02\\u0A4F\\x02\\u0A53\\x02\\u0A53\\x02\\u0A5B\\x02\\u0A5E\\x02\" +\r\n\t\t\"\\u0A60\\x02\\u0A60\\x02\\u0A68\\x02\\u0A77\\x02\\u0A83\\x02\\u0A85\\x02\\u0A87\\x02\" +\r\n\t\t\"\\u0A8F\\x02\\u0A91\\x02\\u0A93\\x02\\u0A95\\x02\\u0AAA\\x02\\u0AAC\\x02\\u0AB2\\x02\" +\r\n\t\t\"\\u0AB4\\x02\\u0AB5\\x02\\u0AB7\\x02\\u0ABB\\x02\\u0ABE\\x02\\u0AC7\\x02\\u0AC9\\x02\" +\r\n\t\t\"\\u0ACB\\x02\\u0ACD\\x02\\u0ACF\\x02\\u0AD2\\x02\\u0AD2\\x02\\u0AE2\\x02\\u0AE5\\x02\" +\r\n\t\t\"\\u0AE8\\x02\\u0AF1\\x02\\u0AFB\\x02\\u0AFB\\x02\\u0B03\\x02\\u0B05\\x02\\u0B07\\x02\" +\r\n\t\t\"\\u0B0E\\x02\\u0B11\\x02\\u0B12\\x02\\u0B15\\x02\\u0B2A\\x02\\u0B2C\\x02\\u0B32\\x02\" +\r\n\t\t\"\\u0B34\\x02\\u0B35\\x02\\u0B37\\x02\\u0B3B\\x02\\u0B3E\\x02\\u0B46\\x02\\u0B49\\x02\" +\r\n\t\t\"\\u0B4A\\x02\\u0B4D\\x02\\u0B4F\\x02\\u0B58\\x02\\u0B59\\x02\\u0B5E\\x02\\u0B5F\\x02\" +\r\n\t\t\"\\u0B61\\x02\\u0B65\\x02\\u0B68\\x02\\u0B71\\x02\\u0B73\\x02\\u0B73\\x02\\u0B84\\x02\" +\r\n\t\t\"\\u0B85\\x02\\u0B87\\x02\\u0B8C\\x02\\u0B90\\x02\\u0B92\\x02\\u0B94\\x02\\u0B97\\x02\" +\r\n\t\t\"\\u0B9B\\x02\\u0B9C\\x02\\u0B9E\\x02\\u0B9E\\x02\\u0BA0\\x02\\u0BA1\\x02\\u0BA5\\x02\" +\r\n\t\t\"\\u0BA6\\x02\\u0BAA\\x02\\u0BAC\\x02\\u0BB0\\x02\\u0BBB\\x02\\u0BC0\\x02\\u0BC4\\x02\" +\r\n\t\t\"\\u0BC8\\x02\\u0BCA\\x02\\u0BCC\\x02\\u0BCF\\x02\\u0BD2\\x02\\u0BD2\\x02\\u0BD9\\x02\" +\r\n\t\t\"\\u0BD9\\x02\\u0BE8\\x02\\u0BF1\\x02\\u0C02\\x02\\u0C05\\x02\\u0C07\\x02\\u0C0E\\x02\" +\r\n\t\t\"\\u0C10\\x02\\u0C12\\x02\\u0C14\\x02\\u0C2A\\x02\\u0C2C\\x02\\u0C3B\\x02\\u0C3F\\x02\" +\r\n\t\t\"\\u0C46\\x02\\u0C48\\x02\\u0C4A\\x02\\u0C4C\\x02\\u0C4F\\x02\\u0C57\\x02\\u0C58\\x02\" +\r\n\t\t\"\\u0C5A\\x02\\u0C5C\\x02\\u0C62\\x02\\u0C65\\x02\\u0C68\\x02\\u0C71\\x02\\u0C82\\x02\" +\r\n\t\t\"\\u0C85\\x02\\u0C87\\x02\\u0C8E\\x02\\u0C90\\x02\\u0C92\\x02\\u0C94\\x02\\u0CAA\\x02\" +\r\n\t\t\"\\u0CAC\\x02\\u0CB5\\x02\\u0CB7\\x02\\u0CBB\\x02\\u0CBE\\x02\\u0CC6\\x02\\u0CC8\\x02\" +\r\n\t\t\"\\u0CCA\\x02\\u0CCC\\x02\\u0CCF\\x02\\u0CD7\\x02\\u0CD8\\x02\\u0CE0\\x02\\u0CE0\\x02\" +\r\n\t\t\"\\u0CE2\\x02\\u0CE5\\x02\\u0CE8\\x02\\u0CF1\\x02\\u0CF3\\x02\\u0CF4\\x02\\u0D03\\x02\" +\r\n\t\t\"\\u0D05\\x02\\u0D07\\x02\\u0D0E\\x02\\u0D10\\x02\\u0D12\\x02\\u0D14\\x02\\u0D3C\\x02\" +\r\n\t\t\"\\u0D3F\\x02\\u0D46\\x02\\u0D48\\x02\\u0D4A\\x02\\u0D4C\\x02\\u0D50\\x02\\u0D56\\x02\" +\r\n\t\t\"\\u0D59\\x02\\u0D61\\x02\\u0D65\\x02\\u0D68\\x02\\u0D71\\x02\\u0D7C\\x02\\u0D81\\x02\" +\r\n\t\t\"\\u0D84\\x02\\u0D85\\x02\\u0D87\\x02\\u0D98\\x02\\u0D9C\\x02\\u0DB3\\x02\\u0DB5\\x02\" +\r\n\t\t\"\\u0DBD\\x02\\u0DBF\\x02\\u0DBF\\x02\\u0DC2\\x02\\u0DC8\\x02\\u0DCC\\x02\\u0DCC\\x02\" +\r\n\t\t\"\\u0DD1\\x02\\u0DD6\\x02\\u0DD8\\x02\\u0DD8\\x02\\u0DDA\\x02\\u0DE1\\x02\\u0DE8\\x02\" +\r\n\t\t\"\\u0DF1\\x02\\u0DF4\\x02\\u0DF5\\x02\\u0E03\\x02\\u0E3C\\x02\\u0E42\\x02\\u0E50\\x02\" +\r\n\t\t\"\\u0E52\\x02\\u0E5B\\x02\\u0E83\\x02\\u0E84\\x02\\u0E86\\x02\\u0E86\\x02\\u0E89\\x02\" +\r\n\t\t\"\\u0E8A\\x02\\u0E8C\\x02\\u0E8C\\x02\\u0E8F\\x02\\u0E8F\\x02\\u0E96\\x02\\u0E99\\x02\" +\r\n\t\t\"\\u0E9B\\x02\\u0EA1\\x02\\u0EA3\\x02\\u0EA5\\x02\\u0EA7\\x02\\u0EA7\\x02\\u0EA9\\x02\" +\r\n\t\t\"\\u0EA9\\x02\\u0EAC\\x02\\u0EAD\\x02\\u0EAF\\x02\\u0EBB\\x02\\u0EBD\\x02\\u0EBF\\x02\" +\r\n\t\t\"\\u0EC2\\x02\\u0EC6\\x02\\u0EC8\\x02\\u0EC8\\x02\\u0ECA\\x02\\u0ECF\\x02\\u0ED2\\x02\" +\r\n\t\t\"\\u0EDB\\x02\\u0EDE\\x02\\u0EE1\\x02\\u0F02\\x02\\u0F02\\x02\\u0F1A\\x02\\u0F1B\\x02\" +\r\n\t\t\"\\u0F22\\x02\\u0F2B\\x02\\u0F37\\x02\\u0F37\\x02\\u0F39\\x02\\u0F39\\x02\\u0F3B\\x02\" +\r\n\t\t\"\\u0F3B\\x02\\u0F40\\x02\\u0F49\\x02\\u0F4B\\x02\\u0F6E\\x02\\u0F73\\x02\\u0F86\\x02\" +\r\n\t\t\"\\u0F88\\x02\\u0F99\\x02\\u0F9B\\x02\\u0FBE\\x02\\u0FC8\\x02\\u0FC8\\x02\\u1002\\x02\" +\r\n\t\t\"\\u104B\\x02\\u1052\\x02\\u109F\\x02\\u10A2\\x02\\u10C7\\x02\\u10C9\\x02\\u10C9\\x02\" +\r\n\t\t\"\\u10CF\\x02\\u10CF\\x02\\u10D2\\x02\\u10FC\\x02\\u10FE\\x02\\u124A\\x02\\u124C\\x02\" +\r\n\t\t\"\\u124F\\x02\\u1252\\x02\\u1258\\x02\\u125A\\x02\\u125A\\x02\\u125C\\x02\\u125F\\x02\" +\r\n\t\t\"\\u1262\\x02\\u128A\\x02\\u128C\\x02\\u128F\\x02\\u1292\\x02\\u12B2\\x02\\u12B4\\x02\" +\r\n\t\t\"\\u12B7\\x02\\u12BA\\x02\\u12C0\\x02\\u12C2\\x02\\u12C2\\x02\\u12C4\\x02\\u12C7\\x02\" +\r\n\t\t\"\\u12CA\\x02\\u12D8\\x02\\u12DA\\x02\\u1312\\x02\\u1314\\x02\\u1317\\x02\\u131A\\x02\" +\r\n\t\t\"\\u135C\\x02\\u135F\\x02\\u1361\\x02\\u1382\\x02\\u1391\\x02\\u13A2\\x02\\u13F7\\x02\" +\r\n\t\t\"\\u13FA\\x02\\u13FF\\x02\\u1403\\x02\\u166E\\x02\\u1671\\x02\\u1681\\x02\\u1683\\x02\" +\r\n\t\t\"\\u169C\\x02\\u16A2\\x02\\u16EC\\x02\\u16F0\\x02\\u16FA\\x02\\u1702\\x02\\u170E\\x02\" +\r\n\t\t\"\\u1710\\x02\\u1716\\x02\\u1722\\x02\\u1736\\x02\\u1742\\x02\\u1755\\x02\\u1762\\x02\" +\r\n\t\t\"\\u176E\\x02\\u1770\\x02\\u1772\\x02\\u1774\\x02\\u1775\\x02\\u1782\\x02\\u17D5\\x02\" +\r\n\t\t\"\\u17D9\\x02\\u17D9\\x02\\u17DE\\x02\\u17DF\\x02\\u17E2\\x02\\u17EB\\x02\\u180D\\x02\" +\r\n\t\t\"\\u1810\\x02\\u1812\\x02\\u181B\\x02\\u1822\\x02\\u1879\\x02\\u1882\\x02\\u18AC\\x02\" +\r\n\t\t\"\\u18B2\\x02\\u18F7\\x02\\u1902\\x02\\u1920\\x02\\u1922\\x02\\u192D\\x02\\u1932\\x02\" +\r\n\t\t\"\\u193D\\x02\\u1948\\x02\\u196F\\x02\\u1972\\x02\\u1976\\x02\\u1982\\x02\\u19AD\\x02\" +\r\n\t\t\"\\u19B2\\x02\\u19CB\\x02\\u19D2\\x02\\u19DB\\x02\\u1A02\\x02\\u1A1D\\x02\\u1A22\\x02\" +\r\n\t\t\"\\u1A60\\x02\\u1A62\\x02\\u1A7E\\x02\\u1A81\\x02\\u1A8B\\x02\\u1A92\\x02\\u1A9B\\x02\" +\r\n\t\t\"\\u1AA9\\x02\\u1AA9\\x02\\u1AB2\\x02\\u1ABF\\x02\\u1B02\\x02\\u1B4D\\x02\\u1B52\\x02\" +\r\n\t\t\"\\u1B5B\\x02\\u1B6D\\x02\\u1B75\\x02\\u1B82\\x02\\u1BF5\\x02\\u1C02\\x02\\u1C39\\x02\" +\r\n\t\t\"\\u1C42\\x02\\u1C4B\\x02\\u1C4F\\x02\\u1C7F\\x02\\u1C82\\x02\\u1C8A\\x02\\u1CD2\\x02\" +\r\n\t\t\"\\u1CD4\\x02\\u1CD6\\x02\\u1CF8\\x02\\u1CFA\\x02\\u1CFB\\x02\\u1D02\\x02\\u1DF7\\x02\" +\r\n\t\t\"\\u1DFD\\x02\\u1F17\\x02\\u1F1A\\x02\\u1F1F\\x02\\u1F22\\x02\\u1F47\\x02\\u1F4A\\x02\" +\r\n\t\t\"\\u1F4F\\x02\\u1F52\\x02\\u1F59\\x02\\u1F5B\\x02\\u1F5B\\x02\\u1F5D\\x02\\u1F5D\\x02\" +\r\n\t\t\"\\u1F5F\\x02\\u1F5F\\x02\\u1F61\\x02\\u1F7F\\x02\\u1F82\\x02\\u1FB6\\x02\\u1FB8\\x02\" +\r\n\t\t\"\\u1FBE\\x02\\u1FC0\\x02\\u1FC0\\x02\\u1FC4\\x02\\u1FC6\\x02\\u1FC8\\x02\\u1FCE\\x02\" +\r\n\t\t\"\\u1FD2\\x02\\u1FD5\\x02\\u1FD8\\x02\\u1FDD\\x02\\u1FE2\\x02\\u1FEE\\x02\\u1FF4\\x02\" +\r\n\t\t\"\\u1FF6\\x02\\u1FF8\\x02\\u1FFE\\x02\\u200D\\x02\\u2011\\x02\\u202C\\x02\\u2030\\x02\" +\r\n\t\t\"\\u2041\\x02\\u2042\\x02\\u2056\\x02\\u2056\\x02\\u2062\\x02\\u2066\\x02\\u2068\\x02\" +\r\n\t\t\"\\u2071\\x02\\u2073\\x02\\u2073\\x02\\u2081\\x02\\u2081\\x02\\u2092\\x02\\u209E\\x02\" +\r\n\t\t\"\\u20D2\\x02\\u20DE\\x02\\u20E3\\x02\\u20E3\\x02\\u20E7\\x02\\u20F2\\x02\\u2104\\x02\" +\r\n\t\t\"\\u2104\\x02\\u2109\\x02\\u2109\\x02\\u210C\\x02\\u2115\\x02\\u2117\\x02\\u2117\\x02\" +\r\n\t\t\"\\u211B\\x02\\u211F\\x02\\u2126\\x02\\u2126\\x02\\u2128\\x02\\u2128\\x02\\u212A\\x02\" +\r\n\t\t\"\\u212A\\x02\\u212C\\x02\\u212F\\x02\\u2131\\x02\\u213B\\x02\\u213E\\x02\\u2141\\x02\" +\r\n\t\t\"\\u2147\\x02\\u214B\\x02\\u2150\\x02\\u2150\\x02\\u2162\\x02\\u218A\\x02\\u2C02\\x02\" +\r\n\t\t\"\\u2C30\\x02\\u2C32\\x02\\u2C60\\x02\\u2C62\\x02\\u2CE6\\x02\\u2CED\\x02\\u2CF5\\x02\" +\r\n\t\t\"\\u2D02\\x02\\u2D27\\x02\\u2D29\\x02\\u2D29\\x02\\u2D2F\\x02\\u2D2F\\x02\\u2D32\\x02\" +\r\n\t\t\"\\u2D69\\x02\\u2D71\\x02\\u2D71\\x02\\u2D81\\x02\\u2D98\\x02\\u2DA2\\x02\\u2DA8\\x02\" +\r\n\t\t\"\\u2DAA\\x02\\u2DB0\\x02\\u2DB2\\x02\\u2DB8\\x02\\u2DBA\\x02\\u2DC0\\x02\\u2DC2\\x02\" +\r\n\t\t\"\\u2DC8\\x02\\u2DCA\\x02\\u2DD0\\x02\\u2DD2\\x02\\u2DD8\\x02\\u2DDA\\x02\\u2DE0\\x02\" +\r\n\t\t\"\\u2DE2\\x02\\u2E01\\x02\\u2E31\\x02\\u2E31\\x02\\u3007\\x02\\u3009\\x02\\u3023\\x02\" +\r\n\t\t\"\\u3031\\x02\\u3033\\x02\\u3037\\x02\\u303A\\x02\\u303E\\x02\\u3043\\x02\\u3098\\x02\" +\r\n\t\t\"\\u309B\\x02\\u309C\\x02\\u309F\\x02\\u30A1\\x02\\u30A3\\x02\\u30FC\\x02\\u30FE\\x02\" +\r\n\t\t\"\\u3101\\x02\\u3107\\x02\\u312F\\x02\\u3133\\x02\\u3190\\x02\\u31A2\\x02\\u31BC\\x02\" +\r\n\t\t\"\\u31F2\\x02\\u3201\\x02\\u3402\\x02\\u4DB7\\x02\\u4E02\\x02\\u9FD7\\x02\\uA002\\x02\" +\r\n\t\t\"\\uA48E\\x02\\uA4D2\\x02\\uA4FF\\x02\\uA502\\x02\\uA60E\\x02\\uA612\\x02\\uA62D\\x02\" +\r\n\t\t\"\\uA642\\x02\\uA671\\x02\\uA676\\x02\\uA67F\\x02\\uA681\\x02\\uA6F3\\x02\\uA719\\x02\" +\r\n\t\t\"\\uA721\\x02\\uA724\\x02\\uA78A\\x02\\uA78D\\x02\\uA7B0\\x02\\uA7B2\\x02\\uA7B9\\x02\" +\r\n\t\t\"\\uA7F9\\x02\\uA829\\x02\\uA842\\x02\\uA875\\x02\\uA882\\x02\\uA8C7\\x02\\uA8D2\\x02\" +\r\n\t\t\"\\uA8DB\\x02\\uA8E2\\x02\\uA8F9\\x02\\uA8FD\\x02\\uA8FD\\x02\\uA8FF\\x02\\uA8FF\\x02\" +\r\n\t\t\"\\uA902\\x02\\uA92F\\x02\\uA932\\x02\\uA955\\x02\\uA962\\x02\\uA97E\\x02\\uA982\\x02\" +\r\n\t\t\"\\uA9C2\\x02\\uA9D1\\x02\\uA9DB\\x02\\uA9E2\\x02\\uAA00\\x02\\uAA02\\x02\\uAA38\\x02\" +\r\n\t\t\"\\uAA42\\x02\\uAA4F\\x02\\uAA52\\x02\\uAA5B\\x02\\uAA62\\x02\\uAA78\\x02\\uAA7C\\x02\" +\r\n\t\t\"\\uAAC4\\x02\\uAADD\\x02\\uAADF\\x02\\uAAE2\\x02\\uAAF1\\x02\\uAAF4\\x02\\uAAF8\\x02\" +\r\n\t\t\"\\uAB03\\x02\\uAB08\\x02\\uAB0B\\x02\\uAB10\\x02\\uAB13\\x02\\uAB18\\x02\\uAB22\\x02\" +\r\n\t\t\"\\uAB28\\x02\\uAB2A\\x02\\uAB30\\x02\\uAB32\\x02\\uAB5C\\x02\\uAB5E\\x02\\uAB67\\x02\" +\r\n\t\t\"\\uAB72\\x02\\uABEC\\x02\\uABEE\\x02\\uABEF\\x02\\uABF2\\x02\\uABFB\\x02\\uAC02\\x02\" +\r\n\t\t\"\\uD7A5\\x02\\uD7B2\\x02\\uD7C8\\x02\\uD7CD\\x02\\uD7FD\\x02\\uF902\\x02\\uFA6F\\x02\" +\r\n\t\t\"\\uFA72\\x02\\uFADB\\x02\\uFB02\\x02\\uFB08\\x02\\uFB15\\x02\\uFB19\\x02\\uFB1F\\x02\" +\r\n\t\t\"\\uFB2A\\x02\\uFB2C\\x02\\uFB38\\x02\\uFB3A\\x02\\uFB3E\\x02\\uFB40\\x02\\uFB40\\x02\" +\r\n\t\t\"\\uFB42\\x02\\uFB43\\x02\\uFB45\\x02\\uFB46\\x02\\uFB48\\x02\\uFBB3\\x02\\uFBD5\\x02\" +\r\n\t\t\"\\uFD3F\\x02\\uFD52\\x02\\uFD91\\x02\\uFD94\\x02\\uFDC9\\x02\\uFDF2\\x02\\uFDFD\\x02\" +\r\n\t\t\"\\uFE02\\x02\\uFE11\\x02\\uFE22\\x02\\uFE31\\x02\\uFE35\\x02\\uFE36\\x02\\uFE4F\\x02\" +\r\n\t\t\"\\uFE51\\x02\\uFE72\\x02\\uFE76\\x02\\uFE78\\x02\\uFEFE\\x02\\uFF01\\x02\\uFF01\\x02\" +\r\n\t\t\"\\uFF12\\x02\\uFF1B\\x02\\uFF23\\x02\\uFF3C\\x02\\uFF41\\x02\\uFF41\\x02\\uFF43\\x02\" +\r\n\t\t\"\\uFF5C\\x02\\uFF68\\x02\\uFFC0\\x02\\uFFC4\\x02\\uFFC9\\x02\\uFFCC\\x02\\uFFD1\\x02\" +\r\n\t\t\"\\uFFD4\\x02\\uFFD9\\x02\\uFFDC\\x02\\uFFDE\\x02\\uFFFB\\x02\\uFFFD\\x02\\x02\\x03\\r\" +\r\n\t\t\"\\x03\\x0F\\x03(\\x03*\\x03<\\x03>\\x03?\\x03A\\x03O\\x03R\\x03_\\x03\\x82\\x03\\xFC\" +\r\n\t\t\"\\x03\\u0142\\x03\\u0176\\x03\\u01FF\\x03\\u01FF\\x03\\u0282\\x03\\u029E\\x03\\u02A2\" +\r\n\t\t\"\\x03\\u02D2\\x03\\u02E2\\x03\\u02E2\\x03\\u0302\\x03\\u0321\\x03\\u0332\\x03\\u034C\" +\r\n\t\t\"\\x03\\u0352\\x03\\u037C\\x03\\u0382\\x03\\u039F\\x03\\u03A2\\x03\\u03C5\\x03\\u03CA\" +\r\n\t\t\"\\x03\\u03D1\\x03\\u03D3\\x03\\u03D7\\x03\\u0402\\x03\\u049F\\x03\\u04A2\\x03\\u04AB\" +\r\n\t\t\"\\x03\\u04B2\\x03\\u04D5\\x03\\u04DA\\x03\\u04FD\\x03\\u0502\\x03\\u0529\\x03\\u0532\" +\r\n\t\t\"\\x03\\u0565\\x03\\u0602\\x03\\u0738\\x03\\u0742\\x03\\u0757\\x03\\u0762\\x03\\u0769\" +\r\n\t\t\"\\x03\\u0802\\x03\\u0807\\x03\\u080A\\x03\\u080A\\x03\\u080C\\x03\\u0837\\x03\\u0839\" +\r\n\t\t\"\\x03\\u083A\\x03\\u083E\\x03\\u083E\\x03\\u0841\\x03\\u0857\\x03\\u0862\\x03\\u0878\" +\r\n\t\t\"\\x03\\u0882\\x03\\u08A0\\x03\\u08E2\\x03\\u08F4\\x03\\u08F6\\x03\\u08F7\\x03\\u0902\" +\r\n\t\t\"\\x03\\u0917\\x03\\u0922\\x03\\u093B\\x03\\u0982\\x03\\u09B9\\x03\\u09C0\\x03\\u09C1\" +\r\n\t\t\"\\x03\\u0A02\\x03\\u0A05\\x03\\u0A07\\x03\\u0A08\\x03\\u0A0E\\x03\\u0A15\\x03\\u0A17\" +\r\n\t\t\"\\x03\\u0A19\\x03\\u0A1B\\x03\\u0A35\\x03\\u0A3A\\x03\\u0A3C\\x03\\u0A41\\x03\\u0A41\" +\r\n\t\t\"\\x03\\u0A62\\x03\\u0A7E\\x03\\u0A82\\x03\\u0A9E\\x03\\u0AC2\\x03\\u0AC9\\x03\\u0ACB\" +\r\n\t\t\"\\x03\\u0AE8\\x03\\u0B02\\x03\\u0B37\\x03\\u0B42\\x03\\u0B57\\x03\\u0B62\\x03\\u0B74\" +\r\n\t\t\"\\x03\\u0B82\\x03\\u0B93\\x03\\u0C02\\x03\\u0C4A\\x03\\u0C82\\x03\\u0CB4\\x03\\u0CC2\" +\r\n\t\t\"\\x03\\u0CF4\\x03\\u1002\\x03\\u1048\\x03\\u1068\\x03\\u1071\\x03\\u1081\\x03\\u10BC\" +\r\n\t\t\"\\x03\\u10BF\\x03\\u10BF\\x03\\u10D2\\x03\\u10EA\\x03\\u10F2\\x03\\u10FB\\x03\\u1102\" +\r\n\t\t\"\\x03\\u1136\\x03\\u1138\\x03\\u1141\\x03\\u1152\\x03\\u1175\\x03\\u1178\\x03\\u1178\" +\r\n\t\t\"\\x03\\u1182\\x03\\u11C6\\x03\\u11CC\\x03\\u11CE\\x03\\u11D2\\x03\\u11DC\\x03\\u11DE\" +\r\n\t\t\"\\x03\\u11DE\\x03\\u1202\\x03\\u1213\\x03\\u1215\\x03\\u1239\\x03\\u1240\\x03\\u1240\" +\r\n\t\t\"\\x03\\u1282\\x03\\u1288\\x03\\u128A\\x03\\u128A\\x03\\u128C\\x03\\u128F\\x03\\u1291\" +\r\n\t\t\"\\x03\\u129F\\x03\\u12A1\\x03\\u12AA\\x03\\u12B2\\x03\\u12EC\\x03\\u12F2\\x03\\u12FB\" +\r\n\t\t\"\\x03\\u1302\\x03\\u1305\\x03\\u1307\\x03\\u130E\\x03\\u1311\\x03\\u1312\\x03\\u1315\" +\r\n\t\t\"\\x03\\u132A\\x03\\u132C\\x03\\u1332\\x03\\u1334\\x03\\u1335\\x03\\u1337\\x03\\u133B\" +\r\n\t\t\"\\x03\\u133E\\x03\\u1346\\x03\\u1349\\x03\\u134A\\x03\\u134D\\x03\\u134F\\x03\\u1352\" +\r\n\t\t\"\\x03\\u1352\\x03\\u1359\\x03\\u1359\\x03\\u135F\\x03\\u1365\\x03\\u1368\\x03\\u136E\" +\r\n\t\t\"\\x03\\u1372\\x03\\u1376\\x03\\u1402\\x03\\u144C\\x03\\u1452\\x03\\u145B\\x03\\u1482\" +\r\n\t\t\"\\x03\\u14C7\\x03\\u14C9\\x03\\u14C9\\x03\\u14D2\\x03\\u14DB\\x03\\u1582\\x03\\u15B7\" +\r\n\t\t\"\\x03\\u15BA\\x03\\u15C2\\x03\\u15DA\\x03\\u15DF\\x03\\u1602\\x03\\u1642\\x03\\u1646\" +\r\n\t\t\"\\x03\\u1646\\x03\\u1652\\x03\\u165B\\x03\\u1682\\x03\\u16B9\\x03\\u16C2\\x03\\u16CB\" +\r\n\t\t\"\\x03\\u1702\\x03\\u171B\\x03\\u171F\\x03\\u172D\\x03\\u1732\\x03\\u173B\\x03\\u18A2\" +\r\n\t\t\"\\x03\\u18EB\\x03\\u1901\\x03\\u1901\\x03\\u1AC2\\x03\\u1AFA\\x03\\u1C02\\x03\\u1C0A\" +\r\n\t\t\"\\x03\\u1C0C\\x03\\u1C38\\x03\\u1C3A\\x03\\u1C42\\x03\\u1C52\\x03\\u1C5B\\x03\\u1C74\" +\r\n\t\t\"\\x03\\u1C91\\x03\\u1C94\\x03\\u1CA9\\x03\\u1CAB\\x03\\u1CB8\\x03\\u2002\\x03\\u239B\" +\r\n\t\t\"\\x03\\u2402\\x03\\u2470\\x03\\u2482\\x03\\u2545\\x03\\u3002\\x03\\u3430\\x03\\u4402\" +\r\n\t\t\"\\x03\\u4648\\x03\\u6802\\x03\\u6A3A\\x03\\u6A42\\x03\\u6A60\\x03\\u6A62\\x03\\u6A6B\" +\r\n\t\t\"\\x03\\u6AD2\\x03\\u6AEF\\x03\\u6AF2\\x03\\u6AF6\\x03\\u6B02\\x03\\u6B38\\x03\\u6B42\" +\r\n\t\t\"\\x03\\u6B45\\x03\\u6B52\\x03\\u6B5B\\x03\\u6B65\\x03\\u6B79\\x03\\u6B7F\\x03\\u6B91\" +\r\n\t\t\"\\x03\\u6F02\\x03\\u6F46\\x03\\u6F52\\x03\\u6F80\\x03\\u6F91\\x03\\u6FA1\\x03\\u6FE2\" +\r\n\t\t\"\\x03\\u6FE2\\x03\\u7002\\x03\\u87EE\\x03\\u8802\\x03\\u8AF4\\x03\\uB002\\x03\\uB003\" +\r\n\t\t\"\\x03\\uBC02\\x03\\uBC6C\\x03\\uBC72\\x03\\uBC7E\\x03\\uBC82\\x03\\uBC8A\\x03\\uBC92\" +\r\n\t\t\"\\x03\\uBC9B\\x03\\uBC9F\\x03\\uBCA0\\x03\\uBCA2\\x03\\uBCA5\\x03\\uD167\\x03\\uD16B\" +\r\n\t\t\"\\x03\\uD16F\\x03\\uD184\\x03\\uD187\\x03\\uD18D\\x03\\uD1AC\\x03\\uD1AF\\x03\\uD244\" +\r\n\t\t\"\\x03\\uD246\\x03\\uD402\\x03\\uD456\\x03\\uD458\\x03\\uD49E\\x03\\uD4A0\\x03\\uD4A1\" +\r\n\t\t\"\\x03\\uD4A4\\x03\\uD4A4\\x03\\uD4A7\\x03\\uD4A8\\x03\\uD4AB\\x03\\uD4AE\\x03\\uD4B0\" +\r\n\t\t\"\\x03\\uD4BB\\x03\\uD4BD\\x03\\uD4BD\\x03\\uD4BF\\x03\\uD4C5\\x03\\uD4C7\\x03\\uD507\" +\r\n\t\t\"\\x03\\uD509\\x03\\uD50C\\x03\\uD50F\\x03\\uD516\\x03\\uD518\\x03\\uD51E\\x03\\uD520\" +\r\n\t\t\"\\x03\\uD53B\\x03\\uD53D\\x03\\uD540\\x03\\uD542\\x03\\uD546\\x03\\uD548\\x03\\uD548\" +\r\n\t\t\"\\x03\\uD54C\\x03\\uD552\\x03\\uD554\\x03\\uD6A7\\x03\\uD6AA\\x03\\uD6C2\\x03\\uD6C4\" +\r\n\t\t\"\\x03\\uD6DC\\x03\\uD6DE\\x03\\uD6FC\\x03\\uD6FE\\x03\\uD716\\x03\\uD718\\x03\\uD736\" +\r\n\t\t\"\\x03\\uD738\\x03\\uD750\\x03\\uD752\\x03\\uD770\\x03\\uD772\\x03\\uD78A\\x03\\uD78C\" +\r\n\t\t\"\\x03\\uD7AA\\x03\\uD7AC\\x03\\uD7C4\\x03\\uD7C6\\x03\\uD7CD\\x03\\uD7D0\\x03\\uD801\" +\r\n\t\t\"\\x03\\uDA02\\x03\\uDA38\\x03\\uDA3D\\x03\\uDA6E\\x03\\uDA77\\x03\\uDA77\\x03\\uDA86\" +\r\n\t\t\"\\x03\\uDA86\\x03\\uDA9D\\x03\\uDAA1\\x03\\uDAA3\\x03\\uDAB1\\x03\\uE002\\x03\\uE008\" +\r\n\t\t\"\\x03\\uE00A\\x03\\uE01A\\x03\\uE01D\\x03\\uE023\\x03\\uE025\\x03\\uE026\\x03\\uE028\" +\r\n\t\t\"\\x03\\uE02C\\x03\\uE802\\x03\\uE8C6\\x03\\uE8D2\\x03\\uE8D8\\x03\\uE902\\x03\\uE94C\" +\r\n\t\t\"\\x03\\uE952\\x03\\uE95B\\x03\\uEE02\\x03\\uEE05\\x03\\uEE07\\x03\\uEE21\\x03\\uEE23\" +\r\n\t\t\"\\x03\\uEE24\\x03\\uEE26\\x03\\uEE26\\x03\\uEE29\\x03\\uEE29\\x03\\uEE2B\\x03\\uEE34\" +\r\n\t\t\"\\x03\\uEE36\\x03\\uEE39\\x03\\uEE3B\\x03\\uEE3B\\x03\\uEE3D\\x03\\uEE3D\\x03\\uEE44\" +\r\n\t\t\"\\x03\\uEE44\\x03\\uEE49\\x03\\uEE49\\x03\\uEE4B\\x03\\uEE4B\\x03\\uEE4D\\x03\\uEE4D\" +\r\n\t\t\"\\x03\\uEE4F\\x03\\uEE51\\x03\\uEE53\\x03\\uEE54\\x03\\uEE56\\x03\\uEE56\\x03\\uEE59\" +\r\n\t\t\"\\x03\\uEE59\\x03\\uEE5B\\x03\\uEE5B\\x03\\uEE5D\\x03\\uEE5D\\x03\\uEE5F\\x03\\uEE5F\" +\r\n\t\t\"\\x03\\uEE61\\x03\\uEE61\\x03\\uEE63\\x03\\uEE64\\x03\\uEE66\\x03\\uEE66\\x03\\uEE69\" +\r\n\t\t\"\\x03\\uEE6C\\x03\\uEE6E\\x03\\uEE74\\x03\\uEE76\\x03\\uEE79\\x03\\uEE7B\\x03\\uEE7E\" +\r\n\t\t\"\\x03\\uEE80\\x03\\uEE80\\x03\\uEE82\\x03\\uEE8B\\x03\\uEE8D\\x03\\uEE9D\\x03\\uEEA3\" +\r\n\t\t\"\\x03\\uEEA5\\x03\\uEEA7\\x03\\uEEAB\\x03\\uEEAD\\x03\\uEEBD\\x03\\x02\\x04\\uA6D8\\x04\" +\r\n\t\t\"\\uA702\\x04\\uB736\\x04\\uB742\\x04\\uB81F\\x04\\uB822\\x04\\uCEA3\\x04\\uF802\\x04\" +\r\n\t\t\"\\uFA1F\\x04\\x03\\x10\\x03\\x10\\\"\\x10\\x81\\x10\\u0102\\x10\\u01F1\\x10\\u0240\\x02\" +\r\n\t\t\"C\\x02\\\\\\x02c\\x02|\\x02\\xAC\\x02\\xAC\\x02\\xB7\\x02\\xB7\\x02\\xBC\\x02\\xBC\\x02\" +\r\n\t\t\"\\xC2\\x02\\xD8\\x02\\xDA\\x02\\xF8\\x02\\xFA\\x02\\u02C3\\x02\\u02C8\\x02\\u02D3\\x02\" +\r\n\t\t\"\\u02E2\\x02\\u02E6\\x02\\u02EE\\x02\\u02EE\\x02\\u02F0\\x02\\u02F0\\x02\\u0372\\x02\" +\r\n\t\t\"\\u0376\\x02\\u0378\\x02\\u0379\\x02\\u037C\\x02\\u037F\\x02\\u0381\\x02\\u0381\\x02\" +\r\n\t\t\"\\u0388\\x02\\u0388\\x02\\u038A\\x02\\u038C\\x02\\u038E\\x02\\u038E\\x02\\u0390\\x02\" +\r\n\t\t\"\\u03A3\\x02\\u03A5\\x02\\u03F7\\x02\\u03F9\\x02\\u0483\\x02\\u048C\\x02\\u0531\\x02\" +\r\n\t\t\"\\u0533\\x02\\u0558\\x02\\u055B\\x02\\u055B\\x02\\u0563\\x02\\u0589\\x02\\u05D2\\x02\" +\r\n\t\t\"\\u05EC\\x02\\u05F2\\x02\\u05F4\\x02\\u0622\\x02\\u064C\\x02\\u0670\\x02\\u0671\\x02\" +\r\n\t\t\"\\u0673\\x02\\u06D5\\x02\\u06D7\\x02\\u06D7\\x02\\u06E7\\x02\\u06E8\\x02\\u06F0\\x02\" +\r\n\t\t\"\\u06F1\\x02\\u06FC\\x02\\u06FE\\x02\\u0701\\x02\\u0701\\x02\\u0712\\x02\\u0712\\x02\" +\r\n\t\t\"\\u0714\\x02\\u0731\\x02\\u074F\\x02\\u07A7\\x02\\u07B3\\x02\\u07B3\\x02\\u07CC\\x02\" +\r\n\t\t\"\\u07EC\\x02\\u07F6\\x02\\u07F7\\x02\\u07FC\\x02\\u07FC\\x02\\u0802\\x02\\u0817\\x02\" +\r\n\t\t\"\\u081C\\x02\\u081C\\x02\\u0826\\x02\\u0826\\x02\\u082A\\x02\\u082A\\x02\\u0842\\x02\" +\r\n\t\t\"\\u085A\\x02\\u08A2\\x02\\u08B6\\x02\\u08B8\\x02\\u08BF\\x02\\u0906\\x02\\u093B\\x02\" +\r\n\t\t\"\\u093F\\x02\\u093F\\x02\\u0952\\x02\\u0952\\x02\\u095A\\x02\\u0963\\x02\\u0973\\x02\" +\r\n\t\t\"\\u0982\\x02\\u0987\\x02\\u098E\\x02\\u0991\\x02\\u0992\\x02\\u0995\\x02\\u09AA\\x02\" +\r\n\t\t\"\\u09AC\\x02\\u09B2\\x02\\u09B4\\x02\\u09B4\\x02\\u09B8\\x02\\u09BB\\x02\\u09BF\\x02\" +\r\n\t\t\"\\u09BF\\x02\\u09D0\\x02\\u09D0\\x02\\u09DE\\x02\\u09DF\\x02\\u09E1\\x02\\u09E3\\x02\" +\r\n\t\t\"\\u09F2\\x02\\u09F3\\x02\\u0A07\\x02\\u0A0C\\x02\\u0A11\\x02\\u0A12\\x02\\u0A15\\x02\" +\r\n\t\t\"\\u0A2A\\x02\\u0A2C\\x02\\u0A32\\x02\\u0A34\\x02\\u0A35\\x02\\u0A37\\x02\\u0A38\\x02\" +\r\n\t\t\"\\u0A3A\\x02\\u0A3B\\x02\\u0A5B\\x02\\u0A5E\\x02\\u0A60\\x02\\u0A60\\x02\\u0A74\\x02\" +\r\n\t\t\"\\u0A76\\x02\\u0A87\\x02\\u0A8F\\x02\\u0A91\\x02\\u0A93\\x02\\u0A95\\x02\\u0AAA\\x02\" +\r\n\t\t\"\\u0AAC\\x02\\u0AB2\\x02\\u0AB4\\x02\\u0AB5\\x02\\u0AB7\\x02\\u0ABB\\x02\\u0ABF\\x02\" +\r\n\t\t\"\\u0ABF\\x02\\u0AD2\\x02\\u0AD2\\x02\\u0AE2\\x02\\u0AE3\\x02\\u0AFB\\x02\\u0AFB\\x02\" +\r\n\t\t\"\\u0B07\\x02\\u0B0E\\x02\\u0B11\\x02\\u0B12\\x02\\u0B15\\x02\\u0B2A\\x02\\u0B2C\\x02\" +\r\n\t\t\"\\u0B32\\x02\\u0B34\\x02\\u0B35\\x02\\u0B37\\x02\\u0B3B\\x02\\u0B3F\\x02\\u0B3F\\x02\" +\r\n\t\t\"\\u0B5E\\x02\\u0B5F\\x02\\u0B61\\x02\\u0B63\\x02\\u0B73\\x02\\u0B73\\x02\\u0B85\\x02\" +\r\n\t\t\"\\u0B85\\x02\\u0B87\\x02\\u0B8C\\x02\\u0B90\\x02\\u0B92\\x02\\u0B94\\x02\\u0B97\\x02\" +\r\n\t\t\"\\u0B9B\\x02\\u0B9C\\x02\\u0B9E\\x02\\u0B9E\\x02\\u0BA0\\x02\\u0BA1\\x02\\u0BA5\\x02\" +\r\n\t\t\"\\u0BA6\\x02\\u0BAA\\x02\\u0BAC\\x02\\u0BB0\\x02\\u0BBB\\x02\\u0BD2\\x02\\u0BD2\\x02\" +\r\n\t\t\"\\u0C07\\x02\\u0C0E\\x02\\u0C10\\x02\\u0C12\\x02\\u0C14\\x02\\u0C2A\\x02\\u0C2C\\x02\" +\r\n\t\t\"\\u0C3B\\x02\\u0C3F\\x02\\u0C3F\\x02\\u0C5A\\x02\\u0C5C\\x02\\u0C62\\x02\\u0C63\\x02\" +\r\n\t\t\"\\u0C82\\x02\\u0C82\\x02\\u0C87\\x02\\u0C8E\\x02\\u0C90\\x02\\u0C92\\x02\\u0C94\\x02\" +\r\n\t\t\"\\u0CAA\\x02\\u0CAC\\x02\\u0CB5\\x02\\u0CB7\\x02\\u0CBB\\x02\\u0CBF\\x02\\u0CBF\\x02\" +\r\n\t\t\"\\u0CE0\\x02\\u0CE0\\x02\\u0CE2\\x02\\u0CE3\\x02\\u0CF3\\x02\\u0CF4\\x02\\u0D07\\x02\" +\r\n\t\t\"\\u0D0E\\x02\\u0D10\\x02\\u0D12\\x02\\u0D14\\x02\\u0D3C\\x02\\u0D3F\\x02\\u0D3F\\x02\" +\r\n\t\t\"\\u0D50\\x02\\u0D50\\x02\\u0D56\\x02\\u0D58\\x02\\u0D61\\x02\\u0D63\\x02\\u0D7C\\x02\" +\r\n\t\t\"\\u0D81\\x02\\u0D87\\x02\\u0D98\\x02\\u0D9C\\x02\\u0DB3\\x02\\u0DB5\\x02\\u0DBD\\x02\" +\r\n\t\t\"\\u0DBF\\x02\\u0DBF\\x02\\u0DC2\\x02\\u0DC8\\x02\\u0E03\\x02\\u0E32\\x02\\u0E34\\x02\" +\r\n\t\t\"\\u0E35\\x02\\u0E42\\x02\\u0E48\\x02\\u0E83\\x02\\u0E84\\x02\\u0E86\\x02\\u0E86\\x02\" +\r\n\t\t\"\\u0E89\\x02\\u0E8A\\x02\\u0E8C\\x02\\u0E8C\\x02\\u0E8F\\x02\\u0E8F\\x02\\u0E96\\x02\" +\r\n\t\t\"\\u0E99\\x02\\u0E9B\\x02\\u0EA1\\x02\\u0EA3\\x02\\u0EA5\\x02\\u0EA7\\x02\\u0EA7\\x02\" +\r\n\t\t\"\\u0EA9\\x02\\u0EA9\\x02\\u0EAC\\x02\\u0EAD\\x02\\u0EAF\\x02\\u0EB2\\x02\\u0EB4\\x02\" +\r\n\t\t\"\\u0EB5\\x02\\u0EBF\\x02\\u0EBF\\x02\\u0EC2\\x02\\u0EC6\\x02\\u0EC8\\x02\\u0EC8\\x02\" +\r\n\t\t\"\\u0EDE\\x02\\u0EE1\\x02\\u0F02\\x02\\u0F02\\x02\\u0F42\\x02\\u0F49\\x02\\u0F4B\\x02\" +\r\n\t\t\"\\u0F6E\\x02\\u0F8A\\x02\\u0F8E\\x02\\u1002\\x02\\u102C\\x02\\u1041\\x02\\u1041\\x02\" +\r\n\t\t\"\\u1052\\x02\\u1057\\x02\\u105C\\x02\\u105F\\x02\\u1063\\x02\\u1063\\x02\\u1067\\x02\" +\r\n\t\t\"\\u1068\\x02\\u1070\\x02\\u1072\\x02\\u1077\\x02\\u1083\\x02\\u1090\\x02\\u1090\\x02\" +\r\n\t\t\"\\u10A2\\x02\\u10C7\\x02\\u10C9\\x02\\u10C9\\x02\\u10CF\\x02\\u10CF\\x02\\u10D2\\x02\" +\r\n\t\t\"\\u10FC\\x02\\u10FE\\x02\\u124A\\x02\\u124C\\x02\\u124F\\x02\\u1252\\x02\\u1258\\x02\" +\r\n\t\t\"\\u125A\\x02\\u125A\\x02\\u125C\\x02\\u125F\\x02\\u1262\\x02\\u128A\\x02\\u128C\\x02\" +\r\n\t\t\"\\u128F\\x02\\u1292\\x02\\u12B2\\x02\\u12B4\\x02\\u12B7\\x02\\u12BA\\x02\\u12C0\\x02\" +\r\n\t\t\"\\u12C2\\x02\\u12C2\\x02\\u12C4\\x02\\u12C7\\x02\\u12CA\\x02\\u12D8\\x02\\u12DA\\x02\" +\r\n\t\t\"\\u1312\\x02\\u1314\\x02\\u1317\\x02\\u131A\\x02\\u135C\\x02\\u1382\\x02\\u1391\\x02\" +\r\n\t\t\"\\u13A2\\x02\\u13F7\\x02\\u13FA\\x02\\u13FF\\x02\\u1403\\x02\\u166E\\x02\\u1671\\x02\" +\r\n\t\t\"\\u1681\\x02\\u1683\\x02\\u169C\\x02\\u16A2\\x02\\u16EC\\x02\\u16F0\\x02\\u16FA\\x02\" +\r\n\t\t\"\\u1702\\x02\\u170E\\x02\\u1710\\x02\\u1713\\x02\\u1722\\x02\\u1733\\x02\\u1742\\x02\" +\r\n\t\t\"\\u1753\\x02\\u1762\\x02\\u176E\\x02\\u1770\\x02\\u1772\\x02\\u1782\\x02\\u17B5\\x02\" +\r\n\t\t\"\\u17D9\\x02\\u17D9\\x02\\u17DE\\x02\\u17DE\\x02\\u1822\\x02\\u1879\\x02\\u1882\\x02\" +\r\n\t\t\"\\u1886\\x02\\u1889\\x02\\u18AA\\x02\\u18AC\\x02\\u18AC\\x02\\u18B2\\x02\\u18F7\\x02\" +\r\n\t\t\"\\u1902\\x02\\u1920\\x02\\u1952\\x02\\u196F\\x02\\u1972\\x02\\u1976\\x02\\u1982\\x02\" +\r\n\t\t\"\\u19AD\\x02\\u19B2\\x02\\u19CB\\x02\\u1A02\\x02\\u1A18\\x02\\u1A22\\x02\\u1A56\\x02\" +\r\n\t\t\"\\u1AA9\\x02\\u1AA9\\x02\\u1B07\\x02\\u1B35\\x02\\u1B47\\x02\\u1B4D\\x02\\u1B85\\x02\" +\r\n\t\t\"\\u1BA2\\x02\\u1BB0\\x02\\u1BB1\\x02\\u1BBC\\x02\\u1BE7\\x02\\u1C02\\x02\\u1C25\\x02\" +\r\n\t\t\"\\u1C4F\\x02\\u1C51\\x02\\u1C5C\\x02\\u1C7F\\x02\\u1C82\\x02\\u1C8A\\x02\\u1CEB\\x02\" +\r\n\t\t\"\\u1CEE\\x02\\u1CF0\\x02\\u1CF3\\x02\\u1CF7\\x02\\u1CF8\\x02\\u1D02\\x02\\u1DC1\\x02\" +\r\n\t\t\"\\u1E02\\x02\\u1F17\\x02\\u1F1A\\x02\\u1F1F\\x02\\u1F22\\x02\\u1F47\\x02\\u1F4A\\x02\" +\r\n\t\t\"\\u1F4F\\x02\\u1F52\\x02\\u1F59\\x02\\u1F5B\\x02\\u1F5B\\x02\\u1F5D\\x02\\u1F5D\\x02\" +\r\n\t\t\"\\u1F5F\\x02\\u1F5F\\x02\\u1F61\\x02\\u1F7F\\x02\\u1F82\\x02\\u1FB6\\x02\\u1FB8\\x02\" +\r\n\t\t\"\\u1FBE\\x02\\u1FC0\\x02\\u1FC0\\x02\\u1FC4\\x02\\u1FC6\\x02\\u1FC8\\x02\\u1FCE\\x02\" +\r\n\t\t\"\\u1FD2\\x02\\u1FD5\\x02\\u1FD8\\x02\\u1FDD\\x02\\u1FE2\\x02\\u1FEE\\x02\\u1FF4\\x02\" +\r\n\t\t\"\\u1FF6\\x02\\u1FF8\\x02\\u1FFE\\x02\\u2073\\x02\\u2073\\x02\\u2081\\x02\\u2081\\x02\" +\r\n\t\t\"\\u2092\\x02\\u209E\\x02\\u2104\\x02\\u2104\\x02\\u2109\\x02\\u2109\\x02\\u210C\\x02\" +\r\n\t\t\"\\u2115\\x02\\u2117\\x02\\u2117\\x02\\u211B\\x02\\u211F\\x02\\u2126\\x02\\u2126\\x02\" +\r\n\t\t\"\\u2128\\x02\\u2128\\x02\\u212A\\x02\\u212A\\x02\\u212C\\x02\\u212F\\x02\\u2131\\x02\" +\r\n\t\t\"\\u213B\\x02\\u213E\\x02\\u2141\\x02\\u2147\\x02\\u214B\\x02\\u2150\\x02\\u2150\\x02\" +\r\n\t\t\"\\u2162\\x02\\u218A\\x02\\u2C02\\x02\\u2C30\\x02\\u2C32\\x02\\u2C60\\x02\\u2C62\\x02\" +\r\n\t\t\"\\u2CE6\\x02\\u2CED\\x02\\u2CF0\\x02\\u2CF4\\x02\\u2CF5\\x02\\u2D02\\x02\\u2D27\\x02\" +\r\n\t\t\"\\u2D29\\x02\\u2D29\\x02\\u2D2F\\x02\\u2D2F\\x02\\u2D32\\x02\\u2D69\\x02\\u2D71\\x02\" +\r\n\t\t\"\\u2D71\\x02\\u2D82\\x02\\u2D98\\x02\\u2DA2\\x02\\u2DA8\\x02\\u2DAA\\x02\\u2DB0\\x02\" +\r\n\t\t\"\\u2DB2\\x02\\u2DB8\\x02\\u2DBA\\x02\\u2DC0\\x02\\u2DC2\\x02\\u2DC8\\x02\\u2DCA\\x02\" +\r\n\t\t\"\\u2DD0\\x02\\u2DD2\\x02\\u2DD8\\x02\\u2DDA\\x02\\u2DE0\\x02\\u2E31\\x02\\u2E31\\x02\" +\r\n\t\t\"\\u3007\\x02\\u3009\\x02\\u3023\\x02\\u302B\\x02\\u3033\\x02\\u3037\\x02\\u303A\\x02\" +\r\n\t\t\"\\u303E\\x02\\u3043\\x02\\u3098\\x02\\u309F\\x02\\u30A1\\x02\\u30A3\\x02\\u30FC\\x02\" +\r\n\t\t\"\\u30FE\\x02\\u3101\\x02\\u3107\\x02\\u312F\\x02\\u3133\\x02\\u3190\\x02\\u31A2\\x02\" +\r\n\t\t\"\\u31BC\\x02\\u31F2\\x02\\u3201\\x02\\u3402\\x02\\u4DB7\\x02\\u4E02\\x02\\u9FD7\\x02\" +\r\n\t\t\"\\uA002\\x02\\uA48E\\x02\\uA4D2\\x02\\uA4FF\\x02\\uA502\\x02\\uA60E\\x02\\uA612\\x02\" +\r\n\t\t\"\\uA621\\x02\\uA62C\\x02\\uA62D\\x02\\uA642\\x02\\uA670\\x02\\uA681\\x02\\uA69F\\x02\" +\r\n\t\t\"\\uA6A2\\x02\\uA6F1\\x02\\uA719\\x02\\uA721\\x02\\uA724\\x02\\uA78A\\x02\\uA78D\\x02\" +\r\n\t\t\"\\uA7B0\\x02\\uA7B2\\x02\\uA7B9\\x02\\uA7F9\\x02\\uA803\\x02\\uA805\\x02\\uA807\\x02\" +\r\n\t\t\"\\uA809\\x02\\uA80C\\x02\\uA80E\\x02\\uA824\\x02\\uA842\\x02\\uA875\\x02\\uA884\\x02\" +\r\n\t\t\"\\uA8B5\\x02\\uA8F4\\x02\\uA8F9\\x02\\uA8FD\\x02\\uA8FD\\x02\\uA8FF\\x02\\uA8FF\\x02\" +\r\n\t\t\"\\uA90C\\x02\\uA927\\x02\\uA932\\x02\\uA948\\x02\\uA962\\x02\\uA97E\\x02\\uA986\\x02\" +\r\n\t\t\"\\uA9B4\\x02\\uA9D1\\x02\\uA9D1\\x02\\uA9E2\\x02\\uA9E6\\x02\\uA9E8\\x02\\uA9F1\\x02\" +\r\n\t\t\"\\uA9FC\\x02\\uAA00\\x02\\uAA02\\x02\\uAA2A\\x02\\uAA42\\x02\\uAA44\\x02\\uAA46\\x02\" +\r\n\t\t\"\\uAA4D\\x02\\uAA62\\x02\\uAA78\\x02\\uAA7C\\x02\\uAA7C\\x02\\uAA80\\x02\\uAAB1\\x02\" +\r\n\t\t\"\\uAAB3\\x02\\uAAB3\\x02\\uAAB7\\x02\\uAAB8\\x02\\uAABB\\x02\\uAABF\\x02\\uAAC2\\x02\" +\r\n\t\t\"\\uAAC2\\x02\\uAAC4\\x02\\uAAC4\\x02\\uAADD\\x02\\uAADF\\x02\\uAAE2\\x02\\uAAEC\\x02\" +\r\n\t\t\"\\uAAF4\\x02\\uAAF6\\x02\\uAB03\\x02\\uAB08\\x02\\uAB0B\\x02\\uAB10\\x02\\uAB13\\x02\" +\r\n\t\t\"\\uAB18\\x02\\uAB22\\x02\\uAB28\\x02\\uAB2A\\x02\\uAB30\\x02\\uAB32\\x02\\uAB5C\\x02\" +\r\n\t\t\"\\uAB5E\\x02\\uAB67\\x02\\uAB72\\x02\\uABE4\\x02\\uAC02\\x02\\uD7A5\\x02\\uD7B2\\x02\" +\r\n\t\t\"\\uD7C8\\x02\\uD7CD\\x02\\uD7FD\\x02\\uF902\\x02\\uFA6F\\x02\\uFA72\\x02\\uFADB\\x02\" +\r\n\t\t\"\\uFB02\\x02\\uFB08\\x02\\uFB15\\x02\\uFB19\\x02\\uFB1F\\x02\\uFB1F\\x02\\uFB21\\x02\" +\r\n\t\t\"\\uFB2A\\x02\\uFB2C\\x02\\uFB38\\x02\\uFB3A\\x02\\uFB3E\\x02\\uFB40\\x02\\uFB40\\x02\" +\r\n\t\t\"\\uFB42\\x02\\uFB43\\x02\\uFB45\\x02\\uFB46\\x02\\uFB48\\x02\\uFBB3\\x02\\uFBD5\\x02\" +\r\n\t\t\"\\uFD3F\\x02\\uFD52\\x02\\uFD91\\x02\\uFD94\\x02\\uFDC9\\x02\\uFDF2\\x02\\uFDFD\\x02\" +\r\n\t\t\"\\uFE72\\x02\\uFE76\\x02\\uFE78\\x02\\uFEFE\\x02\\uFF23\\x02\\uFF3C\\x02\\uFF43\\x02\" +\r\n\t\t\"\\uFF5C\\x02\\uFF68\\x02\\uFFC0\\x02\\uFFC4\\x02\\uFFC9\\x02\\uFFCC\\x02\\uFFD1\\x02\" +\r\n\t\t\"\\uFFD4\\x02\\uFFD9\\x02\\uFFDC\\x02\\uFFDE\\x02\\x02\\x03\\r\\x03\\x0F\\x03(\\x03*\\x03\" +\r\n\t\t\"<\\x03>\\x03?\\x03A\\x03O\\x03R\\x03_\\x03\\x82\\x03\\xFC\\x03\\u0142\\x03\\u0176\\x03\" +\r\n\t\t\"\\u0282\\x03\\u029E\\x03\\u02A2\\x03\\u02D2\\x03\\u0302\\x03\\u0321\\x03\\u0332\\x03\" +\r\n\t\t\"\\u034C\\x03\\u0352\\x03\\u0377\\x03\\u0382\\x03\\u039F\\x03\\u03A2\\x03\\u03C5\\x03\" +\r\n\t\t\"\\u03CA\\x03\\u03D1\\x03\\u03D3\\x03\\u03D7\\x03\\u0402\\x03\\u049F\\x03\\u04B2\\x03\" +\r\n\t\t\"\\u04D5\\x03\\u04DA\\x03\\u04FD\\x03\\u0502\\x03\\u0529\\x03\\u0532\\x03\\u0565\\x03\" +\r\n\t\t\"\\u0602\\x03\\u0738\\x03\\u0742\\x03\\u0757\\x03\\u0762\\x03\\u0769\\x03\\u0802\\x03\" +\r\n\t\t\"\\u0807\\x03\\u080A\\x03\\u080A\\x03\\u080C\\x03\\u0837\\x03\\u0839\\x03\\u083A\\x03\" +\r\n\t\t\"\\u083E\\x03\\u083E\\x03\\u0841\\x03\\u0857\\x03\\u0862\\x03\\u0878\\x03\\u0882\\x03\" +\r\n\t\t\"\\u08A0\\x03\\u08E2\\x03\\u08F4\\x03\\u08F6\\x03\\u08F7\\x03\\u0902\\x03\\u0917\\x03\" +\r\n\t\t\"\\u0922\\x03\\u093B\\x03\\u0982\\x03\\u09B9\\x03\\u09C0\\x03\\u09C1\\x03\\u0A02\\x03\" +\r\n\t\t\"\\u0A02\\x03\\u0A12\\x03\\u0A15\\x03\\u0A17\\x03\\u0A19\\x03\\u0A1B\\x03\\u0A35\\x03\" +\r\n\t\t\"\\u0A62\\x03\\u0A7E\\x03\\u0A82\\x03\\u0A9E\\x03\\u0AC2\\x03\\u0AC9\\x03\\u0ACB\\x03\" +\r\n\t\t\"\\u0AE6\\x03\\u0B02\\x03\\u0B37\\x03\\u0B42\\x03\\u0B57\\x03\\u0B62\\x03\\u0B74\\x03\" +\r\n\t\t\"\\u0B82\\x03\\u0B93\\x03\\u0C02\\x03\\u0C4A\\x03\\u0C82\\x03\\u0CB4\\x03\\u0CC2\\x03\" +\r\n\t\t\"\\u0CF4\\x03\\u1005\\x03\\u1039\\x03\\u1085\\x03\\u10B1\\x03\\u10D2\\x03\\u10EA\\x03\" +\r\n\t\t\"\\u1105\\x03\\u1128\\x03\\u1152\\x03\\u1174\\x03\\u1178\\x03\\u1178\\x03\\u1185\\x03\" +\r\n\t\t\"\\u11B4\\x03\\u11C3\\x03\\u11C6\\x03\\u11DC\\x03\\u11DC\\x03\\u11DE\\x03\\u11DE\\x03\" +\r\n\t\t\"\\u1202\\x03\\u1213\\x03\\u1215\\x03\\u122D\\x03\\u1282\\x03\\u1288\\x03\\u128A\\x03\" +\r\n\t\t\"\\u128A\\x03\\u128C\\x03\\u128F\\x03\\u1291\\x03\\u129F\\x03\\u12A1\\x03\\u12AA\\x03\" +\r\n\t\t\"\\u12B2\\x03\\u12E0\\x03\\u1307\\x03\\u130E\\x03\\u1311\\x03\\u1312\\x03\\u1315\\x03\" +\r\n\t\t\"\\u132A\\x03\\u132C\\x03\\u1332\\x03\\u1334\\x03\\u1335\\x03\\u1337\\x03\\u133B\\x03\" +\r\n\t\t\"\\u133F\\x03\\u133F\\x03\\u1352\\x03\\u1352\\x03\\u135F\\x03\\u1363\\x03\\u1402\\x03\" +\r\n\t\t\"\\u1436\\x03\\u1449\\x03\\u144C\\x03\\u1482\\x03\\u14B1\\x03\\u14C6\\x03\\u14C7\\x03\" +\r\n\t\t\"\\u14C9\\x03\\u14C9\\x03\\u1582\\x03\\u15B0\\x03\\u15DA\\x03\\u15DD\\x03\\u1602\\x03\" +\r\n\t\t\"\\u1631\\x03\\u1646\\x03\\u1646\\x03\\u1682\\x03\\u16AC\\x03\\u1702\\x03\\u171B\\x03\" +\r\n\t\t\"\\u18A2\\x03\\u18E1\\x03\\u1901\\x03\\u1901\\x03\\u1AC2\\x03\\u1AFA\\x03\\u1C02\\x03\" +\r\n\t\t\"\\u1C0A\\x03\\u1C0C\\x03\\u1C30\\x03\\u1C42\\x03\\u1C42\\x03\\u1C74\\x03\\u1C91\\x03\" +\r\n\t\t\"\\u2002\\x03\\u239B\\x03\\u2402\\x03\\u2470\\x03\\u2482\\x03\\u2545\\x03\\u3002\\x03\" +\r\n\t\t\"\\u3430\\x03\\u4402\\x03\\u4648\\x03\\u6802\\x03\\u6A3A\\x03\\u6A42\\x03\\u6A60\\x03\" +\r\n\t\t\"\\u6AD2\\x03\\u6AEF\\x03\\u6B02\\x03\\u6B31\\x03\\u6B42\\x03\\u6B45\\x03\\u6B65\\x03\" +\r\n\t\t\"\\u6B79\\x03\\u6B7F\\x03\\u6B91\\x03\\u6F02\\x03\\u6F46\\x03\\u6F52\\x03\\u6F52\\x03\" +\r\n\t\t\"\\u6F95\\x03\\u6FA1\\x03\\u6FE2\\x03\\u6FE2\\x03\\u7002\\x03\\u87EE\\x03\\u8802\\x03\" +\r\n\t\t\"\\u8AF4\\x03\\uB002\\x03\\uB003\\x03\\uBC02\\x03\\uBC6C\\x03\\uBC72\\x03\\uBC7E\\x03\" +\r\n\t\t\"\\uBC82\\x03\\uBC8A\\x03\\uBC92\\x03\\uBC9B\\x03\\uD402\\x03\\uD456\\x03\\uD458\\x03\" +\r\n\t\t\"\\uD49E\\x03\\uD4A0\\x03\\uD4A1\\x03\\uD4A4\\x03\\uD4A4\\x03\\uD4A7\\x03\\uD4A8\\x03\" +\r\n\t\t\"\\uD4AB\\x03\\uD4AE\\x03\\uD4B0\\x03\\uD4BB\\x03\\uD4BD\\x03\\uD4BD\\x03\\uD4BF\\x03\" +\r\n\t\t\"\\uD4C5\\x03\\uD4C7\\x03\\uD507\\x03\\uD509\\x03\\uD50C\\x03\\uD50F\\x03\\uD516\\x03\" +\r\n\t\t\"\\uD518\\x03\\uD51E\\x03\\uD520\\x03\\uD53B\\x03\\uD53D\\x03\\uD540\\x03\\uD542\\x03\" +\r\n\t\t\"\\uD546\\x03\\uD548\\x03\\uD548\";\r\n\tprivate static readonly _serializedATNSegment1: string =\r\n\t\t\"\\x03\\uD54C\\x03\\uD552\\x03\\uD554\\x03\\uD6A7\\x03\\uD6AA\\x03\\uD6C2\\x03\\uD6C4\" +\r\n\t\t\"\\x03\\uD6DC\\x03\\uD6DE\\x03\\uD6FC\\x03\\uD6FE\\x03\\uD716\\x03\\uD718\\x03\\uD736\" +\r\n\t\t\"\\x03\\uD738\\x03\\uD750\\x03\\uD752\\x03\\uD770\\x03\\uD772\\x03\\uD78A\\x03\\uD78C\" +\r\n\t\t\"\\x03\\uD7AA\\x03\\uD7AC\\x03\\uD7C4\\x03\\uD7C6\\x03\\uD7CD\\x03\\uE802\\x03\\uE8C6\" +\r\n\t\t\"\\x03\\uE902\\x03\\uE945\\x03\\uEE02\\x03\\uEE05\\x03\\uEE07\\x03\\uEE21\\x03\\uEE23\" +\r\n\t\t\"\\x03\\uEE24\\x03\\uEE26\\x03\\uEE26\\x03\\uEE29\\x03\\uEE29\\x03\\uEE2B\\x03\\uEE34\" +\r\n\t\t\"\\x03\\uEE36\\x03\\uEE39\\x03\\uEE3B\\x03\\uEE3B\\x03\\uEE3D\\x03\\uEE3D\\x03\\uEE44\" +\r\n\t\t\"\\x03\\uEE44\\x03\\uEE49\\x03\\uEE49\\x03\\uEE4B\\x03\\uEE4B\\x03\\uEE4D\\x03\\uEE4D\" +\r\n\t\t\"\\x03\\uEE4F\\x03\\uEE51\\x03\\uEE53\\x03\\uEE54\\x03\\uEE56\\x03\\uEE56\\x03\\uEE59\" +\r\n\t\t\"\\x03\\uEE59\\x03\\uEE5B\\x03\\uEE5B\\x03\\uEE5D\\x03\\uEE5D\\x03\\uEE5F\\x03\\uEE5F\" +\r\n\t\t\"\\x03\\uEE61\\x03\\uEE61\\x03\\uEE63\\x03\\uEE64\\x03\\uEE66\\x03\\uEE66\\x03\\uEE69\" +\r\n\t\t\"\\x03\\uEE6C\\x03\\uEE6E\\x03\\uEE74\\x03\\uEE76\\x03\\uEE79\\x03\\uEE7B\\x03\\uEE7E\" +\r\n\t\t\"\\x03\\uEE80\\x03\\uEE80\\x03\\uEE82\\x03\\uEE8B\\x03\\uEE8D\\x03\\uEE9D\\x03\\uEEA3\" +\r\n\t\t\"\\x03\\uEEA5\\x03\\uEEA7\\x03\\uEEAB\\x03\\uEEAD\\x03\\uEEBD\\x03\\x02\\x04\\uA6D8\\x04\" +\r\n\t\t\"\\uA702\\x04\\uB736\\x04\\uB742\\x04\\uB81F\\x04\\uB822\\x04\\uCEA3\\x04\\uF802\\x04\" +\r\n\t\t\"\\uFA1F\\x041\\x02\\x03\\x03\\x02\\x02\\x02\\x02\\x05\\x03\\x02\\x02\\x02\\x02\\x07\\x03\" +\r\n\t\t\"\\x02\\x02\\x02\\x02\\t\\x03\\x02\\x02\\x02\\x02\\v\\x03\\x02\\x02\\x02\\x02\\x11\\x03\\x02\" +\r\n\t\t\"\\x02\\x02\\x03\\x13\\x03\\x02\\x02\\x02\\x05\\x16\\x03\\x02\\x02\\x02\\x07\\x18\\x03\\x02\" +\r\n\t\t\"\\x02\\x02\\t\\x1A\\x03\\x02\\x02\\x02\\v\\x1C\\x03\\x02\\x02\\x02\\r%\\x03\\x02\\x02\\x02\" +\r\n\t\t\"\\x0F\\'\\x03\\x02\\x02\\x02\\x11)\\x03\\x02\\x02\\x02\\x13\\x14\\x071\\x02\\x02\\x14\\x15\" +\r\n\t\t\"\\x071\\x02\\x02\\x15\\x04\\x03\\x02\\x02\\x02\\x16\\x17\\x071\\x02\\x02\\x17\\x06\\x03\" +\r\n\t\t\"\\x02\\x02\\x02\\x18\\x19\\x07,\\x02\\x02\\x19\\b\\x03\\x02\\x02\\x02\\x1A\\x1B\\x07#\\x02\" +\r\n\t\t\"\\x02\\x1B\\n\\x03\\x02\\x02\\x02\\x1C \\x05\\x0F\\b\\x02\\x1D\\x1F\\x05\\r\\x07\\x02\\x1E\" +\r\n\t\t\"\\x1D\\x03\\x02\\x02\\x02\\x1F\\\"\\x03\\x02\\x02\\x02 \\x1E\\x03\\x02\\x02\\x02 !\\x03\" +\r\n\t\t\"\\x02\\x02\\x02!#\\x03\\x02\\x02\\x02\\\" \\x03\\x02\\x02\\x02#$\\b\\x06\\x02\\x02$\\f\\x03\" +\r\n\t\t\"\\x02\\x02\\x02%&\\t\\x02\\x02\\x02&\\x0E\\x03\\x02\\x02\\x02\\'(\\t\\x03\\x02\\x02(\\x10\" +\r\n\t\t\"\\x03\\x02\\x02\\x02)-\\x07)\\x02\\x02*,\\v\\x02\\x02\\x02+*\\x03\\x02\\x02\\x02,/\\x03\" +\r\n\t\t\"\\x02\\x02\\x02-.\\x03\\x02\\x02\\x02-+\\x03\\x02\\x02\\x02.0\\x03\\x02\\x02\\x02/-\\x03\" +\r\n\t\t\"\\x02\\x02\\x0201\\x07)\\x02\\x021\\x12\\x03\\x02\\x02\\x02\\x05\\x02 -\\x03\\x03\\x06\" +\r\n\t\t\"\\x02\";\r\n\tpublic static readonly _serializedATN: string = Utils.join(\r\n\t\t[\r\n\t\t\tXPathLexer._serializedATNSegment0,\r\n\t\t\tXPathLexer._serializedATNSegment1,\r\n\t\t],\r\n\t\t\"\",\r\n\t);\r\n\tpublic static __ATN: ATN;\r\n\tpublic static get _ATN(): ATN {\r\n\t\tif (!XPathLexer.__ATN) {\r\n\t\t\tXPathLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(XPathLexer._serializedATN));\r\n\t\t}\r\n\r\n\t\treturn XPathLexer.__ATN;\r\n\t}\r\n\r\n}\r\n\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\n\r\nimport { ANTLRErrorListener } from \"../../ANTLRErrorListener\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { Recognizer } from \"../../Recognizer\";\r\nimport { RecognitionException } from \"../../RecognitionException\";\r\n\r\nexport class XPathLexerErrorListener implements ANTLRErrorListener {\r\n\t@Override\r\n\tpublic syntaxError(\r\n\t\trecognizer: Recognizer, offendingSymbol: T | undefined,\r\n\t\tline: number, charPositionInLine: number, msg: string,\r\n\t\te: RecognitionException | undefined): void {\r\n\t\t// intentionally empty\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\n\r\nexport abstract class XPathElement {\r\n\tprotected nodeName: string;\r\n\tpublic invert: boolean;\r\n\r\n\t/** Construct element like `/ID` or `ID` or `/*` etc...\r\n\t * op is null if just node\r\n\t */\r\n\tconstructor(nodeName: string) {\r\n\t\tthis.nodeName = nodeName;\r\n\t\tthis.invert = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Given tree rooted at `t` return all nodes matched by this path\r\n\t * element.\r\n\t */\r\n\tpublic abstract evaluate(t: ParseTree): ParseTree[];\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet inv: string = this.invert ? \"!\" : \"\";\r\n\t\tlet className: string = Object.constructor.name;\r\n\t\treturn className + \"[\" + inv + this.nodeName + \"]\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\n/**\r\n * Either `ID` at start of path or `...//ID` in middle of path.\r\n */\r\nexport class XPathRuleAnywhereElement extends XPathElement {\r\n\tprotected ruleIndex: number;\r\n\tconstructor(ruleName: string, ruleIndex: number) {\r\n\t\tsuper(ruleName);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\treturn Trees.findAllRuleNodes(t, this.ruleIndex);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathRuleElement extends XPathElement {\r\n\tprotected ruleIndex: number;\r\n\tconstructor(ruleName: string, ruleIndex: number) {\r\n\t\tsuper(ruleName);\r\n\t\tthis.ruleIndex = ruleIndex;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\t// return all children of t that match nodeName\r\n\t\tlet nodes: ParseTree[] = [];\r\n\t\tfor (let c of Trees.getChildren(t)) {\r\n\t\t\tif (c instanceof ParserRuleContext) {\r\n\t\t\t\tif ((c.ruleIndex === this.ruleIndex && !this.invert) ||\r\n\t\t\t\t\t(c.ruleIndex !== this.ruleIndex && this.invert)) {\r\n\t\t\t\t\tnodes.push(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nodes;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathTokenAnywhereElement extends XPathElement {\r\n\tprotected tokenType: number;\r\n\tconstructor(tokenName: string, tokenType: number) {\r\n\t\tsuper(tokenName);\r\n\t\tthis.tokenType = tokenType;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\treturn Trees.findAllTokenNodes(t, this.tokenType);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathTokenElement extends XPathElement {\r\n\tprotected tokenType: number;\r\n\tconstructor(tokenName: string, tokenType: number) {\r\n\t\tsuper(tokenName);\r\n\t\tthis.tokenType = tokenType;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\t// return all children of t that match nodeName\r\n\t\tlet nodes: ParseTree[] = [];\r\n\t\tfor (let c of Trees.getChildren(t)) {\r\n\t\t\tif (c instanceof TerminalNode) {\r\n\t\t\t\tif ((c.symbol.type === this.tokenType && !this.invert) ||\r\n\t\t\t\t\t(c.symbol.type !== this.tokenType && this.invert)) {\r\n\t\t\t\t\tnodes.push(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nodes;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPath } from \"./XPath\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathWildcardAnywhereElement extends XPathElement {\r\n\tconstructor() {\r\n\t\tsuper(XPath.WILDCARD);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\tif (this.invert) {\r\n\t\t\t// !* is weird but valid (empty)\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\treturn Trees.getDescendants(t);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { Override } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { Trees } from \"../Trees\";\r\nimport { XPath } from \"./XPath\";\r\nimport { XPathElement } from \"./XPathElement\";\r\n\r\nexport class XPathWildcardElement extends XPathElement {\r\n\tconstructor() {\r\n\t\tsuper(XPath.WILDCARD);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic evaluate(t: ParseTree): ParseTree[] {\r\n\t\tlet kids: ParseTree[] = [];\r\n\t\tif (this.invert) {\r\n\t\t\t// !* is weird but valid (empty)\r\n\t\t\treturn kids;\r\n\t\t}\r\n\t\tfor (let c of Trees.getChildren(t)) {\r\n\t\t\tkids.push(c);\r\n\t\t}\r\n\t\treturn kids;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.4373888-07:00\r\n\r\nimport { CharStreams } from \"../../CharStreams\";\r\nimport { CommonTokenStream } from \"../../CommonTokenStream\";\r\nimport { LexerNoViableAltException } from \"../../LexerNoViableAltException\";\r\nimport { Parser } from \"../../Parser\";\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { Token } from \"../../Token\";\r\nimport { XPathElement } from \"./XPathElement\";\r\nimport { XPathLexer } from \"./XPathLexer\";\r\nimport { XPathLexerErrorListener } from \"./XPathLexerErrorListener\";\r\nimport { XPathRuleAnywhereElement } from \"./XPathRuleAnywhereElement\";\r\nimport { XPathRuleElement } from \"./XPathRuleElement\";\r\nimport { XPathTokenAnywhereElement } from \"./XPathTokenAnywhereElement\";\r\nimport { XPathTokenElement } from \"./XPathTokenElement\";\r\nimport { XPathWildcardAnywhereElement } from \"./XPathWildcardAnywhereElement\";\r\nimport { XPathWildcardElement } from \"./XPathWildcardElement\";\r\n\r\n/**\r\n * Represent a subset of XPath XML path syntax for use in identifying nodes in\r\n * parse trees.\r\n *\r\n * Split path into words and separators `/` and `//` via ANTLR\r\n * itself then walk path elements from left to right. At each separator-word\r\n * pair, find set of nodes. Next stage uses those as work list.\r\n *\r\n * The basic interface is\r\n * {@link XPath#findAll ParseTree.findAll}`(tree, pathString, parser)`.\r\n * But that is just shorthand for:\r\n *\r\n * ```\r\n * let p = new XPath(parser, pathString);\r\n * return p.evaluate(tree);\r\n * ```\r\n *\r\n * See `TestXPath` for descriptions. In short, this\r\n * allows operators:\r\n *\r\n * | | |\r\n * | --- | --- |\r\n * | `/` | root |\r\n * | `//` | anywhere |\r\n * | `!` | invert; this much appear directly after root or anywhere operator |\r\n *\r\n * and path elements:\r\n *\r\n * | | |\r\n * | --- | --- |\r\n * | `ID` | token name |\r\n * | `'string'` | any string literal token from the grammar |\r\n * | `expr` | rule name |\r\n * | `*` | wildcard matching any node |\r\n *\r\n * Whitespace is not allowed.\r\n */\r\nexport class XPath {\r\n\tpublic static readonly WILDCARD: string = \"*\"; // word not operator/separator\r\n\tpublic static readonly NOT: string = \"!\"; \t // word for invert operator\r\n\r\n\tprotected path: string;\r\n\tprotected elements: XPathElement[];\r\n\tprotected parser: Parser;\r\n\r\n\tconstructor(parser: Parser, path: string) {\r\n\t\tthis.parser = parser;\r\n\t\tthis.path = path;\r\n\t\tthis.elements = this.split(path);\r\n\t\t// console.log(this.elements.toString());\r\n\t}\r\n\r\n\t// TODO: check for invalid token/rule names, bad syntax\r\n\r\n\tpublic split(path: string): XPathElement[] {\r\n\t\tlet lexer = new XPathLexer(CharStreams.fromString(path));\r\n\t\tlexer.recover = (e: LexerNoViableAltException) => { throw e; };\r\n\r\n\t\tlexer.removeErrorListeners();\r\n\t\tlexer.addErrorListener(new XPathLexerErrorListener());\r\n\t\tlet tokenStream = new CommonTokenStream(lexer);\r\n\t\ttry {\r\n\t\t\ttokenStream.fill();\r\n\t\t}\r\n\t\tcatch (e) {\r\n\t\t\tif (e instanceof LexerNoViableAltException) {\r\n\t\t\t\tlet pos: number = lexer.charPositionInLine;\r\n\t\t\t\tlet msg: string = \"Invalid tokens or characters at index \" + pos + \" in path '\" + path + \"' -- \" + e.message;\r\n\t\t\t\tthrow new RangeError(msg);\r\n\t\t\t}\r\n\t\t\tthrow e;\r\n\t\t}\r\n\r\n\t\tlet tokens: Token[] = tokenStream.getTokens();\r\n\t\t// console.log(\"path=\" + path + \"=>\" + tokens);\r\n\t\tlet elements: XPathElement[] = [];\r\n\t\tlet n: number = tokens.length;\r\n\t\tlet i: number = 0;\r\n\t\tloop:\r\n\t\twhile (i < n) {\r\n\t\t\tlet el: Token = tokens[i];\r\n\t\t\tlet next: Token | undefined;\r\n\t\t\tswitch (el.type) {\r\n\t\t\t\tcase XPathLexer.ROOT:\r\n\t\t\t\tcase XPathLexer.ANYWHERE:\r\n\t\t\t\t\tlet anywhere: boolean = el.type === XPathLexer.ANYWHERE;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tnext = tokens[i];\r\n\t\t\t\t\tlet invert: boolean = next.type === XPathLexer.BANG;\r\n\t\t\t\t\tif (invert) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tnext = tokens[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet pathElement: XPathElement = this.getXPathElement(next, anywhere);\r\n\t\t\t\t\tpathElement.invert = invert;\r\n\t\t\t\t\telements.push(pathElement);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase XPathLexer.TOKEN_REF:\r\n\t\t\t\tcase XPathLexer.RULE_REF:\r\n\t\t\t\tcase XPathLexer.WILDCARD:\r\n\t\t\t\t\telements.push(this.getXPathElement(el, false));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase Token.EOF:\r\n\t\t\t\t\tbreak loop;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Error(\"Unknowth path element \" + el);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn elements;\r\n\t}\r\n\r\n\t/**\r\n\t * Convert word like `*` or `ID` or `expr` to a path\r\n\t * element. `anywhere` is `true` if `//` precedes the\r\n\t * word.\r\n\t */\r\n\tprotected getXPathElement(wordToken: Token, anywhere: boolean): XPathElement {\r\n\t\tif (wordToken.type === Token.EOF) {\r\n\t\t\tthrow new Error(\"Missing path element at end of path\");\r\n\t\t}\r\n\r\n\t\tlet word = wordToken.text;\r\n\t\tif (word == null) {\r\n\t\t\tthrow new Error(\"Expected wordToken to have text content.\");\r\n\t\t}\r\n\r\n\t\tlet ttype: number = this.parser.getTokenType(word);\r\n\t\tlet ruleIndex: number = this.parser.getRuleIndex(word);\r\n\t\tswitch (wordToken.type) {\r\n\t\t\tcase XPathLexer.WILDCARD:\r\n\t\t\t\treturn anywhere ?\r\n\t\t\t\t\tnew XPathWildcardAnywhereElement() :\r\n\t\t\t\t\tnew XPathWildcardElement();\r\n\t\t\tcase XPathLexer.TOKEN_REF:\r\n\t\t\tcase XPathLexer.STRING:\r\n\t\t\t\tif (ttype === Token.INVALID_TYPE) {\r\n\t\t\t\t\tthrow new Error(word + \" at index \" +\r\n\t\t\t\t\t\twordToken.startIndex +\r\n\t\t\t\t\t\t\" isn't a valid token name\");\r\n\t\t\t\t}\r\n\t\t\t\treturn anywhere ?\r\n\t\t\t\t\tnew XPathTokenAnywhereElement(word, ttype) :\r\n\t\t\t\t\tnew XPathTokenElement(word, ttype);\r\n\t\t\tdefault:\r\n\t\t\t\tif (ruleIndex === -1) {\r\n\t\t\t\t\tthrow new Error(word + \" at index \" +\r\n\t\t\t\t\t\twordToken.startIndex +\r\n\t\t\t\t\t\t\" isn't a valid rule name\");\r\n\t\t\t\t}\r\n\t\t\t\treturn anywhere ?\r\n\t\t\t\t\tnew XPathRuleAnywhereElement(word, ruleIndex) :\r\n\t\t\t\t\tnew XPathRuleElement(word, ruleIndex);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static findAll(tree: ParseTree, xpath: string, parser: Parser): Set {\r\n\t\tlet p: XPath = new XPath(parser, xpath);\r\n\t\treturn p.evaluate(tree);\r\n\t}\r\n\r\n\t/**\r\n\t * Return a list of all nodes starting at `t` as root that satisfy the\r\n\t * path. The root `/` is relative to the node passed to {@link evaluate}.\r\n\t */\r\n\tpublic evaluate(t: ParseTree): Set {\r\n\t\tlet dummyRoot = new ParserRuleContext();\r\n\t\tdummyRoot.addChild(t as ParserRuleContext);\r\n\r\n\t\tlet work = new Set([dummyRoot]);\r\n\r\n\t\tlet i: number = 0;\r\n\t\twhile (i < this.elements.length) {\r\n\t\t\tlet next = new Set();\r\n\t\t\tfor (let node of work) {\r\n\t\t\t\tif (node.childCount > 0) {\r\n\t\t\t\t\t// only try to match next element if it has children\r\n\t\t\t\t\t// e.g., //func/*/stat might have a token node for which\r\n\t\t\t\t\t// we can't go looking for stat nodes.\r\n\t\t\t\t\tlet matching = this.elements[i].evaluate(node);\r\n\t\t\t\t\tmatching.forEach(next.add, next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t\twork = next;\r\n\t\t}\r\n\r\n\t\treturn work;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\nimport { NotNull } from \"../../Decorators\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { ParseTreeMatch } from \"./ParseTreeMatch\";\r\nimport { ParseTreePatternMatcher } from \"./ParseTreePatternMatcher\";\r\nimport { XPath } from \"../xpath/XPath\";\r\n\r\n/**\r\n * A pattern like ` = ;` converted to a {@link ParseTree} by\r\n * {@link ParseTreePatternMatcher#compile(String, int)}.\r\n */\r\nexport class ParseTreePattern {\r\n\t/**\r\n\t * This is the backing field for `patternRuleIndex`.\r\n\t */\r\n\tprivate _patternRuleIndex: number;\r\n\r\n\t/**\r\n\t * This is the backing field for `pattern`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _pattern: string;\r\n\r\n\t/**\r\n\t * This is the backing field for `patternTree`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _patternTree: ParseTree;\r\n\r\n\t/**\r\n\t * This is the backing field for `matcher`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _matcher: ParseTreePatternMatcher;\r\n\r\n\t/**\r\n\t * Construct a new instance of the {@link ParseTreePattern} class.\r\n\t *\r\n\t * @param matcher The {@link ParseTreePatternMatcher} which created this\r\n\t * tree pattern.\r\n\t * @param pattern The tree pattern in concrete syntax form.\r\n\t * @param patternRuleIndex The parser rule which serves as the root of the\r\n\t * tree pattern.\r\n\t * @param patternTree The tree pattern in {@link ParseTree} form.\r\n\t */\r\n\tconstructor(\r\n\t\t@NotNull matcher: ParseTreePatternMatcher,\r\n\t\t@NotNull pattern: string,\r\n\t\tpatternRuleIndex: number,\r\n\t\t@NotNull patternTree: ParseTree) {\r\n\t\tthis._matcher = matcher;\r\n\t\tthis._patternRuleIndex = patternRuleIndex;\r\n\t\tthis._pattern = pattern;\r\n\t\tthis._patternTree = patternTree;\r\n\t}\r\n\r\n\t/**\r\n\t * Match a specific parse tree against this tree pattern.\r\n\t *\r\n\t * @param tree The parse tree to match against this tree pattern.\r\n\t * @returns A {@link ParseTreeMatch} object describing the result of the\r\n\t * match operation. The `ParseTreeMatch.succeeded` method can be\r\n\t * used to determine whether or not the match was successful.\r\n\t */\r\n\t@NotNull\r\n\tpublic match(@NotNull tree: ParseTree): ParseTreeMatch {\r\n\t\treturn this._matcher.match(tree, this);\r\n\t}\r\n\r\n\t/**\r\n\t * Determine whether or not a parse tree matches this tree pattern.\r\n\t *\r\n\t * @param tree The parse tree to match against this tree pattern.\r\n\t * @returns `true` if `tree` is a match for the current tree\r\n\t * pattern; otherwise, `false`.\r\n\t */\r\n\tpublic matches(@NotNull tree: ParseTree): boolean {\r\n\t\treturn this._matcher.match(tree, this).succeeded;\r\n\t}\r\n\r\n\t/**\r\n\t * Find all nodes using XPath and then try to match those subtrees against\r\n\t * this tree pattern.\r\n\t *\r\n\t * @param tree The {@link ParseTree} to match against this pattern.\r\n\t * @param xpath An expression matching the nodes\r\n\t *\r\n\t * @returns A collection of {@link ParseTreeMatch} objects describing the\r\n\t * successful matches. Unsuccessful matches are omitted from the result,\r\n\t * regardless of the reason for the failure.\r\n\t */\r\n\t@NotNull\r\n\tpublic findAll(@NotNull tree: ParseTree, @NotNull xpath: string): ParseTreeMatch[] {\r\n\t\tlet subtrees: Set = XPath.findAll(tree, xpath, this._matcher.parser);\r\n\t\tlet matches: ParseTreeMatch[] = [];\r\n\t\tfor (let t of subtrees) {\r\n\t\t\tlet match: ParseTreeMatch = this.match(t);\r\n\t\t\tif (match.succeeded) {\r\n\t\t\t\tmatches.push(match);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn matches;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the {@link ParseTreePatternMatcher} which created this tree pattern.\r\n\t *\r\n\t * @returns The {@link ParseTreePatternMatcher} which created this tree\r\n\t * pattern.\r\n\t */\r\n\t@NotNull\r\n\tget matcher(): ParseTreePatternMatcher {\r\n\t\treturn this._matcher;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tree pattern in concrete syntax form.\r\n\t *\r\n\t * @returns The tree pattern in concrete syntax form.\r\n\t */\r\n\t@NotNull\r\n\tget pattern(): string {\r\n\t\treturn this._pattern;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the parser rule which serves as the outermost rule for the tree\r\n\t * pattern.\r\n\t *\r\n\t * @returns The parser rule which serves as the outermost rule for the tree\r\n\t * pattern.\r\n\t */\r\n\tget patternRuleIndex(): number {\r\n\t\treturn this._patternRuleIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tree pattern as a {@link ParseTree}. The rule and token tags from\r\n\t * the pattern are present in the parse tree as terminal nodes with a symbol\r\n\t * of type {@link RuleTagToken} or {@link TokenTagToken}.\r\n\t *\r\n\t * @returns The tree pattern as a {@link ParseTree}.\r\n\t */\r\n\t@NotNull\r\n\tget patternTree(): ParseTree {\r\n\t\treturn this._patternTree;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.0343500-07:00\r\n\r\nimport { CharStream } from \"../../CharStream\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\nimport { Token } from \"../../Token\";\r\nimport { TokenSource } from \"../../TokenSource\";\r\n\r\n/**\r\n * A {@link Token} object representing an entire subtree matched by a parser\r\n * rule; e.g., ``. These tokens are created for {@link TagChunk}\r\n * chunks where the tag corresponds to a parser rule.\r\n */\r\nexport class RuleTagToken implements Token {\r\n\t/**\r\n\t * This is the backing field for `ruleName`.\r\n\t */\r\n\tprivate _ruleName: string;\r\n\t/**\r\n\t * The token type for the current token. This is the token type assigned to\r\n\t * the bypass alternative for the rule during ATN deserialization.\r\n\t */\r\n\tprivate bypassTokenType: number;\r\n\t/**\r\n\t * This is the backing field for `label`.\r\n\t */\r\n\tprivate _label?: string;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link RuleTagToken} with the specified rule\r\n\t * name, bypass token type, and label.\r\n\t *\r\n\t * @param ruleName The name of the parser rule this rule tag matches.\r\n\t * @param bypassTokenType The bypass token type assigned to the parser rule.\r\n\t * @param label The label associated with the rule tag, or `undefined` if\r\n\t * the rule tag is unlabeled.\r\n\t *\r\n\t * @exception IllegalArgumentException if `ruleName` is not defined\r\n\t * or empty.\r\n\t */\r\n\tconstructor(@NotNull ruleName: string, bypassTokenType: number, label?: string) {\r\n\t\tif (ruleName == null || ruleName.length === 0) {\r\n\t\t\tthrow new Error(\"ruleName cannot be null or empty.\");\r\n\t\t}\r\n\r\n\t\tthis._ruleName = ruleName;\r\n\t\tthis.bypassTokenType = bypassTokenType;\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the name of the rule associated with this rule tag.\r\n\t *\r\n\t * @returns The name of the parser rule associated with this rule tag.\r\n\t */\r\n\t@NotNull\r\n\tget ruleName(): string {\r\n\t\treturn this._ruleName;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the label associated with the rule tag.\r\n\t *\r\n\t * @returns The name of the label associated with the rule tag, or\r\n\t * `undefined` if this is an unlabeled rule tag.\r\n\t */\r\n\tget label(): string | undefined {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * Rule tag tokens are always placed on the {@link #DEFAULT_CHANNEL}.\r\n\t */\r\n\t@Override\r\n\tget channel(): number {\r\n\t\treturn Token.DEFAULT_CHANNEL;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * This method returns the rule tag formatted with `<` and `>`\r\n\t * delimiters.\r\n\t */\r\n\t@Override\r\n\tget text(): string {\r\n\t\tif (this._label != null) {\r\n\t\t\treturn \"<\" + this._label + \":\" + this._ruleName + \">\";\r\n\t\t}\r\n\r\n\t\treturn \"<\" + this._ruleName + \">\";\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * Rule tag tokens have types assigned according to the rule bypass\r\n\t * transitions created during ATN deserialization.\r\n\t */\r\n\t@Override\r\n\tget type(): number {\r\n\t\treturn this.bypassTokenType;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns 0.\r\n\t */\r\n\t@Override\r\n\tget line(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget charPositionInLine(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget tokenIndex(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget startIndex(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns -1.\r\n\t */\r\n\t@Override\r\n\tget stopIndex(): number {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns `undefined`.\r\n\t */\r\n\t@Override\r\n\tget tokenSource(): TokenSource | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} always returns `undefined`.\r\n\t */\r\n\t@Override\r\n\tget inputStream(): CharStream | undefined {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link RuleTagToken} returns a string of the form\r\n\t * `ruleName:bypassTokenType`.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this._ruleName + \":\" + this.bypassTokenType;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:45.2799060-07:00\r\n\r\n/**\r\n * A chunk is either a token tag, a rule tag, or a span of literal text within a\r\n * tree pattern.\r\n *\r\n * The method {@link ParseTreePatternMatcher#split(String)} returns a list of\r\n * chunks in preparation for creating a token stream by\r\n * {@link ParseTreePatternMatcher#tokenize(String)}. From there, we get a parse\r\n * tree from with {@link ParseTreePatternMatcher#compile(String, int)}. These\r\n * chunks are converted to {@link RuleTagToken}, {@link TokenTagToken}, or the\r\n * regular tokens of the text surrounding the tags.\r\n */\r\nexport abstract class Chunk {\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.1670669-07:00\r\n\r\nimport { Chunk } from \"./Chunk\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\n\r\n/**\r\n * Represents a placeholder tag in a tree pattern. A tag can have any of the\r\n * following forms.\r\n *\r\n * * `expr`: An unlabeled placeholder for a parser rule `expr`.\r\n * * `ID`: An unlabeled placeholder for a token of type `ID`.\r\n * * `e:expr`: A labeled placeholder for a parser rule `expr`.\r\n * * `id:ID`: A labeled placeholder for a token of type `ID`.\r\n *\r\n * This class does not perform any validation on the tag or label names aside\r\n * from ensuring that the tag is a defined, non-empty string.\r\n */\r\nexport class TagChunk extends Chunk {\r\n\t/**\r\n\t * This is the backing field for `tag`.\r\n\t */\r\n\tprivate _tag: string;\r\n\t/**\r\n\t * This is the backing field for `label`.\r\n\t */\r\n\tprivate _label?: string;\r\n\r\n\t/**\r\n\t * Construct a new instance of {@link TagChunk} using the specified label\r\n\t * and tag.\r\n\t *\r\n\t * @param label The label for the tag. If this is `undefined`, the\r\n\t * {@link TagChunk} represents an unlabeled tag.\r\n\t * @param tag The tag, which should be the name of a parser rule or token\r\n\t * type.\r\n\t *\r\n\t * @exception IllegalArgumentException if `tag` is not defined or\r\n\t * empty.\r\n\t */\r\n\tconstructor(tag: string, label?: string) {\r\n\t\tsuper();\r\n\r\n\t\tif (tag == null || tag.length === 0) {\r\n\t\t\tthrow new Error(\"tag cannot be null or empty\");\r\n\t\t}\r\n\r\n\t\tthis._tag = tag;\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tag for this chunk.\r\n\t *\r\n\t * @returns The tag for the chunk.\r\n\t */\r\n\t@NotNull\r\n\tget tag(): string {\r\n\t\treturn this._tag;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the label, if any, assigned to this chunk.\r\n\t *\r\n\t * @returns The label assigned to this chunk, or `undefined` if no label is\r\n\t * assigned to the chunk.\r\n\t */\r\n\tget label(): string | undefined {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * This method returns a text representation of the tag chunk. Labeled tags\r\n\t * are returned in the form `label:tag`, and unlabeled tags are\r\n\t * returned as just the tag name.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif (this._label != null) {\r\n\t\t\treturn this._label + \":\" + this._tag;\r\n\t\t}\r\n\r\n\t\treturn this._tag;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.2521448-07:00\r\n\r\nimport { Chunk } from \"./Chunk\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\n\r\n/**\r\n * Represents a span of raw text (concrete syntax) between tags in a tree\r\n * pattern string.\r\n */\r\nexport class TextChunk extends Chunk {\r\n\t/**\r\n\t * This is the backing field for {@link #getText}.\r\n\t */\r\n\t@NotNull\r\n\tprivate _text: string;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link TextChunk} with the specified text.\r\n\t *\r\n\t * @param text The text of this chunk.\r\n\t * @exception IllegalArgumentException if `text` is not defined.\r\n\t */\r\n\tconstructor(@NotNull text: string) {\r\n\t\tsuper();\r\n\r\n\t\tif (text == null) {\r\n\t\t\tthrow new Error(\"text cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._text = text;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the raw text of this chunk.\r\n\t *\r\n\t * @returns The text of the chunk.\r\n\t */\r\n\t@NotNull\r\n\tget text(): string {\r\n\t\treturn this._text;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link TextChunk} returns the result of\r\n\t * `text` in single quotes.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"'\" + this._text + \"'\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:46.3281988-07:00\r\n\r\nimport { CommonToken } from \"../../CommonToken\";\r\nimport { NotNull, Override } from \"../../Decorators\";\r\n\r\n/**\r\n * A {@link Token} object representing a token of a particular type; e.g.,\r\n * ``. These tokens are created for {@link TagChunk} chunks where the\r\n * tag corresponds to a lexer rule or token type.\r\n */\r\nexport class TokenTagToken extends CommonToken {\r\n\t/**\r\n\t * This is the backing field for `tokenName`.\r\n\t */\r\n\t@NotNull\r\n\tprivate _tokenName: string;\r\n\t/**\r\n\t * This is the backing field for `label`.\r\n\t */\r\n\tprivate _label: string | undefined;\r\n\r\n\t/**\r\n\t * Constructs a new instance of {@link TokenTagToken} with the specified\r\n\t * token name, type, and label.\r\n\t *\r\n\t * @param tokenName The token name.\r\n\t * @param type The token type.\r\n\t * @param label The label associated with the token tag, or `undefined` if\r\n\t * the token tag is unlabeled.\r\n\t */\r\n\tconstructor(@NotNull tokenName: string, type: number, label?: string) {\r\n\t\tsuper(type);\r\n\t\tthis._tokenName = tokenName;\r\n\t\tthis._label = label;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the token name.\r\n\t * @returns The token name.\r\n\t */\r\n\t@NotNull\r\n\tget tokenName(): string {\r\n\t\treturn this._tokenName;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the label associated with the rule tag.\r\n\t *\r\n\t * @returns The name of the label associated with the rule tag, or\r\n\t * `undefined` if this is an unlabeled rule tag.\r\n\t */\r\n\tget label(): string | undefined {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link TokenTagToken} returns the token tag\r\n\t * formatted with `<` and `>` delimiters.\r\n\t */\r\n\t@Override\r\n\tget text(): string {\r\n\t\tif (this._label != null) {\r\n\t\t\treturn \"<\" + this._label + \":\" + this._tokenName + \">\";\r\n\t\t}\r\n\r\n\t\treturn \"<\" + this._tokenName + \">\";\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The implementation for {@link TokenTagToken} returns a string of the form\r\n\t * `tokenName:type`.\r\n\t */\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn this._tokenName + \":\" + this.type;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// CONVERSION complete, Burt Harris 10/14/2016\r\n\r\nimport { BailErrorStrategy } from \"../../BailErrorStrategy\";\r\nimport { CharStreams } from \"../../CharStreams\";\r\nimport { Chunk } from \"./Chunk\";\r\nimport { CommonTokenStream } from \"../../CommonTokenStream\";\r\nimport { Lexer } from \"../../Lexer\";\r\nimport { ListTokenSource } from \"../../ListTokenSource\";\r\nimport { MultiMap } from \"../../misc/MultiMap\";\r\nimport { NotNull } from \"../../Decorators\";\r\nimport { ParseCancellationException } from \"../../misc/ParseCancellationException\";\r\nimport { Parser } from \"../../Parser\";\r\nimport { ParserInterpreter } from \"../../ParserInterpreter\";\r\nimport { ParserRuleContext } from \"../../ParserRuleContext\";\r\nimport { ParseTree } from \"../ParseTree\";\r\nimport { ParseTreeMatch } from \"./ParseTreeMatch\";\r\nimport { ParseTreePattern } from \"./ParseTreePattern\";\r\nimport { RecognitionException } from \"../../RecognitionException\";\r\nimport { RuleNode } from \"../RuleNode\";\r\nimport { RuleTagToken } from \"./RuleTagToken\";\r\nimport { TagChunk } from \"./TagChunk\";\r\nimport { TerminalNode } from \"../TerminalNode\";\r\nimport { TextChunk } from \"./TextChunk\";\r\nimport { Token } from \"../../Token\";\r\nimport { TokenTagToken } from \"./TokenTagToken\";\r\n\r\n/**\r\n * A tree pattern matching mechanism for ANTLR {@link ParseTree}s.\r\n *\r\n * Patterns are strings of source input text with special tags representing\r\n * token or rule references such as:\r\n *\r\n * ```\r\n * = ;\r\n * ```\r\n *\r\n * Given a pattern start rule such as `statement`, this object constructs\r\n * a {@link ParseTree} with placeholders for the `ID` and `expr`\r\n * subtree. Then the {@link #match} routines can compare an actual\r\n * {@link ParseTree} from a parse with this pattern. Tag `` matches\r\n * any `ID` token and tag `` references the result of the\r\n * `expr` rule (generally an instance of `ExprContext`.\r\n *\r\n * Pattern `x = 0;` is a similar pattern that matches the same pattern\r\n * except that it requires the identifier to be `x` and the expression to\r\n * be `0`.\r\n *\r\n * The {@link #matches} routines return `true` or `false` based\r\n * upon a match for the tree rooted at the parameter sent in. The\r\n * {@link #match} routines return a {@link ParseTreeMatch} object that\r\n * contains the parse tree, the parse tree pattern, and a map from tag name to\r\n * matched nodes (more below). A subtree that fails to match, returns with\r\n * {@link ParseTreeMatch#mismatchedNode} set to the first tree node that did not\r\n * match.\r\n *\r\n * For efficiency, you can compile a tree pattern in string form to a\r\n * {@link ParseTreePattern} object.\r\n *\r\n * See `TestParseTreeMatcher` for lots of examples.\r\n * {@link ParseTreePattern} has two static helper methods:\r\n * {@link ParseTreePattern#findAll} and {@link ParseTreePattern#match} that\r\n * are easy to use but not super efficient because they create new\r\n * {@link ParseTreePatternMatcher} objects each time and have to compile the\r\n * pattern in string form before using it.\r\n *\r\n * The lexer and parser that you pass into the {@link ParseTreePatternMatcher}\r\n * constructor are used to parse the pattern in string form. The lexer converts\r\n * the ` = ;` into a sequence of four tokens (assuming lexer\r\n * throws out whitespace or puts it on a hidden channel). Be aware that the\r\n * input stream is reset for the lexer (but not the parser; a\r\n * {@link ParserInterpreter} is created to parse the input.). Any user-defined\r\n * fields you have put into the lexer might get changed when this mechanism asks\r\n * it to scan the pattern string.\r\n *\r\n * Normally a parser does not accept token `` as a valid\r\n * `expr` but, from the parser passed in, we create a special version of\r\n * the underlying grammar representation (an {@link ATN}) that allows imaginary\r\n * tokens representing rules (``) to match entire rules. We call\r\n * these *bypass alternatives*.\r\n *\r\n * Delimiters are `<`} and `>`}, with `\\` as the escape string\r\n * by default, but you can set them to whatever you want using\r\n * {@link #setDelimiters}. You must escape both start and stop strings\r\n * `\\<` and `\\>`.\r\n */\r\nexport class ParseTreePatternMatcher {\r\n\t/**\r\n\t * This is the backing field for `lexer`.\r\n\t */\r\n\tprivate _lexer: Lexer;\r\n\r\n\t/**\r\n\t * This is the backing field for `parser`.\r\n\t */\r\n\tprivate _parser: Parser;\r\n\r\n\tprotected start = \"<\";\r\n\tprotected stop = \">\";\r\n\tprotected escape = \"\\\\\"; // e.g., \\< and \\> must escape BOTH!\r\n\r\n\t/**\r\n\t * Regular expression corresponding to escape, for global replace\r\n\t */\r\n\tprotected escapeRE = /\\\\/g;\r\n\r\n\t/**\r\n\t * Constructs a {@link ParseTreePatternMatcher} or from a {@link Lexer} and\r\n\t * {@link Parser} object. The lexer input stream is altered for tokenizing\r\n\t * the tree patterns. The parser is used as a convenient mechanism to get\r\n\t * the grammar name, plus token, rule names.\r\n\t */\r\n\tconstructor(lexer: Lexer, parser: Parser) {\r\n\t\tthis._lexer = lexer;\r\n\t\tthis._parser = parser;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the delimiters used for marking rule and token tags within concrete\r\n\t * syntax used by the tree pattern parser.\r\n\t *\r\n\t * @param start The start delimiter.\r\n\t * @param stop The stop delimiter.\r\n\t * @param escapeLeft The escape sequence to use for escaping a start or stop delimiter.\r\n\t *\r\n\t * @throws {@link Error} if `start` is not defined or empty.\r\n\t * @throws {@link Error} if `stop` is not defined or empty.\r\n\t */\r\n\tpublic setDelimiters(start: string, stop: string, escapeLeft: string): void {\r\n\t\tif (!start) {\r\n\t\t\tthrow new Error(\"start cannot be null or empty\");\r\n\t\t}\r\n\r\n\t\tif (!stop) {\r\n\t\t\tthrow new Error(\"stop cannot be null or empty\");\r\n\t\t}\r\n\r\n\t\tthis.start = start;\r\n\t\tthis.stop = stop;\r\n\t\tthis.escape = escapeLeft;\r\n\t\tthis.escapeRE = new RegExp(escapeLeft.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"), \"g\");\r\n\t}\r\n\r\n\t/** Does `pattern` matched as rule `patternRuleIndex` match `tree`? */\r\n\tpublic matches(tree: ParseTree, pattern: string, patternRuleIndex: number): boolean;\r\n\r\n\t/** Does `pattern` matched as rule patternRuleIndex match tree? Pass in a\r\n\t * compiled pattern instead of a string representation of a tree pattern.\r\n\t */\r\n\tpublic matches(tree: ParseTree, pattern: ParseTreePattern): boolean;\r\n\r\n\tpublic matches(tree: ParseTree, pattern: string | ParseTreePattern, patternRuleIndex: number = 0): boolean {\r\n\t\tif (typeof pattern === \"string\") {\r\n\t\t\tlet p: ParseTreePattern = this.compile(pattern, patternRuleIndex);\r\n\t\t\treturn this.matches(tree, p);\r\n\t\t} else {\r\n\t\t\tlet labels = new MultiMap();\r\n\t\t\tlet mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels);\r\n\t\t\treturn !mismatchedNode;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Compare `pattern` matched as rule `patternRuleIndex` against\r\n\t * `tree` and return a {@link ParseTreeMatch} object that contains the\r\n\t * matched elements, or the node at which the match failed.\r\n\t */\r\n\tpublic match(tree: ParseTree, pattern: string, patternRuleIndex: number): ParseTreeMatch;\r\n\r\n\t/**\r\n\t * Compare `pattern` matched against `tree` and return a\r\n\t * {@link ParseTreeMatch} object that contains the matched elements, or the\r\n\t * node at which the match failed. Pass in a compiled pattern instead of a\r\n\t * string representation of a tree pattern.\r\n\t */\r\n\tpublic match(tree: ParseTree, pattern: ParseTreePattern): ParseTreeMatch;\r\n\r\n\t// Implementation of match\r\n\t@NotNull\r\n\tpublic match(tree: ParseTree, @NotNull pattern: string | ParseTreePattern, patternRuleIndex: number = 0): ParseTreeMatch {\r\n\t\tif (typeof pattern === \"string\") {\r\n\t\t\tlet p: ParseTreePattern = this.compile(pattern, patternRuleIndex);\r\n\t\t\treturn this.match(tree, p);\r\n\t\t} else {\r\n\t\t\tlet labels = new MultiMap();\r\n\t\t\tlet mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels);\r\n\t\t\treturn new ParseTreeMatch(tree, pattern, labels, mismatchedNode);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * For repeated use of a tree pattern, compile it to a\r\n\t * {@link ParseTreePattern} using this method.\r\n\t */\r\n\tpublic compile(pattern: string, patternRuleIndex: number): ParseTreePattern {\r\n\t\tlet tokenList = this.tokenize(pattern);\r\n\t\tlet tokenSrc = new ListTokenSource(tokenList);\r\n\t\tlet tokens = new CommonTokenStream(tokenSrc);\r\n\t\tconst parser = this._parser;\r\n\r\n\t\tlet parserInterp = new ParserInterpreter(\r\n\t\t\tparser.grammarFileName,\r\n\t\t\tparser.vocabulary,\r\n\t\t\tparser.ruleNames,\r\n\t\t\tparser.getATNWithBypassAlts(),\r\n\t\t\ttokens);\r\n\r\n\t\tlet tree: ParseTree;\r\n\t\ttry {\r\n\t\t\tparserInterp.errorHandler = new BailErrorStrategy();\r\n\t\t\ttree = parserInterp.parse(patternRuleIndex);\r\n//\t\t\tSystem.out.println(\"pattern tree = \"+tree.toStringTree(parserInterp));\r\n\t\t} catch (e) {\r\n\t\t\tif (e instanceof ParseCancellationException) {\r\n\t\t\t\tthrow e.getCause();\r\n\t\t\t} else if (e instanceof RecognitionException) {\r\n\t\t\t\tthrow e;\r\n\t\t\t} else if (e instanceof Error) {\r\n\t\t\t\tthrow new ParseTreePatternMatcher.CannotInvokeStartRule(e);\r\n\t\t\t} else {\r\n\t\t\t\tthrow e;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Make sure tree pattern compilation checks for a complete parse\r\n\t\tif (tokens.LA(1) !== Token.EOF) {\r\n\t\t\tthrow new ParseTreePatternMatcher.StartRuleDoesNotConsumeFullPattern();\r\n\t\t}\r\n\r\n\t\treturn new ParseTreePattern(this, pattern, patternRuleIndex, tree);\r\n\t}\r\n\r\n\t/**\r\n\t * Used to convert the tree pattern string into a series of tokens. The\r\n\t * input stream is reset.\r\n\t */\r\n\t@NotNull\r\n\tget lexer(): Lexer {\r\n\t\treturn this._lexer;\r\n\t}\r\n\r\n\t/**\r\n\t * Used to collect to the grammar file name, token names, rule names for\r\n\t * used to parse the pattern into a parse tree.\r\n\t */\r\n\t@NotNull\r\n\tget parser(): Parser {\r\n\t\treturn this._parser;\r\n\t}\r\n\r\n\t// ---- SUPPORT CODE ----\r\n\r\n\t/**\r\n\t * Recursively walk `tree` against `patternTree`, filling\r\n\t * `match.`{@link ParseTreeMatch#labels labels}.\r\n\t *\r\n\t * @returns the first node encountered in `tree` which does not match\r\n\t * a corresponding node in `patternTree`, or `undefined` if the match\r\n\t * was successful. The specific node returned depends on the matching\r\n\t * algorithm used by the implementation, and may be overridden.\r\n\t */\r\n\tprotected matchImpl(\r\n\t\t@NotNull tree: ParseTree,\r\n\t\t@NotNull patternTree: ParseTree,\r\n\t\t@NotNull labels: MultiMap): ParseTree | undefined {\r\n\t\tif (!tree) {\r\n\t\t\tthrow new TypeError(\"tree cannot be null\");\r\n\t\t}\r\n\r\n\t\tif (!patternTree) {\r\n\t\t\tthrow new TypeError(\"patternTree cannot be null\");\r\n\t\t}\r\n\r\n\t\t// x and , x and y, or x and x; or could be mismatched types\r\n\t\tif (tree instanceof TerminalNode && patternTree instanceof TerminalNode) {\r\n\t\t\tlet mismatchedNode: ParseTree | undefined;\r\n\t\t\t// both are tokens and they have same type\r\n\t\t\tif (tree.symbol.type === patternTree.symbol.type) {\r\n\t\t\t\tif (patternTree.symbol instanceof TokenTagToken) { // x and \r\n\t\t\t\t\tlet tokenTagToken = patternTree.symbol;\r\n\t\t\t\t\t// track label->list-of-nodes for both token name and label (if any)\r\n\t\t\t\t\tlabels.map(tokenTagToken.tokenName, tree);\r\n\t\t\t\t\tconst l = tokenTagToken.label;\r\n\t\t\t\t\tif (l) {\r\n\t\t\t\t\t\tlabels.map(l, tree);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (tree.text === patternTree.text) {\r\n\t\t\t\t\t// x and x\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// x and y\r\n\t\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn mismatchedNode;\r\n\t\t}\r\n\r\n\t\tif (tree instanceof ParserRuleContext\r\n\t\t\t&& patternTree instanceof ParserRuleContext) {\r\n\t\t\tlet mismatchedNode: ParseTree | undefined;\r\n\t\t\t// (expr ...) and \r\n\t\t\tlet ruleTagToken = this.getRuleTagToken(patternTree);\r\n\t\t\tif (ruleTagToken) {\r\n\t\t\t\tlet m: ParseTreeMatch;\r\n\t\t\t\tif (tree.ruleContext.ruleIndex === patternTree.ruleContext.ruleIndex) {\r\n\t\t\t\t\t// track label->list-of-nodes for both rule name and label (if any)\r\n\t\t\t\t\tlabels.map(ruleTagToken.ruleName, tree);\r\n\t\t\t\t\tconst l = ruleTagToken.label;\r\n\t\t\t\t\tif (l) {\r\n\t\t\t\t\t\tlabels.map(l, tree);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn mismatchedNode;\r\n\t\t\t}\r\n\r\n\t\t\t// (expr ...) and (expr ...)\r\n\t\t\tif (tree.childCount !== patternTree.childCount) {\r\n\t\t\t\tif (!mismatchedNode) {\r\n\t\t\t\t\tmismatchedNode = tree;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn mismatchedNode;\r\n\t\t\t}\r\n\r\n\t\t\tlet n: number = tree.childCount;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet childMatch = this.matchImpl(tree.getChild(i), patternTree.getChild(i), labels);\r\n\t\t\t\tif (childMatch) {\r\n\t\t\t\t\treturn childMatch;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn mismatchedNode;\r\n\t\t}\r\n\r\n\t\t// if nodes aren't both tokens or both rule nodes, can't match\r\n\t\treturn tree;\r\n\t}\r\n\r\n\t/** Is `t` `(expr )` subtree? */\r\n\tprotected getRuleTagToken(t: ParseTree): RuleTagToken | undefined {\r\n\t\tif (t instanceof RuleNode) {\r\n\t\t\tif (t.childCount === 1 && t.getChild(0) instanceof TerminalNode) {\r\n\t\t\t\tlet c = t.getChild(0) as TerminalNode;\r\n\t\t\t\tif (c.symbol instanceof RuleTagToken) {\r\n//\t\t\t\t\tSystem.out.println(\"rule tag subtree \"+t.toStringTree(parser));\r\n\t\t\t\t\treturn c.symbol;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tpublic tokenize(pattern: string): Token[] {\r\n\t\t// split pattern into chunks: sea (raw input) and islands (, )\r\n\t\tlet chunks = this.split(pattern);\r\n\r\n\t\t// create token stream from text and tags\r\n\t\tlet tokens: Token[] = [];\r\n\r\n\t\tfor (let chunk of chunks) {\r\n\t\t\tif (chunk instanceof TagChunk) {\r\n\t\t\t\tlet tagChunk = chunk;\r\n\t\t\t\tconst firstChar = tagChunk.tag.substr(0, 1);\r\n\t\t\t\t// add special rule token or conjure up new token from name\r\n\t\t\t\tif (firstChar === firstChar.toUpperCase()) {\r\n\t\t\t\t\tlet ttype: number = this._parser.getTokenType(tagChunk.tag);\r\n\t\t\t\t\tif (ttype === Token.INVALID_TYPE) {\r\n\t\t\t\t\t\tthrow new Error(\"Unknown token \" + tagChunk.tag + \" in pattern: \" + pattern);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet t: TokenTagToken = new TokenTagToken(tagChunk.tag, ttype, tagChunk.label);\r\n\t\t\t\t\ttokens.push(t);\r\n\t\t\t\t}\r\n\t\t\t\telse if (firstChar === firstChar.toLowerCase()) {\r\n\t\t\t\t\tlet ruleIndex: number = this._parser.getRuleIndex(tagChunk.tag);\r\n\t\t\t\t\tif (ruleIndex === -1) {\r\n\t\t\t\t\t\tthrow new Error(\"Unknown rule \" + tagChunk.tag + \" in pattern: \" + pattern);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet ruleImaginaryTokenType: number = this._parser.getATNWithBypassAlts().ruleToTokenType[ruleIndex];\r\n\t\t\t\t\ttokens.push(new RuleTagToken(tagChunk.tag, ruleImaginaryTokenType, tagChunk.label));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthrow new Error(\"invalid tag: \" + tagChunk.tag + \" in pattern: \" + pattern);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlet textChunk = chunk as TextChunk;\r\n\t\t\t\tthis._lexer.inputStream = CharStreams.fromString(textChunk.text);\r\n\t\t\t\tlet t: Token = this._lexer.nextToken();\r\n\t\t\t\twhile (t.type !== Token.EOF) {\r\n\t\t\t\t\ttokens.push(t);\r\n\t\t\t\t\tt = this._lexer.nextToken();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t\tSystem.out.println(\"tokens=\"+tokens);\r\n\t\treturn tokens;\r\n\t}\r\n\r\n\t/** Split ` = ;` into 4 chunks for tokenizing by {@link #tokenize}. */\r\n\tpublic split(pattern: string): Chunk[] {\r\n\t\tlet p: number = 0;\r\n\t\tlet n: number = pattern.length;\r\n\t\tlet chunks: Chunk[] = [];\r\n\t\tlet buf: \"\";\r\n\t\t// find all start and stop indexes first, then collect\r\n\t\tlet starts: number[] = [];\r\n\t\tlet stops: number[] = [];\r\n\t\twhile (p < n) {\r\n\t\t\tif (p === pattern.indexOf(this.escape + this.start, p)) {\r\n\t\t\t\tp += this.escape.length + this.start.length;\r\n\t\t\t}\r\n\t\t\telse if (p === pattern.indexOf(this.escape + this.stop, p)) {\r\n\t\t\t\tp += this.escape.length + this.stop.length;\r\n\t\t\t}\r\n\t\t\telse if (p === pattern.indexOf(this.start, p)) {\r\n\t\t\t\tstarts.push(p);\r\n\t\t\t\tp += this.start.length;\r\n\t\t\t}\r\n\t\t\telse if (p === pattern.indexOf(this.stop, p)) {\r\n\t\t\t\tstops.push(p);\r\n\t\t\t\tp += this.stop.length;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tp++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t\tSystem.out.println(\"\");\r\n//\t\tSystem.out.println(starts);\r\n//\t\tSystem.out.println(stops);\r\n\t\tif (starts.length > stops.length) {\r\n\t\t\tthrow new Error(\"unterminated tag in pattern: \" + pattern);\r\n\t\t}\r\n\r\n\t\tif (starts.length < stops.length) {\r\n\t\t\tthrow new Error(\"missing start tag in pattern: \" + pattern);\r\n\t\t}\r\n\r\n\t\tlet ntags: number = starts.length;\r\n\t\tfor (let i = 0; i < ntags; i++) {\r\n\t\t\tif (starts[i] >= stops[i]) {\r\n\t\t\t\tthrow new Error(\"tag delimiters out of order in pattern: \" + pattern);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// collect into chunks now\r\n\t\tif (ntags === 0) {\r\n\t\t\tlet text: string = pattern.substring(0, n);\r\n\t\t\tchunks.push(new TextChunk(text));\r\n\t\t}\r\n\r\n\t\tif (ntags > 0 && starts[0] > 0) { // copy text up to first tag into chunks\r\n\t\t\tlet text: string = pattern.substring(0, starts[0]);\r\n\t\t\tchunks.push(new TextChunk(text));\r\n\t\t}\r\n\t\tfor (let i = 0; i < ntags; i++) {\r\n\t\t\t// copy inside of \r\n\t\t\tlet tag: string = pattern.substring(starts[i] + this.start.length, stops[i]);\r\n\t\t\tlet ruleOrToken: string = tag;\r\n\t\t\tlet label: string | undefined;\r\n\t\t\tlet colon: number = tag.indexOf(\":\");\r\n\t\t\tif (colon >= 0) {\r\n\t\t\t\tlabel = tag.substring(0, colon);\r\n\t\t\t\truleOrToken = tag.substring(colon + 1, tag.length);\r\n\t\t\t}\r\n\t\t\tchunks.push(new TagChunk(ruleOrToken, label));\r\n\t\t\tif (i + 1 < ntags) {\r\n\t\t\t\t// copy from end of to start of next\r\n\t\t\t\tlet text: string = pattern.substring(stops[i] + this.stop.length, starts[i + 1]);\r\n\t\t\t\tchunks.push(new TextChunk(text));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (ntags > 0) {\r\n\t\t\tlet afterLastTag: number = stops[ntags - 1] + this.stop.length;\r\n\t\t\tif (afterLastTag < n) { // copy text from end of last tag to end\r\n\t\t\t\tlet text: string = pattern.substring(afterLastTag, n);\r\n\t\t\t\tchunks.push(new TextChunk(text));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// strip out the escape sequences from text chunks but not tags\r\n\t\tfor (let i = 0; i < chunks.length; i++) {\r\n\t\t\tlet c: Chunk = chunks[i];\r\n\t\t\tif (c instanceof TextChunk) {\r\n\t\t\t\tlet unescaped: string = c.text.replace(this.escapeRE, \"\");\r\n\t\t\t\tif (unescaped.length < c.text.length) {\r\n\t\t\t\t\tchunks[i] = new TextChunk(unescaped);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn chunks;\r\n\t}\r\n}\r\n\r\nexport namespace ParseTreePatternMatcher {\r\n\texport class CannotInvokeStartRule extends Error {\r\n\t\tpublic constructor(public error: Error) {\r\n\t\t\tsuper(`CannotInvokeStartRule: ${error}`);\r\n\t\t}\r\n\t}\r\n\r\n\t// Fixes https://github.com/antlr/antlr4/issues/413\r\n\t// \"Tree pattern compilation doesn't check for a complete parse\"\r\n\texport class StartRuleDoesNotConsumeFullPattern extends Error {\r\n\t\tconstructor() {\r\n\t\t\tsuper(\"StartRuleDoesNotConsumeFullPattern\");\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.2401032-07:00\r\n\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This is the base class for gathering detailed information about prediction\r\n * events which occur during parsing.\r\n *\r\n * Note that we could record the parser call stack at the time this event\r\n * occurred but in the presence of left recursive rules, the stack is kind of\r\n * meaningless. It's better to look at the individual configurations for their\r\n * individual stacks. Of course that is a {@link PredictionContext} object\r\n * not a parse tree node and so it does not have information about the extent\r\n * (start...stop) of the various subtrees. Examining the stack tops of all\r\n * configurations provide the return states for the rule invocations.\r\n * From there you can get the enclosing rule.\r\n *\r\n * @since 4.3\r\n */\r\nexport class DecisionEventInfo {\r\n\t/**\r\n\t * The invoked decision number which this event is related to.\r\n\t *\r\n\t * @see ATN#decisionToState\r\n\t */\r\n\tpublic decision: number;\r\n\r\n\t/**\r\n\t * The simulator state containing additional information relevant to the\r\n\t * prediction state when the current event occurred, or `undefined` if no\r\n\t * additional information is relevant or available.\r\n\t */\r\n\tpublic state: SimulatorState | undefined;\r\n\r\n\t/**\r\n\t * The input token stream which is being parsed.\r\n\t */\r\n\t@NotNull\r\n\tpublic input: TokenStream;\r\n\r\n\t/**\r\n\t * The token index in the input stream at which the current prediction was\r\n\t * originally invoked.\r\n\t */\r\n\tpublic startIndex: number;\r\n\r\n\t/**\r\n\t * The token index in the input stream at which the current event occurred.\r\n\t */\r\n\tpublic stopIndex: number;\r\n\r\n\t/**\r\n\t * `true` if the current event occurred during LL prediction;\r\n\t * otherwise, `false` if the input occurred during SLL prediction.\r\n\t */\r\n\tpublic fullCtx: boolean;\r\n\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\tstate: SimulatorState | undefined,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tfullCtx: boolean) {\r\n\r\n\t\tthis.decision = decision;\r\n\t\tthis.fullCtx = fullCtx;\r\n\t\tthis.stopIndex = stopIndex;\r\n\t\tthis.input = input;\r\n\t\tthis.startIndex = startIndex;\r\n\t\tthis.state = state;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:24.8229279-07:00\r\n\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for an ambiguity.\r\n * Ambiguities are decisions where a particular input resulted in an SLL\r\n * conflict, followed by LL prediction also reaching a conflict state\r\n * (indicating a true ambiguity in the grammar).\r\n *\r\n * This event may be reported during SLL prediction in cases where the\r\n * conflicting SLL configuration set provides sufficient information to\r\n * determine that the SLL conflict is truly an ambiguity. For example, if none\r\n * of the ATN configurations in the conflicting SLL configuration set have\r\n * traversed a global follow transition (i.e.\r\n * {@link ATNConfig#getReachesIntoOuterContext} is `false` for all\r\n * configurations), then the result of SLL prediction for that input is known to\r\n * be equivalent to the result of LL prediction for that input.\r\n *\r\n * In some cases, the minimum represented alternative in the conflicting LL\r\n * configuration set is not equal to the minimum represented alternative in the\r\n * conflicting SLL configuration set. Grammars and inputs which result in this\r\n * scenario are unable to use {@link PredictionMode#SLL}, which in turn means\r\n * they cannot use the two-stage parsing strategy to improve parsing performance\r\n * for that input.\r\n *\r\n * @see ParserATNSimulator#reportAmbiguity\r\n * @see ParserErrorListener#reportAmbiguity\r\n *\r\n * @since 4.3\r\n */\r\nexport class AmbiguityInfo extends DecisionEventInfo {\r\n\t/** The set of alternative numbers for this decision event that lead to a valid parse. */\r\n\t@NotNull\r\n\tprivate ambigAlts: BitSet;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link AmbiguityInfo} class with the\r\n\t * specified detailed ambiguity information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state identifying the ambiguous\r\n\t * alternatives for the current input\r\n\t * @param ambigAlts The set of alternatives in the decision that lead to a valid parse.\r\n\t * The predicted alt is the min(ambigAlts)\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the ambiguity was identified during\r\n\t * prediction\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\t@NotNull state: SimulatorState,\r\n\t\t@NotNull ambigAlts: BitSet,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number) {\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, state.useContext);\r\n\t\tthis.ambigAlts = ambigAlts;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the set of alternatives in the decision that lead to a valid parse.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\t@NotNull\r\n\tget ambiguousAlternatives(): BitSet {\r\n\t\treturn this.ambigAlts;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.1575933-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for a context sensitivity.\r\n * Context sensitivities are decisions where a particular input resulted in an\r\n * SLL conflict, but LL prediction produced a single unique alternative.\r\n *\r\n * In some cases, the unique alternative identified by LL prediction is not\r\n * equal to the minimum represented alternative in the conflicting SLL\r\n * configuration set. Grammars and inputs which result in this scenario are\r\n * unable to use {@link PredictionMode#SLL}, which in turn means they cannot use\r\n * the two-stage parsing strategy to improve parsing performance for that\r\n * input.\r\n *\r\n * @see ParserATNSimulator#reportContextSensitivity\r\n * @see ParserErrorListener#reportContextSensitivity\r\n *\r\n * @since 4.3\r\n */\r\nexport class ContextSensitivityInfo extends DecisionEventInfo {\r\n\t/**\r\n\t * Constructs a new instance of the {@link ContextSensitivityInfo} class\r\n\t * with the specified detailed context sensitivity information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state containing the unique\r\n\t * alternative identified by full-context prediction\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the context sensitivity was\r\n\t * identified during full-context prediction\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\t@NotNull state: SimulatorState,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, true);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.3330673-07:00\r\n\r\nimport { AmbiguityInfo } from \"./AmbiguityInfo\";\r\nimport { ContextSensitivityInfo } from \"./ContextSensitivityInfo\";\r\nimport { ErrorInfo } from \"./ErrorInfo\";\r\nimport { LookaheadEventInfo } from \"./LookaheadEventInfo\";\r\nimport { Override } from \"../Decorators\";\r\nimport { PredicateEvalInfo } from \"./PredicateEvalInfo\";\r\n\r\n/**\r\n * This class contains profiling gathered for a particular decision.\r\n *\r\n * Parsing performance in ANTLR 4 is heavily influenced by both static factors\r\n * (e.g. the form of the rules in the grammar) and dynamic factors (e.g. the\r\n * choice of input and the state of the DFA cache at the time profiling\r\n * operations are started). For best results, gather and use aggregate\r\n * statistics from a large sample of inputs representing the inputs expected in\r\n * production before using the results to make changes in the grammar.\r\n *\r\n * @since 4.3\r\n */\r\nexport class DecisionInfo {\r\n\t/**\r\n\t * The decision number, which is an index into {@link ATN#decisionToState}.\r\n\t */\r\n\tpublic decision: number;\r\n\r\n\t/**\r\n\t * The total number of times {@link ParserATNSimulator#adaptivePredict} was\r\n\t * invoked for this decision.\r\n\t */\r\n\tpublic invocations: number = 0;\r\n\r\n\t/**\r\n\t * The total time spent in {@link ParserATNSimulator#adaptivePredict} for\r\n\t * this decision, in nanoseconds.\r\n\t *\r\n\t * The value of this field contains the sum of differential results obtained\r\n\t * by {@link System#nanoTime()}, and is not adjusted to compensate for JIT\r\n\t * and/or garbage collection overhead. For best accuracy, use a modern JVM\r\n\t * implementation that provides precise results from\r\n\t * {@link System#nanoTime()}, and perform profiling in a separate process\r\n\t * which is warmed up by parsing the input prior to profiling. If desired,\r\n\t * call {@link ATNSimulator#clearDFA} to reset the DFA cache to its initial\r\n\t * state before starting the profiling measurement pass.\r\n\t */\r\n\tpublic timeInPrediction: number = 0;\r\n\r\n\t/**\r\n\t * The sum of the lookahead required for SLL prediction for this decision.\r\n\t * Note that SLL prediction is used before LL prediction for performance\r\n\t * reasons even when {@link PredictionMode#LL} or\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} is used.\r\n\t */\r\n\tpublic SLL_TotalLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the minimum lookahead required for any single SLL prediction to\r\n\t * complete for this decision, by reaching a unique prediction, reaching an\r\n\t * SLL conflict state, or encountering a syntax error.\r\n\t */\r\n\tpublic SLL_MinLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the maximum lookahead required for any single SLL prediction to\r\n\t * complete for this decision, by reaching a unique prediction, reaching an\r\n\t * SLL conflict state, or encountering a syntax error.\r\n\t */\r\n\tpublic SLL_MaxLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the {@link LookaheadEventInfo} associated with the event where the\r\n\t * {@link #SLL_MaxLook} value was set.\r\n\t */\r\n\tpublic SLL_MaxLookEvent?: LookaheadEventInfo;\r\n\r\n\t/**\r\n\t * The sum of the lookahead required for LL prediction for this decision.\r\n\t * Note that LL prediction is only used when SLL prediction reaches a\r\n\t * conflict state.\r\n\t */\r\n\tpublic LL_TotalLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the minimum lookahead required for any single LL prediction to\r\n\t * complete for this decision. An LL prediction completes when the algorithm\r\n\t * reaches a unique prediction, a conflict state (for\r\n\t * {@link PredictionMode#LL}, an ambiguity state (for\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error.\r\n\t */\r\n\tpublic LL_MinLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the maximum lookahead required for any single LL prediction to\r\n\t * complete for this decision. An LL prediction completes when the algorithm\r\n\t * reaches a unique prediction, a conflict state (for\r\n\t * {@link PredictionMode#LL}, an ambiguity state (for\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error.\r\n\t */\r\n\tpublic LL_MaxLook: number = 0;\r\n\r\n\t/**\r\n\t * Gets the {@link LookaheadEventInfo} associated with the event where the\r\n\t * {@link #LL_MaxLook} value was set.\r\n\t */\r\n\tpublic LL_MaxLookEvent?: LookaheadEventInfo;\r\n\r\n\t/**\r\n\t * A collection of {@link ContextSensitivityInfo} instances describing the\r\n\t * context sensitivities encountered during LL prediction for this decision.\r\n\t *\r\n\t * @see ContextSensitivityInfo\r\n\t */\r\n\tpublic contextSensitivities: ContextSensitivityInfo[] = [];\r\n\r\n\t/**\r\n\t * A collection of {@link ErrorInfo} instances describing the parse errors\r\n\t * identified during calls to {@link ParserATNSimulator#adaptivePredict} for\r\n\t * this decision.\r\n\t *\r\n\t * @see ErrorInfo\r\n\t */\r\n\tpublic errors: ErrorInfo[] = [];\r\n\r\n\t/**\r\n\t * A collection of {@link AmbiguityInfo} instances describing the\r\n\t * ambiguities encountered during LL prediction for this decision.\r\n\t *\r\n\t * @see AmbiguityInfo\r\n\t */\r\n\tpublic ambiguities: AmbiguityInfo[] = [];\r\n\r\n\t/**\r\n\t * A collection of {@link PredicateEvalInfo} instances describing the\r\n\t * results of evaluating individual predicates during prediction for this\r\n\t * decision.\r\n\t *\r\n\t * @see PredicateEvalInfo\r\n\t */\r\n\tpublic predicateEvals: PredicateEvalInfo[] = [];\r\n\r\n\t/**\r\n\t * The total number of ATN transitions required during SLL prediction for\r\n\t * this decision. An ATN transition is determined by the number of times the\r\n\t * DFA does not contain an edge that is required for prediction, resulting\r\n\t * in on-the-fly computation of that edge.\r\n\t *\r\n\t * If DFA caching of SLL transitions is employed by the implementation, ATN\r\n\t * computation may cache the computed edge for efficient lookup during\r\n\t * future parsing of this decision. Otherwise, the SLL parsing algorithm\r\n\t * will use ATN transitions exclusively.\r\n\t *\r\n\t * @see #SLL_ATNTransitions\r\n\t * @see ParserATNSimulator#computeTargetState\r\n\t * @see LexerATNSimulator#computeTargetState\r\n\t */\r\n\tpublic SLL_ATNTransitions: number = 0;\r\n\r\n\t/**\r\n\t * The total number of DFA transitions required during SLL prediction for\r\n\t * this decision.\r\n\t *\r\n\t * If the ATN simulator implementation does not use DFA caching for SLL\r\n\t * transitions, this value will be 0.\r\n\t *\r\n\t * @see ParserATNSimulator#getExistingTargetState\r\n\t * @see LexerATNSimulator#getExistingTargetState\r\n\t */\r\n\tpublic SLL_DFATransitions: number = 0;\r\n\r\n\t/**\r\n\t * Gets the total number of times SLL prediction completed in a conflict\r\n\t * state, resulting in fallback to LL prediction.\r\n\t *\r\n\t * Note that this value is not related to whether or not\r\n\t * {@link PredictionMode#SLL} may be used successfully with a particular\r\n\t * grammar. If the ambiguity resolution algorithm applied to the SLL\r\n\t * conflicts for this decision produce the same result as LL prediction for\r\n\t * this decision, {@link PredictionMode#SLL} would produce the same overall\r\n\t * parsing result as {@link PredictionMode#LL}.\r\n\t */\r\n\tpublic LL_Fallback: number = 0;\r\n\r\n\t/**\r\n\t * The total number of ATN transitions required during LL prediction for\r\n\t * this decision. An ATN transition is determined by the number of times the\r\n\t * DFA does not contain an edge that is required for prediction, resulting\r\n\t * in on-the-fly computation of that edge.\r\n\t *\r\n\t * If DFA caching of LL transitions is employed by the implementation, ATN\r\n\t * computation may cache the computed edge for efficient lookup during\r\n\t * future parsing of this decision. Otherwise, the LL parsing algorithm will\r\n\t * use ATN transitions exclusively.\r\n\t *\r\n\t * @see #LL_DFATransitions\r\n\t * @see ParserATNSimulator#computeTargetState\r\n\t * @see LexerATNSimulator#computeTargetState\r\n\t */\r\n\tpublic LL_ATNTransitions: number = 0;\r\n\r\n\t/**\r\n\t * The total number of DFA transitions required during LL prediction for\r\n\t * this decision.\r\n\t *\r\n\t * If the ATN simulator implementation does not use DFA caching for LL\r\n\t * transitions, this value will be 0.\r\n\t *\r\n\t * @see ParserATNSimulator#getExistingTargetState\r\n\t * @see LexerATNSimulator#getExistingTargetState\r\n\t */\r\n\tpublic LL_DFATransitions: number = 0;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link DecisionInfo} class to contain\r\n\t * statistics for a particular decision.\r\n\t *\r\n\t * @param decision The decision number\r\n\t */\r\n\tconstructor(decision: number) {\r\n\t\tthis.decision = decision;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\treturn \"{\" +\r\n\t\t\t\"decision=\" + this.decision +\r\n\t\t\t\", contextSensitivities=\" + this.contextSensitivities.length +\r\n\t\t\t\", errors=\" + this.errors.length +\r\n\t\t\t\", ambiguities=\" + this.ambiguities.length +\r\n\t\t\t\", SLL_lookahead=\" + this.SLL_TotalLook +\r\n\t\t\t\", SLL_ATNTransitions=\" + this.SLL_ATNTransitions +\r\n\t\t\t\", SLL_DFATransitions=\" + this.SLL_DFATransitions +\r\n\t\t\t\", LL_Fallback=\" + this.LL_Fallback +\r\n\t\t\t\", LL_lookahead=\" + this.LL_TotalLook +\r\n\t\t\t\", LL_ATNTransitions=\" + this.LL_ATNTransitions +\r\n\t\t\t\"}\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:28.7213647-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for a syntax error\r\n * identified during prediction. Syntax errors occur when the prediction\r\n * algorithm is unable to identify an alternative which would lead to a\r\n * successful parse.\r\n *\r\n * @see Parser#notifyErrorListeners(Token, String, RecognitionException)\r\n * @see ANTLRErrorListener#syntaxError\r\n *\r\n * @since 4.3\r\n */\r\nexport class ErrorInfo extends DecisionEventInfo {\r\n\t/**\r\n\t * Constructs a new instance of the {@link ErrorInfo} class with the\r\n\t * specified detailed syntax error information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state reached during prediction\r\n\t * prior to reaching the {@link ATNSimulator#ERROR} state\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the syntax error was identified\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\t@NotNull state: SimulatorState,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, state.useContext);\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:30.6852565-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for tracking the lookahead\r\n * depth required in order to make a prediction.\r\n *\r\n * @since 4.3\r\n */\r\nexport class LookaheadEventInfo extends DecisionEventInfo {\r\n\t/** The alternative chosen by adaptivePredict(), not necessarily\r\n\t * the outermost alt shown for a rule; left-recursive rules have\r\n\t * user-level alts that differ from the rewritten rule with a (...) block\r\n\t * and a (..)* loop.\r\n\t */\r\n\tpublic predictedAlt: number;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link LookaheadEventInfo} class with\r\n\t * the specified detailed lookahead information.\r\n\t *\r\n\t * @param decision The decision number\r\n\t * @param state The final simulator state containing the necessary\r\n\t * information to determine the result of a prediction, or `undefined` if\r\n\t * the final state is not available\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the prediction was finally made\r\n\t * @param fullCtx `true` if the current lookahead is part of an LL\r\n\t * prediction; otherwise, `false` if the current lookahead is part of\r\n\t * an SLL prediction\r\n\t */\r\n\tconstructor(\r\n\t\tdecision: number,\r\n\t\tstate: SimulatorState | undefined,\r\n\t\tpredictedAlt: number,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tfullCtx: boolean) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, fullCtx);\r\n\t\tthis.predictedAlt = predictedAlt;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:35.1914305-07:00\r\n\r\nimport { DecisionEventInfo } from \"./DecisionEventInfo\";\r\nimport { NotNull } from \"../Decorators\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * This class represents profiling event information for semantic predicate\r\n * evaluations which occur during prediction.\r\n *\r\n * @see ParserATNSimulator#evalSemanticContext\r\n *\r\n * @since 4.3\r\n */\r\nexport class PredicateEvalInfo extends DecisionEventInfo {\r\n\t/**\r\n\t * The semantic context which was evaluated.\r\n\t */\r\n\tpublic semctx: SemanticContext;\r\n\t/**\r\n\t * The alternative number for the decision which is guarded by the semantic\r\n\t * context {@link #semctx}. Note that other ATN\r\n\t * configurations may predict the same alternative which are guarded by\r\n\t * other semantic contexts and/or {@link SemanticContext#NONE}.\r\n\t */\r\n\tpublic predictedAlt: number;\r\n\t/**\r\n\t * The result of evaluating the semantic context {@link #semctx}.\r\n\t */\r\n\tpublic evalResult: boolean;\r\n\r\n\t/**\r\n\t * Constructs a new instance of the {@link PredicateEvalInfo} class with the\r\n\t * specified detailed predicate evaluation information.\r\n\t *\r\n\t * @param state The simulator state\r\n\t * @param decision The decision number\r\n\t * @param input The input token stream\r\n\t * @param startIndex The start index for the current prediction\r\n\t * @param stopIndex The index at which the predicate evaluation was\r\n\t * triggered. Note that the input stream may be reset to other positions for\r\n\t * the actual evaluation of individual predicates.\r\n\t * @param semctx The semantic context which was evaluated\r\n\t * @param evalResult The results of evaluating the semantic context\r\n\t * @param predictedAlt The alternative number for the decision which is\r\n\t * guarded by the semantic context `semctx`. See {@link #predictedAlt}\r\n\t * for more information.\r\n\t *\r\n\t * @see ParserATNSimulator#evalSemanticContext(SemanticContext, ParserRuleContext, int)\r\n\t * @see SemanticContext#eval(Recognizer, RuleContext)\r\n\t */\r\n\tconstructor(\r\n\t\t@NotNull state: SimulatorState,\r\n\t\tdecision: number,\r\n\t\t@NotNull input: TokenStream,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\t@NotNull semctx: SemanticContext,\r\n\t\tevalResult: boolean,\r\n\t\tpredictedAlt: number) {\r\n\r\n\t\tsuper(decision, state, input, startIndex, stopIndex, state.useContext);\r\n\t\tthis.semctx = semctx;\r\n\t\tthis.evalResult = evalResult;\r\n\t\tthis.predictedAlt = predictedAlt;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:36.4188352-07:00\r\n\r\nimport { AmbiguityInfo } from \"./AmbiguityInfo\";\r\nimport { ATN } from \"./ATN\";\r\nimport { ATNConfigSet } from \"./ATNConfigSet\";\r\nimport { ATNSimulator } from \"./ATNSimulator\";\r\nimport { BitSet } from \"../misc/BitSet\";\r\nimport { ContextSensitivityInfo } from \"./ContextSensitivityInfo\";\r\nimport { DecisionInfo } from \"./DecisionInfo\";\r\nimport { DFA } from \"../dfa/DFA\";\r\nimport { DFAState } from \"../dfa/DFAState\";\r\nimport { ErrorInfo } from \"./ErrorInfo\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { LookaheadEventInfo } from \"./LookaheadEventInfo\";\r\nimport { Parser } from \"../Parser\";\r\nimport { ParserATNSimulator } from \"./ParserATNSimulator\";\r\nimport { ParserRuleContext } from \"../ParserRuleContext\";\r\nimport { PredicateEvalInfo } from \"./PredicateEvalInfo\";\r\nimport { PredictionContextCache } from \"./PredictionContextCache\";\r\nimport { SemanticContext } from \"./SemanticContext\";\r\nimport { SimulatorState } from \"./SimulatorState\";\r\nimport { TokenStream } from \"../TokenStream\";\r\n\r\n/**\r\n * @since 4.3\r\n */\r\nexport class ProfilingATNSimulator extends ParserATNSimulator {\r\n\tprotected decisions: DecisionInfo[];\r\n\tprotected numDecisions: number;\r\n\r\n\tprotected _input: TokenStream | undefined;\r\n\tprotected _startIndex: number = 0;\r\n\tprotected _sllStopIndex: number = 0;\r\n\tprotected _llStopIndex: number = 0;\r\n\r\n\tprotected currentDecision: number = 0;\r\n\tprotected currentState: SimulatorState | undefined;\r\n\r\n\t/** At the point of LL failover, we record how SLL would resolve the conflict so that\r\n\t * we can determine whether or not a decision / input pair is context-sensitive.\r\n\t * If LL gives a different result than SLL's predicted alternative, we have a\r\n\t * context sensitivity for sure. The converse is not necessarily true, however.\r\n\t * It's possible that after conflict resolution chooses minimum alternatives,\r\n\t * SLL could get the same answer as LL. Regardless of whether or not the result indicates\r\n\t * an ambiguity, it is not treated as a context sensitivity because LL prediction\r\n\t * was not required in order to produce a correct prediction for this decision and input sequence.\r\n\t * It may in fact still be a context sensitivity but we don't know by looking at the\r\n\t * minimum alternatives for the current input.\r\n\t */\r\n\tprotected conflictingAltResolvedBySLL: number = 0;\r\n\r\n\tconstructor(parser: Parser) {\r\n\t\tsuper(parser.interpreter.atn, parser);\r\n\t\tthis.optimize_ll1 = false;\r\n\t\tthis.reportAmbiguities = true;\r\n\t\tthis.numDecisions = this.atn.decisionToState.length;\r\n\t\tthis.decisions = [];\r\n\t\tfor (let i = 0; i < this.numDecisions; i++) {\r\n\t\t\tthis.decisions.push(new DecisionInfo(i));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined): number;\r\n\tpublic adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext: boolean): number;\r\n\t@Override\r\n\tpublic adaptivePredict(\r\n\t\t@NotNull input: TokenStream,\r\n\t\tdecision: number,\r\n\t\touterContext: ParserRuleContext | undefined,\r\n\t\tuseContext?: boolean): number {\r\n\t\tif (useContext !== undefined) {\r\n\t\t\treturn super.adaptivePredict(input, decision, outerContext, useContext);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tthis._input = input;\r\n\t\t\tthis._startIndex = input.index;\r\n\t\t\t// it's possible for SLL to reach a conflict state without consuming any input\r\n\t\t\tthis._sllStopIndex = this._startIndex - 1;\r\n\t\t\tthis._llStopIndex = -1;\r\n\t\t\tthis.currentDecision = decision;\r\n\t\t\tthis.currentState = undefined;\r\n\t\t\tthis.conflictingAltResolvedBySLL = ATN.INVALID_ALT_NUMBER;\r\n\t\t\tlet start: number[] = process.hrtime();\r\n\t\t\tlet alt: number = super.adaptivePredict(input, decision, outerContext);\r\n\t\t\tlet stop: number[] = process.hrtime();\r\n\r\n\t\t\tlet nanoseconds: number = (stop[0] - start[0]) * 1000000000;\r\n\t\t\tif (nanoseconds === 0) {\r\n\t\t\t\tnanoseconds = stop[1] - start[1];\r\n\t\t\t} else {\r\n\t\t\t\t// Add nanoseconds from start to end of that second, plus start of the end second to end\r\n\t\t\t\tnanoseconds += (1000000000 - start[1]) + stop[1];\r\n\t\t\t}\r\n\r\n\t\t\tthis.decisions[decision].timeInPrediction += nanoseconds;\r\n\t\t\tthis.decisions[decision].invocations++;\r\n\r\n\t\t\tlet SLL_k: number = this._sllStopIndex - this._startIndex + 1;\r\n\t\t\tthis.decisions[decision].SLL_TotalLook += SLL_k;\r\n\t\t\tthis.decisions[decision].SLL_MinLook = this.decisions[decision].SLL_MinLook === 0 ? SLL_k : Math.min(this.decisions[decision].SLL_MinLook, SLL_k);\r\n\t\t\tif (SLL_k > this.decisions[decision].SLL_MaxLook) {\r\n\t\t\t\tthis.decisions[decision].SLL_MaxLook = SLL_k;\r\n\t\t\t\tthis.decisions[decision].SLL_MaxLookEvent =\r\n\t\t\t\t\tnew LookaheadEventInfo(decision, undefined, alt, input, this._startIndex, this._sllStopIndex, false);\r\n\t\t\t}\r\n\r\n\t\t\tif (this._llStopIndex >= 0) {\r\n\t\t\t\tlet LL_k: number = this._llStopIndex - this._startIndex + 1;\r\n\t\t\t\tthis.decisions[decision].LL_TotalLook += LL_k;\r\n\t\t\t\tthis.decisions[decision].LL_MinLook = this.decisions[decision].LL_MinLook === 0 ? LL_k : Math.min(this.decisions[decision].LL_MinLook, LL_k);\r\n\t\t\t\tif (LL_k > this.decisions[decision].LL_MaxLook) {\r\n\t\t\t\t\tthis.decisions[decision].LL_MaxLook = LL_k;\r\n\t\t\t\t\tthis.decisions[decision].LL_MaxLookEvent =\r\n\t\t\t\t\t\tnew LookaheadEventInfo(decision, undefined, alt, input, this._startIndex, this._llStopIndex, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn alt;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tthis._input = undefined;\r\n\t\t\tthis.currentDecision = -1;\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tprotected getStartState(dfa: DFA, input: TokenStream, outerContext: ParserRuleContext, useContext: boolean): SimulatorState | undefined {\r\n\t\tlet state: SimulatorState | undefined = super.getStartState(dfa, input, outerContext, useContext);\r\n\t\tthis.currentState = state;\r\n\t\treturn state;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected computeStartState(dfa: DFA, globalContext: ParserRuleContext, useContext: boolean): SimulatorState {\r\n\t\tlet state: SimulatorState = super.computeStartState(dfa, globalContext, useContext);\r\n\t\tthis.currentState = state;\r\n\t\treturn state;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected computeReachSet(dfa: DFA, previous: SimulatorState, t: number, contextCache: PredictionContextCache): SimulatorState | undefined {\r\n\t\tif (this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tlet reachState: SimulatorState | undefined = super.computeReachSet(dfa, previous, t, contextCache);\r\n\t\tif (reachState == null) {\r\n\t\t\t// no reach on current lookahead symbol. ERROR.\r\n\t\t\tthis.decisions[this.currentDecision].errors.push(\r\n\t\t\t\tnew ErrorInfo(this.currentDecision, previous, this._input, this._startIndex, this._input.index),\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tthis.currentState = reachState;\r\n\t\treturn reachState;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected getExistingTargetState(previousD: DFAState, t: number): DFAState | undefined {\r\n\t\tif (this.currentState === undefined || this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\t// this method is called after each time the input position advances\r\n\t\tif (this.currentState.useContext) {\r\n\t\t\tthis._llStopIndex = this._input.index;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._sllStopIndex = this._input.index;\r\n\t\t}\r\n\r\n\t\tlet existingTargetState: DFAState | undefined = super.getExistingTargetState(previousD, t);\r\n\t\tif (existingTargetState != null) {\r\n\t\t\t// this method is directly called by execDFA; must construct a SimulatorState\r\n\t\t\t// to represent the current state for this case\r\n\t\t\tthis.currentState = new SimulatorState(this.currentState.outerContext, existingTargetState, this.currentState.useContext, this.currentState.remainingOuterContext);\r\n\r\n\t\t\tif (this.currentState.useContext) {\r\n\t\t\t\tthis.decisions[this.currentDecision].LL_DFATransitions++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.decisions[this.currentDecision].SLL_DFATransitions++; // count only if we transition over a DFA state\r\n\t\t\t}\r\n\r\n\t\t\tif (existingTargetState === ATNSimulator.ERROR) {\r\n\t\t\t\tlet state: SimulatorState = new SimulatorState(this.currentState.outerContext, previousD, this.currentState.useContext, this.currentState.remainingOuterContext);\r\n\t\t\t\tthis.decisions[this.currentDecision].errors.push(\r\n\t\t\t\t\tnew ErrorInfo(this.currentDecision, state, this._input, this._startIndex, this._input.index),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn existingTargetState;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected computeTargetState(dfa: DFA, s: DFAState, remainingGlobalContext: ParserRuleContext, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] {\r\n\t\tlet targetState: [DFAState, ParserRuleContext | undefined] = super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache);\r\n\r\n\t\tif (useContext) {\r\n\t\t\tthis.decisions[this.currentDecision].LL_ATNTransitions++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.decisions[this.currentDecision].SLL_ATNTransitions++;\r\n\t\t}\r\n\r\n\t\treturn targetState;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected evalSemanticContextImpl(pred: SemanticContext, parserCallStack: ParserRuleContext, alt: number): boolean {\r\n\t\tif (this.currentState === undefined || this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tlet result: boolean = super.evalSemanticContextImpl(pred, parserCallStack, alt);\r\n\t\tif (!(pred instanceof SemanticContext.PrecedencePredicate)) {\r\n\t\t\tlet fullContext: boolean = this._llStopIndex >= 0;\r\n\t\t\tlet stopIndex: number = fullContext ? this._llStopIndex : this._sllStopIndex;\r\n\t\t\tthis.decisions[this.currentDecision].predicateEvals.push(\r\n\t\t\t\tnew PredicateEvalInfo(this.currentState, this.currentDecision, this._input, this._startIndex, stopIndex, pred, result, alt),\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected reportContextSensitivity(dfa: DFA, prediction: number, acceptState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tif (prediction !== this.conflictingAltResolvedBySLL) {\r\n\t\t\tthis.decisions[this.currentDecision].contextSensitivities.push(\r\n\t\t\t\tnew ContextSensitivityInfo(this.currentDecision, acceptState, this._input, startIndex, stopIndex),\r\n\t\t\t);\r\n\t\t}\r\n\t\tsuper.reportContextSensitivity(dfa, prediction, acceptState, startIndex, stopIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected reportAttemptingFullContext(dfa: DFA, conflictingAlts: BitSet, conflictState: SimulatorState, startIndex: number, stopIndex: number): void {\r\n\t\tif (conflictingAlts != null) {\r\n\t\t\tthis.conflictingAltResolvedBySLL = conflictingAlts.nextSetBit(0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.conflictingAltResolvedBySLL = conflictState.s0.configs.getRepresentedAlternatives().nextSetBit(0);\r\n\t\t}\r\n\t\tthis.decisions[this.currentDecision].LL_Fallback++;\r\n\t\tsuper.reportAttemptingFullContext(dfa, conflictingAlts, conflictState, startIndex, stopIndex);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected reportAmbiguity(@NotNull dfa: DFA, D: DFAState, startIndex: number, stopIndex: number, exact: boolean, @NotNull ambigAlts: BitSet, @NotNull configs: ATNConfigSet): void {\r\n\t\tif (this.currentState === undefined || this._input === undefined) {\r\n\t\t\tthrow new Error(\"Invalid state\");\r\n\t\t}\r\n\r\n\t\tlet prediction: number;\r\n\t\tif (ambigAlts != null) {\r\n\t\t\tprediction = ambigAlts.nextSetBit(0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tprediction = configs.getRepresentedAlternatives().nextSetBit(0);\r\n\t\t}\r\n\t\tif (this.conflictingAltResolvedBySLL !== ATN.INVALID_ALT_NUMBER && prediction !== this.conflictingAltResolvedBySLL) {\r\n\t\t\t// Even though this is an ambiguity we are reporting, we can\r\n\t\t\t// still detect some context sensitivities. Both SLL and LL\r\n\t\t\t// are showing a conflict, hence an ambiguity, but if they resolve\r\n\t\t\t// to different minimum alternatives we have also identified a\r\n\t\t\t// context sensitivity.\r\n\t\t\tthis.decisions[this.currentDecision].contextSensitivities.push(\r\n\t\t\t\tnew ContextSensitivityInfo(this.currentDecision, this.currentState, this._input, startIndex, stopIndex),\r\n\t\t\t);\r\n\t\t}\r\n\t\tthis.decisions[this.currentDecision].ambiguities.push(\r\n\t\t\tnew AmbiguityInfo(this.currentDecision, this.currentState, ambigAlts, this._input, startIndex, stopIndex),\r\n\t\t);\r\n\t\tsuper.reportAmbiguity(dfa, D, startIndex, stopIndex, exact, ambigAlts, configs);\r\n\t}\r\n\r\n\t// ---------------------------------------------------------------------\r\n\r\n\tpublic getDecisionInfo(): DecisionInfo[] {\r\n\t\treturn this.decisions;\r\n\t}\r\n\r\n\tpublic getCurrentState(): SimulatorState | undefined {\r\n\t\treturn this.currentState;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.4399193-07:00\r\n\r\nimport * as assert from \"assert\";\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ANTLRErrorStrategy } from \"./ANTLRErrorStrategy\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNDeserializationOptions } from \"./atn/ATNDeserializationOptions\";\r\nimport { ATNDeserializer } from \"./atn/ATNDeserializer\";\r\nimport { ATNSimulator } from \"./atn/ATNSimulator\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { DefaultErrorStrategy } from \"./DefaultErrorStrategy\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { ErrorNode } from \"./tree/ErrorNode\";\r\nimport { IntegerStack } from \"./misc/IntegerStack\";\r\nimport { IntervalSet } from \"./misc/IntervalSet\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { Override, NotNull, Nullable } from \"./Decorators\";\r\nimport { ParseInfo } from \"./atn/ParseInfo\";\r\nimport { ParserATNSimulator } from \"./atn/ParserATNSimulator\";\r\nimport { ParserErrorListener } from \"./ParserErrorListener\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { ParseTreeListener } from \"./tree/ParseTreeListener\";\r\nimport { ParseTreePattern } from \"./tree/pattern/ParseTreePattern\";\r\nimport { ProxyParserErrorListener } from \"./ProxyParserErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { RuleTransition } from \"./atn/RuleTransition\";\r\nimport { TerminalNode } from \"./tree/TerminalNode\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { TokenStream } from \"./TokenStream\";\r\n\r\nclass TraceListener implements ParseTreeListener {\r\n\tconstructor(private ruleNames: string[], private tokenStream: TokenStream) {\r\n\t}\r\n\r\n\t@Override\r\n\tpublic enterEveryRule(ctx: ParserRuleContext): void {\r\n\t\tconsole.log(\"enter \" + this.ruleNames[ctx.ruleIndex] +\r\n\t\t\t\", LT(1)=\" + this.tokenStream.LT(1).text);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic exitEveryRule(ctx: ParserRuleContext): void {\r\n\t\tconsole.log(\"exit \" + this.ruleNames[ctx.ruleIndex] +\r\n\t\t\t\", LT(1)=\" + this.tokenStream.LT(1).text);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic visitErrorNode(node: ErrorNode): void {\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t@Override\r\n\tpublic visitTerminal(node: TerminalNode): void {\r\n\t\tlet parent = node.parent!.ruleContext;\r\n\t\tlet token: Token = node.symbol;\r\n\t\tconsole.log(\"consume \" + token + \" rule \" + this.ruleNames[parent.ruleIndex]);\r\n\t}\r\n}\r\n\r\n/** This is all the parsing support code essentially; most of it is error recovery stuff. */\r\nexport abstract class Parser extends Recognizer {\r\n\t/**\r\n\t * This field maps from the serialized ATN string to the deserialized {@link ATN} with\r\n\t * bypass alternatives.\r\n\t *\r\n\t * @see ATNDeserializationOptions.isGenerateRuleBypassTransitions\r\n\t */\r\n\tprivate static readonly bypassAltsAtnCache = new Map();\r\n\r\n\t/**\r\n\t * The error handling strategy for the parser. The default value is a new\r\n\t * instance of {@link DefaultErrorStrategy}.\r\n\t *\r\n\t * @see #getErrorHandler\r\n\t * @see #setErrorHandler\r\n\t */\r\n\t@NotNull\r\n\tprotected _errHandler: ANTLRErrorStrategy = new DefaultErrorStrategy();\r\n\r\n\t/**\r\n\t * The input stream.\r\n\t *\r\n\t * @see #getInputStream\r\n\t * @see #setInputStream\r\n\t */\r\n\tprotected _input!: TokenStream;\r\n\r\n\tprotected readonly _precedenceStack: IntegerStack = new IntegerStack();\r\n\r\n\t/**\r\n\t * The {@link ParserRuleContext} object for the currently executing rule.\r\n\t *\r\n\t * This is always non-undefined during the parsing process.\r\n\t */\r\n\tprotected _ctx!: ParserRuleContext;\r\n\r\n\t/**\r\n\t * Specifies whether or not the parser should construct a parse tree during\r\n\t * the parsing process. The default value is `true`.\r\n\t *\r\n\t * @see `buildParseTree`\r\n\t */\r\n\tprivate _buildParseTrees: boolean = true;\r\n\r\n\t/**\r\n\t * When {@link #setTrace}`(true)` is called, a reference to the\r\n\t * {@link TraceListener} is stored here so it can be easily removed in a\r\n\t * later call to {@link #setTrace}`(false)`. The listener itself is\r\n\t * implemented as a parser listener so this field is not directly used by\r\n\t * other parser methods.\r\n\t */\r\n\tprivate _tracer: TraceListener | undefined;\r\n\r\n\t/**\r\n\t * The list of {@link ParseTreeListener} listeners registered to receive\r\n\t * events during the parse.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tprotected _parseListeners: ParseTreeListener[] = [];\r\n\r\n\t/**\r\n\t * The number of syntax errors reported during parsing. This value is\r\n\t * incremented each time {@link #notifyErrorListeners} is called.\r\n\t */\r\n\tprotected _syntaxErrors: number = 0;\r\n\r\n\t/** Indicates parser has match()ed EOF token. See {@link #exitRule()}. */\r\n\tprotected matchedEOF: boolean = false;\r\n\r\n\tconstructor(input: TokenStream) {\r\n\t\tsuper();\r\n\t\tthis._precedenceStack.push(0);\r\n\t\tthis.inputStream = input;\r\n\t}\r\n\r\n\t/** reset the parser's state */\r\n\tpublic reset(): void;\r\n\tpublic reset(resetInput: boolean): void;\r\n\tpublic reset(resetInput?: boolean): void {\r\n\t\t// Note: this method executes when not parsing, so _ctx can be undefined\r\n\t\tif (resetInput === undefined || resetInput) {\r\n\t\t\tthis.inputStream.seek(0);\r\n\t\t}\r\n\r\n\t\tthis._errHandler.reset(this);\r\n\t\tthis._ctx = undefined as any;\r\n\t\tthis._syntaxErrors = 0;\r\n\t\tthis.matchedEOF = false;\r\n\t\tthis.isTrace = false;\r\n\t\tthis._precedenceStack.clear();\r\n\t\tthis._precedenceStack.push(0);\r\n\t\tlet interpreter: ATNSimulator = this.interpreter;\r\n\t\tif (interpreter != null) {\r\n\t\t\tinterpreter.reset();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Match current input symbol against `ttype`. If the symbol type\r\n\t * matches, {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are\r\n\t * called to complete the match process.\r\n\t *\r\n\t * If the symbol type does not match,\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is called on the current error\r\n\t * strategy to attempt recovery. If {@link #getBuildParseTree} is\r\n\t * `true` and the token index of the symbol returned by\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is -1, the symbol is added to\r\n\t * the parse tree by calling {@link #createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)}.\r\n\t *\r\n\t * @param ttype the token type to match\r\n\t * @returns the matched symbol\r\n\t * @ if the current input symbol did not match\r\n\t * `ttype` and the error strategy could not recover from the\r\n\t * mismatched symbol\r\n\t */\r\n\t@NotNull\r\n\tpublic match(ttype: number): Token {\r\n\t\tlet t: Token = this.currentToken;\r\n\t\tif (t.type === ttype) {\r\n\t\t\tif (ttype === Token.EOF) {\r\n\t\t\t\tthis.matchedEOF = true;\r\n\t\t\t}\r\n\t\t\tthis._errHandler.reportMatch(this);\r\n\t\t\tthis.consume();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tt = this._errHandler.recoverInline(this);\r\n\t\t\tif (this._buildParseTrees && t.tokenIndex === -1) {\r\n\t\t\t\t// we must have conjured up a new token during single token insertion\r\n\t\t\t\t// if it's not the current symbol\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, t));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * Match current input symbol as a wildcard. If the symbol type matches\r\n\t * (i.e. has a value greater than 0), {@link ANTLRErrorStrategy#reportMatch}\r\n\t * and {@link #consume} are called to complete the match process.\r\n\t *\r\n\t * If the symbol type does not match,\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is called on the current error\r\n\t * strategy to attempt recovery. If {@link #getBuildParseTree} is\r\n\t * `true` and the token index of the symbol returned by\r\n\t * {@link ANTLRErrorStrategy#recoverInline} is -1, the symbol is added to\r\n\t * the parse tree by calling {@link Parser#createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)}.\r\n\t *\r\n\t * @returns the matched symbol\r\n\t * @ if the current input symbol did not match\r\n\t * a wildcard and the error strategy could not recover from the mismatched\r\n\t * symbol\r\n\t */\r\n\t@NotNull\r\n\tpublic matchWildcard(): Token {\r\n\t\tlet t: Token = this.currentToken;\r\n\t\tif (t.type > 0) {\r\n\t\t\tthis._errHandler.reportMatch(this);\r\n\t\t\tthis.consume();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tt = this._errHandler.recoverInline(this);\r\n\t\t\tif (this._buildParseTrees && t.tokenIndex === -1) {\r\n\t\t\t\t// we must have conjured up a new token during single token insertion\r\n\t\t\t\t// if it's not the current symbol\r\n\t\t\t\tthis._ctx.addErrorNode(this.createErrorNode(this._ctx, t));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn t;\r\n\t}\r\n\r\n\t/**\r\n\t * Track the {@link ParserRuleContext} objects during the parse and hook\r\n\t * them up using the {@link ParserRuleContext#children} list so that it\r\n\t * forms a parse tree. The {@link ParserRuleContext} returned from the start\r\n\t * rule represents the root of the parse tree.\r\n\t *\r\n\t * Note that if we are not building parse trees, rule contexts only point\r\n\t * upwards. When a rule exits, it returns the context but that gets garbage\r\n\t * collected if nobody holds a reference. It points upwards but nobody\r\n\t * points at it.\r\n\t *\r\n\t * When we build parse trees, we are adding all of these contexts to\r\n\t * {@link ParserRuleContext#children} list. Contexts are then not candidates\r\n\t * for garbage collection.\r\n\t */\r\n\tset buildParseTree(buildParseTrees: boolean) {\r\n\t\tthis._buildParseTrees = buildParseTrees;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether or not a complete parse tree will be constructed while\r\n\t * parsing. This property is `true` for a newly constructed parser.\r\n\t *\r\n\t * @returns `true` if a complete parse tree will be constructed while\r\n\t * parsing, otherwise `false`\r\n\t */\r\n\tget buildParseTree(): boolean {\r\n\t\treturn this._buildParseTrees;\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getParseListeners(): ParseTreeListener[] {\r\n\t\treturn this._parseListeners;\r\n\t}\r\n\r\n\t/**\r\n\t * Registers `listener` to receive events during the parsing process.\r\n\t *\r\n\t * To support output-preserving grammar transformations (including but not\r\n\t * limited to left-recursion removal, automated left-factoring, and\r\n\t * optimized code generation), calls to listener methods during the parse\r\n\t * may differ substantially from calls made by\r\n\t * {@link ParseTreeWalker#DEFAULT} used after the parse is complete. In\r\n\t * particular, rule entry and exit events may occur in a different order\r\n\t * during the parse than after the parser. In addition, calls to certain\r\n\t * rule entry methods may be omitted.\r\n\t *\r\n\t * With the following specific exceptions, calls to listener events are\r\n\t * *deterministic*, i.e. for identical input the calls to listener\r\n\t * methods will be the same.\r\n\t *\r\n\t * * Alterations to the grammar used to generate code may change the\r\n\t * behavior of the listener calls.\r\n\t * * Alterations to the command line options passed to ANTLR 4 when\r\n\t * generating the parser may change the behavior of the listener calls.\r\n\t * * Changing the version of the ANTLR Tool used to generate the parser\r\n\t * may change the behavior of the listener calls.\r\n\t *\r\n\t * @param listener the listener to add\r\n\t *\r\n\t * @throws {@link TypeError} if `listener` is `undefined`\r\n\t */\r\n\tpublic addParseListener(@NotNull listener: ParseTreeListener): void {\r\n\t\tif (listener == null) {\r\n\t\t\tthrow new TypeError(\"listener cannot be null\");\r\n\t\t}\r\n\r\n\t\tthis._parseListeners.push(listener);\r\n\t}\r\n\r\n\t/**\r\n\t * Remove `listener` from the list of parse listeners.\r\n\t *\r\n\t * If `listener` is `undefined` or has not been added as a parse\r\n\t * listener, this method does nothing.\r\n\t *\r\n\t * @see #addParseListener\r\n\t *\r\n\t * @param listener the listener to remove\r\n\t */\r\n\tpublic removeParseListener(listener: ParseTreeListener): void {\r\n\t\tlet index = this._parseListeners.findIndex((l) => l === listener);\r\n\t\tif (index !== -1) {\r\n\t\t\tthis._parseListeners.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Remove all parse listeners.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tpublic removeParseListeners(): void {\r\n\t\tthis._parseListeners.length = 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Notify any parse listeners of an enter rule event.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tprotected triggerEnterRuleEvent(): void {\r\n\t\tfor (let listener of this._parseListeners) {\r\n\t\t\tif (listener.enterEveryRule) {\r\n\t\t\t\tlistener.enterEveryRule(this._ctx);\r\n\t\t\t}\r\n\r\n\t\t\tthis._ctx.enterRule(listener);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Notify any parse listeners of an exit rule event.\r\n\t *\r\n\t * @see #addParseListener\r\n\t */\r\n\tprotected triggerExitRuleEvent(): void {\r\n\t\t// reverse order walk of listeners\r\n\t\tfor (let i = this._parseListeners.length - 1; i >= 0; i--) {\r\n\t\t\tlet listener: ParseTreeListener = this._parseListeners[i];\r\n\t\t\tthis._ctx.exitRule(listener);\r\n\t\t\tif (listener.exitEveryRule) {\r\n\t\t\t\tlistener.exitEveryRule(this._ctx);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the number of syntax errors reported during parsing. This value is\r\n\t * incremented each time {@link #notifyErrorListeners} is called.\r\n\t *\r\n\t * @see #notifyErrorListeners\r\n\t */\r\n\tget numberOfSyntaxErrors(): number {\r\n\t\treturn this._syntaxErrors;\r\n\t}\r\n\r\n\tget tokenFactory(): TokenFactory {\r\n\t\treturn this._input.tokenSource.tokenFactory;\r\n\t}\r\n\r\n\t/**\r\n\t * The ATN with bypass alternatives is expensive to create so we create it\r\n\t * lazily.\r\n\t *\r\n\t * @ if the current parser does not\r\n\t * implement the `serializedATN` property.\r\n\t */\r\n\t@NotNull\r\n\tpublic getATNWithBypassAlts(): ATN {\r\n\t\tlet serializedAtn: string = this.serializedATN;\r\n\t\tif (serializedAtn == null) {\r\n\t\t\tthrow new Error(\"The current parser does not support an ATN with bypass alternatives.\");\r\n\t\t}\r\n\r\n\t\tlet result = Parser.bypassAltsAtnCache.get(serializedAtn);\r\n\t\tif (result == null) {\r\n\t\t\tlet deserializationOptions: ATNDeserializationOptions = new ATNDeserializationOptions();\r\n\t\t\tdeserializationOptions.isGenerateRuleBypassTransitions = true;\r\n\t\t\tresult = new ATNDeserializer(deserializationOptions).deserialize(Utils.toCharArray(serializedAtn));\r\n\t\t\tParser.bypassAltsAtnCache.set(serializedAtn, result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * The preferred method of getting a tree pattern. For example, here's a\r\n\t * sample use:\r\n\t *\r\n\t * ```\r\n\t * let t: ParseTree = parser.expr();\r\n\t * let p: ParseTreePattern = await parser.compileParseTreePattern(\"+0\", MyParser.RULE_expr);\r\n\t * let m: ParseTreeMatch = p.match(t);\r\n\t * let id: string = m.get(\"ID\");\r\n\t * ```\r\n\t */\r\n\tpublic compileParseTreePattern(pattern: string, patternRuleIndex: number): Promise;\r\n\r\n\t/**\r\n\t * The same as {@link #compileParseTreePattern(String, int)} but specify a\r\n\t * {@link Lexer} rather than trying to deduce it from this parser.\r\n\t */\r\n\tpublic compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): Promise;\r\n\r\n\tpublic async compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): Promise {\r\n\t\tif (!lexer) {\r\n\t\t\tif (this.inputStream) {\r\n\t\t\t\tlet tokenSource = this.inputStream.tokenSource;\r\n\t\t\t\tif (tokenSource instanceof Lexer) {\r\n\t\t\t\t\tlexer = tokenSource;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!lexer) {\r\n\t\t\t\tthrow new Error(\"Parser can't discover a lexer to use\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet currentLexer = lexer;\r\n\t\tlet m = await import(\"./tree/pattern/ParseTreePatternMatcher\");\r\n\t\tlet matcher = new m.ParseTreePatternMatcher(currentLexer, this);\r\n\t\treturn matcher.compile(pattern, patternRuleIndex);\r\n\t}\r\n\r\n\t@NotNull\r\n\tget errorHandler(): ANTLRErrorStrategy {\r\n\t\treturn this._errHandler;\r\n\t}\r\n\r\n\tset errorHandler(@NotNull handler: ANTLRErrorStrategy) {\r\n\t\tthis._errHandler = handler;\r\n\t}\r\n\r\n\t@Override\r\n\tget inputStream(): TokenStream {\r\n\t\treturn this._input;\r\n\t}\r\n\r\n\t/** Set the token stream and reset the parser. */\r\n\tset inputStream(input: TokenStream) {\r\n\t\tthis.reset(false);\r\n\t\tthis._input = input;\r\n\t}\r\n\r\n\t/** Match needs to return the current input symbol, which gets put\r\n\t * into the label for the associated token ref; e.g., x=ID.\r\n\t */\r\n\t@NotNull\r\n\tget currentToken(): Token {\r\n\t\treturn this._input.LT(1);\r\n\t}\r\n\r\n\tpublic notifyErrorListeners(/*@NotNull*/ msg: string): void;\r\n\tpublic notifyErrorListeners(/*@NotNull*/ msg: string, /*@NotNull*/ offendingToken: Token | null, e: RecognitionException | undefined): void;\r\n\r\n\tpublic notifyErrorListeners(msg: string, offendingToken?: Token | null, e?: RecognitionException | undefined): void {\r\n\t\tif (offendingToken === undefined) {\r\n\t\t\toffendingToken = this.currentToken;\r\n\t\t} else if (offendingToken === null) {\r\n\t\t\toffendingToken = undefined;\r\n\t\t}\r\n\r\n\t\tthis._syntaxErrors++;\r\n\t\tlet line: number = -1;\r\n\t\tlet charPositionInLine: number = -1;\r\n\t\tif (offendingToken != null) {\r\n\t\t\tline = offendingToken.line;\r\n\t\t\tcharPositionInLine = offendingToken.charPositionInLine;\r\n\t\t}\r\n\r\n\t\tlet listener = this.getErrorListenerDispatch();\r\n\t\tif (listener.syntaxError) {\r\n\t\t\tlistener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Consume and return the [current symbol](`currentToken`).\r\n\t *\r\n\t * E.g., given the following input with `A` being the current\r\n\t * lookahead symbol, this function moves the cursor to `B` and returns\r\n\t * `A`.\r\n\t *\r\n\t * ```\r\n\t * A B\r\n\t * ^\r\n\t * ```\r\n\t *\r\n\t * If the parser is not in error recovery mode, the consumed symbol is added\r\n\t * to the parse tree using {@link ParserRuleContext#addChild(TerminalNode)}, and\r\n\t * {@link ParseTreeListener#visitTerminal} is called on any parse listeners.\r\n\t * If the parser *is* in error recovery mode, the consumed symbol is\r\n\t * added to the parse tree using {@link #createErrorNode(ParserRuleContext, Token)} then\r\n\t * {@link ParserRuleContext#addErrorNode(ErrorNode)} and\r\n\t * {@link ParseTreeListener#visitErrorNode} is called on any parse\r\n\t * listeners.\r\n\t */\r\n\tpublic consume(): Token {\r\n\t\tlet o: Token = this.currentToken;\r\n\t\tif (o.type !== Parser.EOF) {\r\n\t\t\tthis.inputStream.consume();\r\n\t\t}\r\n\t\tlet hasListener: boolean = this._parseListeners.length !== 0;\r\n\t\tif (this._buildParseTrees || hasListener) {\r\n\t\t\tif (this._errHandler.inErrorRecoveryMode(this)) {\r\n\t\t\t\tlet node: ErrorNode = this._ctx.addErrorNode(this.createErrorNode(this._ctx, o));\r\n\t\t\t\tif (hasListener) {\r\n\t\t\t\t\tfor (let listener of this._parseListeners) {\r\n\t\t\t\t\t\tif (listener.visitErrorNode) {\r\n\t\t\t\t\t\t\tlistener.visitErrorNode(node);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlet node: TerminalNode = this.createTerminalNode(this._ctx, o);\r\n\t\t\t\tthis._ctx.addChild(node);\r\n\t\t\t\tif (hasListener) {\r\n\t\t\t\t\tfor (let listener of this._parseListeners) {\r\n\t\t\t\t\t\tif (listener.visitTerminal) {\r\n\t\t\t\t\t\t\tlistener.visitTerminal(node);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn o;\r\n\t}\r\n\r\n\t/**\r\n\t * How to create a token leaf node associated with a parent.\r\n\t * Typically, the terminal node to create is not a function of the parent.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic createTerminalNode(parent: ParserRuleContext, t: Token): TerminalNode {\r\n\t\treturn new TerminalNode(t);\r\n\t}\r\n\r\n\t/**\r\n\t * How to create an error node, given a token, associated with a parent.\r\n\t * Typically, the error node to create is not a function of the parent.\r\n\t *\r\n\t * @since 4.7\r\n\t */\r\n\tpublic createErrorNode(parent: ParserRuleContext, t: Token): ErrorNode {\r\n\t\treturn new ErrorNode(t);\r\n\t}\r\n\r\n\tprotected addContextToParseTree(): void {\r\n\t\tlet parent = this._ctx._parent as ParserRuleContext | undefined;\r\n\t\t// add current context to parent if we have a parent\r\n\t\tif (parent != null) {\r\n\t\t\tparent.addChild(this._ctx);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Always called by generated parsers upon entry to a rule. Access field\r\n\t * {@link #_ctx} get the current context.\r\n\t */\r\n\tpublic enterRule(@NotNull localctx: ParserRuleContext, state: number, ruleIndex: number): void {\r\n\t\tthis.state = state;\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = this._input.LT(1);\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tthis.addContextToParseTree();\r\n\t\t}\r\n\t\tthis.triggerEnterRuleEvent();\r\n\t}\r\n\r\n\tpublic enterLeftFactoredRule(localctx: ParserRuleContext, state: number, ruleIndex: number): void {\r\n\t\tthis.state = state;\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tlet factoredContext = this._ctx.getChild(this._ctx.childCount - 1) as ParserRuleContext;\r\n\t\t\tthis._ctx.removeLastChild();\r\n\t\t\tfactoredContext._parent = localctx;\r\n\t\t\tlocalctx.addChild(factoredContext);\r\n\t\t}\r\n\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = this._input.LT(1);\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tthis.addContextToParseTree();\r\n\t\t}\r\n\r\n\t\tthis.triggerEnterRuleEvent();\r\n\t}\r\n\r\n\tpublic exitRule(): void {\r\n\t\tif (this.matchedEOF) {\r\n\t\t\t// if we have matched EOF, it cannot consume past EOF so we use LT(1) here\r\n\t\t\tthis._ctx._stop = this._input.LT(1); // LT(1) will be end of file\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._ctx._stop = this._input.tryLT(-1); // stop node is what we just matched\r\n\t\t}\r\n\t\t// trigger event on _ctx, before it reverts to parent\r\n\t\tthis.triggerExitRuleEvent();\r\n\t\tthis.state = this._ctx.invokingState;\r\n\t\tthis._ctx = this._ctx._parent as ParserRuleContext;\r\n\t}\r\n\r\n\tpublic enterOuterAlt(localctx: ParserRuleContext, altNum: number): void {\r\n\t\tlocalctx.altNumber = altNum;\r\n\t\t// if we have new localctx, make sure we replace existing ctx\r\n\t\t// that is previous child of parse tree\r\n\t\tif (this._buildParseTrees && this._ctx !== localctx) {\r\n\t\t\tlet parent = this._ctx._parent as ParserRuleContext | undefined;\r\n\t\t\tif (parent != null) {\r\n\t\t\t\tparent.removeLastChild();\r\n\t\t\t\tparent.addChild(localctx);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._ctx = localctx;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the precedence level for the top-most precedence rule.\r\n\t *\r\n\t * @returns The precedence level for the top-most precedence rule, or -1 if\r\n\t * the parser context is not nested within a precedence rule.\r\n\t */\r\n\tget precedence(): number {\r\n\t\tif (this._precedenceStack.isEmpty) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\treturn this._precedenceStack.peek();\r\n\t}\r\n\r\n\tpublic enterRecursionRule(localctx: ParserRuleContext, state: number, ruleIndex: number, precedence: number): void {\r\n\t\tthis.state = state;\r\n\t\tthis._precedenceStack.push(precedence);\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = this._input.LT(1);\r\n\t\tthis.triggerEnterRuleEvent(); // simulates rule entry for left-recursive rules\r\n\t}\r\n\r\n\t/** Like {@link #enterRule} but for recursive rules.\r\n\t * Make the current context the child of the incoming localctx.\r\n\t */\r\n\tpublic pushNewRecursionContext(localctx: ParserRuleContext, state: number, ruleIndex: number): void {\r\n\t\tlet previous: ParserRuleContext = this._ctx;\r\n\t\tprevious._parent = localctx;\r\n\t\tprevious.invokingState = state;\r\n\t\tprevious._stop = this._input.tryLT(-1);\r\n\r\n\t\tthis._ctx = localctx;\r\n\t\tthis._ctx._start = previous._start;\r\n\t\tif (this._buildParseTrees) {\r\n\t\t\tthis._ctx.addChild(previous);\r\n\t\t}\r\n\r\n\t\tthis.triggerEnterRuleEvent(); // simulates rule entry for left-recursive rules\r\n\t}\r\n\r\n\tpublic unrollRecursionContexts(_parentctx: ParserRuleContext): void {\r\n\t\tthis._precedenceStack.pop();\r\n\t\tthis._ctx._stop = this._input.tryLT(-1);\r\n\t\tlet retctx: ParserRuleContext = this._ctx; // save current ctx (return value)\r\n\r\n\t\t// unroll so _ctx is as it was before call to recursive method\r\n\t\tif (this._parseListeners.length > 0) {\r\n\t\t\twhile (this._ctx !== _parentctx) {\r\n\t\t\t\tthis.triggerExitRuleEvent();\r\n\t\t\t\tthis._ctx = this._ctx._parent as ParserRuleContext;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._ctx = _parentctx;\r\n\t\t}\r\n\r\n\t\t// hook into tree\r\n\t\tretctx._parent = _parentctx;\r\n\r\n\t\tif (this._buildParseTrees && _parentctx != null) {\r\n\t\t\t// add return ctx into invoking rule's tree\r\n\t\t\t_parentctx.addChild(retctx);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getInvokingContext(ruleIndex: number): ParserRuleContext | undefined {\r\n\t\tlet p = this._ctx;\r\n\t\twhile (p && p.ruleIndex !== ruleIndex) {\r\n\t\t\tp = p._parent as ParserRuleContext;\r\n\t\t}\r\n\t\treturn p;\r\n\t}\r\n\r\n\tget context(): ParserRuleContext {\r\n\t\treturn this._ctx;\r\n\t}\r\n\r\n\tset context(ctx: ParserRuleContext) {\r\n\t\tthis._ctx = ctx;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic precpred(@Nullable localctx: RuleContext, precedence: number): boolean {\r\n\t\treturn precedence >= this._precedenceStack.peek();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic getErrorListenerDispatch(): ParserErrorListener {\r\n\t\treturn new ProxyParserErrorListener(this.getErrorListeners());\r\n\t}\r\n\r\n\tpublic inContext(context: string): boolean {\r\n\t\t// TODO: useful in parser?\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks whether or not `symbol` can follow the current state in the\r\n\t * ATN. The behavior of this method is equivalent to the following, but is\r\n\t * implemented such that the complete context-sensitive follow set does not\r\n\t * need to be explicitly constructed.\r\n\t *\r\n\t * ```\r\n\t * return getExpectedTokens().contains(symbol);\r\n\t * ```\r\n\t *\r\n\t * @param symbol the symbol type to check\r\n\t * @returns `true` if `symbol` can follow the current state in\r\n\t * the ATN, otherwise `false`.\r\n\t */\r\n\tpublic isExpectedToken(symbol: number): boolean {\r\n// \t\treturn interpreter.atn.nextTokens(_ctx);\r\n\t\tlet atn: ATN = this.interpreter.atn;\r\n\t\tlet ctx: ParserRuleContext = this._ctx;\r\n\t\tlet s: ATNState = atn.states[this.state];\r\n\t\tlet following: IntervalSet = atn.nextTokens(s);\r\n\t\tif (following.contains(symbol)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n// System.out.println(\"following \"+s+\"=\"+following);\r\n\t\tif (!following.contains(Token.EPSILON)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\twhile (ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {\r\n\t\t\tlet invokingState: ATNState = atn.states[ctx.invokingState];\r\n\t\t\tlet rt = invokingState.transition(0) as RuleTransition;\r\n\t\t\tfollowing = atn.nextTokens(rt.followState);\r\n\t\t\tif (following.contains(symbol)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tctx = ctx._parent as ParserRuleContext;\r\n\t\t}\r\n\r\n\t\tif (following.contains(Token.EPSILON) && symbol === Token.EOF) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tget isMatchedEOF(): boolean {\r\n\t\treturn this.matchedEOF;\r\n\t}\r\n\r\n\t/**\r\n\t * Computes the set of input symbols which could follow the current parser\r\n\t * state and context, as given by {@link #getState} and {@link #getContext},\r\n\t * respectively.\r\n\t *\r\n\t * @see ATN#getExpectedTokens(int, RuleContext)\r\n\t */\r\n\t@NotNull\r\n\tpublic getExpectedTokens(): IntervalSet {\r\n\t\treturn this.atn.getExpectedTokens(this.state, this.context);\r\n\t}\r\n\r\n\t@NotNull\r\n\tpublic getExpectedTokensWithinCurrentRule(): IntervalSet {\r\n\t\tlet atn: ATN = this.interpreter.atn;\r\n\t\tlet s: ATNState = atn.states[this.state];\r\n\t\treturn atn.nextTokens(s);\r\n\t}\r\n\r\n\t/** Get a rule's index (i.e., `RULE_ruleName` field) or -1 if not found. */\r\n\tpublic getRuleIndex(ruleName: string): number {\r\n\t\tlet ruleIndex = this.getRuleIndexMap().get(ruleName);\r\n\t\tif (ruleIndex != null) {\r\n\t\t\treturn ruleIndex;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}\r\n\r\n\tget ruleContext(): ParserRuleContext { return this._ctx; }\r\n\r\n\t/** Return List<String> of the rule names in your parser instance\r\n\t * leading up to a call to the current rule. You could override if\r\n\t * you want more details such as the file/line info of where\r\n\t * in the ATN a rule is invoked.\r\n\t *\r\n\t * This is very useful for error messages.\r\n\t */\r\n\r\n\tpublic getRuleInvocationStack(ctx: RuleContext = this._ctx): string[] {\r\n\t\tlet p: RuleContext | undefined = ctx; \t\t// Workaround for Microsoft/TypeScript#14487\r\n\t\tlet ruleNames: string[] = this.ruleNames;\r\n\t\tlet stack: string[] = [];\r\n\t\twhile (p != null) {\r\n\t\t\t// compute what follows who invoked us\r\n\t\t\tlet ruleIndex: number = p.ruleIndex;\r\n\t\t\tif (ruleIndex < 0) {\r\n\t\t\t\tstack.push(\"n/a\");\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(ruleNames[ruleIndex]);\r\n\t\t\t}\r\n\t\t\tp = p._parent as RuleContext;\r\n\t\t}\r\n\t\treturn stack;\r\n\t}\r\n\r\n\t/** For debugging and other purposes. */\r\n\tpublic getDFAStrings(): string[] {\r\n\t\tlet s: string[] = [];\r\n\t\tfor (let dfa of this._interp.atn.decisionToDFA) {\r\n\t\t\ts.push(dfa.toString(this.vocabulary, this.ruleNames));\r\n\t\t}\r\n\t\treturn s;\r\n\t}\r\n\r\n\t/** For debugging and other purposes. */\r\n\tpublic dumpDFA(): void {\r\n\t\tlet seenOne: boolean = false;\r\n\t\tfor (let dfa of this._interp.atn.decisionToDFA) {\r\n\t\t\tif (!dfa.isEmpty) {\r\n\t\t\t\tif (seenOne) {\r\n\t\t\t\t\tconsole.log();\r\n\t\t\t\t}\r\n\t\t\t\tconsole.log(\"Decision \" + dfa.decision + \":\");\r\n\t\t\t\tprocess.stdout.write(dfa.toString(this.vocabulary, this.ruleNames));\r\n\t\t\t\tseenOne = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tget sourceName(): string {\r\n\t\treturn this._input.sourceName;\r\n\t}\r\n\r\n\t@Override\r\n\tget parseInfo(): Promise {\r\n\t\treturn import(\"./atn/ProfilingATNSimulator\").then((m) => {\r\n\t\t\tlet interp: ParserATNSimulator = this.interpreter;\r\n\t\t\tif (interp instanceof m.ProfilingATNSimulator) {\r\n\t\t\t\treturn new ParseInfo(interp);\r\n\t\t\t}\r\n\r\n\t\t\treturn undefined;\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * @since 4.3\r\n\t */\r\n\tpublic async setProfile(profile: boolean): Promise {\r\n\t\tlet m = await import(\"./atn/ProfilingATNSimulator\");\r\n\t\tlet interp: ParserATNSimulator = this.interpreter;\r\n\t\tif (profile) {\r\n\t\t\tif (!(interp instanceof m.ProfilingATNSimulator)) {\r\n\t\t\t\tthis.interpreter = new m.ProfilingATNSimulator(this);\r\n\t\t\t}\r\n\t\t} else if (interp instanceof m.ProfilingATNSimulator) {\r\n\t\t\tthis.interpreter = new ParserATNSimulator(this.atn, this);\r\n\t\t}\r\n\r\n\t\tthis.interpreter.setPredictionMode(interp.getPredictionMode());\r\n\t}\r\n\r\n\t/** During a parse is sometimes useful to listen in on the rule entry and exit\r\n\t * events as well as token matches. This is for quick and dirty debugging.\r\n\t */\r\n\tset isTrace(trace: boolean) {\r\n\t\tif (!trace) {\r\n\t\t\tif (this._tracer) {\r\n\t\t\t\tthis.removeParseListener(this._tracer);\r\n\t\t\t\tthis._tracer = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this._tracer) {\r\n\t\t\t\tthis.removeParseListener(this._tracer);\r\n\t\t\t} else {\r\n\t\t\t\tthis._tracer = new TraceListener(this.ruleNames, this._input);\r\n\t\t\t}\r\n\r\n\t\t\tthis.addParseListener(this._tracer);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets whether a {@link TraceListener} is registered as a parse listener\r\n\t * for the parser.\r\n\t */\r\n\tget isTrace(): boolean {\r\n\t\treturn this._tracer != null;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.3255548-07:00\r\n\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { NotNull } from \"./Decorators\";\r\n\r\n/** Indicates that the parser could not decide which of two or more paths\r\n * to take based upon the remaining input. It tracks the starting token\r\n * of the offending input and also knows where the parser was\r\n * in the various paths when the error. Reported by reportNoViableAlternative()\r\n */\r\nexport class NoViableAltException extends RecognitionException {\r\n\t//private static serialVersionUID: number = 5096000008992867052L;\r\n\r\n\t/** Which configurations did we try at input.index that couldn't match input.LT(1)? */\r\n\tprivate _deadEndConfigs?: ATNConfigSet;\r\n\r\n\t/** The token object at the start index; the input stream might\r\n\t * \tnot be buffering tokens so get a reference to it. (At the\r\n\t * time the error occurred, of course the stream needs to keep a\r\n\t * buffer all of the tokens but later we might not have access to those.)\r\n\t */\r\n\t@NotNull\r\n\tprivate _startToken: Token;\r\n\r\n\tconstructor(/*@NotNull*/ recognizer: Parser);\r\n\tconstructor(\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Recognizer,\r\n\t\t/*@NotNull*/\r\n\t\tinput: TokenStream,\r\n\t\t/*@NotNull*/\r\n\t\tstartToken: Token,\r\n\t\t/*@NotNull*/\r\n\t\toffendingToken: Token,\r\n\t\tdeadEndConfigs: ATNConfigSet | undefined,\r\n\t\t/*@NotNull*/\r\n\t\tctx: ParserRuleContext);\r\n\r\n\tconstructor(\r\n\t\trecognizer: Recognizer,\r\n\t\tinput?: TokenStream,\r\n\t\tstartToken?: Token,\r\n\t\toffendingToken?: Token,\r\n\t\tdeadEndConfigs?: ATNConfigSet,\r\n\t\tctx?: ParserRuleContext) {\r\n\t\tif (recognizer instanceof Parser) {\r\n\t\t\tif (input === undefined) {\r\n\t\t\t\tinput = recognizer.inputStream;\r\n\t\t\t}\r\n\r\n\t\t\tif (startToken === undefined) {\r\n\t\t\t\tstartToken = recognizer.currentToken;\r\n\t\t\t}\r\n\r\n\t\t\tif (offendingToken === undefined) {\r\n\t\t\t\toffendingToken = recognizer.currentToken;\r\n\t\t\t}\r\n\r\n\t\t\tif (ctx === undefined) {\r\n\t\t\t\tctx = recognizer.context;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsuper(recognizer, input, ctx);\r\n\t\tthis._deadEndConfigs = deadEndConfigs;\r\n\t\tthis._startToken = startToken as Token;\r\n\t\tthis.setOffendingToken(recognizer, offendingToken);\r\n\t}\r\n\r\n\tget startToken(): Token {\r\n\t\treturn this._startToken;\r\n\t}\r\n\r\n\tget deadEndConfigs(): ATNConfigSet | undefined {\r\n\t\treturn this._deadEndConfigs;\r\n\t}\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.8290527-07:00\r\n\r\nimport { ANTLRErrorStrategy } from \"./ANTLRErrorStrategy\";\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNState } from \"./atn/ATNState\";\r\nimport { ATNStateType } from \"./atn/ATNStateType\";\r\nimport { FailedPredicateException } from \"./FailedPredicateException\";\r\nimport { InputMismatchException } from \"./InputMismatchException\";\r\nimport { IntervalSet } from \"./misc/IntervalSet\";\r\nimport { NoViableAltException } from \"./NoViableAltException\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { PredictionContext } from \"./atn/PredictionContext\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { RuleTransition } from \"./atn/RuleTransition\";\r\nimport { TokenStream } from \"./TokenStream\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\nimport { TokenSource } from \"./TokenSource\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\nimport { Override, NotNull } from \"./Decorators\";\r\n\r\n/**\r\n * This is the default implementation of {@link ANTLRErrorStrategy} used for\r\n * error reporting and recovery in ANTLR parsers.\r\n */\r\nexport class DefaultErrorStrategy implements ANTLRErrorStrategy {\r\n\t/**\r\n\t * Indicates whether the error strategy is currently \"recovering from an\r\n\t * error\". This is used to suppress reporting multiple error messages while\r\n\t * attempting to recover from a detected syntax error.\r\n\t *\r\n\t * @see #inErrorRecoveryMode\r\n\t */\r\n\tprotected errorRecoveryMode: boolean = false;\r\n\r\n\t/** The index into the input stream where the last error occurred.\r\n\t * \tThis is used to prevent infinite loops where an error is found\r\n\t * but no token is consumed during recovery...another error is found,\r\n\t * ad nauseum. This is a failsafe mechanism to guarantee that at least\r\n\t * one token/tree node is consumed for two errors.\r\n\t */\r\n\tprotected lastErrorIndex: number = -1;\r\n\r\n\tprotected lastErrorStates?: IntervalSet;\r\n\r\n\t/**\r\n\t * This field is used to propagate information about the lookahead following\r\n\t * the previous match. Since prediction prefers completing the current rule\r\n\t * to error recovery efforts, error reporting may occur later than the\r\n\t * original point where it was discoverable. The original context is used to\r\n\t * compute the true expected sets as though the reporting occurred as early\r\n\t * as possible.\r\n\t */\r\n\tprotected nextTokensContext?: ParserRuleContext;\r\n\r\n\t/**\r\n\t * @see #nextTokensContext\r\n\t */\r\n\tprotected nextTokensState: number = ATNState.INVALID_STATE_NUMBER;\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation simply calls {@link #endErrorCondition} to\r\n\t * ensure that the handler is not in error recovery mode.\r\n\t */\r\n\t@Override\r\n\tpublic reset(recognizer: Parser): void {\r\n\t\tthis.endErrorCondition(recognizer);\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to enter error recovery mode when a recognition\r\n\t * exception is reported.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\tprotected beginErrorCondition(@NotNull recognizer: Parser): void {\r\n\t\tthis.errorRecoveryMode = true;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t */\r\n\t@Override\r\n\tpublic inErrorRecoveryMode(recognizer: Parser): boolean {\r\n\t\treturn this.errorRecoveryMode;\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to leave error recovery mode after recovering from\r\n\t * a recognition exception.\r\n\t *\r\n\t * @param recognizer\r\n\t */\r\n\tprotected endErrorCondition(@NotNull recognizer: Parser): void {\r\n\t\tthis.errorRecoveryMode = false;\r\n\t\tthis.lastErrorStates = undefined;\r\n\t\tthis.lastErrorIndex = -1;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation simply calls {@link #endErrorCondition}.\r\n\t */\r\n\t@Override\r\n\tpublic reportMatch(recognizer: Parser): void {\r\n\t\tthis.endErrorCondition(recognizer);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation returns immediately if the handler is already\r\n\t * in error recovery mode. Otherwise, it calls {@link #beginErrorCondition}\r\n\t * and dispatches the reporting task based on the runtime type of `e`\r\n\t * according to the following table.\r\n\t *\r\n\t * * {@link NoViableAltException}: Dispatches the call to\r\n\t * {@link #reportNoViableAlternative}\r\n\t * * {@link InputMismatchException}: Dispatches the call to\r\n\t * {@link #reportInputMismatch}\r\n\t * * {@link FailedPredicateException}: Dispatches the call to\r\n\t * {@link #reportFailedPredicate}\r\n\t * * All other types: calls {@link Parser#notifyErrorListeners} to report\r\n\t * the exception\r\n\t */\r\n\t@Override\r\n\tpublic reportError(\r\n\t\trecognizer: Parser,\r\n\t\te: RecognitionException): void {\r\n\t\t// if we've already reported an error and have not matched a token\r\n\t\t// yet successfully, don't report any errors.\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n//\t\t\tSystem.err.print(\"[SPURIOUS] \");\r\n\t\t\treturn; // don't report spurious errors\r\n\t\t}\r\n\t\tthis.beginErrorCondition(recognizer);\r\n\t\tif (e instanceof NoViableAltException) {\r\n\t\t\tthis.reportNoViableAlternative(recognizer, e);\r\n\t\t}\r\n\t\telse if (e instanceof InputMismatchException) {\r\n\t\t\tthis.reportInputMismatch(recognizer, e);\r\n\t\t}\r\n\t\telse if (e instanceof FailedPredicateException) {\r\n\t\t\tthis.reportFailedPredicate(recognizer, e);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tconsole.error(`unknown recognition error type: ${e}`);\r\n\t\t\tthis.notifyErrorListeners(recognizer, e.toString(), e);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected notifyErrorListeners(@NotNull recognizer: Parser, message: string, e: RecognitionException): void {\r\n\t\tlet offendingToken: Token | null | undefined = e.getOffendingToken(recognizer);\r\n\t\tif (offendingToken === undefined) {\r\n\t\t\t// Pass null to notifyErrorListeners so it in turn calls the error listeners with undefined as the offending\r\n\t\t\t// token. If we passed undefined, it would instead call the listeners with currentToken from the parser.\r\n\t\t\toffendingToken = null;\r\n\t\t}\r\n\r\n\t\trecognizer.notifyErrorListeners(message, offendingToken, e);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation resynchronizes the parser by consuming tokens\r\n\t * until we find one in the resynchronization set--loosely the set of tokens\r\n\t * that can follow the current rule.\r\n\t */\r\n\t@Override\r\n\tpublic recover(recognizer: Parser, e: RecognitionException): void {\r\n//\t\tSystem.out.println(\"recover in \"+recognizer.getRuleInvocationStack()+\r\n//\t\t\t\t\t\t \" index=\"+recognizer.inputStream.index+\r\n//\t\t\t\t\t\t \", lastErrorIndex=\"+\r\n//\t\t\t\t\t\t lastErrorIndex+\r\n//\t\t\t\t\t\t \", states=\"+lastErrorStates);\r\n\t\tif (this.lastErrorIndex === recognizer.inputStream.index &&\r\n\t\t\tthis.lastErrorStates &&\r\n\t\t\tthis.lastErrorStates.contains(recognizer.state)) {\r\n\t\t\t// uh oh, another error at same token index and previously-visited\r\n\t\t\t// state in ATN; must be a case where LT(1) is in the recovery\r\n\t\t\t// token set so nothing got consumed. Consume a single token\r\n\t\t\t// at least to prevent an infinite loop; this is a failsafe.\r\n//\t\t\tSystem.err.println(\"seen error condition before index=\"+\r\n//\t\t\t\t\t\t\t lastErrorIndex+\", states=\"+lastErrorStates);\r\n//\t\t\tSystem.err.println(\"FAILSAFE consumes \"+recognizer.getTokenNames()[recognizer.inputStream.LA(1)]);\r\n\t\t\trecognizer.consume();\r\n\t\t}\r\n\t\tthis.lastErrorIndex = recognizer.inputStream.index;\r\n\t\tif (!this.lastErrorStates) {\r\n\t\t\tthis.lastErrorStates = new IntervalSet();\r\n\t\t}\r\n\t\tthis.lastErrorStates.add(recognizer.state);\r\n\t\tlet followSet: IntervalSet = this.getErrorRecoverySet(recognizer);\r\n\t\tthis.consumeUntil(recognizer, followSet);\r\n\t}\r\n\r\n\t/**\r\n\t * The default implementation of {@link ANTLRErrorStrategy#sync} makes sure\r\n\t * that the current lookahead symbol is consistent with what were expecting\r\n\t * at this point in the ATN. You can call this anytime but ANTLR only\r\n\t * generates code to check before subrules/loops and each iteration.\r\n\t *\r\n\t * Implements Jim Idle's magic sync mechanism in closures and optional\r\n\t * subrules. E.g.,\r\n\t *\r\n\t * ```antlr\r\n\t * a : sync ( stuff sync )* ;\r\n\t * sync : {consume to what can follow sync} ;\r\n\t * ```\r\n\t *\r\n\t * At the start of a sub rule upon error, {@link #sync} performs single\r\n\t * token deletion, if possible. If it can't do that, it bails on the current\r\n\t * rule and uses the default error recovery, which consumes until the\r\n\t * resynchronization set of the current rule.\r\n\t *\r\n\t * If the sub rule is optional (`(...)?`, `(...)*`, or block\r\n\t * with an empty alternative), then the expected set includes what follows\r\n\t * the subrule.\r\n\t *\r\n\t * During loop iteration, it consumes until it sees a token that can start a\r\n\t * sub rule or what follows loop. Yes, that is pretty aggressive. We opt to\r\n\t * stay in the loop as long as possible.\r\n\t *\r\n\t * **ORIGINS**\r\n\t *\r\n\t * Previous versions of ANTLR did a poor job of their recovery within loops.\r\n\t * A single mismatch token or missing token would force the parser to bail\r\n\t * out of the entire rules surrounding the loop. So, for rule\r\n\t *\r\n\t * ```antlr\r\n\t * classDef : 'class' ID '{' member* '}'\r\n\t * ```\r\n\t *\r\n\t * input with an extra token between members would force the parser to\r\n\t * consume until it found the next class definition rather than the next\r\n\t * member definition of the current class.\r\n\t *\r\n\t * This functionality cost a little bit of effort because the parser has to\r\n\t * compare token set at the start of the loop and at each iteration. If for\r\n\t * some reason speed is suffering for you, you can turn off this\r\n\t * functionality by simply overriding this method as a blank { }.\r\n\t */\r\n\t@Override\r\n\tpublic sync(recognizer: Parser): void {\r\n\t\tlet s: ATNState = recognizer.interpreter.atn.states[recognizer.state];\r\n//\t\tSystem.err.println(\"sync @ \"+s.stateNumber+\"=\"+s.getClass().getSimpleName());\r\n\t\t// If already recovering, don't try to sync\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet tokens: TokenStream = recognizer.inputStream;\r\n\t\tlet la: number = tokens.LA(1);\r\n\r\n\t\t// try cheaper subset first; might get lucky. seems to shave a wee bit off\r\n\t\tlet nextTokens: IntervalSet = recognizer.atn.nextTokens(s);\r\n\t\tif (nextTokens.contains(la)) {\r\n\t\t\t// We are sure the token matches\r\n\t\t\tthis.nextTokensContext = undefined;\r\n\t\t\tthis.nextTokensState = ATNState.INVALID_STATE_NUMBER;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (nextTokens.contains(Token.EPSILON)) {\r\n\t\t\tif (this.nextTokensContext === undefined) {\r\n\t\t\t\t// It's possible the next token won't match; information tracked\r\n\t\t\t\t// by sync is restricted for performance.\r\n\t\t\t\tthis.nextTokensContext = recognizer.context;\r\n\t\t\t\tthis.nextTokensState = recognizer.state;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tswitch (s.stateType) {\r\n\t\tcase ATNStateType.BLOCK_START:\r\n\t\tcase ATNStateType.STAR_BLOCK_START:\r\n\t\tcase ATNStateType.PLUS_BLOCK_START:\r\n\t\tcase ATNStateType.STAR_LOOP_ENTRY:\r\n\t\t\t// report error and recover if possible\r\n\t\t\tif (this.singleTokenDeletion(recognizer)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthrow new InputMismatchException(recognizer);\r\n\r\n\t\tcase ATNStateType.PLUS_LOOP_BACK:\r\n\t\tcase ATNStateType.STAR_LOOP_BACK:\r\n//\t\t\tSystem.err.println(\"at loop back: \"+s.getClass().getSimpleName());\r\n\t\t\tthis.reportUnwantedToken(recognizer);\r\n\t\t\tlet expecting: IntervalSet = recognizer.getExpectedTokens();\r\n\t\t\tlet whatFollowsLoopIterationOrRule: IntervalSet =\r\n\t\t\t\texpecting.or(this.getErrorRecoverySet(recognizer));\r\n\t\t\tthis.consumeUntil(recognizer, whatFollowsLoopIterationOrRule);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\t// do nothing if we can't identify the exact kind of ATN state\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This is called by {@link #reportError} when the exception is a\r\n\t * {@link NoViableAltException}.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception\r\n\t */\r\n\tprotected reportNoViableAlternative(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull e: NoViableAltException): void {\r\n\t\tlet tokens: TokenStream = recognizer.inputStream;\r\n\t\tlet input: string;\r\n\t\tif (tokens) {\r\n\t\t\tif (e.startToken.type === Token.EOF) {\r\n\t\t\t\tinput = \"\";\r\n\t\t\t} else {\r\n\t\t\t\tinput = tokens.getTextFromRange(e.startToken, e.getOffendingToken());\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tinput = \"\";\r\n\t\t}\r\n\t\tlet msg: string = \"no viable alternative at input \" + this.escapeWSAndQuote(input);\r\n\t\tthis.notifyErrorListeners(recognizer, msg, e);\r\n\t}\r\n\r\n\t/**\r\n\t * This is called by {@link #reportError} when the exception is an\r\n\t * {@link InputMismatchException}.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception\r\n\t */\r\n\tprotected reportInputMismatch(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull e: InputMismatchException): void {\r\n\t\tlet expected = e.expectedTokens;\r\n\t\tlet expectedString = expected ? expected.toStringVocabulary(recognizer.vocabulary) : \"\";\r\n\t\tlet msg: string = \"mismatched input \" + this.getTokenErrorDisplay(e.getOffendingToken(recognizer)) +\r\n\t\t\t\" expecting \" + expectedString;\r\n\t\tthis.notifyErrorListeners(recognizer, msg, e);\r\n\t}\r\n\r\n\t/**\r\n\t * This is called by {@link #reportError} when the exception is a\r\n\t * {@link FailedPredicateException}.\r\n\t *\r\n\t * @see #reportError\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param e the recognition exception\r\n\t */\r\n\tprotected reportFailedPredicate(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull e: FailedPredicateException): void {\r\n\t\tlet ruleName: string = recognizer.ruleNames[recognizer.context.ruleIndex];\r\n\t\tlet msg: string = \"rule \" + ruleName + \" \" + e.message;\r\n\t\tthis.notifyErrorListeners(recognizer, msg, e);\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to report a syntax error which requires the removal\r\n\t * of a token from the input stream. At the time this method is called, the\r\n\t * erroneous symbol is current `LT(1)` symbol and has not yet been\r\n\t * removed from the input stream. When this method returns,\r\n\t * `recognizer` is in error recovery mode.\r\n\t *\r\n\t * This method is called when {@link #singleTokenDeletion} identifies\r\n\t * single-token deletion as a viable recovery strategy for a mismatched\r\n\t * input error.\r\n\t *\r\n\t * The default implementation simply returns if the handler is already in\r\n\t * error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to\r\n\t * enter error recovery mode, followed by calling\r\n\t * {@link Parser#notifyErrorListeners}.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\tprotected reportUnwantedToken(@NotNull recognizer: Parser): void {\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.beginErrorCondition(recognizer);\r\n\r\n\t\tlet t: Token = recognizer.currentToken;\r\n\t\tlet tokenName: string = this.getTokenErrorDisplay(t);\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tlet msg: string = \"extraneous input \" + tokenName + \" expecting \" +\r\n\t\t\texpecting.toStringVocabulary(recognizer.vocabulary);\r\n\t\trecognizer.notifyErrorListeners(msg, t, undefined);\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called to report a syntax error which requires the\r\n\t * insertion of a missing token into the input stream. At the time this\r\n\t * method is called, the missing token has not yet been inserted. When this\r\n\t * method returns, `recognizer` is in error recovery mode.\r\n\t *\r\n\t * This method is called when {@link #singleTokenInsertion} identifies\r\n\t * single-token insertion as a viable recovery strategy for a mismatched\r\n\t * input error.\r\n\t *\r\n\t * The default implementation simply returns if the handler is already in\r\n\t * error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to\r\n\t * enter error recovery mode, followed by calling\r\n\t * {@link Parser#notifyErrorListeners}.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t */\r\n\tprotected reportMissingToken(@NotNull recognizer: Parser): void {\r\n\t\tif (this.inErrorRecoveryMode(recognizer)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.beginErrorCondition(recognizer);\r\n\r\n\t\tlet t: Token = recognizer.currentToken;\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tlet msg: string = \"missing \" + expecting.toStringVocabulary(recognizer.vocabulary) +\r\n\t\t\t\" at \" + this.getTokenErrorDisplay(t);\r\n\r\n\t\trecognizer.notifyErrorListeners(msg, t, undefined);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation attempts to recover from the mismatched input\r\n\t * by using single token insertion and deletion as described below. If the\r\n\t * recovery attempt fails, this method\r\n\t * {@link InputMismatchException}.\r\n\t *\r\n\t * **EXTRA TOKEN** (single token deletion)\r\n\t *\r\n\t * `LA(1)` is not what we are looking for. If `LA(2)` has the\r\n\t * right token, however, then assume `LA(1)` is some extra spurious\r\n\t * token and delete it. Then consume and return the next token (which was\r\n\t * the `LA(2)` token) as the successful result of the match operation.\r\n\t *\r\n\t * This recovery strategy is implemented by {@link #singleTokenDeletion}.\r\n\t *\r\n\t * **MISSING TOKEN** (single token insertion)\r\n\t *\r\n\t * If current token (at `LA(1)`) is consistent with what could come\r\n\t * after the expected `LA(1)` token, then assume the token is missing\r\n\t * and use the parser's {@link TokenFactory} to create it on the fly. The\r\n\t * \"insertion\" is performed by returning the created token as the successful\r\n\t * result of the match operation.\r\n\t *\r\n\t * This recovery strategy is implemented by {@link #singleTokenInsertion}.\r\n\t *\r\n\t * **EXAMPLE**\r\n\t *\r\n\t * For example, Input `i=(3;` is clearly missing the `')'`. When\r\n\t * the parser returns from the nested call to `expr`, it will have\r\n\t * call chain:\r\n\t *\r\n\t * ```\r\n\t * stat \u2192 expr \u2192 atom\r\n\t * ```\r\n\t *\r\n\t * and it will be trying to match the `')'` at this point in the\r\n\t * derivation:\r\n\t *\r\n\t * ```\r\n\t * => ID '=' '(' INT ')' ('+' atom)* ';'\r\n\t * ^\r\n\t * ```\r\n\t *\r\n\t * The attempt to match `')'` will fail when it sees `';'` and\r\n\t * call {@link #recoverInline}. To recover, it sees that `LA(1)==';'`\r\n\t * is in the set of tokens that can follow the `')'` token reference\r\n\t * in rule `atom`. It can assume that you forgot the `')'`.\r\n\t */\r\n\t@Override\r\n\tpublic recoverInline(recognizer: Parser): Token {\r\n\t\t// SINGLE TOKEN DELETION\r\n\t\tlet matchedSymbol = this.singleTokenDeletion(recognizer);\r\n\t\tif (matchedSymbol) {\r\n\t\t\t// we have deleted the extra token.\r\n\t\t\t// now, move past ttype token as if all were ok\r\n\t\t\trecognizer.consume();\r\n\t\t\treturn matchedSymbol;\r\n\t\t}\r\n\r\n\t\t// SINGLE TOKEN INSERTION\r\n\t\tif (this.singleTokenInsertion(recognizer)) {\r\n\t\t\treturn this.getMissingSymbol(recognizer);\r\n\t\t}\r\n\r\n\t\t// even that didn't work; must throw the exception\r\n\t\tif (this.nextTokensContext === undefined) {\r\n\t\t\tthrow new InputMismatchException(recognizer);\r\n\t\t} else {\r\n\t\t\tthrow new InputMismatchException(recognizer, this.nextTokensState, this.nextTokensContext);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This method implements the single-token insertion inline error recovery\r\n\t * strategy. It is called by {@link #recoverInline} if the single-token\r\n\t * deletion strategy fails to recover from the mismatched input. If this\r\n\t * method returns `true`, `recognizer` will be in error recovery\r\n\t * mode.\r\n\t *\r\n\t * This method determines whether or not single-token insertion is viable by\r\n\t * checking if the `LA(1)` input symbol could be successfully matched\r\n\t * if it were instead the `LA(2)` symbol. If this method returns\r\n\t * `true`, the caller is responsible for creating and inserting a\r\n\t * token with the correct type to produce this behavior.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @returns `true` if single-token insertion is a viable recovery\r\n\t * strategy for the current mismatched input, otherwise `false`\r\n\t */\r\n\tprotected singleTokenInsertion(@NotNull recognizer: Parser): boolean {\r\n\t\tlet currentSymbolType: number = recognizer.inputStream.LA(1);\r\n\t\t// if current token is consistent with what could come after current\r\n\t\t// ATN state, then we know we're missing a token; error recovery\r\n\t\t// is free to conjure up and insert the missing token\r\n\t\tlet currentState = recognizer.interpreter.atn.states[recognizer.state];\r\n\t\tlet next: ATNState = currentState.transition(0).target;\r\n\t\tlet atn: ATN = recognizer.interpreter.atn;\r\n\t\tlet expectingAtLL2: IntervalSet = atn.nextTokens(next, PredictionContext.fromRuleContext(atn, recognizer.context));\r\n//\t\tconsole.warn(\"LT(2) set=\"+expectingAtLL2.toString(recognizer.getTokenNames()));\r\n\t\tif (expectingAtLL2.contains(currentSymbolType)) {\r\n\t\t\tthis.reportMissingToken(recognizer);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * This method implements the single-token deletion inline error recovery\r\n\t * strategy. It is called by {@link #recoverInline} to attempt to recover\r\n\t * from mismatched input. If this method returns `undefined`, the parser and error\r\n\t * handler state will not have changed. If this method returns non-`undefined`,\r\n\t * `recognizer` will *not* be in error recovery mode since the\r\n\t * returned token was a successful match.\r\n\t *\r\n\t * If the single-token deletion is successful, this method calls\r\n\t * {@link #reportUnwantedToken} to report the error, followed by\r\n\t * {@link Parser#consume} to actually \"delete\" the extraneous token. Then,\r\n\t * before returning {@link #reportMatch} is called to signal a successful\r\n\t * match.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @returns the successfully matched {@link Token} instance if single-token\r\n\t * deletion successfully recovers from the mismatched input, otherwise\r\n\t * `undefined`\r\n\t */\r\n\tprotected singleTokenDeletion(@NotNull recognizer: Parser): Token | undefined {\r\n\t\tlet nextTokenType: number = recognizer.inputStream.LA(2);\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tif (expecting.contains(nextTokenType)) {\r\n\t\t\tthis.reportUnwantedToken(recognizer);\r\n\t\t\t/*\r\n\t\t\tSystem.err.println(\"recoverFromMismatchedToken deleting \"+\r\n\t\t\t\t\t\t\t ((TokenStream)recognizer.inputStream).LT(1)+\r\n\t\t\t\t\t\t\t \" since \"+((TokenStream)recognizer.inputStream).LT(2)+\r\n\t\t\t\t\t\t\t \" is what we want\");\r\n\t\t\t*/\r\n\t\t\trecognizer.consume(); // simply delete extra token\r\n\t\t\t// we want to return the token we're actually matching\r\n\t\t\tlet matchedSymbol: Token = recognizer.currentToken;\r\n\t\t\tthis.reportMatch(recognizer); // we know current token is correct\r\n\t\t\treturn matchedSymbol;\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t/** Conjure up a missing token during error recovery.\r\n\t *\r\n\t * The recognizer attempts to recover from single missing\r\n\t * symbols. But, actions might refer to that missing symbol.\r\n\t * For example, x=ID {f($x);}. The action clearly assumes\r\n\t * that there has been an identifier matched previously and that\r\n\t * $x points at that token. If that token is missing, but\r\n\t * the next token in the stream is what we want we assume that\r\n\t * this token is missing and we keep going. Because we\r\n\t * have to return some token to replace the missing token,\r\n\t * we have to conjure one up. This method gives the user control\r\n\t * over the tokens returned for missing tokens. Mostly,\r\n\t * you will want to create something special for identifier\r\n\t * tokens. For literals such as '{' and ',', the default\r\n\t * action in the parser or tree parser works. It simply creates\r\n\t * a CommonToken of the appropriate type. The text will be the token.\r\n\t * If you change what tokens must be created by the lexer,\r\n\t * override this method to create the appropriate tokens.\r\n\t */\r\n\t@NotNull\r\n\tprotected getMissingSymbol(@NotNull recognizer: Parser): Token {\r\n\t\tlet currentSymbol: Token = recognizer.currentToken;\r\n\t\tlet expecting: IntervalSet = this.getExpectedTokens(recognizer);\r\n\t\tlet expectedTokenType: number = Token.INVALID_TYPE;\r\n\t\tif (!expecting.isNil) {\r\n\t\t\t// get any element\r\n\t\t\texpectedTokenType = expecting.minElement;\r\n\t\t}\r\n\r\n\t\tlet tokenText: string;\r\n\t\tif (expectedTokenType === Token.EOF) {\r\n\t\t\ttokenText = \"\";\r\n\t\t} else {\r\n\t\t\ttokenText = \"\";\r\n\t\t}\r\n\t\tlet current: Token = currentSymbol;\r\n\t\tlet lookback = recognizer.inputStream.tryLT(-1);\r\n\t\tif (current.type === Token.EOF && lookback != null) {\r\n\t\t\tcurrent = lookback;\r\n\t\t}\r\n\r\n\t\treturn this.constructToken(recognizer.inputStream.tokenSource, expectedTokenType, tokenText, current);\r\n\t}\r\n\r\n\tprotected constructToken(\r\n\t\ttokenSource: TokenSource,\r\n\t\texpectedTokenType: number,\r\n\t\ttokenText: string,\r\n\t\tcurrent: Token): Token {\r\n\t\tlet factory: TokenFactory = tokenSource.tokenFactory;\r\n\t\tlet x = current.tokenSource;\r\n\t\tlet stream = x ? x.inputStream : undefined;\r\n\r\n\t\treturn factory.create(\r\n\t\t\t{ source: tokenSource, stream },\r\n\t\t\texpectedTokenType, tokenText,\r\n\t\t\tToken.DEFAULT_CHANNEL,\r\n\t\t\t-1, -1,\r\n\t\t\tcurrent.line, current.charPositionInLine);\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected getExpectedTokens(@NotNull recognizer: Parser): IntervalSet {\r\n\t\treturn recognizer.getExpectedTokens();\r\n\t}\r\n\r\n\t/** How should a token be displayed in an error message? The default\r\n\t * is to display just the text, but during development you might\r\n\t * want to have a lot of information spit out. Override in that case\r\n\t * to use t.toString() (which, for CommonToken, dumps everything about\r\n\t * the token). This is better than forcing you to override a method in\r\n\t * your token objects because you don't have to go modify your lexer\r\n\t * so that it creates a new Java type.\r\n\t */\r\n\tprotected getTokenErrorDisplay(t: Token | undefined): string {\r\n\t\tif (!t) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tlet s = this.getSymbolText(t);\r\n\t\tif (!s) {\r\n\t\t\tif (this.getSymbolType(t) === Token.EOF) {\r\n\t\t\t\ts = \"\";\r\n\t\t\t} else {\r\n\t\t\t\ts = `<${this.getSymbolType(t)}>`;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this.escapeWSAndQuote(s);\r\n\t}\r\n\r\n\tprotected getSymbolText(@NotNull symbol: Token): string | undefined {\r\n\t\treturn symbol.text;\r\n\t}\r\n\r\n\tprotected getSymbolType(@NotNull symbol: Token): number {\r\n\t\treturn symbol.type;\r\n\t}\r\n\r\n\t@NotNull\r\n\tprotected escapeWSAndQuote(@NotNull s: string): string {\r\n//\t\tif ( s==null ) return s;\r\n\t\ts = s.replace(\"\\n\", \"\\\\n\");\r\n\t\ts = s.replace(\"\\r\", \"\\\\r\");\r\n\t\ts = s.replace(\"\\t\", \"\\\\t\");\r\n\t\treturn \"'\" + s + \"'\";\r\n\t}\r\n\r\n\t/* Compute the error recovery set for the current rule. During\r\n\t * rule invocation, the parser pushes the set of tokens that can\r\n\t * follow that rule reference on the stack; this amounts to\r\n\t * computing FIRST of what follows the rule reference in the\r\n\t * enclosing rule. See LinearApproximator.FIRST().\r\n\t * This local follow set only includes tokens\r\n\t * from within the rule; i.e., the FIRST computation done by\r\n\t * ANTLR stops at the end of a rule.\r\n\t *\r\n\t * EXAMPLE\r\n\t *\r\n\t * When you find a \"no viable alt exception\", the input is not\r\n\t * consistent with any of the alternatives for rule r. The best\r\n\t * thing to do is to consume tokens until you see something that\r\n\t * can legally follow a call to r *or* any rule that called r.\r\n\t * You don't want the exact set of viable next tokens because the\r\n\t * input might just be missing a token--you might consume the\r\n\t * rest of the input looking for one of the missing tokens.\r\n\t *\r\n\t * Consider grammar:\r\n\t *\r\n\t * a : '[' b ']'\r\n\t * | '(' b ')'\r\n\t * ;\r\n\t * b : c '^' INT ;\r\n\t * c : ID\r\n\t * | INT\r\n\t * ;\r\n\t *\r\n\t * At each rule invocation, the set of tokens that could follow\r\n\t * that rule is pushed on a stack. Here are the various\r\n\t * context-sensitive follow sets:\r\n\t *\r\n\t * FOLLOW(b1_in_a) = FIRST(']') = ']'\r\n\t * FOLLOW(b2_in_a) = FIRST(')') = ')'\r\n\t * FOLLOW(c_in_b) = FIRST('^') = '^'\r\n\t *\r\n\t * Upon erroneous input \"[]\", the call chain is\r\n\t *\r\n\t * a -> b -> c\r\n\t *\r\n\t * and, hence, the follow context stack is:\r\n\t *\r\n\t * depth follow set start of rule execution\r\n\t * 0 a (from main())\r\n\t * 1 ']' b\r\n\t * 2 '^' c\r\n\t *\r\n\t * Notice that ')' is not included, because b would have to have\r\n\t * been called from a different context in rule a for ')' to be\r\n\t * included.\r\n\t *\r\n\t * For error recovery, we cannot consider FOLLOW(c)\r\n\t * (context-sensitive or otherwise). We need the combined set of\r\n\t * all context-sensitive FOLLOW sets--the set of all tokens that\r\n\t * could follow any reference in the call chain. We need to\r\n\t * resync to one of those tokens. Note that FOLLOW(c)='^' and if\r\n\t * we resync'd to that token, we'd consume until EOF. We need to\r\n\t * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.\r\n\t * In this case, for input \"[]\", LA(1) is ']' and in the set, so we would\r\n\t * not consume anything. After printing an error, rule c would\r\n\t * return normally. Rule b would not find the required '^' though.\r\n\t * At this point, it gets a mismatched token error and\r\n\t * exception (since LA(1) is not in the viable following token\r\n\t * set). The rule exception handler tries to recover, but finds\r\n\t * the same recovery set and doesn't consume anything. Rule b\r\n\t * exits normally returning to rule a. Now it finds the ']' (and\r\n\t * with the successful match exits errorRecovery mode).\r\n\t *\r\n\t * So, you can see that the parser walks up the call chain looking\r\n\t * for the token that was a member of the recovery set.\r\n\t *\r\n\t * Errors are not generated in errorRecovery mode.\r\n\t *\r\n\t * ANTLR's error recovery mechanism is based upon original ideas:\r\n\t *\r\n\t * \"Algorithms + Data Structures = Programs\" by Niklaus Wirth\r\n\t *\r\n\t * and\r\n\t *\r\n\t * \"A note on error recovery in recursive descent parsers\":\r\n\t * http://portal.acm.org/citation.cfm?id=947902.947905\r\n\t *\r\n\t * Later, Josef Grosch had some good ideas:\r\n\t *\r\n\t * \"Efficient and Comfortable Error Recovery in Recursive Descent\r\n\t * Parsers\":\r\n\t * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip\r\n\t *\r\n\t * Like Grosch I implement context-sensitive FOLLOW sets that are combined\r\n\t * at run-time upon error to avoid overhead during parsing.\r\n\t */\r\n\t@NotNull\r\n\tprotected getErrorRecoverySet(@NotNull recognizer: Parser): IntervalSet {\r\n\t\tlet atn: ATN = recognizer.interpreter.atn;\r\n\t\tlet ctx: RuleContext | undefined = recognizer.context;\r\n\t\tlet recoverSet: IntervalSet = new IntervalSet();\r\n\t\twhile (ctx && ctx.invokingState >= 0) {\r\n\t\t\t// compute what follows who invoked us\r\n\t\t\tlet invokingState: ATNState = atn.states[ctx.invokingState];\r\n\t\t\tlet rt = invokingState.transition(0) as RuleTransition;\r\n\t\t\tlet follow: IntervalSet = atn.nextTokens(rt.followState);\r\n\t\t\trecoverSet.addAll(follow);\r\n\t\t\tctx = ctx._parent;\r\n\t\t}\r\n\t\trecoverSet.remove(Token.EPSILON);\r\n//\t\tSystem.out.println(\"recover set \"+recoverSet.toString(recognizer.getTokenNames()));\r\n\t\treturn recoverSet;\r\n\t}\r\n\r\n\t/** Consume tokens until one matches the given token set. */\r\n\tprotected consumeUntil(@NotNull recognizer: Parser, @NotNull set: IntervalSet): void {\r\n//\t\tSystem.err.println(\"consumeUntil(\"+set.toString(recognizer.getTokenNames())+\")\");\r\n\t\tlet ttype: number = recognizer.inputStream.LA(1);\r\n\t\twhile (ttype !== Token.EOF && !set.contains(ttype)) {\r\n\t\t\t//System.out.println(\"consume during recover LA(1)=\"+getTokenNames()[input.LA(1)]);\r\n//\t\t\trecognizer.inputStream.consume();\r\n\t\t\trecognizer.consume();\r\n\t\t\tttype = recognizer.inputStream.LA(1);\r\n\t\t}\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:49.2855056-07:00\r\n\r\nimport { DefaultErrorStrategy } from \"./DefaultErrorStrategy\";\r\nimport { Parser } from \"./Parser\";\r\nimport { InputMismatchException } from \"./InputMismatchException\";\r\nimport { Override } from \"./Decorators\";\r\nimport { ParseCancellationException } from \"./misc/ParseCancellationException\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Token } from \"./Token\";\r\n\r\n/**\r\n * This implementation of {@link ANTLRErrorStrategy} responds to syntax errors\r\n * by immediately canceling the parse operation with a\r\n * {@link ParseCancellationException}. The implementation ensures that the\r\n * {@link ParserRuleContext#exception} field is set for all parse tree nodes\r\n * that were not completed prior to encountering the error.\r\n *\r\n * This error strategy is useful in the following scenarios.\r\n *\r\n * * **Two-stage parsing:** This error strategy allows the first\r\n * stage of two-stage parsing to immediately terminate if an error is\r\n * encountered, and immediately fall back to the second stage. In addition to\r\n * avoiding wasted work by attempting to recover from errors here, the empty\r\n * implementation of {@link BailErrorStrategy#sync} improves the performance of\r\n * the first stage.\r\n * * **Silent validation:** When syntax errors are not being\r\n * reported or logged, and the parse result is simply ignored if errors occur,\r\n * the {@link BailErrorStrategy} avoids wasting work on recovering from errors\r\n * when the result will be ignored either way.\r\n *\r\n * ```\r\n * myparser.errorHandler = new BailErrorStrategy();\r\n * ```\r\n *\r\n * @see Parser.errorHandler\r\n */\r\nexport class BailErrorStrategy extends DefaultErrorStrategy {\r\n\t/** Instead of recovering from exception `e`, re-throw it wrapped\r\n\t * in a {@link ParseCancellationException} so it is not caught by the\r\n\t * rule function catches. Use {@link Exception#getCause()} to get the\r\n\t * original {@link RecognitionException}.\r\n\t */\r\n\t@Override\r\n\tpublic recover(recognizer: Parser, e: RecognitionException): void {\r\n\t\tfor (let context: ParserRuleContext | undefined = recognizer.context; context; context = context.parent) {\r\n\t\t\tcontext.exception = e;\r\n\t\t}\r\n\r\n\t\tthrow new ParseCancellationException(e);\r\n\t}\r\n\r\n\t/** Make sure we don't attempt to recover inline; if the parser\r\n\t * successfully recovers, it won't throw an exception.\r\n\t */\r\n\t@Override\r\n\tpublic recoverInline(recognizer: Parser): Token {\r\n\t\tlet e = new InputMismatchException(recognizer);\r\n\t\tfor (let context: ParserRuleContext | undefined = recognizer.context; context; context = context.parent) {\r\n\t\t\tcontext.exception = e;\r\n\t\t}\r\n\r\n\t\tthrow new ParseCancellationException(e);\r\n\t}\r\n\r\n\t/** Make sure we don't attempt to recover from problems in subrules. */\r\n\t@Override\r\n\tpublic sync(recognizer: Parser): void {\r\n\t\t// intentionally empty\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:50.0659297-07:00\r\n\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { IntStream } from \"./IntStream\";\r\n\r\n/** A source of characters for an ANTLR lexer. */\r\nexport interface CharStream extends IntStream {\r\n\t/**\r\n\t * This method returns the text for a range of characters within this input\r\n\t * stream. This method is guaranteed to not throw an exception if the\r\n\t * specified `interval` lies entirely within a marked range. For more\r\n\t * information about marked ranges, see {@link IntStream#mark}.\r\n\t *\r\n\t * @param interval an interval within the stream\r\n\t * @returns the text of the specified interval\r\n\t *\r\n\t * @throws NullPointerException if `interval` is `undefined`\r\n\t * @throws IllegalArgumentException if `interval.a < 0`, or if\r\n\t * `interval.b < interval.a - 1`, or if `interval.b` lies at or\r\n\t * past the end of the stream\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * getting the text of the specified interval\r\n\t */\r\n\t//@NotNull\r\n\tgetText(/*@NotNull*/ interval: Interval): string;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.1349829-07:00\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport enum Dependents {\r\n\r\n\t/**\r\n\t * The element is dependent upon the specified rule.\r\n\t */\r\n\tSELF,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's parents\r\n\t * (rules which directly reference it).\r\n\t */\r\n\tPARENTS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's children\r\n\t * (rules which it directly references).\r\n\t */\r\n\tCHILDREN,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's ancestors\r\n\t * (the transitive closure of `PARENTS` rules).\r\n\t */\r\n\tANCESTORS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's descendants\r\n\t * (the transitive closure of `CHILDREN` rules).\r\n\t */\r\n\tDESCENDANTS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's siblings\r\n\t * (the union of `CHILDREN` of its `PARENTS`).\r\n\t */\r\n\tSIBLINGS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's preceding\r\n\t * siblings (the union of `CHILDREN` of its `PARENTS` which\r\n\t * appear before a reference to the rule).\r\n\t */\r\n\tPRECEDING_SIBLINGS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's following\r\n\t * siblings (the union of `CHILDREN` of its `PARENTS` which\r\n\t * appear after a reference to the rule).\r\n\t */\r\n\tFOLLOWING_SIBLINGS,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's preceding\r\n\t * elements (rules which might end before the start of the specified rule\r\n\t * while parsing). This is calculated by taking the\r\n\t * `PRECEDING_SIBLINGS` of the rule and each of its\r\n\t * `ANCESTORS`, along with the `DESCENDANTS` of those\r\n\t * elements.\r\n\t */\r\n\tPRECEDING,\r\n\t/**\r\n\t * The element is dependent upon the set of the specified rule's following\r\n\t * elements (rules which might start after the end of the specified rule\r\n\t * while parsing). This is calculated by taking the\r\n\t * `FOLLOWING_SIBLINGS` of the rule and each of its\r\n\t * `ANCESTORS`, along with the `DESCENDANTS` of those\r\n\t * elements.\r\n\t */\r\n\tFOLLOWING,\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.2133685-07:00\r\n\r\nimport { ATNConfig } from \"./atn/ATNConfig\";\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserErrorListener } from \"./ParserErrorListener\";\r\nimport { RecognitionException } from \"./RecognitionException\";\r\nimport { Recognizer } from \"./Recognizer\";\r\nimport { SimulatorState } from \"./atn/SimulatorState\";\r\nimport { Token } from \"./Token\";\r\nimport { Override, NotNull } from \"./Decorators\";\r\nimport { Interval } from \"./misc/Interval\";\r\n\r\n/**\r\n * This implementation of {@link ANTLRErrorListener} can be used to identify\r\n * certain potential correctness and performance problems in grammars. \"Reports\"\r\n * are made by calling {@link Parser#notifyErrorListeners} with the appropriate\r\n * message.\r\n *\r\n * * **Ambiguities**: These are cases where more than one path through the\r\n * grammar can match the input.\r\n * * **Weak context sensitivity**: These are cases where full-context\r\n * prediction resolved an SLL conflict to a unique alternative which equaled the\r\n * minimum alternative of the SLL conflict.\r\n * * **Strong (forced) context sensitivity**: These are cases where the\r\n * full-context prediction resolved an SLL conflict to a unique alternative,\r\n * *and* the minimum alternative of the SLL conflict was found to not be\r\n * a truly viable alternative. Two-stage parsing cannot be used for inputs where\r\n * this situation occurs.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport class DiagnosticErrorListener implements ParserErrorListener {\r\n\r\n\t/**\r\n\t * Initializes a new instance of {@link DiagnosticErrorListener}, specifying\r\n\t * whether all ambiguities or only exact ambiguities are reported.\r\n\t *\r\n\t * @param exactOnly `true` to report only exact ambiguities, otherwise\r\n\t * `false` to report all ambiguities. Defaults to true.\r\n\t */\r\n\tconstructor(protected exactOnly: boolean = true) {\r\n\t\tthis.exactOnly = exactOnly;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic syntaxError(\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Recognizer,\r\n\t\toffendingSymbol: T | undefined,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number,\r\n\t\t/*@NotNull*/\r\n\t\tmsg: string,\r\n\t\te: RecognitionException | undefined): void\r\n\t{\r\n\t\t// intentionally empty\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAmbiguity(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\tambigAlts: BitSet | undefined,\r\n\t\t@NotNull configs: ATNConfigSet): void {\r\n\t\tif (this.exactOnly && !exact) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet decision: string = this.getDecisionDescription(recognizer, dfa);\r\n\t\tlet conflictingAlts: BitSet = this.getConflictingAlts(ambigAlts, configs);\r\n\t\tlet text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex));\r\n\t\tlet message: string = `reportAmbiguity d=${decision}: ambigAlts=${conflictingAlts}, input='${text}'`;\r\n\t\trecognizer.notifyErrorListeners(message);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportAttemptingFullContext(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tconflictingAlts: BitSet | undefined,\r\n\t\t@NotNull conflictState: SimulatorState): void {\r\n\t\tlet format: string = \"reportAttemptingFullContext d=%s, input='%s'\";\r\n\t\tlet decision: string = this.getDecisionDescription(recognizer, dfa);\r\n\t\tlet text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex));\r\n\t\tlet message: string = `reportAttemptingFullContext d=${decision}, input='${text}'`;\r\n\t\trecognizer.notifyErrorListeners(message);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic reportContextSensitivity(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tprediction: number,\r\n\t\t@NotNull acceptState: SimulatorState): void {\r\n\t\tlet format: string = \"reportContextSensitivity d=%s, input='%s'\";\r\n\t\tlet decision: string = this.getDecisionDescription(recognizer, dfa);\r\n\t\tlet text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex));\r\n\t\tlet message: string = `reportContextSensitivity d=${decision}, input='${text}'`;\r\n\t\trecognizer.notifyErrorListeners(message);\r\n\t}\r\n\r\n\tprotected getDecisionDescription(\r\n\t\t@NotNull recognizer: Parser,\r\n\t\t@NotNull dfa: DFA): string {\r\n\t\tlet decision: number = dfa.decision;\r\n\t\tlet ruleIndex: number = dfa.atnStartState.ruleIndex;\r\n\r\n\t\tlet ruleNames: string[] = recognizer.ruleNames;\r\n\t\tif (ruleIndex < 0 || ruleIndex >= ruleNames.length) {\r\n\t\t\treturn decision.toString();\r\n\t\t}\r\n\r\n\t\tlet ruleName: string = ruleNames[ruleIndex];\r\n\t\tif (!ruleName) {\r\n\t\t\treturn decision.toString();\r\n\t\t}\r\n\r\n\t\treturn `${decision} (${ruleName})`;\r\n\t}\r\n\r\n\t/**\r\n\t * Computes the set of conflicting or ambiguous alternatives from a\r\n\t * configuration set, if that information was not already provided by the\r\n\t * parser.\r\n\t *\r\n\t * @param reportedAlts The set of conflicting or ambiguous alternatives, as\r\n\t * reported by the parser.\r\n\t * @param configs The conflicting or ambiguous configuration set.\r\n\t * @returns Returns `reportedAlts` if it is not `undefined`, otherwise\r\n\t * returns the set of alternatives represented in `configs`.\r\n\t */\r\n\t@NotNull\r\n\tprotected getConflictingAlts(reportedAlts: BitSet | undefined, @NotNull configs: ATNConfigSet): BitSet {\r\n\t\tif (reportedAlts != null) {\r\n\t\t\treturn reportedAlts;\r\n\t\t}\r\n\r\n\t\tlet result: BitSet = new BitSet();\r\n\t\tfor (let config of configs) {\r\n\t\t\tresult.set(config.alt);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:51.9954566-07:00\r\n\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { ATNType } from \"./atn/ATNType\";\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Lexer } from \"./Lexer\";\r\nimport { LexerATNSimulator } from \"./atn/LexerATNSimulator\";\r\nimport { NotNull } from \"./Decorators\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Vocabulary } from \"./Vocabulary\";\r\n\r\nexport class LexerInterpreter extends Lexer {\r\n\tprotected _grammarFileName: string;\r\n\tprotected _atn: ATN;\r\n\r\n\tprotected _ruleNames: string[];\r\n\tprotected _channelNames: string[];\r\n\tprotected _modeNames: string[];\r\n\t@NotNull\r\n\tprivate _vocabulary: Vocabulary;\r\n\r\n\tconstructor(grammarFileName: string, @NotNull vocabulary: Vocabulary, ruleNames: string[], channelNames: string[], modeNames: string[], atn: ATN, input: CharStream) {\r\n\t\tsuper(input);\r\n\r\n\t\tif (atn.grammarType !== ATNType.LEXER) {\r\n\t\t\tthrow new Error(\"IllegalArgumentException: The ATN must be a lexer ATN.\");\r\n\t\t}\r\n\r\n\t\tthis._grammarFileName = grammarFileName;\r\n\t\tthis._atn = atn;\r\n\r\n\t\tthis._ruleNames = ruleNames.slice(0);\r\n\t\tthis._channelNames = channelNames.slice(0);\r\n\t\tthis._modeNames = modeNames.slice(0);\r\n\t\tthis._vocabulary = vocabulary;\r\n\t\tthis._interp = new LexerATNSimulator(atn, this);\r\n\t}\r\n\r\n\t@Override\r\n\tget atn(): ATN {\r\n\t\treturn this._atn;\r\n\t}\r\n\r\n\t@Override\r\n\tget grammarFileName(): string {\r\n\t\treturn this._grammarFileName;\r\n\t}\r\n\r\n\t@Override\r\n\tget ruleNames(): string[] {\r\n\t\treturn this._ruleNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget channelNames(): string[] {\r\n\t\treturn this._channelNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget modeNames(): string[] {\r\n\t\treturn this._modeNames;\r\n\t}\r\n\r\n\t@Override\r\n\tget vocabulary(): Vocabulary {\r\n\t\treturn this._vocabulary;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:52.9471863-07:00\r\nimport { ANTLRErrorListener } from \"./ANTLRErrorListener\";\r\nimport { ATNConfigSet } from \"./atn/ATNConfigSet\";\r\nimport { BitSet } from \"./misc/BitSet\";\r\nimport { DFA } from \"./dfa/DFA\";\r\nimport { Parser } from \"./Parser\";\r\nimport { SimulatorState } from \"./atn/SimulatorState\";\r\nimport { Token } from \"./Token\";\r\nimport * as Stubs from \"./misc/Stubs\";\r\nimport * as Exception from \"./RecognitionException\";\r\n\r\n/** How to emit recognition errors for parsers.\r\n */\r\nexport interface ParserErrorListener extends ANTLRErrorListener {\r\n\t/**\r\n\t * This method is called by the parser when a full-context prediction\r\n\t * results in an ambiguity.\r\n\t *\r\n\t * Each full-context prediction which does not result in a syntax error\r\n\t * will call either {@link #reportContextSensitivity} or\r\n\t * {@link #reportAmbiguity}.\r\n\t *\r\n\t * When `ambigAlts` is not `undefined`, it contains the set of potentially\r\n\t * viable alternatives identified by the prediction algorithm. When\r\n\t * `ambigAlts` is `undefined`, use\r\n\t * {@link ATNConfigSet#getRepresentedAlternatives} to obtain the represented\r\n\t * alternatives from the `configs` argument.\r\n\t *\r\n\t * When `exact` is `true`, *all* of the potentially\r\n\t * viable alternatives are truly viable, i.e. this is reporting an exact\r\n\t * ambiguity. When `exact` is `false`, *at least two* of\r\n\t * the potentially viable alternatives are viable for the current input, but\r\n\t * the prediction algorithm terminated as soon as it determined that at\r\n\t * least the *minimum* potentially viable alternative is truly\r\n\t * viable.\r\n\t *\r\n\t * When the {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} prediction\r\n\t * mode is used, the parser is required to identify exact ambiguities so\r\n\t * `exact` will always be `true`.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param dfa the DFA for the current decision\r\n\t * @param startIndex the input index where the decision started\r\n\t * @param stopIndex the input input where the ambiguity was identified\r\n\t * @param exact `true` if the ambiguity is exactly known, otherwise\r\n\t * `false`. This is always `true` when\r\n\t * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} is used.\r\n\t * @param ambigAlts the potentially ambiguous alternatives, or `undefined`\r\n\t * to indicate that the potentially ambiguous alternatives are the complete\r\n\t * set of represented alternatives in `configs`\r\n\t * @param configs the ATN configuration set where the ambiguity was\r\n\t * identified\r\n\t */\r\n\treportAmbiguity?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Parser,\r\n\t\t/*@NotNull*/\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\texact: boolean,\r\n\t\tambigAlts: BitSet | undefined,\r\n\t\t/*@NotNull*/\r\n\t\tconfigs: ATNConfigSet) => void;\r\n\r\n\t/**\r\n\t * This method is called when an SLL conflict occurs and the parser is about\r\n\t * to use the full context information to make an LL decision.\r\n\t *\r\n\t * If one or more configurations in `configs` contains a semantic\r\n\t * predicate, the predicates are evaluated before this method is called. The\r\n\t * subset of alternatives which are still viable after predicates are\r\n\t * evaluated is reported in `conflictingAlts`.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param dfa the DFA for the current decision\r\n\t * @param startIndex the input index where the decision started\r\n\t * @param stopIndex the input index where the SLL conflict occurred\r\n\t * @param conflictingAlts The specific conflicting alternatives. If this is\r\n\t * `undefined`, the conflicting alternatives are all alternatives\r\n\t * represented in `configs`.\r\n\t * @param conflictState the simulator state when the SLL conflict was\r\n\t * detected\r\n\t */\r\n\treportAttemptingFullContext?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Parser,\r\n\t\t/*@NotNull*/\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tconflictingAlts: BitSet | undefined,\r\n\t\t/*@NotNull*/\r\n\t\tconflictState: SimulatorState) => void;\r\n\r\n\t/**\r\n\t * This method is called by the parser when a full-context prediction has a\r\n\t * unique result.\r\n\t *\r\n\t * Each full-context prediction which does not result in a syntax error\r\n\t * will call either {@link #reportContextSensitivity} or\r\n\t * {@link #reportAmbiguity}.\r\n\t *\r\n\t * For prediction implementations that only evaluate full-context\r\n\t * predictions when an SLL conflict is found (including the default\r\n\t * {@link ParserATNSimulator} implementation), this method reports cases\r\n\t * where SLL conflicts were resolved to unique full-context predictions,\r\n\t * i.e. the decision was context-sensitive. This report does not necessarily\r\n\t * indicate a problem, and it may appear even in completely unambiguous\r\n\t * grammars.\r\n\t *\r\n\t * `configs` may have more than one represented alternative if the\r\n\t * full-context prediction algorithm does not evaluate predicates before\r\n\t * beginning the full-context prediction. In all cases, the final prediction\r\n\t * is passed as the `prediction` argument.\r\n\t *\r\n\t * Note that the definition of \"context sensitivity\" in this method\r\n\t * differs from the concept in {@link DecisionInfo#contextSensitivities}.\r\n\t * This method reports all instances where an SLL conflict occurred but LL\r\n\t * parsing produced a unique result, whether or not that unique result\r\n\t * matches the minimum alternative in the SLL conflicting set.\r\n\t *\r\n\t * @param recognizer the parser instance\r\n\t * @param dfa the DFA for the current decision\r\n\t * @param startIndex the input index where the decision started\r\n\t * @param stopIndex the input index where the context sensitivity was\r\n\t * finally determined\r\n\t * @param prediction the unambiguous result of the full-context prediction\r\n\t * @param acceptState the simulator state when the unambiguous prediction\r\n\t * was determined\r\n\t */\r\n\treportContextSensitivity?: (\r\n\t\t/*@NotNull*/\r\n\t\trecognizer: Parser,\r\n\t\t/*@NotNull*/\r\n\t\tdfa: DFA,\r\n\t\tstartIndex: number,\r\n\t\tstopIndex: number,\r\n\t\tprediction: number,\r\n\t\t/*@NotNull*/\r\n\t\tacceptState: SimulatorState) => void;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.4741196-07:00\r\n\r\nimport { ATN } from \"./atn/ATN\";\r\nimport { Override } from \"./Decorators\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/** A handy class for use with\r\n *\r\n * options {contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum;}\r\n *\r\n * that provides a backing field / impl for the outer alternative number\r\n * matched for an internal parse tree node.\r\n *\r\n * I'm only putting into Java runtime as I'm certain I'm the only one that\r\n * will really every use this.\r\n */\r\nexport class RuleContextWithAltNum extends ParserRuleContext {\r\n\tprivate _altNumber: number;\r\n\r\n\tconstructor();\r\n\tconstructor(parent: ParserRuleContext | undefined, invokingStateNumber: number);\r\n\tconstructor(parent?: ParserRuleContext, invokingStateNumber?: number) {\r\n\t\tif (invokingStateNumber !== undefined) {\r\n\t\t\tsuper(parent, invokingStateNumber);\r\n\t\t} else {\r\n\t\t\tsuper();\r\n\t\t}\r\n\r\n\t\tthis._altNumber = ATN.INVALID_ALT_NUMBER;\r\n\t}\r\n\r\n\t@Override\r\n\tget altNumber(): number {\r\n\t\treturn this._altNumber;\r\n\t}\r\n\r\n\t// @Override\r\n\tset altNumber(altNum: number) {\r\n\t\tthis._altNumber = altNum;\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.6271221-07:00\r\n\r\nimport { Dependents } from \"./Dependents\";\r\nimport { Parser } from \"./Parser\";\r\n\r\n/**\r\n * Declares a dependency upon a grammar rule, along with a set of zero or more dependent rules.\r\n *\r\n * Version numbers within a grammar should be assigned on a monotonically increasing basis to allow for accurate\r\n * tracking of dependent rules.\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport function RuleDependency(dependency: DependencySpecification) {\r\n\treturn (target: object, propertyKey: PropertyKey, propertyDescriptor: PropertyDescriptor) => {\r\n\t\t// intentionally empty\r\n\t};\r\n}\r\n\r\nexport interface DependencySpecification {\r\n\treadonly recognizer: { new (...args: any[]): Parser; };\r\n\r\n\treadonly rule: number;\r\n\r\n\treadonly version: number;\r\n\r\n\t/**\r\n\t * Specifies the set of grammar rules related to `rule` which the annotated element depends on. Even when absent\r\n\t * from this set, the annotated element is implicitly dependent upon the explicitly specified `rule`, which\r\n\t * corresponds to the `Dependents.SELF` element.\r\n\t *\r\n\t * By default, the annotated element is dependent upon the specified `rule` and its `Dependents.PARENTS`, i.e. the\r\n\t * rule within one level of context information. The parents are included since the most frequent assumption about a\r\n\t * rule is where it's used in the grammar.\r\n\t */\r\n\treadonly dependents?: Dependents[];\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.7170027-07:00\r\n\r\nimport { Parser } from \"./Parser\";\r\nimport { ParserRuleContext } from \"./ParserRuleContext\";\r\n\r\n/**\r\n *\r\n * @author Sam Harwell\r\n */\r\nexport function RuleVersion(version: number) {\r\n\r\n\treturn (target: Parser, propertyKey: PropertyKey, propertyDescriptor: TypedPropertyDescriptor<(...args: any[]) => T>) => {\r\n\t\t// intentionally empty\r\n\t};\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.8783640-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/** The default mechanism for creating tokens. It's used by default in Lexer and\r\n * the error handling strategy (to create missing tokens). Notifying the parser\r\n * of a new factory means that it notifies its token source and error strategy.\r\n */\r\nexport interface TokenFactory {\r\n\t/** This is the method used to create tokens in the lexer and in the\r\n\t * error handling strategy. If text!=undefined, than the start and stop positions\r\n\t * are wiped to -1 in the text override is set in the CommonToken.\r\n\t */\r\n\t//@NotNull\r\n\tcreate(\r\n\t\t/*@NotNull*/\r\n\t\tsource: { source?: TokenSource, stream?: CharStream },\r\n\t\ttype: number,\r\n\t\ttext: string | undefined,\r\n\t\tchannel: number,\r\n\t\tstart: number,\r\n\t\tstop: number,\r\n\t\tline: number,\r\n\t\tcharPositionInLine: number): Token;\r\n\r\n\t/** Generically useful */\r\n\t//@NotNull\r\n\tcreateSimple(type: number, text: string): Token;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:57.9604200-07:00\r\n\r\nimport { CharStream } from \"./CharStream\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenFactory } from \"./TokenFactory\";\r\n\r\n/**\r\n * A source of tokens must provide a sequence of tokens via {@link #nextToken()}\r\n * and also must reveal it's source of characters; {@link CommonToken}'s text is\r\n * computed from a {@link CharStream}; it only store indices into the char\r\n * stream.\r\n *\r\n * Errors from the lexer are never passed to the parser. Either you want to keep\r\n * going or you do not upon token recognition error. If you do not want to\r\n * continue lexing then you do not want to continue parsing. Just throw an\r\n * exception not under {@link RecognitionException} and Java will naturally toss\r\n * you all the way out of the recognizers. If you want to continue lexing then\r\n * you should not throw an exception to the parser--it has already requested a\r\n * token. Keep lexing until you get a valid one. Just report errors and keep\r\n * going, looking for a valid token.\r\n */\r\nexport interface TokenSource {\r\n\t/**\r\n\t * Return a {@link Token} object from your input stream (usually a\r\n\t * {@link CharStream}). Do not fail/return upon lexing error; keep chewing\r\n\t * on the characters until you get a good one; errors are not passed through\r\n\t * to the parser.\r\n\t */\r\n\t//@NotNull\r\n\tnextToken(): Token;\r\n\r\n\t/**\r\n\t * Get the line number for the current position in the input stream. The\r\n\t * first line in the input is line 1.\r\n\t *\r\n\t * @returns The line number for the current position in the input stream, or\r\n\t * 0 if the current token source does not track line numbers.\r\n\t */\r\n\treadonly line: number;\r\n\r\n\t/**\r\n\t * Get the index into the current line for the current position in the input\r\n\t * stream. The first character on a line has position 0.\r\n\t *\r\n\t * @returns The line number for the current position in the input stream, or\r\n\t * -1 if the current token source does not track character positions.\r\n\t */\r\n\treadonly charPositionInLine: number;\r\n\r\n\t/**\r\n\t * Get the {@link CharStream} from which this token source is currently\r\n\t * providing tokens.\r\n\t *\r\n\t * @returns The {@link CharStream} associated with the current position in\r\n\t * the input, or `undefined` if no input stream is available for the token\r\n\t * source.\r\n\t */\r\n\treadonly inputStream: CharStream | undefined;\r\n\r\n\t/**\r\n\t * Gets the name of the underlying input source. This method returns a\r\n\t * non-undefined, non-empty string. If such a name is not known, this method\r\n\t * returns {@link IntStream#UNKNOWN_SOURCE_NAME}.\r\n\t */\r\n\t//@NotNull\r\n\treadonly sourceName: string;\r\n\r\n\t/**\r\n\t * Gets or sets the `TokenFactory` this token source is currently using for\r\n\t * creating `Token` objects from the input.\r\n\t */\r\n\t//@NotNull\r\n\ttokenFactory: TokenFactory;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:58.0433998-07:00\r\n\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { IntStream } from \"./IntStream\";\r\nimport { RuleContext } from \"./RuleContext\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenSource } from \"./TokenSource\";\r\n\r\n/**\r\n * An {@link IntStream} whose symbols are {@link Token} instances.\r\n */\r\nexport interface TokenStream extends IntStream {\r\n\t/**\r\n\t * Get the `Token` instance associated with the value returned by `LA(k)`. This method has the same pre- and\r\n\t * post-conditions as `IntStream.LA`. In addition, when the preconditions of this method are met, the return value\r\n\t * is non-undefined and the value of `LT(k).type === LA(k)`.\r\n\t *\r\n\t * A `RangeError` is thrown if `k<0` and fewer than `-k` calls to `consume()` have occurred from the beginning of\r\n\t * the stream before calling this method.\r\n\t *\r\n\t * See `IntStream.LA`\r\n\t */\r\n\tLT(k: number): Token;\r\n\r\n\t/**\r\n\t * Get the `Token` instance associated with the value returned by `LA(k)`. This method has the same pre- and\r\n\t * post-conditions as `IntStream.LA`. In addition, when the preconditions of this method are met, the return value\r\n\t * is non-undefined and the value of `tryLT(k).type === LA(k)`.\r\n\t *\r\n\t * The return value is `undefined` if `k<0` and fewer than `-k` calls to `consume()` have occurred from the\r\n\t * beginning of the stream before calling this method.\r\n\t *\r\n\t * See `IntStream.LA`\r\n\t */\r\n\ttryLT(k: number): Token | undefined;\r\n\r\n\t/**\r\n\t * Gets the {@link Token} at the specified `index` in the stream. When\r\n\t * the preconditions of this method are met, the return value is non-undefined.\r\n\t *\r\n\t * The preconditions for this method are the same as the preconditions of\r\n\t * {@link IntStream#seek}. If the behavior of `seek(index)` is\r\n\t * unspecified for the current state and given `index`, then the\r\n\t * behavior of this method is also unspecified.\r\n\t *\r\n\t * The symbol referred to by `index` differs from `seek()` only\r\n\t * in the case of filtering streams where `index` lies before the end\r\n\t * of the stream. Unlike `seek()`, this method does not adjust\r\n\t * `index` to point to a non-ignored symbol.\r\n\t *\r\n\t * @throws IllegalArgumentException if {code index} is less than 0\r\n\t * @throws UnsupportedOperationException if the stream does not support\r\n\t * retrieving the token at the specified index\r\n\t */\r\n\t//@NotNull\r\n\tget(i: number): Token;\r\n\r\n\t/**\r\n\t * Gets the underlying {@link TokenSource} which provides tokens for this\r\n\t * stream.\r\n\t */\r\n\t//@NotNull\r\n\treadonly tokenSource: TokenSource;\r\n\r\n\t/**\r\n\t * Return the text of all tokens within the specified `interval`. This\r\n\t * method behaves like the following code (including potential exceptions\r\n\t * for violating preconditions of {@link #get}, but may be optimized by the\r\n\t * specific implementation.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = \"\";\r\n\t * for (int i = interval.a; i <= interval.b; i++) {\r\n\t * text += stream.get(i).text;\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param interval The interval of tokens within this stream to get text\r\n\t * for.\r\n\t * @returns The text of all tokens within the specified interval in this\r\n\t * stream.\r\n\t *\r\n\t * @throws NullPointerException if `interval` is `undefined`\r\n\t */\r\n\t//@NotNull\r\n\tgetText(/*@NotNull*/ interval: Interval): string;\r\n\r\n\t/**\r\n\t * Return the text of all tokens in the stream. This method behaves like the\r\n\t * following code, including potential exceptions from the calls to\r\n\t * {@link IntStream#size} and {@link #getText(Interval)}, but may be\r\n\t * optimized by the specific implementation.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = stream.getText(new Interval(0, stream.size));\r\n\t * ```\r\n\t *\r\n\t * @returns The text of all tokens in the stream.\r\n\t */\r\n\t//@NotNull\r\n\tgetText(): string;\r\n\r\n\t/**\r\n\t * Return the text of all tokens in the source interval of the specified\r\n\t * context. This method behaves like the following code, including potential\r\n\t * exceptions from the call to {@link #getText(Interval)}, but may be\r\n\t * optimized by the specific implementation.\r\n\t *\r\n\t * If `ctx.sourceInterval` does not return a valid interval of\r\n\t * tokens provided by this stream, the behavior is unspecified.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = stream.getText(ctx.sourceInterval);\r\n\t * ```\r\n\t *\r\n\t * @param ctx The context providing the source interval of tokens to get\r\n\t * text for.\r\n\t * @returns The text of all tokens within the source interval of `ctx`.\r\n\t */\r\n\t//@NotNull\r\n\tgetText(/*@NotNull*/ ctx: RuleContext): string;\r\n\r\n\t/**\r\n\t * Return the text of all tokens in this stream between `start` and\r\n\t * `stop` (inclusive).\r\n\t *\r\n\t * If the specified `start` or `stop` token was not provided by\r\n\t * this stream, or if the `stop` occurred before the `start`}\r\n\t * token, the behavior is unspecified.\r\n\t *\r\n\t * For streams which ensure that the `Token.tokenIndex` method is\r\n\t * accurate for all of its provided tokens, this method behaves like the\r\n\t * following code. Other streams may implement this method in other ways\r\n\t * provided the behavior is consistent with this at a high level.\r\n\t *\r\n\t * ```\r\n\t * TokenStream stream = ...;\r\n\t * String text = \"\";\r\n\t * for (int i = start.tokenIndex; i <= stop.tokenIndex; i++) {\r\n\t * text += stream.get(i).text;\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @param start The first token in the interval to get text for.\r\n\t * @param stop The last token in the interval to get text for (inclusive).\r\n\t * @returns The text of all tokens lying between the specified `start`\r\n\t * and `stop` tokens.\r\n\t *\r\n\t * @throws UnsupportedOperationException if this stream does not support\r\n\t * this method for the specified tokens\r\n\t */\r\n\t//@NotNull\r\n\tgetTextFromRange(start: any, stop: any): string;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:58.1768850-07:00\r\n\r\nimport { Interval } from \"./misc/Interval\";\r\nimport { Override } from \"./Decorators\";\r\nimport { Token } from \"./Token\";\r\nimport { TokenStream } from \"./TokenStream\";\r\n\r\nimport * as Utils from \"./misc/Utils\";\r\n\r\n/**\r\n * Useful for rewriting out a buffered input token stream after doing some\r\n * augmentation or other manipulations on it.\r\n *\r\n * You can insert stuff, replace, and delete chunks. Note that the operations\r\n * are done lazily--only if you convert the buffer to a {@link String} with\r\n * {@link TokenStream#getText()}. This is very efficient because you are not\r\n * moving data around all the time. As the buffer of tokens is converted to\r\n * strings, the {@link #getText()} method(s) scan the input token stream and\r\n * check to see if there is an operation at the current index. If so, the\r\n * operation is done and then normal {@link String} rendering continues on the\r\n * buffer. This is like having multiple Turing machine instruction streams\r\n * (programs) operating on a single input tape. :)\r\n *\r\n * This rewriter makes no modifications to the token stream. It does not ask the\r\n * stream to fill itself up nor does it advance the input cursor. The token\r\n * stream `TokenStream.index` will return the same value before and\r\n * after any {@link #getText()} call.\r\n *\r\n * The rewriter only works on tokens that you have in the buffer and ignores the\r\n * current input cursor. If you are buffering tokens on-demand, calling\r\n * {@link #getText()} halfway through the input will only do rewrites for those\r\n * tokens in the first half of the file.\r\n *\r\n * Since the operations are done lazily at {@link #getText}-time, operations do\r\n * not screw up the token index values. That is, an insert operation at token\r\n * index `i` does not change the index values for tokens\r\n * `i`+1..n-1.\r\n *\r\n * Because operations never actually alter the buffer, you may always get the\r\n * original token stream back without undoing anything. Since the instructions\r\n * are queued up, you can easily simulate transactions and roll back any changes\r\n * if there is an error just by removing instructions. For example,\r\n *\r\n * ```\r\n * CharStream input = new ANTLRFileStream(\"input\");\r\n * TLexer lex = new TLexer(input);\r\n * CommonTokenStream tokens = new CommonTokenStream(lex);\r\n * T parser = new T(tokens);\r\n * TokenStreamRewriter rewriter = new TokenStreamRewriter(tokens);\r\n * parser.startRule();\r\n * ```\r\n *\r\n * Then in the rules, you can execute (assuming rewriter is visible):\r\n *\r\n * ```\r\n * Token t,u;\r\n * ...\r\n * rewriter.insertAfter(t, \"text to put after t\");}\r\n * rewriter.insertAfter(u, \"text after u\");}\r\n * System.out.println(rewriter.getText());\r\n * ```\r\n *\r\n * You can also have multiple \"instruction streams\" and get multiple rewrites\r\n * from a single pass over the input. Just name the instruction streams and use\r\n * that name again when printing the buffer. This could be useful for generating\r\n * a C file and also its header file--all from the same buffer:\r\n *\r\n * ```\r\n * rewriter.insertAfter(\"pass1\", t, \"text to put after t\");}\r\n * rewriter.insertAfter(\"pass2\", u, \"text after u\");}\r\n * System.out.println(rewriter.getText(\"pass1\"));\r\n * System.out.println(rewriter.getText(\"pass2\"));\r\n * ```\r\n *\r\n * If you don't use named rewrite streams, a \"default\" stream is used as the\r\n * first example shows.\r\n */\r\nexport class TokenStreamRewriter {\r\n\tpublic static readonly DEFAULT_PROGRAM_NAME: string = \"default\";\r\n\tpublic static readonly PROGRAM_INIT_SIZE: number = 100;\r\n\tpublic static readonly MIN_TOKEN_INDEX: number = 0;\r\n\r\n\t/** Our source stream */\r\n\tprotected tokens: TokenStream;\r\n\r\n\t/** You may have multiple, named streams of rewrite operations.\r\n\t * I'm calling these things \"programs.\"\r\n\t * Maps String (name) → rewrite (List)\r\n\t */\r\n\tprotected programs: Map;\r\n\r\n\t/** Map String (program name) → Integer index */\r\n\tprotected lastRewriteTokenIndexes: Map;\r\n\r\n\tconstructor(tokens: TokenStream) {\r\n\t\tthis.tokens = tokens;\r\n\t\tthis.programs = new Map();\r\n\t\tthis.programs.set(TokenStreamRewriter.DEFAULT_PROGRAM_NAME, []);\r\n\t\tthis.lastRewriteTokenIndexes = new Map();\r\n\t}\r\n\r\n\tpublic getTokenStream(): TokenStream {\r\n\t\treturn this.tokens;\r\n\t}\r\n\r\n\tpublic rollback(instructionIndex: number): void;\r\n\t/** Rollback the instruction stream for a program so that\r\n\t * the indicated instruction (via instructionIndex) is no\r\n\t * longer in the stream. UNTESTED!\r\n\t */\r\n\tpublic rollback(instructionIndex: number, programName: string): void;\r\n\tpublic rollback(instructionIndex: number, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tlet is: RewriteOperation[] | undefined = this.programs.get(programName);\r\n\t\tif ( is != null ) {\r\n\t\t\tthis.programs.set(programName, is.slice(TokenStreamRewriter.MIN_TOKEN_INDEX, instructionIndex));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic deleteProgram(): void;\r\n\r\n\t/** Reset the program so that no instructions exist */\r\n\tpublic deleteProgram(programName: string): void;\r\n\tpublic deleteProgram(programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tthis.rollback(TokenStreamRewriter.MIN_TOKEN_INDEX, programName);\r\n\t}\r\n\r\n\tpublic insertAfter(t: Token, text: {}): void;\r\n\tpublic insertAfter(index: number, text: {}): void;\r\n\tpublic insertAfter(t: Token, text: {}, programName: string): void;\r\n\tpublic insertAfter(index: number, text: {}, programName: string): void;\r\n\tpublic insertAfter(tokenOrIndex: Token | number, text: {}, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tlet index: number;\r\n\t\tif (typeof tokenOrIndex === \"number\") {\r\n\t\t\tindex = tokenOrIndex;\r\n\t\t} else {\r\n\t\t\tindex = tokenOrIndex.tokenIndex;\r\n\t\t}\r\n\r\n\t\t// to insert after, just insert before next index (even if past end)\r\n\t\tlet rewrites: RewriteOperation[] = this.getProgram(programName);\r\n\t\tlet op = new InsertAfterOp(this.tokens, index, rewrites.length, text);\r\n\t\trewrites.push(op);\r\n\t}\r\n\r\n\tpublic insertBefore(t: Token, text: {}): void;\r\n\tpublic insertBefore(index: number, text: {}): void;\r\n\tpublic insertBefore(t: Token, text: {}, programName: string): void;\r\n\tpublic insertBefore(index: number, text: {}, programName: string): void;\r\n\tpublic insertBefore(tokenOrIndex: Token | number, text: {}, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tlet index: number;\r\n\t\tif (typeof tokenOrIndex === \"number\") {\r\n\t\t\tindex = tokenOrIndex;\r\n\t\t} else {\r\n\t\t\tindex = tokenOrIndex.tokenIndex;\r\n\t\t}\r\n\r\n\t\tlet rewrites: RewriteOperation[] = this.getProgram(programName);\r\n\t\tlet op: RewriteOperation = new InsertBeforeOp(this.tokens, index, rewrites.length, text);\r\n\t\trewrites.push(op);\r\n\t}\r\n\r\n\tpublic replaceSingle(index: number, text: {}): void;\r\n\tpublic replaceSingle(indexT: Token, text: {}): void;\r\n\tpublic replaceSingle(index: Token | number, text: {}): void {\r\n\t\tif (typeof index === \"number\") {\r\n\t\t\tthis.replace(index, index, text);\r\n\t\t} else {\r\n\t\t\tthis.replace(index, index, text);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic replace(from: number, to: number, text: {}): void;\r\n\r\n\tpublic replace(from: Token, to: Token, text: {}): void;\r\n\r\n\tpublic replace(from: number, to: number, text: {}, programName: string): void;\r\n\r\n\tpublic replace(from: Token, to: Token, text: {}, programName: string): void;\r\n\r\n\tpublic replace(from: Token | number, to: Token | number, text: {}, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tif (typeof from !== \"number\") {\r\n\t\t\tfrom = from.tokenIndex;\r\n\t\t}\r\n\r\n\t\tif (typeof to !== \"number\") {\r\n\t\t\tto = to.tokenIndex;\r\n\t\t}\r\n\r\n\t\tif ( from > to || from < 0 || to < 0 || to >= this.tokens.size ) {\r\n\t\t\tthrow new RangeError(`replace: range invalid: ${from}..${to}(size=${this.tokens.size})`);\r\n\t\t}\r\n\r\n\t\tlet rewrites: RewriteOperation[] = this.getProgram(programName);\r\n\t\tlet op: RewriteOperation = new ReplaceOp(this.tokens, from, to, rewrites.length, text);\r\n\t\trewrites.push(op);\r\n\t}\r\n\r\n\tpublic delete(index: number): void;\r\n\r\n\tpublic delete(from: number, to: number): void;\r\n\r\n\tpublic delete(indexT: Token): void;\r\n\r\n\tpublic delete(from: Token, to: Token): void;\r\n\r\n\tpublic delete(from: number, to: number, programName: string): void;\r\n\r\n\tpublic delete(from: Token, to: Token, programName: string): void;\r\n\r\n\tpublic delete(from: Token | number, to?: Token | number, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void {\r\n\t\tif (to === undefined) {\r\n\t\t\tto = from;\r\n\t\t}\r\n\r\n\t\tif (typeof from === \"number\") {\r\n\t\t\tthis.replace(from, to as number, \"\", programName);\r\n\t\t} else {\r\n\t\t\tthis.replace(from, to as Token, \"\", programName);\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getLastRewriteTokenIndex(): number;\r\n\r\n\tprotected getLastRewriteTokenIndex(programName: string): number;\r\n\r\n\tprotected getLastRewriteTokenIndex(programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): number {\r\n\t\tlet I: number | undefined = this.lastRewriteTokenIndexes.get(programName);\r\n\t\tif ( I == null ) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\treturn I;\r\n\t}\r\n\r\n\tprotected setLastRewriteTokenIndex(programName: string, i: number): void {\r\n\t\tthis.lastRewriteTokenIndexes.set(programName, i);\r\n\t}\r\n\r\n\tprotected getProgram(name: string): RewriteOperation[] {\r\n\t\tlet is: RewriteOperation[] | undefined = this.programs.get(name);\r\n\t\tif ( is == null ) {\r\n\t\t\tis = this.initializeProgram(name);\r\n\t\t}\r\n\r\n\t\treturn is;\r\n\t}\r\n\r\n\tprivate initializeProgram(name: string): RewriteOperation[] {\r\n\t\tlet is: RewriteOperation[] = [];\r\n\t\tthis.programs.set(name, is);\r\n\t\treturn is;\r\n\t}\r\n\r\n\t/** Return the text from the original tokens altered per the\r\n\t * instructions given to this rewriter.\r\n\t */\r\n\tpublic getText(): string;\r\n\r\n\t/** Return the text from the original tokens altered per the\r\n\t * instructions given to this rewriter in programName.\r\n\t *\r\n\t * @since 4.5\r\n\t */\r\n\tpublic getText(programName: string): string;\r\n\r\n\t/** Return the text associated with the tokens in the interval from the\r\n\t * original token stream but with the alterations given to this rewriter.\r\n\t * The interval refers to the indexes in the original token stream.\r\n\t * We do not alter the token stream in any way, so the indexes\r\n\t * and intervals are still consistent. Includes any operations done\r\n\t * to the first and last token in the interval. So, if you did an\r\n\t * insertBefore on the first token, you would get that insertion.\r\n\t * The same is true if you do an insertAfter the stop token.\r\n\t */\r\n\tpublic getText(interval: Interval): string;\r\n\r\n\tpublic getText(interval: Interval, programName: string): string;\r\n\r\n\tpublic getText(intervalOrProgram?: Interval | string, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): string {\r\n\t\tlet interval: Interval;\r\n\t\tif (intervalOrProgram instanceof Interval) {\r\n\t\t\tinterval = intervalOrProgram;\r\n\t\t} else {\r\n\t\t\tinterval = Interval.of(0, this.tokens.size - 1);\r\n\t\t}\r\n\r\n\t\tif (typeof intervalOrProgram === \"string\") {\r\n\t\t\tprogramName = intervalOrProgram;\r\n\t\t}\r\n\r\n\t\tlet rewrites: RewriteOperation[] | undefined = this.programs.get(programName);\r\n\t\tlet start: number = interval.a;\r\n\t\tlet stop: number = interval.b;\r\n\r\n\t\t// ensure start/end are in range\r\n\t\tif ( stop > this.tokens.size - 1 ) {\r\n\t\t\tstop = this.tokens.size - 1;\r\n\t\t}\r\n\t\tif ( start < 0 ) {\r\n\t\t\tstart = 0;\r\n\t\t}\r\n\r\n\t\tif ( rewrites == null || rewrites.length === 0 ) {\r\n\t\t\treturn this.tokens.getText(interval); // no instructions to execute\r\n\t\t}\r\n\r\n\t\tlet buf: string[] = [];\r\n\r\n\t\t// First, optimize instruction stream\r\n\t\tlet indexToOp: Map = this.reduceToSingleOperationPerIndex(rewrites);\r\n\r\n\t\t// Walk buffer, executing instructions and emitting tokens\r\n\t\tlet i: number = start;\r\n\t\twhile ( i <= stop && i < this.tokens.size ) {\r\n\t\t\tlet op: RewriteOperation | undefined = indexToOp.get(i);\r\n\t\t\tindexToOp.delete(i); // remove so any left have index size-1\r\n\t\t\tlet t: Token = this.tokens.get(i);\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\t// no operation at that index, just dump token\r\n\t\t\t\tif ( t.type !== Token.EOF ) {\r\n\t\t\t\t\tbuf.push(String(t.text));\r\n\t\t\t\t}\r\n\t\t\t\ti++; // move to next token\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ti = op.execute(buf); // execute operation and skip\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// include stuff after end if it's last index in buffer\r\n\t\t// So, if they did an insertAfter(lastValidIndex, \"foo\"), include\r\n\t\t// foo if end==lastValidIndex.\r\n\t\tif ( stop === this.tokens.size - 1 ) {\r\n\t\t\t// Scan any remaining operations after last token\r\n\t\t\t// should be included (they will be inserts).\r\n\t\t\tfor (let op of indexToOp.values()) {\r\n\t\t\t\tif ( op.index >= this.tokens.size - 1 ) {\r\n\t\t\t\t\tbuf.push(op.text.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn buf.join(\"\");\r\n\t}\r\n\r\n\t/** We need to combine operations and report invalid operations (like\r\n\t * overlapping replaces that are not completed nested). Inserts to\r\n\t * same index need to be combined etc... Here are the cases:\r\n\t *\r\n\t * I.i.u I.j.v\t\t\t\t\t\t\t\tleave alone, nonoverlapping\r\n\t * I.i.u I.i.v\t\t\t\t\t\t\t\tcombine: Iivu\r\n\t *\r\n\t * R.i-j.u R.x-y.v\t| i-j in x-y\t\t\tdelete first R\r\n\t * R.i-j.u R.i-j.v\t\t\t\t\t\t\tdelete first R\r\n\t * R.i-j.u R.x-y.v\t| x-y in i-j\t\t\tERROR\r\n\t * R.i-j.u R.x-y.v\t| boundaries overlap\tERROR\r\n\t *\r\n\t * Delete special case of replace (text==undefined):\r\n\t * D.i-j.u D.x-y.v\t| boundaries overlap\tcombine to max(min)..max(right)\r\n\t *\r\n\t * I.i.u R.x-y.v | i in (x+1)-y\t\t\tdelete I (since insert before\r\n\t * \t\t\t\t\t\t\t\t\t\t\twe're not deleting i)\r\n\t * I.i.u R.x-y.v | i not in (x+1)-y\t\tleave alone, nonoverlapping\r\n\t * R.x-y.v I.i.u | i in x-y\t\t\t\tERROR\r\n\t * R.x-y.v I.x.u \t\t\t\t\t\t\tR.x-y.uv (combine, delete I)\r\n\t * R.x-y.v I.i.u | i not in x-y\t\t\tleave alone, nonoverlapping\r\n\t *\r\n\t * I.i.u = insert u before op @ index i\r\n\t * R.x-y.u = replace x-y indexed tokens with u\r\n\t *\r\n\t * First we need to examine replaces. For any replace op:\r\n\t *\r\n\t * \t\t1. wipe out any insertions before op within that range.\r\n\t * \t\t2. Drop any replace op before that is contained completely within\r\n\t * \t that range.\r\n\t * \t\t3. Throw exception upon boundary overlap with any previous replace.\r\n\t *\r\n\t * Then we can deal with inserts:\r\n\t *\r\n\t * \t\t1. for any inserts to same index, combine even if not adjacent.\r\n\t * \t\t2. for any prior replace with same left boundary, combine this\r\n\t * \t insert with replace and delete this replace.\r\n\t * \t\t3. throw exception if index in same range as previous replace\r\n\t *\r\n\t * Don't actually delete; make op undefined in list. Easier to walk list.\r\n\t * Later we can throw as we add to index → op map.\r\n\t *\r\n\t * Note that I.2 R.2-2 will wipe out I.2 even though, technically, the\r\n\t * inserted stuff would be before the replace range. But, if you\r\n\t * add tokens in front of a method body '{' and then delete the method\r\n\t * body, I think the stuff before the '{' you added should disappear too.\r\n\t *\r\n\t * Return a map from token index to operation.\r\n\t */\r\n\tprotected reduceToSingleOperationPerIndex(rewrites: Array): Map {\r\n\t\t// console.log(`rewrites=[${Utils.join(rewrites, \", \")}]`);\r\n\r\n\t\t// WALK REPLACES\r\n\t\tfor (let i = 0; i < rewrites.length; i++) {\r\n\t\t\tlet op: RewriteOperation | undefined = rewrites[i];\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( !(op instanceof ReplaceOp) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tlet rop: ReplaceOp = op;\r\n\t\t\t// Wipe prior inserts within range\r\n\t\t\tlet inserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i);\r\n\t\t\tfor (let iop of inserts) {\r\n\t\t\t\tif ( iop.index === rop.index ) {\r\n\t\t\t\t\t// E.g., insert before 2, delete 2..2; update replace\r\n\t\t\t\t\t// text to include insert before, kill insert\r\n\t\t\t\t\trewrites[iop.instructionIndex] = undefined;\r\n\t\t\t\t\trop.text = iop.text.toString() + (rop.text != null ? rop.text.toString() : \"\");\r\n\t\t\t\t}\r\n\t\t\t\telse if ( iop.index > rop.index && iop.index <= rop.lastIndex ) {\r\n\t\t\t\t\t// delete insert as it's a no-op.\r\n\t\t\t\t\trewrites[iop.instructionIndex] = undefined;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Drop any prior replaces contained within\r\n\t\t\tlet prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i);\r\n\t\t\tfor (let prevRop of prevReplaces) {\r\n\t\t\t\tif ( prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex ) {\r\n\t\t\t\t\t// delete replace as it's a no-op.\r\n\t\t\t\t\trewrites[prevRop.instructionIndex] = undefined;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// throw exception unless disjoint or identical\r\n\t\t\t\tlet disjoint: boolean =\r\n\t\t\t\t\tprevRop.lastIndex < rop.index || prevRop.index > rop.lastIndex;\r\n\t\t\t\t// Delete special case of replace (text==null):\r\n\t\t\t\t// D.i-j.u D.x-y.v\t| boundaries overlap\tcombine to max(min)..max(right)\r\n\t\t\t\tif ( prevRop.text == null && rop.text == null && !disjoint ) {\r\n\t\t\t\t\t// console.log(`overlapping deletes: ${prevRop}, ${rop}`);\r\n\t\t\t\t\trewrites[prevRop.instructionIndex] = undefined; // kill first delete\r\n\t\t\t\t\trop.index = Math.min(prevRop.index, rop.index);\r\n\t\t\t\t\trop.lastIndex = Math.max(prevRop.lastIndex, rop.lastIndex);\r\n\t\t\t\t\t// console.log(`new rop ${rop}`);\r\n\t\t\t\t}\r\n\t\t\t\telse if ( !disjoint ) {\r\n\t\t\t\t\tthrow new Error(`replace op boundaries of ${rop} overlap with previous ${prevRop}`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// WALK INSERTS\r\n\t\tfor (let i = 0; i < rewrites.length; i++) {\r\n\t\t\tlet op: RewriteOperation | undefined = rewrites[i];\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( !(op instanceof InsertBeforeOp) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tlet iop: InsertBeforeOp = op;\r\n\t\t\t// combine current insert with prior if any at same index\r\n\t\t\tlet prevInserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i);\r\n\t\t\tfor (let prevIop of prevInserts) {\r\n\t\t\t\tif ( prevIop.index === iop.index ) {\r\n\t\t\t\t\tif (prevIop instanceof InsertAfterOp) {\r\n\t\t\t\t\t\tiop.text = this.catOpText(prevIop.text, iop.text);\r\n\t\t\t\t\t\trewrites[prevIop.instructionIndex] = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (prevIop instanceof InsertBeforeOp) { // combine objects\r\n\t\t\t\t\t\t// convert to strings...we're in process of toString'ing\r\n\t\t\t\t\t\t// whole token buffer so no lazy eval issue with any templates\r\n\t\t\t\t\t\tiop.text = this.catOpText(iop.text, prevIop.text);\r\n\t\t\t\t\t\t// delete redundant prior insert\r\n\t\t\t\t\t\trewrites[prevIop.instructionIndex] = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// look for replaces where iop.index is in range; error\r\n\t\t\tlet prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i);\r\n\t\t\tfor (let rop of prevReplaces) {\r\n\t\t\t\tif ( iop.index === rop.index ) {\r\n\t\t\t\t\trop.text = this.catOpText(iop.text, rop.text);\r\n\t\t\t\t\trewrites[i] = undefined;\t// delete current insert\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif ( iop.index >= rop.index && iop.index <= rop.lastIndex ) {\r\n\t\t\t\t\tthrow new Error(`insert op ${iop} within boundaries of previous ${rop}`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// console.log(`rewrites after=[${Utils.join(rewrites, \", \")}]`);\r\n\t\tlet m: Map = new Map();\r\n\t\tfor (let op of rewrites) {\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\t// ignore deleted ops\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( m.get(op.index) != null ) {\r\n\t\t\t\tthrow new Error(\"should only be one op per index\");\r\n\t\t\t}\r\n\t\t\tm.set(op.index, op);\r\n\t\t}\r\n\t\t// console.log(`index to op: ${m}`);\r\n\t\treturn m;\r\n\t}\r\n\r\n\tprotected catOpText(a: {}, b: {}): string {\r\n\t\tlet x: string = \"\";\r\n\t\tlet y: string = \"\";\r\n\t\tif ( a != null ) {\r\n\t\t\tx = a.toString();\r\n\t\t}\r\n\t\tif ( b != null ) {\r\n\t\t\ty = b.toString();\r\n\t\t}\r\n\t\treturn x + y;\r\n\t}\r\n\r\n\t/** Get all operations before an index of a particular kind */\r\n\tprotected getKindOfOps(rewrites: Array, kind: {new(...args: any[]): T}, before: number): T[] {\r\n\t\tlet ops: T[] = [];\r\n\t\tfor (let i = 0; i < before && i < rewrites.length; i++) {\r\n\t\t\tlet op: RewriteOperation | undefined = rewrites[i];\r\n\t\t\tif ( op == null ) {\r\n\t\t\t\t// ignore deleted\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( op instanceof kind ) {\r\n\t\t\t\tops.push(op);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ops;\r\n\t}\r\n}\r\n\r\n// Define the rewrite operation hierarchy\r\n\r\nexport class RewriteOperation {\r\n\tprotected readonly tokens: TokenStream;\r\n\t/** What index into rewrites List are we? */\r\n\tpublic readonly instructionIndex: number;\r\n\t/** Token buffer index. */\r\n\tpublic index: number;\r\n\tpublic text: {};\r\n\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number);\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text: {});\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text?: {}) {\r\n\t\tthis.tokens = tokens;\r\n\t\tthis.instructionIndex = instructionIndex;\r\n\t\tthis.index = index;\r\n\t\tthis.text = text === undefined ? \"\" : text;\r\n\t}\r\n\r\n\t/** Execute the rewrite operation by possibly adding to the buffer.\r\n\t * Return the index of the next token to operate on.\r\n\t */\r\n\tpublic execute(buf: string[]): number {\r\n\t\treturn this.index;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tlet opName: string = this.constructor.name;\r\n\t\tlet $index = opName.indexOf(\"$\");\r\n\t\topName = opName.substring($index + 1, opName.length);\r\n\t\treturn \"<\" + opName + \"@\" + this.tokens.get(this.index) +\r\n\t\t\t\t\":\\\"\" + this.text + \"\\\">\";\r\n\t}\r\n}\r\n\r\nclass InsertBeforeOp extends RewriteOperation {\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text: {}) {\r\n\t\tsuper(tokens, index, instructionIndex, text);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic execute(buf: string[]): number {\r\n\t\tbuf.push(this.text.toString());\r\n\t\tif ( this.tokens.get(this.index).type !== Token.EOF ) {\r\n\t\t\tbuf.push(String(this.tokens.get(this.index).text));\r\n\t\t}\r\n\t\treturn this.index + 1;\r\n\t}\r\n}\r\n\r\n/** Distinguish between insert after/before to do the \"insert afters\"\r\n * first and then the \"insert befores\" at same index. Implementation\r\n * of \"insert after\" is \"insert before index+1\".\r\n */\r\nclass InsertAfterOp extends InsertBeforeOp {\r\n\tconstructor(tokens: TokenStream, index: number, instructionIndex: number, text: {}) {\r\n\t\tsuper(tokens, index + 1, instructionIndex, text); // insert after is insert before index+1\r\n\t}\r\n}\r\n\r\n/** I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp\r\n * instructions.\r\n */\r\nclass ReplaceOp extends RewriteOperation {\r\n\tpublic lastIndex: number;\r\n\tconstructor(tokens: TokenStream, from: number, to: number, instructionIndex: number, text: {}) {\r\n\t\tsuper(tokens, from, instructionIndex, text);\r\n\t\tthis.lastIndex = to;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic execute(buf: string[]): number {\r\n\t\tif ( this.text != null ) {\r\n\t\t\tbuf.push(this.text.toString());\r\n\t\t}\r\n\t\treturn this.lastIndex + 1;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic toString(): string {\r\n\t\tif ( this.text == null ) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:59.4986610-07:00\r\n\r\n/**\r\n * This interface provides information about the vocabulary used by a\r\n * recognizer.\r\n *\r\n * @see Recognizer.vocabulary\r\n * @author Sam Harwell\r\n */\r\nexport interface Vocabulary {\r\n\r\n\t/**\r\n\t * Returns the highest token type value. It can be used to iterate from\r\n\t * zero to that number, inclusively, thus querying all stored entries.\r\n\t * @returns the highest token type value\r\n\t */\r\n\treadonly maxTokenType: number;\r\n\r\n\t/**\r\n\t * Gets the string literal associated with a token type. The string returned\r\n\t * by this method, when not `undefined`, can be used unaltered in a parser\r\n\t * grammar to represent this token type.\r\n\t *\r\n\t * The following table shows examples of lexer rules and the literal\r\n\t * names assigned to the corresponding token types.\r\n\t *\r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t *
        RuleLiteral NameJava String Literal
        `THIS : 'this';``'this'``\"'this'\"`
        `SQUOTE : '\\'';``'\\''``\"'\\\\''\"`
        `ID : [A-Z]+;`n/a`undefined`
        \r\n\t *\r\n\t * @param tokenType The token type.\r\n\t *\r\n\t * @returns The string literal associated with the specified token type, or\r\n\t * `undefined` if no string literal is associated with the type.\r\n\t */\r\n\tgetLiteralName(tokenType: number): string | undefined;\r\n\r\n\t/**\r\n\t * Gets the symbolic name associated with a token type. The string returned\r\n\t * by this method, when not `undefined`, can be used unaltered in a parser\r\n\t * grammar to represent this token type.\r\n\t *\r\n\t * This method supports token types defined by any of the following\r\n\t * methods:\r\n\t *\r\n\t * * Tokens created by lexer rules.\r\n\t * * Tokens defined in a `tokens{}` block in a lexer or parser\r\n\t * grammar.\r\n\t * * The implicitly defined `EOF` token, which has the token type\r\n\t * {@link Token#EOF}.\r\n\t *\r\n\t * The following table shows examples of lexer rules and the literal\r\n\t * names assigned to the corresponding token types.\r\n\t *\r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t *
        RuleSymbolic Name
        `THIS : 'this';``THIS`
        `SQUOTE : '\\'';``SQUOTE`
        `ID : [A-Z]+;``ID`
        \r\n\t *\r\n\t * @param tokenType The token type.\r\n\t *\r\n\t * @returns The symbolic name associated with the specified token type, or\r\n\t * `undefined` if no symbolic name is associated with the type.\r\n\t */\r\n\tgetSymbolicName(tokenType: number): string | undefined;\r\n\r\n\t/**\r\n\t * Gets the display name of a token type.\r\n\t *\r\n\t * ANTLR provides a default implementation of this method, but\r\n\t * applications are free to override the behavior in any manner which makes\r\n\t * sense for the application. The default implementation returns the first\r\n\t * result from the following list which produces a non-`undefined`\r\n\t * result.\r\n\t *\r\n\t * 1. The result of {@link #getLiteralName}\r\n\t * 1. The result of {@link #getSymbolicName}\r\n\t * 1. The result of {@link Integer#toString}\r\n\t *\r\n\t * @param tokenType The token type.\r\n\t *\r\n\t * @returns The display name of the token type, for use in error reporting or\r\n\t * other user-visible messages which reference specific token types.\r\n\t */\r\n\t//@NotNull\r\n\tgetDisplayName(tokenType: number): string;\r\n\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:59.7015751-07:00\r\n\r\nimport { Token } from \"./Token\";\r\n\r\nexport interface WritableToken extends Token {\r\n\ttext: string | undefined;\r\n\r\n\ttype: number;\r\n\r\n\tline: number;\r\n\r\n\tcharPositionInLine: number;\r\n\r\n\tchannel: number;\r\n\r\n\ttokenIndex: number;\r\n}\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\nexport * from \"./ANTLRErrorListener\";\r\nexport * from \"./ANTLRErrorStrategy\";\r\n// export * from \"./ANTLRFileStream\";\r\nexport * from \"./ANTLRInputStream\";\r\nexport * from \"./BailErrorStrategy\";\r\nexport * from \"./BufferedTokenStream\";\r\nexport * from \"./CharStream\";\r\nexport * from \"./CharStreams\";\r\nexport * from \"./CodePointBuffer\";\r\nexport * from \"./CodePointCharStream\";\r\nexport * from \"./CommonToken\";\r\nexport * from \"./CommonTokenFactory\";\r\nexport * from \"./CommonTokenStream\";\r\nexport * from \"./ConsoleErrorListener\";\r\nexport * from \"./DefaultErrorStrategy\";\r\nexport * from \"./Dependents\";\r\nexport * from \"./DiagnosticErrorListener\";\r\nexport * from \"./FailedPredicateException\";\r\nexport * from \"./InputMismatchException\";\r\nexport * from \"./InterpreterRuleContext\";\r\nexport * from \"./IntStream\";\r\nexport * from \"./Lexer\";\r\nexport * from \"./LexerInterpreter\";\r\nexport * from \"./LexerNoViableAltException\";\r\nexport * from \"./ListTokenSource\";\r\nexport * from \"./NoViableAltException\";\r\nexport * from \"./Parser\";\r\nexport * from \"./ParserErrorListener\";\r\nexport * from \"./ParserInterpreter\";\r\nexport * from \"./ParserRuleContext\";\r\nexport * from \"./ProxyErrorListener\";\r\nexport * from \"./ProxyParserErrorListener\";\r\nexport * from \"./RecognitionException\";\r\nexport * from \"./Recognizer\";\r\nexport * from \"./RuleContext\";\r\nexport * from \"./RuleContextWithAltNum\";\r\nexport * from \"./RuleDependency\";\r\nexport * from \"./RuleVersion\";\r\nexport * from \"./Token\";\r\nexport * from \"./TokenFactory\";\r\nexport * from \"./TokenSource\";\r\nexport * from \"./TokenStream\";\r\nexport * from \"./TokenStreamRewriter\";\r\n// export * from \"./UnbufferedCharStream\";\r\n// export * from \"./UnbufferedTokenStream\";\r\nexport * from \"./Vocabulary\";\r\nexport * from \"./VocabularyImpl\";\r\nexport * from \"./WritableToken\";\r\n", "/*!\r\n * Copyright 2016 The ANTLR Project. All rights reserved.\r\n * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.\r\n */\r\n\r\n// ConvertTo-TS run at 2016-10-04T11:26:47.3092279-07:00\r\n\r\nimport { ErrorNode } from \"./ErrorNode\";\r\nimport { NotNull, Override } from \"../Decorators\";\r\nimport { ParseTree } from \"./ParseTree\";\r\nimport { ParseTreeVisitor } from \"./ParseTreeVisitor\";\r\nimport { RuleNode } from \"./RuleNode\";\r\nimport { TerminalNode } from \"./TerminalNode\";\r\n\r\nexport abstract class AbstractParseTreeVisitor implements ParseTreeVisitor {\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation calls {@link ParseTree#accept} on the\r\n\t * specified tree.\r\n\t */\r\n\t@Override\r\n\tpublic visit(@NotNull tree: ParseTree): Result {\r\n\t\treturn tree.accept(this);\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation initializes the aggregate result to\r\n\t * {@link #defaultResult defaultResult()}. Before visiting each child, it\r\n\t * calls {@link #shouldVisitNextChild shouldVisitNextChild}; if the result\r\n\t * is `false` no more children are visited and the current aggregate\r\n\t * result is returned. After visiting a child, the aggregate result is\r\n\t * updated by calling {@link #aggregateResult aggregateResult} with the\r\n\t * previous aggregate result and the result of visiting the child.\r\n\t *\r\n\t * The default implementation is not safe for use in visitors that modify\r\n\t * the tree structure. Visitors that modify the tree should override this\r\n\t * method to behave properly in respect to the specific algorithm in use.\r\n\t */\r\n\t@Override\r\n\tpublic visitChildren(@NotNull node: RuleNode): Result {\r\n\t\tlet result: Result = this.defaultResult();\r\n\t\tlet n: number = node.childCount;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tif (!this.shouldVisitNextChild(node, result)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tlet c: ParseTree = node.getChild(i);\r\n\t\t\tlet childResult: Result = c.accept(this);\r\n\t\t\tresult = this.aggregateResult(result, childResult);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation returns the result of\r\n\t * {@link #defaultResult defaultResult}.\r\n\t */\r\n\t@Override\r\n\tpublic visitTerminal(@NotNull node: TerminalNode): Result {\r\n\t\treturn this.defaultResult();\r\n\t}\r\n\r\n\t/**\r\n\t * {@inheritDoc}\r\n\t *\r\n\t * The default implementation returns the result of\r\n\t * {@link #defaultResult defaultResult}.\r\n\t */\r\n\t@Override\r\n\tpublic visitErrorNode(@NotNull node: ErrorNode): Result {\r\n\t\treturn this.defaultResult();\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the default value returned by visitor methods. This value is\r\n\t * returned by the default implementations of\r\n\t * {@link #visitTerminal visitTerminal}, {@link #visitErrorNode visitErrorNode}.\r\n\t * The default implementation of {@link #visitChildren visitChildren}\r\n\t * initializes its aggregate result to this value.\r\n\t *\r\n\t * @returns The default value returned by visitor methods.\r\n\t */\r\n\tprotected abstract defaultResult(): Result;\r\n\r\n\t/**\r\n\t * Aggregates the results of visiting multiple children of a node. After\r\n\t * either all children are visited or {@link #shouldVisitNextChild} returns\r\n\t * `false`, the aggregate value is returned as the result of\r\n\t * {@link #visitChildren}.\r\n\t *\r\n\t * The default implementation returns `nextResult`, meaning\r\n\t * {@link #visitChildren} will return the result of the last child visited\r\n\t * (or return the initial value if the node has no children).\r\n\t *\r\n\t * @param aggregate The previous aggregate value. In the default\r\n\t * implementation, the aggregate value is initialized to\r\n\t * {@link #defaultResult}, which is passed as the `aggregate` argument\r\n\t * to this method after the first child node is visited.\r\n\t * @param nextResult The result of the immediately preceding call to visit\r\n\t * a child node.\r\n\t *\r\n\t * @returns The updated aggregate result.\r\n\t */\r\n\tprotected aggregateResult(aggregate: Result, nextResult: Result): Result {\r\n\t\treturn nextResult;\r\n\t}\r\n\r\n\t/**\r\n\t * This method is called after visiting each child in\r\n\t * {@link #visitChildren}. This method is first called before the first\r\n\t * child is visited; at that point `currentResult` will be the initial\r\n\t * value (in the default implementation, the initial value is returned by a\r\n\t * call to {@link #defaultResult}. This method is not called after the last\r\n\t * child is visited.\r\n\t *\r\n\t * The default implementation always returns `true`, indicating that\r\n\t * `visitChildren` should only return after all children are visited.\r\n\t * One reason to override this method is to provide a \"short circuit\"\r\n\t * evaluation option for situations where the result of visiting a single\r\n\t * child has the potential to determine the result of the visit operation as\r\n\t * a whole.\r\n\t *\r\n\t * @param node The {@link RuleNode} whose children are currently being\r\n\t * visited.\r\n\t * @param currentResult The current aggregate result of the children visited\r\n\t * to the current point.\r\n\t *\r\n\t * @returns `true` to continue visiting children. Otherwise return\r\n\t * `false` to stop visiting children and immediately return the\r\n\t * current aggregate result from {@link #visitChildren}.\r\n\t */\r\n\tprotected shouldVisitNextChild(@NotNull node: RuleNode, currentResult: Result): boolean {\r\n\t\treturn true;\r\n\t}\r\n}\r\n", "", "export * from \"./parser\";\n\nexport type { ParseOptions } from \"./types\";\n", "import { ANTLRInputStream, CharStreams, CommonTokenStream } from 'antlr4ts'\n\nimport { SolidityLexer } from './antlr/SolidityLexer'\nimport { SolidityParser } from './antlr/SolidityParser'\nimport { ASTNode, astNodeTypes, ASTNodeTypeString, ASTVisitor, SourceUnit } from './ast-types'\nimport { ASTBuilder } from './ASTBuilder'\nimport ErrorListener from './ErrorListener'\n//import { buildTokenList } from './tokens'\nimport { ParseOptions, Token, TokenizeOptions } from './types'\nimport util from 'util'\nimport { ParseTreeListener } from 'antlr4ts/tree/ParseTreeListener'\nimport { ContractContext, FunctionContext, FunctionDescriptorContext, FunctionnameContext, SolidityBlocksParser } from './antlr/SolidityBlocksParser';\nimport { SolidityBlocksLexer } from './antlr/SolidityBlocksLexer'\nimport { SolidityBlocksListener } from './antlr/SolidityBlocksListener'\ninterface ParserErrorItem {\n message: string\n line: number\n column: number\n}\n\ntype ParseResult = SourceUnit & {\n errors?: any[]\n tokens?: Token[]\n}\n\nexport class ParserError extends Error {\n public errors: ParserErrorItem[]\n\n constructor(args: { errors: ParserErrorItem[] }) {\n super()\n const { message, line, column } = args.errors[0]\n this.message = `${message} (${line}:${column})`\n this.errors = args.errors\n\n if (Error.captureStackTrace !== undefined) {\n Error.captureStackTrace(this, this.constructor)\n } else {\n this.stack = new Error().stack\n }\n }\n}/*\nexport function tokenize(input: string, options: TokenizeOptions = {}): any {\n const inputStream = new ANTLRInputStream(input)\n const lexer = new SolidityLexer(inputStream)\n\n return buildTokenList(lexer.getAllTokens(), options)\n}\n*/\n\n\n\nexport function parse(\n input: string,\n options: ParseOptions = {},\n parseListsener: ParseTreeListener = {}\n\n): ParseResult | null {\n const inputStream = new ANTLRInputStream(input)\n const lexer = new SolidityLexer(inputStream)\n const tokenStream = new CommonTokenStream(lexer)\n const parser = new SolidityParser(tokenStream)\n\n const listener = new ErrorListener()\n lexer.removeErrorListeners()\n lexer.addErrorListener(listener)\n\n parser.removeErrorListeners()\n parser.addErrorListener(listener)\n\n const startTime = Date.now()\n parser.buildParseTree = true\n const sourceUnit = parser.sourceUnit()\n const endTime = Date.now()\n //console.log(`Parsing took ${endTime - startTime}ms`)\n \n const astBuilder = new ASTBuilder(options)\n\n astBuilder.visit(sourceUnit)\n\n const ast: ParseResult | null = astBuilder.result as any\n\n if (ast === null) {\n throw new Error('ast should never be null')\n }\n\n if (options.tolerant !== true && listener.hasErrors()) {\n throw new ParserError({ errors: listener.getErrors() })\n }\n if (options.tolerant === true && listener.hasErrors()) {\n ast.errors = listener.getErrors()\n }\n return ast\n}\n\n\n\nexport function parseBlock(\n input: string,\n options: ParseOptions = {},\n parseListsener: ParseTreeListener = {}\n\n): ParseResult | null {\n const inputStream = CharStreams.fromString(input)\n const lexer = new SolidityBlocksLexer(inputStream)\n const tokenStream = new CommonTokenStream(lexer)\n const parser = new SolidityBlocksParser(tokenStream)\n\n const listener = new ErrorListener()\n lexer.removeErrorListeners()\n lexer.addErrorListener(listener)\n\n parser.removeErrorListeners()\n parser.addErrorListener(listener)\n\n const result:any = []\n\n const l:SolidityBlocksListener = {\n exitContract(ctx:ContractContext){\n //console.log(ctx.exception)\n result.push({\n type: 'contract',\n name: ctx.functionname().text,\n start: ctx.start.startIndex,\n end: ctx.stop?.stopIndex,\n startLine: ctx.start.line,\n startColumn: ctx.start.charPositionInLine,\n endLine: ctx.stop?.line,\n endColumn: ctx.stop?.charPositionInLine,\n })\n //console.log(ctx.start.line)\n //console.log(ctx.stop?.line)\n },\n exitFunction(ctx:FunctionContext){\n\n const parentType = ctx.parent?.constructor.name\n let parentName = ''\n if(parentType === 'ContractContext'){\n if((ctx.parent as ContractContext)?.functionname){\n parentName = (ctx.parent as ContractContext)?.functionname().text\n }\n }\n result.push({\n type: 'function',\n name: ctx.functionDescriptor()?.functionname()?.text \n || ctx.functionDescriptor()?.Constructorkeyword()?.text\n || null,\n parent: parentName,\n start: ctx.start.startIndex,\n end: ctx.stop?.stopIndex,\n startLine: ctx.start.line,\n startColumn: ctx.start.charPositionInLine,\n endLine: ctx.stop?.line,\n endColumn: ctx.stop?.charPositionInLine,\n })\n //console.log(ctx.start.line)\n //console.log(ctx.stop?.line)\n }\n }\n\n parser.addParseListener(l)\n\n const startTime = Date.now()\n parser.buildParseTree = true\n const sourceUnit = parser.sol()\n const endTime = Date.now()\n //console.log(`Parsing blocks took ${endTime - startTime}ms`)\n result.sort((a:any, b:any) => (a.start > b.start) ? 1 : -1)\n return result\n}\n\nfunction _isASTNode(node: unknown): node is ASTNode {\n if (typeof node !== 'object' || node === null) {\n return false\n }\n\n const nodeAsAny: any = node\n\n if (Object.prototype.hasOwnProperty.call(nodeAsAny, 'type') && typeof nodeAsAny.type === \"string\") {\n return astNodeTypes.includes(nodeAsAny.type)\n }\n\n return false;\n}\n\nexport function visit(node: unknown, visitor: ASTVisitor, nodeParent?: ASTNode): void {\n if (Array.isArray(node)) {\n node.forEach((child) => visit(child, visitor, nodeParent))\n }\n\n if (!_isASTNode(node)) return\n\n let cont = true\n\n if (visitor[node.type] !== undefined) {\n // TODO can we avoid this `as any`\n cont = visitor[node.type]!(node as any, nodeParent)\n }\n\n if (cont === false) return\n\n for (const prop in node) {\n if (Object.prototype.hasOwnProperty.call(node, prop)) {\n // TODO can we avoid this `as any`\n visit((node as any)[prop], visitor, node)\n }\n }\n\n const selector = (node.type + ':exit') as `${ASTNodeTypeString}:exit`\n if (visitor[selector] !== undefined) {\n // TODO can we avoid this `as any`\n visitor[selector]!(node as any, nodeParent)\n }\n}\n", "// Generated from antlr/Solidity.g4 by ANTLR 4.9.0-SNAPSHOT\n\n\nimport { ATN } from \"antlr4ts/atn/ATN\";\nimport { ATNDeserializer } from \"antlr4ts/atn/ATNDeserializer\";\nimport { CharStream } from \"antlr4ts/CharStream\";\nimport { Lexer } from \"antlr4ts/Lexer\";\nimport { LexerATNSimulator } from \"antlr4ts/atn/LexerATNSimulator\";\nimport { NotNull } from \"antlr4ts/Decorators\";\nimport { Override } from \"antlr4ts/Decorators\";\nimport { RuleContext } from \"antlr4ts/RuleContext\";\nimport { Vocabulary } from \"antlr4ts/Vocabulary\";\nimport { VocabularyImpl } from \"antlr4ts/VocabularyImpl\";\n\nimport * as Utils from \"antlr4ts/misc/Utils\";\n\n\nexport class SolidityLexer extends Lexer {\n\tpublic static readonly T__0 = 1;\n\tpublic static readonly T__1 = 2;\n\tpublic static readonly T__2 = 3;\n\tpublic static readonly T__3 = 4;\n\tpublic static readonly T__4 = 5;\n\tpublic static readonly T__5 = 6;\n\tpublic static readonly T__6 = 7;\n\tpublic static readonly T__7 = 8;\n\tpublic static readonly T__8 = 9;\n\tpublic static readonly T__9 = 10;\n\tpublic static readonly T__10 = 11;\n\tpublic static readonly T__11 = 12;\n\tpublic static readonly T__12 = 13;\n\tpublic static readonly T__13 = 14;\n\tpublic static readonly T__14 = 15;\n\tpublic static readonly T__15 = 16;\n\tpublic static readonly T__16 = 17;\n\tpublic static readonly T__17 = 18;\n\tpublic static readonly T__18 = 19;\n\tpublic static readonly T__19 = 20;\n\tpublic static readonly T__20 = 21;\n\tpublic static readonly T__21 = 22;\n\tpublic static readonly T__22 = 23;\n\tpublic static readonly T__23 = 24;\n\tpublic static readonly T__24 = 25;\n\tpublic static readonly T__25 = 26;\n\tpublic static readonly T__26 = 27;\n\tpublic static readonly T__27 = 28;\n\tpublic static readonly T__28 = 29;\n\tpublic static readonly T__29 = 30;\n\tpublic static readonly T__30 = 31;\n\tpublic static readonly T__31 = 32;\n\tpublic static readonly T__32 = 33;\n\tpublic static readonly T__33 = 34;\n\tpublic static readonly T__34 = 35;\n\tpublic static readonly T__35 = 36;\n\tpublic static readonly T__36 = 37;\n\tpublic static readonly T__37 = 38;\n\tpublic static readonly T__38 = 39;\n\tpublic static readonly T__39 = 40;\n\tpublic static readonly T__40 = 41;\n\tpublic static readonly T__41 = 42;\n\tpublic static readonly T__42 = 43;\n\tpublic static readonly T__43 = 44;\n\tpublic static readonly T__44 = 45;\n\tpublic static readonly T__45 = 46;\n\tpublic static readonly T__46 = 47;\n\tpublic static readonly T__47 = 48;\n\tpublic static readonly T__48 = 49;\n\tpublic static readonly T__49 = 50;\n\tpublic static readonly T__50 = 51;\n\tpublic static readonly T__51 = 52;\n\tpublic static readonly T__52 = 53;\n\tpublic static readonly T__53 = 54;\n\tpublic static readonly T__54 = 55;\n\tpublic static readonly T__55 = 56;\n\tpublic static readonly T__56 = 57;\n\tpublic static readonly T__57 = 58;\n\tpublic static readonly T__58 = 59;\n\tpublic static readonly T__59 = 60;\n\tpublic static readonly T__60 = 61;\n\tpublic static readonly T__61 = 62;\n\tpublic static readonly T__62 = 63;\n\tpublic static readonly T__63 = 64;\n\tpublic static readonly T__64 = 65;\n\tpublic static readonly T__65 = 66;\n\tpublic static readonly T__66 = 67;\n\tpublic static readonly T__67 = 68;\n\tpublic static readonly T__68 = 69;\n\tpublic static readonly T__69 = 70;\n\tpublic static readonly T__70 = 71;\n\tpublic static readonly T__71 = 72;\n\tpublic static readonly T__72 = 73;\n\tpublic static readonly T__73 = 74;\n\tpublic static readonly T__74 = 75;\n\tpublic static readonly T__75 = 76;\n\tpublic static readonly T__76 = 77;\n\tpublic static readonly T__77 = 78;\n\tpublic static readonly T__78 = 79;\n\tpublic static readonly T__79 = 80;\n\tpublic static readonly T__80 = 81;\n\tpublic static readonly T__81 = 82;\n\tpublic static readonly T__82 = 83;\n\tpublic static readonly T__83 = 84;\n\tpublic static readonly T__84 = 85;\n\tpublic static readonly T__85 = 86;\n\tpublic static readonly T__86 = 87;\n\tpublic static readonly T__87 = 88;\n\tpublic static readonly T__88 = 89;\n\tpublic static readonly T__89 = 90;\n\tpublic static readonly T__90 = 91;\n\tpublic static readonly T__91 = 92;\n\tpublic static readonly T__92 = 93;\n\tpublic static readonly T__93 = 94;\n\tpublic static readonly T__94 = 95;\n\tpublic static readonly T__95 = 96;\n\tpublic static readonly T__96 = 97;\n\tpublic static readonly Int = 98;\n\tpublic static readonly Uint = 99;\n\tpublic static readonly Byte = 100;\n\tpublic static readonly Fixed = 101;\n\tpublic static readonly Ufixed = 102;\n\tpublic static readonly BooleanLiteral = 103;\n\tpublic static readonly DecimalNumber = 104;\n\tpublic static readonly HexNumber = 105;\n\tpublic static readonly NumberUnit = 106;\n\tpublic static readonly HexLiteralFragment = 107;\n\tpublic static readonly ReservedKeyword = 108;\n\tpublic static readonly AnonymousKeyword = 109;\n\tpublic static readonly BreakKeyword = 110;\n\tpublic static readonly ConstantKeyword = 111;\n\tpublic static readonly ImmutableKeyword = 112;\n\tpublic static readonly ContinueKeyword = 113;\n\tpublic static readonly LeaveKeyword = 114;\n\tpublic static readonly ExternalKeyword = 115;\n\tpublic static readonly IndexedKeyword = 116;\n\tpublic static readonly InternalKeyword = 117;\n\tpublic static readonly PayableKeyword = 118;\n\tpublic static readonly PrivateKeyword = 119;\n\tpublic static readonly PublicKeyword = 120;\n\tpublic static readonly VirtualKeyword = 121;\n\tpublic static readonly PureKeyword = 122;\n\tpublic static readonly TypeKeyword = 123;\n\tpublic static readonly ViewKeyword = 124;\n\tpublic static readonly GlobalKeyword = 125;\n\tpublic static readonly ConstructorKeyword = 126;\n\tpublic static readonly FallbackKeyword = 127;\n\tpublic static readonly ReceiveKeyword = 128;\n\tpublic static readonly Identifier = 129;\n\tpublic static readonly StringLiteralFragment = 130;\n\tpublic static readonly VersionLiteral = 131;\n\tpublic static readonly WS = 132;\n\tpublic static readonly COMMENT = 133;\n\tpublic static readonly LINE_COMMENT = 134;\n\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly channelNames: string[] = [\n\t\t\"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\",\n\t];\n\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly modeNames: string[] = [\n\t\t\"DEFAULT_MODE\",\n\t];\n\n\tpublic static readonly ruleNames: string[] = [\n\t\t\"T__0\", \"T__1\", \"T__2\", \"T__3\", \"T__4\", \"T__5\", \"T__6\", \"T__7\", \"T__8\", \n\t\t\"T__9\", \"T__10\", \"T__11\", \"T__12\", \"T__13\", \"T__14\", \"T__15\", \"T__16\", \n\t\t\"T__17\", \"T__18\", \"T__19\", \"T__20\", \"T__21\", \"T__22\", \"T__23\", \"T__24\", \n\t\t\"T__25\", \"T__26\", \"T__27\", \"T__28\", \"T__29\", \"T__30\", \"T__31\", \"T__32\", \n\t\t\"T__33\", \"T__34\", \"T__35\", \"T__36\", \"T__37\", \"T__38\", \"T__39\", \"T__40\", \n\t\t\"T__41\", \"T__42\", \"T__43\", \"T__44\", \"T__45\", \"T__46\", \"T__47\", \"T__48\", \n\t\t\"T__49\", \"T__50\", \"T__51\", \"T__52\", \"T__53\", \"T__54\", \"T__55\", \"T__56\", \n\t\t\"T__57\", \"T__58\", \"T__59\", \"T__60\", \"T__61\", \"T__62\", \"T__63\", \"T__64\", \n\t\t\"T__65\", \"T__66\", \"T__67\", \"T__68\", \"T__69\", \"T__70\", \"T__71\", \"T__72\", \n\t\t\"T__73\", \"T__74\", \"T__75\", \"T__76\", \"T__77\", \"T__78\", \"T__79\", \"T__80\", \n\t\t\"T__81\", \"T__82\", \"T__83\", \"T__84\", \"T__85\", \"T__86\", \"T__87\", \"T__88\", \n\t\t\"T__89\", \"T__90\", \"T__91\", \"T__92\", \"T__93\", \"T__94\", \"T__95\", \"T__96\", \n\t\t\"Int\", \"Uint\", \"Byte\", \"Fixed\", \"Ufixed\", \"BooleanLiteral\", \"DecimalNumber\", \n\t\t\"DecimalDigits\", \"HexNumber\", \"HexDigits\", \"NumberUnit\", \"HexLiteralFragment\", \n\t\t\"HexPair\", \"HexCharacter\", \"ReservedKeyword\", \"AnonymousKeyword\", \"BreakKeyword\", \n\t\t\"ConstantKeyword\", \"ImmutableKeyword\", \"ContinueKeyword\", \"LeaveKeyword\", \n\t\t\"ExternalKeyword\", \"IndexedKeyword\", \"InternalKeyword\", \"PayableKeyword\", \n\t\t\"PrivateKeyword\", \"PublicKeyword\", \"VirtualKeyword\", \"PureKeyword\", \"TypeKeyword\", \n\t\t\"ViewKeyword\", \"GlobalKeyword\", \"ConstructorKeyword\", \"FallbackKeyword\", \n\t\t\"ReceiveKeyword\", \"Identifier\", \"IdentifierStart\", \"IdentifierPart\", \"StringLiteralFragment\", \n\t\t\"DoubleQuotedStringCharacter\", \"SingleQuotedStringCharacter\", \"VersionLiteral\", \n\t\t\"WS\", \"COMMENT\", \"LINE_COMMENT\",\n\t];\n\n\tprivate static readonly _LITERAL_NAMES: Array = [\n\t\tundefined, \"'pragma'\", \"';'\", \"'*'\", \"'||'\", \"'^'\", \"'~'\", \"'>='\", \"'>'\", \n\t\t\"'<'\", \"'<='\", \"'='\", \"'as'\", \"'import'\", \"'from'\", \"'{'\", \"','\", \"'}'\", \n\t\t\"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'is'\", \"'('\", \n\t\t\"')'\", \"'error'\", \"'using'\", \"'for'\", \"'struct'\", \"'modifier'\", \"'function'\", \n\t\t\"'returns'\", \"'event'\", \"'enum'\", \"'['\", \"']'\", \"'address'\", \"'.'\", \"'mapping'\", \n\t\t\"'=>'\", \"'memory'\", \"'storage'\", \"'calldata'\", \"'if'\", \"'else'\", \"'try'\", \n\t\t\"'catch'\", \"'while'\", \"'unchecked'\", \"'assembly'\", \"'do'\", \"'return'\", \n\t\t\"'throw'\", \"'emit'\", \"'revert'\", \"'var'\", \"'bool'\", \"'string'\", \"'byte'\", \n\t\t\"'++'\", \"'--'\", \"'new'\", \"':'\", \"'+'\", \"'-'\", \"'after'\", \"'delete'\", \"'!'\", \n\t\t\"'**'\", \"'/'\", \"'%'\", \"'<<'\", \"'>>'\", \"'&'\", \"'|'\", \"'=='\", \"'!='\", \"'&&'\", \n\t\t\"'?'\", \"'|='\", \"'^='\", \"'&='\", \"'<<='\", \"'>>='\", \"'+='\", \"'-='\", \"'*='\", \n\t\t\"'/='\", \"'%='\", \"'let'\", \"':='\", \"'=:'\", \"'switch'\", \"'case'\", \"'default'\", \n\t\t\"'->'\", \"'callback'\", \"'override'\", undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"'anonymous'\", \"'break'\", \"'constant'\", \"'immutable'\", \"'continue'\", \"'leave'\", \n\t\t\"'external'\", \"'indexed'\", \"'internal'\", \"'payable'\", \"'private'\", \"'public'\", \n\t\t\"'virtual'\", \"'pure'\", \"'type'\", \"'view'\", \"'global'\", \"'constructor'\", \n\t\t\"'fallback'\", \"'receive'\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"Int\", \"Uint\", \"Byte\", \"Fixed\", \"Ufixed\", \"BooleanLiteral\", \"DecimalNumber\", \n\t\t\"HexNumber\", \"NumberUnit\", \"HexLiteralFragment\", \"ReservedKeyword\", \"AnonymousKeyword\", \n\t\t\"BreakKeyword\", \"ConstantKeyword\", \"ImmutableKeyword\", \"ContinueKeyword\", \n\t\t\"LeaveKeyword\", \"ExternalKeyword\", \"IndexedKeyword\", \"InternalKeyword\", \n\t\t\"PayableKeyword\", \"PrivateKeyword\", \"PublicKeyword\", \"VirtualKeyword\", \n\t\t\"PureKeyword\", \"TypeKeyword\", \"ViewKeyword\", \"GlobalKeyword\", \"ConstructorKeyword\", \n\t\t\"FallbackKeyword\", \"ReceiveKeyword\", \"Identifier\", \"StringLiteralFragment\", \n\t\t\"VersionLiteral\", \"WS\", \"COMMENT\", \"LINE_COMMENT\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityLexer._LITERAL_NAMES, SolidityLexer._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityLexer.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\n\tconstructor(input: CharStream) {\n\t\tsuper(input);\n\t\tthis._interp = new LexerATNSimulator(SolidityLexer._ATN, this);\n\t}\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"Solidity.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityLexer.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityLexer._serializedATN; }\n\n\t// @Override\n\tpublic get channelNames(): string[] { return SolidityLexer.channelNames; }\n\n\t// @Override\n\tpublic get modeNames(): string[] { return SolidityLexer.modeNames; }\n\n\tprivate static readonly _serializedATNSegments: number = 4;\n\tprivate static readonly _serializedATNSegment0: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x02\\x88\\u0757\\b\\x01\" +\n\t\t\"\\x04\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\" +\n\t\t\"\\x04\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x04\\n\\t\\n\\x04\\v\\t\\v\\x04\\f\\t\\f\\x04\\r\" +\n\t\t\"\\t\\r\\x04\\x0E\\t\\x0E\\x04\\x0F\\t\\x0F\\x04\\x10\\t\\x10\\x04\\x11\\t\\x11\\x04\\x12\\t\" +\n\t\t\"\\x12\\x04\\x13\\t\\x13\\x04\\x14\\t\\x14\\x04\\x15\\t\\x15\\x04\\x16\\t\\x16\\x04\\x17\\t\" +\n\t\t\"\\x17\\x04\\x18\\t\\x18\\x04\\x19\\t\\x19\\x04\\x1A\\t\\x1A\\x04\\x1B\\t\\x1B\\x04\\x1C\\t\" +\n\t\t\"\\x1C\\x04\\x1D\\t\\x1D\\x04\\x1E\\t\\x1E\\x04\\x1F\\t\\x1F\\x04 \\t \\x04!\\t!\\x04\\\"\\t\" +\n\t\t\"\\\"\\x04#\\t#\\x04$\\t$\\x04%\\t%\\x04&\\t&\\x04\\'\\t\\'\\x04(\\t(\\x04)\\t)\\x04*\\t*\\x04\" +\n\t\t\"+\\t+\\x04,\\t,\\x04-\\t-\\x04.\\t.\\x04/\\t/\\x040\\t0\\x041\\t1\\x042\\t2\\x043\\t3\\x04\" +\n\t\t\"4\\t4\\x045\\t5\\x046\\t6\\x047\\t7\\x048\\t8\\x049\\t9\\x04:\\t:\\x04;\\t;\\x04<\\t<\\x04\" +\n\t\t\"=\\t=\\x04>\\t>\\x04?\\t?\\x04@\\t@\\x04A\\tA\\x04B\\tB\\x04C\\tC\\x04D\\tD\\x04E\\tE\\x04\" +\n\t\t\"F\\tF\\x04G\\tG\\x04H\\tH\\x04I\\tI\\x04J\\tJ\\x04K\\tK\\x04L\\tL\\x04M\\tM\\x04N\\tN\\x04\" +\n\t\t\"O\\tO\\x04P\\tP\\x04Q\\tQ\\x04R\\tR\\x04S\\tS\\x04T\\tT\\x04U\\tU\\x04V\\tV\\x04W\\tW\\x04\" +\n\t\t\"X\\tX\\x04Y\\tY\\x04Z\\tZ\\x04[\\t[\\x04\\\\\\t\\\\\\x04]\\t]\\x04^\\t^\\x04_\\t_\\x04`\\t\" +\n\t\t\"`\\x04a\\ta\\x04b\\tb\\x04c\\tc\\x04d\\td\\x04e\\te\\x04f\\tf\\x04g\\tg\\x04h\\th\\x04\" +\n\t\t\"i\\ti\\x04j\\tj\\x04k\\tk\\x04l\\tl\\x04m\\tm\\x04n\\tn\\x04o\\to\\x04p\\tp\\x04q\\tq\\x04\" +\n\t\t\"r\\tr\\x04s\\ts\\x04t\\tt\\x04u\\tu\\x04v\\tv\\x04w\\tw\\x04x\\tx\\x04y\\ty\\x04z\\tz\\x04\" +\n\t\t\"{\\t{\\x04|\\t|\\x04}\\t}\\x04~\\t~\\x04\\x7F\\t\\x7F\\x04\\x80\\t\\x80\\x04\\x81\\t\\x81\" +\n\t\t\"\\x04\\x82\\t\\x82\\x04\\x83\\t\\x83\\x04\\x84\\t\\x84\\x04\\x85\\t\\x85\\x04\\x86\\t\\x86\" +\n\t\t\"\\x04\\x87\\t\\x87\\x04\\x88\\t\\x88\\x04\\x89\\t\\x89\\x04\\x8A\\t\\x8A\\x04\\x8B\\t\\x8B\" +\n\t\t\"\\x04\\x8C\\t\\x8C\\x04\\x8D\\t\\x8D\\x04\\x8E\\t\\x8E\\x04\\x8F\\t\\x8F\\x03\\x02\\x03\\x02\" +\n\t\t\"\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\\x03\\x04\\x03\\x04\" +\n\t\t\"\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\b\\x03\\b\\x03\" +\n\t\t\"\\b\\x03\\t\\x03\\t\\x03\\n\\x03\\n\\x03\\v\\x03\\v\\x03\\v\\x03\\f\\x03\\f\\x03\\r\\x03\\r\\x03\" +\n\t\t\"\\r\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0F\\x03\" +\n\t\t\"\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x10\\x03\\x10\\x03\\x11\\x03\\x11\\x03\\x12\\x03\" +\n\t\t\"\\x12\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\" +\n\t\t\"\\x13\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\" +\n\t\t\"\\x14\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\" +\n\t\t\"\\x15\\x03\\x15\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\\x16\\x03\" +\n\t\t\"\\x16\\x03\\x17\\x03\\x17\\x03\\x17\\x03\\x18\\x03\\x18\\x03\\x19\\x03\\x19\\x03\\x1A\\x03\" +\n\t\t\"\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\" +\n\t\t\"\\x1B\\x03\\x1B\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1D\\x03\\x1D\\x03\\x1D\\x03\" +\n\t\t\"\\x1D\\x03\\x1D\\x03\\x1D\\x03\\x1D\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\" +\n\t\t\"\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\" +\n\t\t\"\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03 \\x03 \\x03 \\x03 \\x03 \\x03 \\x03 \\x03 \\x03\" +\n\t\t\"!\\x03!\\x03!\\x03!\\x03!\\x03!\\x03\\\"\\x03\\\"\\x03\\\"\\x03\\\"\\x03\\\"\\x03#\\x03#\\x03\" +\n\t\t\"$\\x03$\\x03%\\x03%\\x03%\\x03%\\x03%\\x03%\\x03%\\x03%\\x03&\\x03&\\x03\\'\\x03\\'\\x03\" +\n\t\t\"\\'\\x03\\'\\x03\\'\\x03\\'\\x03\\'\\x03\\'\\x03(\\x03(\\x03(\\x03)\\x03)\\x03)\\x03)\\x03\" +\n\t\t\")\\x03)\\x03)\\x03*\\x03*\\x03*\\x03*\\x03*\\x03*\\x03*\\x03*\\x03+\\x03+\\x03+\\x03\" +\n\t\t\"+\\x03+\\x03+\\x03+\\x03+\\x03+\\x03,\\x03,\\x03,\\x03-\\x03-\\x03-\\x03-\\x03-\\x03\" +\n\t\t\".\\x03.\\x03.\\x03.\\x03/\\x03/\\x03/\\x03/\\x03/\\x03/\\x030\\x030\\x030\\x030\\x03\" +\n\t\t\"0\\x030\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x031\\x032\\x032\\x03\" +\n\t\t\"2\\x032\\x032\\x032\\x032\\x032\\x032\\x033\\x033\\x033\\x034\\x034\\x034\\x034\\x03\" +\n\t\t\"4\\x034\\x034\\x035\\x035\\x035\\x035\\x035\\x035\\x036\\x036\\x036\\x036\\x036\\x03\" +\n\t\t\"7\\x037\\x037\\x037\\x037\\x037\\x037\\x038\\x038\\x038\\x038\\x039\\x039\\x039\\x03\" +\n\t\t\"9\\x039\\x03:\\x03:\\x03:\\x03:\\x03:\\x03:\\x03:\\x03;\\x03;\\x03;\\x03;\\x03;\\x03\" +\n\t\t\"<\\x03<\\x03<\\x03=\\x03=\\x03=\\x03>\\x03>\\x03>\\x03>\\x03?\\x03?\\x03@\\x03@\\x03\" +\n\t\t\"A\\x03A\\x03B\\x03B\\x03B\\x03B\\x03B\\x03B\\x03C\\x03C\\x03C\\x03C\\x03C\\x03C\\x03\" +\n\t\t\"C\\x03D\\x03D\\x03E\\x03E\\x03E\\x03F\\x03F\\x03G\\x03G\\x03H\\x03H\\x03H\\x03I\\x03\" +\n\t\t\"I\\x03I\\x03J\\x03J\\x03K\\x03K\\x03L\\x03L\\x03L\\x03M\\x03M\\x03M\\x03N\\x03N\\x03\" +\n\t\t\"N\\x03O\\x03O\\x03P\\x03P\\x03P\\x03Q\\x03Q\\x03Q\\x03R\\x03R\\x03R\\x03S\\x03S\\x03\" +\n\t\t\"S\\x03S\\x03T\\x03T\\x03T\\x03T\\x03U\\x03U\\x03U\\x03V\\x03V\\x03V\\x03W\\x03W\\x03\" +\n\t\t\"W\\x03X\\x03X\\x03X\\x03Y\\x03Y\\x03Y\\x03Z\\x03Z\\x03Z\\x03Z\\x03[\\x03[\\x03[\\x03\" +\n\t\t\"\\\\\\x03\\\\\\x03\\\\\\x03]\\x03]\\x03]\\x03]\\x03]\\x03]\\x03]\\x03^\\x03^\\x03^\\x03^\" +\n\t\t\"\\x03^\\x03_\\x03_\\x03_\\x03_\\x03_\\x03_\\x03_\\x03_\\x03`\\x03`\\x03`\\x03a\\x03\" +\n\t\t\"a\\x03a\\x03a\\x03a\\x03a\\x03a\\x03a\\x03a\\x03b\\x03b\\x03b\\x03b\\x03b\\x03b\\x03\" +\n\t\t\"b\\x03b\\x03b\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03c\\x03\" +\n\t\t\"c\\x03c\\x03c\\x05c\\u038B\\nc\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03\" +\n\t\t\"d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x03d\\x05d\\u0464\\nd\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03\" +\n\t\t\"e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x03e\\x05e\\u0542\\ne\\x03f\\x03\" +\n\t\t\"f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x03f\\x06f\\u0550\\nf\\rf\\x0E\" +\n\t\t\"f\\u0551\\x03f\\x03f\\x06f\\u0556\\nf\\rf\\x0Ef\\u0557\\x05f\\u055A\\nf\\x03g\\x03g\" +\n\t\t\"\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x03g\\x06g\\u056A\" +\n\t\t\"\\ng\\rg\\x0Eg\\u056B\\x03g\\x03g\\x06g\\u0570\\ng\\rg\\x0Eg\\u0571\\x05g\\u0574\\ng\" +\n\t\t\"\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x03h\\x05h\\u057F\\nh\\x03i\\x03i\" +\n\t\t\"\\x05i\\u0583\\ni\\x03i\\x03i\\x05i\\u0587\\ni\\x03i\\x03i\\x05i\\u058B\\ni\\x03j\\x03\" +\n\t\t\"j\\x05j\\u058F\\nj\\x03j\\x07j\\u0592\\nj\\fj\\x0Ej\\u0595\\vj\\x03k\\x03k\\x03k\\x03\" +\n\t\t\"k\\x03l\\x03l\\x05l\\u059D\\nl\\x03l\\x07l\\u05A0\\nl\\fl\\x0El\\u05A3\\vl\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03\" +\n\t\t\"m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x03m\\x05m\\u05DD\" +\n\t\t\"\\nm\\x03n\\x03n\\x03n\\x03n\\x03n\\x03n\\x05n\\u05E5\\nn\\x03n\\x03n\\x03n\\x05n\\u05EA\" +\n\t\t\"\\nn\\x03n\\x05n\\u05ED\\nn\\x03o\\x03o\\x03o\\x03p\\x03p\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03\" +\n\t\t\"q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x03q\\x05\" +\n\t\t\"q\\u064C\\nq\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03r\\x03s\\x03\" +\n\t\t\"s\\x03s\\x03s\\x03s\\x03s\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03t\\x03\" +\n\t\t\"u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03u\\x03v\\x03v\\x03v\\x03v\\x03\" +\n\t\t\"v\\x03v\\x03v\\x03v\\x03v\\x03w\\x03w\\x03w\\x03w\\x03w\\x03w\\x03x\\x03x\\x03x\\x03\" +\n\t\t\"x\\x03x\\x03x\\x03x\\x03x\\x03x\\x03y\\x03y\\x03y\\x03y\\x03y\\x03y\\x03y\\x03y\\x03\" +\n\t\t\"z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03z\\x03{\\x03{\\x03{\\x03{\\x03{\\x03\" +\n\t\t\"{\\x03{\\x03{\\x03|\\x03|\\x03|\\x03|\\x03|\\x03|\\x03|\\x03|\\x03}\\x03}\\x03}\\x03\" +\n\t\t\"}\\x03}\\x03}\\x03}\\x03~\\x03~\\x03~\\x03~\\x03~\\x03~\\x03~\\x03~\\x03\\x7F\\x03\\x7F\" +\n\t\t\"\\x03\\x7F\\x03\\x7F\\x03\\x7F\\x03\\x80\\x03\\x80\\x03\\x80\\x03\\x80\\x03\\x80\\x03\\x81\" +\n\t\t\"\\x03\\x81\\x03\\x81\\x03\\x81\\x03\\x81\\x03\\x82\\x03\\x82\\x03\\x82\\x03\\x82\\x03\\x82\" +\n\t\t\"\\x03\\x82\\x03\\x82\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\" +\n\t\t\"\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x83\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x84\" +\n\t\t\"\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x84\\x03\\x85\\x03\\x85\\x03\\x85\\x03\\x85\" +\n\t\t\"\\x03\\x85\\x03\\x85\\x03\\x85\\x03\\x85\\x03\\x86\\x03\\x86\\x07\\x86\\u06EE\\n\\x86\\f\" +\n\t\t\"\\x86\\x0E\\x86\\u06F1\\v\\x86\\x03\\x87\\x03\\x87\\x03\\x88\\x03\\x88\\x03\\x89\\x03\\x89\" +\n\t\t\"\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x05\\x89\\u06FE\\n\\x89\\x03\\x89\\x03\" +\n\t\t\"\\x89\\x07\\x89\\u0702\\n\\x89\\f\\x89\\x0E\\x89\\u0705\\v\\x89\\x03\\x89\\x03\\x89\\x03\" +\n\t\t\"\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x03\\x89\\x05\\x89\\u070F\\n\\x89\\x03\\x89\" +\n\t\t\"\\x03\\x89\\x07\\x89\\u0713\\n\\x89\\f\\x89\\x0E\\x89\\u0716\\v\\x89\\x03\\x89\\x05\\x89\" +\n\t\t\"\\u0719\\n\\x89\\x03\\x8A\\x03\\x8A\\x03\\x8A\\x05\\x8A\\u071E\\n\\x8A\\x03\\x8B\\x03\\x8B\" +\n\t\t\"\\x03\\x8B\\x05\\x8B\\u0723\\n\\x8B\\x03\\x8C\\x06\\x8C\\u0726\\n\\x8C\\r\\x8C\\x0E\\x8C\" +\n\t\t\"\\u0727\\x03\\x8C\\x03\\x8C\\x06\\x8C\\u072C\\n\\x8C\\r\\x8C\\x0E\\x8C\\u072D\\x03\\x8C\" +\n\t\t\"\\x03\\x8C\\x06\\x8C\\u0732\\n\\x8C\\r\\x8C\\x0E\\x8C\\u0733\\x05\\x8C\\u0736\\n\\x8C\\x03\" +\n\t\t\"\\x8D\\x06\\x8D\\u0739\\n\\x8D\\r\\x8D\\x0E\\x8D\\u073A\\x03\\x8D\\x03\\x8D\\x03\\x8E\\x03\" +\n\t\t\"\\x8E\\x03\\x8E\\x03\\x8E\\x07\\x8E\\u0743\\n\\x8E\\f\\x8E\\x0E\\x8E\\u0746\\v\\x8E\\x03\" +\n\t\t\"\\x8E\\x03\\x8E\\x03\\x8E\\x03\\x8E\\x03\\x8E\\x03\\x8F\\x03\\x8F\\x03\\x8F\\x03\\x8F\\x07\" +\n\t\t\"\\x8F\\u0751\\n\\x8F\\f\\x8F\\x0E\\x8F\\u0754\\v\\x8F\\x03\\x8F\\x03\\x8F\\x03\\u0744\\x02\" +\n\t\t\"\\x02\\x90\\x03\\x02\\x03\\x05\\x02\\x04\\x07\\x02\\x05\\t\\x02\\x06\\v\\x02\\x07\\r\\x02\" +\n\t\t\"\\b\\x0F\\x02\\t\\x11\\x02\\n\\x13\\x02\\v\\x15\\x02\\f\\x17\\x02\\r\\x19\\x02\\x0E\\x1B\\x02\" +\n\t\t\"\\x0F\\x1D\\x02\\x10\\x1F\\x02\\x11!\\x02\\x12#\\x02\\x13%\\x02\\x14\\'\\x02\\x15)\\x02\" +\n\t\t\"\\x16+\\x02\\x17-\\x02\\x18/\\x02\\x191\\x02\\x1A3\\x02\\x1B5\\x02\\x1C7\\x02\\x1D9\\x02\" +\n\t\t\"\\x1E;\\x02\\x1F=\\x02 ?\\x02!A\\x02\\\"C\\x02#E\\x02$G\\x02%I\\x02&K\\x02\\'M\\x02(\" +\n\t\t\"O\\x02)Q\\x02*S\\x02+U\\x02,W\\x02-Y\\x02.[\\x02/]\\x020_\\x021a\\x022c\\x023e\\x02\" +\n\t\t\"4g\\x025i\\x026k\\x027m\\x028o\\x029q\\x02:s\\x02;u\\x02{\\x02?}\\x02\" +\n\t\t\"@\\x7F\\x02A\\x81\\x02B\\x83\\x02C\\x85\\x02D\\x87\\x02E\\x89\\x02F\\x8B\\x02G\\x8D\\x02\" +\n\t\t\"H\\x8F\\x02I\\x91\\x02J\\x93\\x02K\\x95\\x02L\\x97\\x02M\\x99\\x02N\\x9B\\x02O\\x9D\\x02\" +\n\t\t\"P\\x9F\\x02Q\\xA1\\x02R\\xA3\\x02S\\xA5\\x02T\\xA7\\x02U\\xA9\\x02V\\xAB\\x02W\\xAD\\x02\" +\n\t\t\"X\\xAF\\x02Y\\xB1\\x02Z\\xB3\\x02[\\xB5\\x02\\\\\\xB7\\x02]\\xB9\\x02^\\xBB\\x02_\\xBD\" +\n\t\t\"\\x02`\\xBF\\x02a\\xC1\\x02b\\xC3\\x02c\\xC5\\x02d\\xC7\\x02e\\xC9\\x02f\\xCB\\x02g\\xCD\" +\n\t\t\"\\x02h\\xCF\\x02i\\xD1\\x02j\\xD3\\x02\\x02\\xD5\\x02k\\xD7\\x02\\x02\\xD9\\x02l\\xDB\" +\n\t\t\"\\x02m\\xDD\\x02\\x02\\xDF\\x02\\x02\\xE1\\x02n\\xE3\\x02o\\xE5\\x02p\\xE7\\x02q\\xE9\" +\n\t\t\"\\x02r\\xEB\\x02s\\xED\\x02t\\xEF\\x02u\\xF1\\x02v\\xF3\\x02w\\xF5\\x02x\\xF7\\x02y\\xF9\" +\n\t\t\"\\x02z\\xFB\\x02{\\xFD\\x02|\\xFF\\x02}\\u0101\\x02~\\u0103\\x02\\x7F\\u0105\\x02\\x80\" +\n\t\t\"\\u0107\\x02\\x81\\u0109\\x02\\x82\\u010B\\x02\\x83\\u010D\\x02\\x02\\u010F\\x02\\x02\" +\n\t\t\"\\u0111\\x02\\x84\\u0113\\x02\\x02\\u0115\\x02\\x02\\u0117\\x02\\x85\\u0119\\x02\\x86\" +\n\t\t\"\\u011B\\x02\\x87\\u011D\\x02\\x88\\x03\\x02\\f\\x03\\x022;\\x04\\x02GGgg\\x04\\x02Z\" +\n\t\t\"Zzz\\x05\\x022;CHch\\x06\\x02&&C\\\\aac|\\x07\\x02&&2;C\\\\aac|\\x06\\x02\\f\\f\\x0F\" +\n\t\t\"\\x0F$$^^\\x06\\x02\\f\\f\\x0F\\x0F))^^\\x05\\x02\\v\\f\\x0E\\x0F\\\"\\\"\\x04\\x02\\f\\f\\x0F\" +\n\t\t\"\\x0F\\x02\\u07E8\\x02\\x03\\x03\\x02\\x02\\x02\\x02\\x05\\x03\\x02\\x02\\x02\\x02\\x07\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x02\\t\\x03\\x02\\x02\\x02\\x02\\v\\x03\\x02\\x02\\x02\\x02\\r\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02\\x0F\\x03\\x02\\x02\\x02\\x02\\x11\\x03\\x02\\x02\\x02\\x02\\x13\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02\\x15\\x03\\x02\\x02\\x02\\x02\\x17\\x03\\x02\\x02\\x02\\x02\\x19\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02\\x1B\\x03\\x02\\x02\\x02\\x02\\x1D\\x03\\x02\\x02\\x02\\x02\\x1F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02!\\x03\\x02\\x02\\x02\\x02#\\x03\\x02\\x02\\x02\\x02%\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\'\\x03\\x02\\x02\\x02\\x02)\\x03\\x02\\x02\\x02\\x02+\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"-\\x03\\x02\\x02\\x02\\x02/\\x03\\x02\\x02\\x02\\x021\\x03\\x02\\x02\\x02\\x023\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x025\\x03\\x02\\x02\\x02\\x027\\x03\\x02\\x02\\x02\\x029\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02;\\x03\\x02\\x02\\x02\\x02=\\x03\\x02\\x02\\x02\\x02?\\x03\\x02\\x02\\x02\\x02A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02C\\x03\\x02\\x02\\x02\\x02E\\x03\\x02\\x02\\x02\\x02G\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02I\\x03\\x02\\x02\\x02\\x02K\\x03\\x02\\x02\\x02\\x02M\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"O\\x03\\x02\\x02\\x02\\x02Q\\x03\\x02\\x02\\x02\\x02S\\x03\\x02\\x02\\x02\\x02U\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02W\\x03\\x02\\x02\\x02\\x02Y\\x03\\x02\\x02\\x02\\x02[\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02]\\x03\\x02\\x02\\x02\\x02_\\x03\\x02\\x02\\x02\\x02a\\x03\\x02\\x02\\x02\\x02c\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02e\\x03\\x02\\x02\\x02\\x02g\\x03\\x02\\x02\\x02\\x02i\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02k\\x03\\x02\\x02\\x02\\x02m\\x03\\x02\\x02\\x02\\x02o\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"q\\x03\\x02\\x02\\x02\\x02s\\x03\\x02\\x02\\x02\\x02u\\x03\\x02\\x02\\x02\\x02w\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02y\\x03\\x02\\x02\\x02\\x02{\\x03\\x02\\x02\\x02\\x02}\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x7F\\x03\\x02\\x02\\x02\\x02\\x81\\x03\\x02\\x02\\x02\\x02\\x83\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x85\\x03\\x02\\x02\\x02\\x02\\x87\\x03\\x02\\x02\\x02\\x02\\x89\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x8B\\x03\\x02\\x02\\x02\\x02\\x8D\\x03\\x02\\x02\\x02\\x02\\x8F\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x91\\x03\\x02\\x02\\x02\\x02\\x93\\x03\\x02\\x02\\x02\\x02\\x95\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x97\\x03\\x02\\x02\\x02\\x02\\x99\\x03\\x02\\x02\\x02\\x02\\x9B\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\x9D\\x03\\x02\\x02\\x02\\x02\\x9F\\x03\\x02\\x02\\x02\\x02\\xA1\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xA3\\x03\\x02\\x02\\x02\\x02\\xA5\\x03\\x02\\x02\\x02\\x02\\xA7\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xA9\\x03\\x02\\x02\\x02\\x02\\xAB\\x03\\x02\\x02\\x02\\x02\\xAD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xAF\\x03\\x02\\x02\\x02\\x02\\xB1\\x03\\x02\\x02\\x02\\x02\\xB3\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xB5\\x03\\x02\\x02\\x02\\x02\\xB7\\x03\\x02\\x02\\x02\\x02\\xB9\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xBB\\x03\\x02\\x02\\x02\\x02\\xBD\\x03\\x02\\x02\\x02\\x02\\xBF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xC1\\x03\\x02\\x02\\x02\\x02\\xC3\\x03\\x02\\x02\\x02\\x02\\xC5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xC7\\x03\\x02\\x02\\x02\\x02\\xC9\\x03\\x02\\x02\\x02\\x02\\xCB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xCD\\x03\\x02\\x02\\x02\\x02\\xCF\\x03\\x02\\x02\\x02\\x02\\xD1\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xD5\\x03\\x02\\x02\\x02\\x02\\xD9\\x03\\x02\\x02\\x02\\x02\\xDB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xE1\\x03\\x02\\x02\\x02\\x02\\xE3\\x03\\x02\\x02\\x02\\x02\\xE5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xE7\\x03\\x02\\x02\\x02\";\n\tprivate static readonly _serializedATNSegment1: string =\n\t\t\"\\x02\\xE9\\x03\\x02\\x02\\x02\\x02\\xEB\\x03\\x02\\x02\\x02\\x02\\xED\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xEF\\x03\\x02\\x02\\x02\\x02\\xF1\\x03\\x02\\x02\\x02\\x02\\xF3\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xF5\\x03\\x02\\x02\\x02\\x02\\xF7\\x03\\x02\\x02\\x02\\x02\\xF9\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\xFB\\x03\\x02\\x02\\x02\\x02\\xFD\\x03\\x02\\x02\\x02\\x02\\xFF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02\\u0101\\x03\\x02\\x02\\x02\\x02\\u0103\\x03\\x02\\x02\\x02\\x02\\u0105\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02\\u0107\\x03\\x02\\x02\\x02\\x02\\u0109\\x03\\x02\\x02\\x02\\x02\\u010B\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x02\\u0111\\x03\\x02\\x02\\x02\\x02\\u0117\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"\\u0119\\x03\\x02\\x02\\x02\\x02\\u011B\\x03\\x02\\x02\\x02\\x02\\u011D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x03\\u011F\\x03\\x02\\x02\\x02\\x05\\u0126\\x03\\x02\\x02\\x02\\x07\\u0128\\x03\" +\n\t\t\"\\x02\\x02\\x02\\t\\u012A\\x03\\x02\\x02\\x02\\v\\u012D\\x03\\x02\\x02\\x02\\r\\u012F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x0F\\u0131\\x03\\x02\\x02\\x02\\x11\\u0134\\x03\\x02\\x02\\x02\\x13\\u0136\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x15\\u0138\\x03\\x02\\x02\\x02\\x17\\u013B\\x03\\x02\\x02\\x02\\x19\" +\n\t\t\"\\u013D\\x03\\x02\\x02\\x02\\x1B\\u0140\\x03\\x02\\x02\\x02\\x1D\\u0147\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x1F\\u014C\\x03\\x02\\x02\\x02!\\u014E\\x03\\x02\\x02\\x02#\\u0150\\x03\\x02\\x02\" +\n\t\t\"\\x02%\\u0152\\x03\\x02\\x02\\x02\\'\\u015B\\x03\\x02\\x02\\x02)\\u0164\\x03\\x02\\x02\" +\n\t\t\"\\x02+\\u016E\\x03\\x02\\x02\\x02-\\u0176\\x03\\x02\\x02\\x02/\\u0179\\x03\\x02\\x02\" +\n\t\t\"\\x021\\u017B\\x03\\x02\\x02\\x023\\u017D\\x03\\x02\\x02\\x025\\u0183\\x03\\x02\\x02\" +\n\t\t\"\\x027\\u0189\\x03\\x02\\x02\\x029\\u018D\\x03\\x02\\x02\\x02;\\u0194\\x03\\x02\\x02\" +\n\t\t\"\\x02=\\u019D\\x03\\x02\\x02\\x02?\\u01A6\\x03\\x02\\x02\\x02A\\u01AE\\x03\\x02\\x02\" +\n\t\t\"\\x02C\\u01B4\\x03\\x02\\x02\\x02E\\u01B9\\x03\\x02\\x02\\x02G\\u01BB\\x03\\x02\\x02\" +\n\t\t\"\\x02I\\u01BD\\x03\\x02\\x02\\x02K\\u01C5\\x03\\x02\\x02\\x02M\\u01C7\\x03\\x02\\x02\" +\n\t\t\"\\x02O\\u01CF\\x03\\x02\\x02\\x02Q\\u01D2\\x03\\x02\\x02\\x02S\\u01D9\\x03\\x02\\x02\" +\n\t\t\"\\x02U\\u01E1\\x03\\x02\\x02\\x02W\\u01EA\\x03\\x02\\x02\\x02Y\\u01ED\\x03\\x02\\x02\" +\n\t\t\"\\x02[\\u01F2\\x03\\x02\\x02\\x02]\\u01F6\\x03\\x02\\x02\\x02_\\u01FC\\x03\\x02\\x02\" +\n\t\t\"\\x02a\\u0202\\x03\\x02\\x02\\x02c\\u020C\\x03\\x02\\x02\\x02e\\u0215\\x03\\x02\\x02\" +\n\t\t\"\\x02g\\u0218\\x03\\x02\\x02\\x02i\\u021F\\x03\\x02\\x02\\x02k\\u0225\\x03\\x02\\x02\" +\n\t\t\"\\x02m\\u022A\\x03\\x02\\x02\\x02o\\u0231\\x03\\x02\\x02\\x02q\\u0235\\x03\\x02\\x02\" +\n\t\t\"\\x02s\\u023A\\x03\\x02\\x02\\x02u\\u0241\\x03\\x02\\x02\\x02w\\u0246\\x03\\x02\\x02\" +\n\t\t\"\\x02y\\u0249\\x03\\x02\\x02\\x02{\\u024C\\x03\\x02\\x02\\x02}\\u0250\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x7F\\u0252\\x03\\x02\\x02\\x02\\x81\\u0254\\x03\\x02\\x02\\x02\\x83\\u0256\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x85\\u025C\\x03\\x02\\x02\\x02\\x87\\u0263\\x03\\x02\\x02\\x02\\x89\\u0265\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x8B\\u0268\\x03\\x02\\x02\\x02\\x8D\\u026A\\x03\\x02\\x02\\x02\\x8F\" +\n\t\t\"\\u026C\\x03\\x02\\x02\\x02\\x91\\u026F\\x03\\x02\\x02\\x02\\x93\\u0272\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x95\\u0274\\x03\\x02\\x02\\x02\\x97\\u0276\\x03\\x02\\x02\\x02\\x99\\u0279\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x9B\\u027C\\x03\\x02\\x02\\x02\\x9D\\u027F\\x03\\x02\\x02\\x02\\x9F\\u0281\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA1\\u0284\\x03\\x02\\x02\\x02\\xA3\\u0287\\x03\\x02\\x02\\x02\\xA5\" +\n\t\t\"\\u028A\\x03\\x02\\x02\\x02\\xA7\\u028E\\x03\\x02\\x02\\x02\\xA9\\u0292\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xAB\\u0295\\x03\\x02\\x02\\x02\\xAD\\u0298\\x03\\x02\\x02\\x02\\xAF\\u029B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xB1\\u029E\\x03\\x02\\x02\\x02\\xB3\\u02A1\\x03\\x02\\x02\\x02\\xB5\\u02A5\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xB7\\u02A8\\x03\\x02\\x02\\x02\\xB9\\u02AB\\x03\\x02\\x02\\x02\\xBB\" +\n\t\t\"\\u02B2\\x03\\x02\\x02\\x02\\xBD\\u02B7\\x03\\x02\\x02\\x02\\xBF\\u02BF\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xC1\\u02C2\\x03\\x02\\x02\\x02\\xC3\\u02CB\\x03\\x02\\x02\\x02\\xC5\\u038A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xC7\\u0463\\x03\\x02\\x02\\x02\\xC9\\u0541\\x03\\x02\\x02\\x02\\xCB\\u0559\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xCD\\u0573\\x03\\x02\\x02\\x02\\xCF\\u057E\\x03\\x02\\x02\\x02\\xD1\" +\n\t\t\"\\u0586\\x03\\x02\\x02\\x02\\xD3\\u058C\\x03\\x02\\x02\\x02\\xD5\\u0596\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xD7\\u059A\\x03\\x02\\x02\\x02\\xD9\\u05DC\\x03\\x02\\x02\\x02\\xDB\\u05DE\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xDD\\u05EE\\x03\\x02\\x02\\x02\\xDF\\u05F1\\x03\\x02\\x02\\x02\\xE1\\u064B\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xE3\\u064D\\x03\\x02\\x02\\x02\\xE5\\u0657\\x03\\x02\\x02\\x02\\xE7\" +\n\t\t\"\\u065D\\x03\\x02\\x02\\x02\\xE9\\u0666\\x03\\x02\\x02\\x02\\xEB\\u0670\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xED\\u0679\\x03\\x02\\x02\\x02\\xEF\\u067F\\x03\\x02\\x02\\x02\\xF1\\u0688\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xF3\\u0690\\x03\\x02\\x02\\x02\\xF5\\u0699\\x03\\x02\\x02\\x02\\xF7\\u06A1\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF9\\u06A9\\x03\\x02\\x02\\x02\\xFB\\u06B0\\x03\\x02\\x02\\x02\\xFD\" +\n\t\t\"\\u06B8\\x03\\x02\\x02\\x02\\xFF\\u06BD\\x03\\x02\\x02\\x02\\u0101\\u06C2\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0103\\u06C7\\x03\\x02\\x02\\x02\\u0105\\u06CE\\x03\\x02\\x02\\x02\\u0107\\u06DA\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0109\\u06E3\\x03\\x02\\x02\\x02\\u010B\\u06EB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u010D\\u06F2\\x03\\x02\\x02\\x02\\u010F\\u06F4\\x03\\x02\\x02\\x02\\u0111\\u0718\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0113\\u071D\\x03\\x02\\x02\\x02\\u0115\\u0722\\x03\\x02\\x02\\x02\\u0117\" +\n\t\t\"\\u0725\\x03\\x02\\x02\\x02\\u0119\\u0738\\x03\\x02\\x02\\x02\\u011B\\u073E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u011D\\u074C\\x03\\x02\\x02\\x02\\u011F\\u0120\\x07r\\x02\\x02\\u0120\\u0121\" +\n\t\t\"\\x07t\\x02\\x02\\u0121\\u0122\\x07c\\x02\\x02\\u0122\\u0123\\x07i\\x02\\x02\\u0123\" +\n\t\t\"\\u0124\\x07o\\x02\\x02\\u0124\\u0125\\x07c\\x02\\x02\\u0125\\x04\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0126\\u0127\\x07=\\x02\\x02\\u0127\\x06\\x03\\x02\\x02\\x02\\u0128\\u0129\\x07,\\x02\" +\n\t\t\"\\x02\\u0129\\b\\x03\\x02\\x02\\x02\\u012A\\u012B\\x07~\\x02\\x02\\u012B\\u012C\\x07\" +\n\t\t\"~\\x02\\x02\\u012C\\n\\x03\\x02\\x02\\x02\\u012D\\u012E\\x07`\\x02\\x02\\u012E\\f\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u012F\\u0130\\x07\\x80\\x02\\x02\\u0130\\x0E\\x03\\x02\\x02\\x02\\u0131\" +\n\t\t\"\\u0132\\x07@\\x02\\x02\\u0132\\u0133\\x07?\\x02\\x02\\u0133\\x10\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0134\\u0135\\x07@\\x02\\x02\\u0135\\x12\\x03\\x02\\x02\\x02\\u0136\\u0137\\x07>\\x02\" +\n\t\t\"\\x02\\u0137\\x14\\x03\\x02\\x02\\x02\\u0138\\u0139\\x07>\\x02\\x02\\u0139\\u013A\\x07\" +\n\t\t\"?\\x02\\x02\\u013A\\x16\\x03\\x02\\x02\\x02\\u013B\\u013C\\x07?\\x02\\x02\\u013C\\x18\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u013D\\u013E\\x07c\\x02\\x02\\u013E\\u013F\\x07u\\x02\\x02\\u013F\" +\n\t\t\"\\x1A\\x03\\x02\\x02\\x02\\u0140\\u0141\\x07k\\x02\\x02\\u0141\\u0142\\x07o\\x02\\x02\" +\n\t\t\"\\u0142\\u0143\\x07r\\x02\\x02\\u0143\\u0144\\x07q\\x02\\x02\\u0144\\u0145\\x07t\\x02\" +\n\t\t\"\\x02\\u0145\\u0146\\x07v\\x02\\x02\\u0146\\x1C\\x03\\x02\\x02\\x02\\u0147\\u0148\\x07\" +\n\t\t\"h\\x02\\x02\\u0148\\u0149\\x07t\\x02\\x02\\u0149\\u014A\\x07q\\x02\\x02\\u014A\\u014B\" +\n\t\t\"\\x07o\\x02\\x02\\u014B\\x1E\\x03\\x02\\x02\\x02\\u014C\\u014D\\x07}\\x02\\x02\\u014D\" +\n\t\t\" \\x03\\x02\\x02\\x02\\u014E\\u014F\\x07.\\x02\\x02\\u014F\\\"\\x03\\x02\\x02\\x02\\u0150\" +\n\t\t\"\\u0151\\x07\\x7F\\x02\\x02\\u0151$\\x03\\x02\\x02\\x02\\u0152\\u0153\\x07c\\x02\\x02\" +\n\t\t\"\\u0153\\u0154\\x07d\\x02\\x02\\u0154\\u0155\\x07u\\x02\\x02\\u0155\\u0156\\x07v\\x02\" +\n\t\t\"\\x02\\u0156\\u0157\\x07t\\x02\\x02\\u0157\\u0158\\x07c\\x02\\x02\\u0158\\u0159\\x07\" +\n\t\t\"e\\x02\\x02\\u0159\\u015A\\x07v\\x02\\x02\\u015A&\\x03\\x02\\x02\\x02\\u015B\\u015C\" +\n\t\t\"\\x07e\\x02\\x02\\u015C\\u015D\\x07q\\x02\\x02\\u015D\\u015E\\x07p\\x02\\x02\\u015E\" +\n\t\t\"\\u015F\\x07v\\x02\\x02\\u015F\\u0160\\x07t\\x02\\x02\\u0160\\u0161\\x07c\\x02\\x02\" +\n\t\t\"\\u0161\\u0162\\x07e\\x02\\x02\\u0162\\u0163\\x07v\\x02\\x02\\u0163(\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0164\\u0165\\x07k\\x02\\x02\\u0165\\u0166\\x07p\\x02\\x02\\u0166\\u0167\\x07\" +\n\t\t\"v\\x02\\x02\\u0167\\u0168\\x07g\\x02\\x02\\u0168\\u0169\\x07t\\x02\\x02\\u0169\\u016A\" +\n\t\t\"\\x07h\\x02\\x02\\u016A\\u016B\\x07c\\x02\\x02\\u016B\\u016C\\x07e\\x02\\x02\\u016C\" +\n\t\t\"\\u016D\\x07g\\x02\\x02\\u016D*\\x03\\x02\\x02\\x02\\u016E\\u016F\\x07n\\x02\\x02\\u016F\" +\n\t\t\"\\u0170\\x07k\\x02\\x02\\u0170\\u0171\\x07d\\x02\\x02\\u0171\\u0172\\x07t\\x02\\x02\" +\n\t\t\"\\u0172\\u0173\\x07c\\x02\\x02\\u0173\\u0174\\x07t\\x02\\x02\\u0174\\u0175\\x07{\\x02\" +\n\t\t\"\\x02\\u0175,\\x03\\x02\\x02\\x02\\u0176\\u0177\\x07k\\x02\\x02\\u0177\\u0178\\x07u\" +\n\t\t\"\\x02\\x02\\u0178.\\x03\\x02\\x02\\x02\\u0179\\u017A\\x07*\\x02\\x02\\u017A0\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u017B\\u017C\\x07+\\x02\\x02\\u017C2\\x03\\x02\\x02\\x02\\u017D\\u017E\\x07\" +\n\t\t\"g\\x02\\x02\\u017E\\u017F\\x07t\\x02\\x02\\u017F\\u0180\\x07t\\x02\\x02\\u0180\\u0181\" +\n\t\t\"\\x07q\\x02\\x02\\u0181\\u0182\\x07t\\x02\\x02\\u01824\\x03\\x02\\x02\\x02\\u0183\\u0184\" +\n\t\t\"\\x07w\\x02\\x02\\u0184\\u0185\\x07u\\x02\\x02\\u0185\\u0186\\x07k\\x02\\x02\\u0186\" +\n\t\t\"\\u0187\\x07p\\x02\\x02\\u0187\\u0188\\x07i\\x02\\x02\\u01886\\x03\\x02\\x02\\x02\\u0189\" +\n\t\t\"\\u018A\\x07h\\x02\\x02\\u018A\\u018B\\x07q\\x02\\x02\\u018B\\u018C\\x07t\\x02\\x02\" +\n\t\t\"\\u018C8\\x03\\x02\\x02\\x02\\u018D\\u018E\\x07u\\x02\\x02\\u018E\\u018F\\x07v\\x02\" +\n\t\t\"\\x02\\u018F\\u0190\\x07t\\x02\\x02\\u0190\\u0191\\x07w\\x02\\x02\\u0191\\u0192\\x07\" +\n\t\t\"e\\x02\\x02\\u0192\\u0193\\x07v\\x02\\x02\\u0193:\\x03\\x02\\x02\\x02\\u0194\\u0195\" +\n\t\t\"\\x07o\\x02\\x02\\u0195\\u0196\\x07q\\x02\\x02\\u0196\\u0197\\x07f\\x02\\x02\\u0197\" +\n\t\t\"\\u0198\\x07k\\x02\\x02\\u0198\\u0199\\x07h\\x02\\x02\\u0199\\u019A\\x07k\\x02\\x02\" +\n\t\t\"\\u019A\\u019B\\x07g\\x02\\x02\\u019B\\u019C\\x07t\\x02\\x02\\u019C<\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u019D\\u019E\\x07h\\x02\\x02\\u019E\\u019F\\x07w\\x02\\x02\\u019F\\u01A0\\x07\" +\n\t\t\"p\\x02\\x02\\u01A0\\u01A1\\x07e\\x02\\x02\\u01A1\\u01A2\\x07v\\x02\\x02\\u01A2\\u01A3\" +\n\t\t\"\\x07k\\x02\\x02\\u01A3\\u01A4\\x07q\\x02\\x02\\u01A4\\u01A5\\x07p\\x02\\x02\\u01A5\" +\n\t\t\">\\x03\\x02\\x02\\x02\\u01A6\\u01A7\\x07t\\x02\\x02\\u01A7\\u01A8\\x07g\\x02\\x02\\u01A8\" +\n\t\t\"\\u01A9\\x07v\\x02\\x02\\u01A9\\u01AA\\x07w\\x02\\x02\\u01AA\\u01AB\\x07t\\x02\\x02\" +\n\t\t\"\\u01AB\\u01AC\\x07p\\x02\\x02\\u01AC\\u01AD\\x07u\\x02\\x02\\u01AD@\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01AE\\u01AF\\x07g\\x02\\x02\\u01AF\\u01B0\\x07x\\x02\\x02\\u01B0\\u01B1\\x07\" +\n\t\t\"g\\x02\\x02\\u01B1\\u01B2\\x07p\\x02\\x02\\u01B2\\u01B3\\x07v\\x02\\x02\\u01B3B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01B4\\u01B5\\x07g\\x02\\x02\\u01B5\\u01B6\\x07p\\x02\\x02\\u01B6\\u01B7\" +\n\t\t\"\\x07w\\x02\\x02\\u01B7\\u01B8\\x07o\\x02\\x02\\u01B8D\\x03\\x02\\x02\\x02\\u01B9\\u01BA\" +\n\t\t\"\\x07]\\x02\\x02\\u01BAF\\x03\\x02\\x02\\x02\\u01BB\\u01BC\\x07_\\x02\\x02\\u01BCH\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01BD\\u01BE\\x07c\\x02\\x02\\u01BE\\u01BF\\x07f\\x02\\x02\\u01BF\\u01C0\" +\n\t\t\"\\x07f\\x02\\x02\\u01C0\\u01C1\\x07t\\x02\\x02\\u01C1\\u01C2\\x07g\\x02\\x02\\u01C2\" +\n\t\t\"\\u01C3\\x07u\\x02\\x02\\u01C3\\u01C4\\x07u\\x02\\x02\\u01C4J\\x03\\x02\\x02\\x02\\u01C5\" +\n\t\t\"\\u01C6\\x070\\x02\\x02\\u01C6L\\x03\\x02\\x02\\x02\\u01C7\\u01C8\\x07o\\x02\\x02\\u01C8\" +\n\t\t\"\\u01C9\\x07c\\x02\\x02\\u01C9\\u01CA\\x07r\\x02\\x02\\u01CA\\u01CB\\x07r\\x02\\x02\" +\n\t\t\"\\u01CB\\u01CC\\x07k\\x02\\x02\\u01CC\\u01CD\\x07p\\x02\\x02\\u01CD\\u01CE\\x07i\\x02\" +\n\t\t\"\\x02\\u01CEN\\x03\\x02\\x02\\x02\\u01CF\\u01D0\\x07?\\x02\\x02\\u01D0\\u01D1\\x07@\" +\n\t\t\"\\x02\\x02\\u01D1P\\x03\\x02\\x02\\x02\\u01D2\\u01D3\\x07o\\x02\\x02\\u01D3\\u01D4\\x07\" +\n\t\t\"g\\x02\\x02\\u01D4\\u01D5\\x07o\\x02\\x02\\u01D5\\u01D6\\x07q\\x02\\x02\\u01D6\\u01D7\" +\n\t\t\"\\x07t\\x02\\x02\\u01D7\\u01D8\\x07{\\x02\\x02\\u01D8R\\x03\\x02\\x02\\x02\\u01D9\\u01DA\" +\n\t\t\"\\x07u\\x02\\x02\\u01DA\\u01DB\\x07v\\x02\\x02\\u01DB\\u01DC\\x07q\\x02\\x02\\u01DC\" +\n\t\t\"\\u01DD\\x07t\\x02\\x02\\u01DD\\u01DE\\x07c\\x02\\x02\\u01DE\\u01DF\\x07i\\x02\\x02\" +\n\t\t\"\\u01DF\\u01E0\\x07g\\x02\\x02\\u01E0T\\x03\\x02\\x02\\x02\\u01E1\\u01E2\\x07e\\x02\" +\n\t\t\"\\x02\\u01E2\\u01E3\\x07c\\x02\\x02\\u01E3\\u01E4\\x07n\\x02\\x02\\u01E4\\u01E5\\x07\" +\n\t\t\"n\\x02\\x02\\u01E5\\u01E6\\x07f\\x02\\x02\\u01E6\\u01E7\\x07c\\x02\\x02\\u01E7\\u01E8\" +\n\t\t\"\\x07v\\x02\\x02\\u01E8\\u01E9\\x07c\\x02\\x02\\u01E9V\\x03\\x02\\x02\\x02\\u01EA\\u01EB\" +\n\t\t\"\\x07k\\x02\\x02\\u01EB\\u01EC\\x07h\\x02\\x02\\u01ECX\\x03\\x02\\x02\\x02\\u01ED\\u01EE\" +\n\t\t\"\\x07g\\x02\\x02\\u01EE\\u01EF\\x07n\\x02\\x02\\u01EF\\u01F0\\x07u\\x02\\x02\\u01F0\" +\n\t\t\"\\u01F1\\x07g\\x02\\x02\\u01F1Z\\x03\\x02\\x02\\x02\\u01F2\\u01F3\\x07v\\x02\\x02\\u01F3\" +\n\t\t\"\\u01F4\\x07t\\x02\\x02\\u01F4\\u01F5\\x07{\\x02\\x02\\u01F5\\\\\\x03\\x02\\x02\\x02\\u01F6\" +\n\t\t\"\\u01F7\\x07e\\x02\\x02\\u01F7\\u01F8\\x07c\\x02\\x02\\u01F8\\u01F9\\x07v\\x02\\x02\" +\n\t\t\"\\u01F9\\u01FA\\x07e\\x02\\x02\\u01FA\\u01FB\\x07j\\x02\\x02\\u01FB^\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01FC\\u01FD\\x07y\\x02\\x02\\u01FD\\u01FE\\x07j\\x02\\x02\\u01FE\\u01FF\\x07\" +\n\t\t\"k\\x02\\x02\\u01FF\\u0200\\x07n\\x02\\x02\\u0200\\u0201\\x07g\\x02\\x02\\u0201`\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0202\\u0203\\x07w\\x02\\x02\\u0203\\u0204\\x07p\\x02\\x02\\u0204\\u0205\" +\n\t\t\"\\x07e\\x02\\x02\\u0205\\u0206\\x07j\\x02\\x02\\u0206\\u0207\\x07g\\x02\\x02\\u0207\" +\n\t\t\"\\u0208\\x07e\\x02\\x02\\u0208\\u0209\\x07m\\x02\\x02\\u0209\\u020A\\x07g\\x02\\x02\" +\n\t\t\"\\u020A\\u020B\\x07f\\x02\\x02\\u020Bb\\x03\\x02\\x02\\x02\\u020C\\u020D\\x07c\\x02\" +\n\t\t\"\\x02\\u020D\\u020E\\x07u\\x02\\x02\\u020E\\u020F\\x07u\\x02\\x02\\u020F\\u0210\\x07\" +\n\t\t\"g\\x02\\x02\\u0210\\u0211\\x07o\\x02\\x02\\u0211\\u0212\\x07d\\x02\\x02\\u0212\\u0213\" +\n\t\t\"\\x07n\\x02\\x02\\u0213\\u0214\\x07{\\x02\\x02\\u0214d\\x03\\x02\\x02\\x02\\u0215\\u0216\" +\n\t\t\"\\x07f\\x02\\x02\\u0216\\u0217\\x07q\\x02\\x02\\u0217f\\x03\\x02\\x02\\x02\\u0218\\u0219\" +\n\t\t\"\\x07t\\x02\\x02\\u0219\\u021A\\x07g\\x02\\x02\\u021A\\u021B\\x07v\\x02\\x02\\u021B\" +\n\t\t\"\\u021C\\x07w\\x02\\x02\\u021C\\u021D\\x07t\\x02\\x02\\u021D\\u021E\\x07p\\x02\\x02\" +\n\t\t\"\\u021Eh\\x03\\x02\\x02\\x02\\u021F\\u0220\\x07v\\x02\\x02\\u0220\\u0221\\x07j\\x02\" +\n\t\t\"\\x02\\u0221\\u0222\\x07t\\x02\\x02\\u0222\\u0223\\x07q\\x02\\x02\\u0223\\u0224\\x07\" +\n\t\t\"y\\x02\\x02\\u0224j\\x03\\x02\\x02\\x02\\u0225\\u0226\\x07g\\x02\\x02\\u0226\\u0227\" +\n\t\t\"\\x07o\\x02\\x02\\u0227\\u0228\\x07k\\x02\\x02\\u0228\\u0229\\x07v\\x02\\x02\\u0229\" +\n\t\t\"l\\x03\\x02\\x02\\x02\\u022A\\u022B\\x07t\\x02\\x02\\u022B\\u022C\\x07g\\x02\\x02\\u022C\" +\n\t\t\"\\u022D\\x07x\\x02\\x02\\u022D\\u022E\\x07g\\x02\\x02\\u022E\\u022F\\x07t\\x02\\x02\" +\n\t\t\"\\u022F\\u0230\\x07v\\x02\\x02\\u0230n\\x03\\x02\\x02\\x02\\u0231\\u0232\\x07x\\x02\" +\n\t\t\"\\x02\\u0232\\u0233\\x07c\\x02\\x02\\u0233\\u0234\\x07t\\x02\\x02\\u0234p\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0235\\u0236\\x07d\\x02\\x02\\u0236\\u0237\\x07q\\x02\\x02\\u0237\\u0238\" +\n\t\t\"\\x07q\\x02\\x02\\u0238\\u0239\\x07n\\x02\\x02\\u0239r\\x03\\x02\\x02\\x02\\u023A\\u023B\" +\n\t\t\"\\x07u\\x02\\x02\\u023B\\u023C\\x07v\\x02\\x02\\u023C\\u023D\\x07t\\x02\\x02\\u023D\" +\n\t\t\"\\u023E\\x07k\\x02\\x02\\u023E\\u023F\\x07p\\x02\\x02\\u023F\\u0240\\x07i\\x02\\x02\" +\n\t\t\"\\u0240t\\x03\\x02\\x02\\x02\\u0241\\u0242\\x07d\\x02\\x02\\u0242\\u0243\\x07{\\x02\" +\n\t\t\"\\x02\\u0243\\u0244\\x07v\\x02\\x02\\u0244\\u0245\\x07g\\x02\\x02\\u0245v\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0246\\u0247\\x07-\\x02\\x02\\u0247\\u0248\\x07-\\x02\\x02\\u0248x\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0249\\u024A\\x07/\\x02\\x02\\u024A\\u024B\\x07/\\x02\\x02\\u024Bz\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u024C\\u024D\\x07p\\x02\\x02\\u024D\\u024E\\x07g\\x02\\x02\\u024E\" +\n\t\t\"\\u024F\\x07y\\x02\\x02\\u024F|\\x03\\x02\\x02\\x02\\u0250\\u0251\\x07<\\x02\\x02\\u0251\" +\n\t\t\"~\\x03\\x02\\x02\\x02\\u0252\\u0253\\x07-\\x02\\x02\\u0253\\x80\\x03\\x02\\x02\\x02\\u0254\" +\n\t\t\"\\u0255\\x07/\\x02\\x02\\u0255\\x82\\x03\\x02\\x02\\x02\\u0256\\u0257\\x07c\\x02\\x02\" +\n\t\t\"\\u0257\\u0258\\x07h\\x02\\x02\\u0258\\u0259\\x07v\\x02\\x02\\u0259\\u025A\\x07g\\x02\" +\n\t\t\"\\x02\\u025A\\u025B\\x07t\\x02\\x02\\u025B\\x84\\x03\\x02\\x02\\x02\\u025C\\u025D\\x07\" +\n\t\t\"f\\x02\\x02\\u025D\\u025E\\x07g\\x02\\x02\\u025E\\u025F\\x07n\\x02\\x02\\u025F\\u0260\" +\n\t\t\"\\x07g\\x02\\x02\\u0260\\u0261\\x07v\\x02\\x02\\u0261\\u0262\\x07g\\x02\\x02\\u0262\" +\n\t\t\"\\x86\\x03\\x02\\x02\\x02\\u0263\\u0264\\x07#\\x02\\x02\\u0264\\x88\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0265\\u0266\\x07,\\x02\\x02\\u0266\\u0267\\x07,\\x02\\x02\\u0267\\x8A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0268\\u0269\\x071\\x02\\x02\\u0269\\x8C\\x03\\x02\\x02\\x02\\u026A\\u026B\\x07\" +\n\t\t\"\\'\\x02\\x02\\u026B\\x8E\\x03\\x02\\x02\\x02\\u026C\\u026D\\x07>\\x02\\x02\\u026D\\u026E\" +\n\t\t\"\\x07>\\x02\\x02\\u026E\\x90\\x03\\x02\\x02\\x02\\u026F\\u0270\\x07@\\x02\\x02\\u0270\" +\n\t\t\"\\u0271\\x07@\\x02\\x02\\u0271\\x92\\x03\\x02\\x02\\x02\\u0272\\u0273\\x07(\\x02\\x02\" +\n\t\t\"\\u0273\\x94\\x03\\x02\\x02\\x02\\u0274\\u0275\\x07~\\x02\\x02\\u0275\\x96\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0276\\u0277\\x07?\\x02\\x02\\u0277\\u0278\\x07?\\x02\\x02\\u0278\\x98\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0279\\u027A\\x07#\\x02\\x02\\u027A\\u027B\\x07?\\x02\\x02\\u027B\\x9A\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u027C\\u027D\\x07(\\x02\\x02\\u027D\\u027E\\x07(\\x02\\x02\\u027E\" +\n\t\t\"\\x9C\\x03\\x02\\x02\\x02\\u027F\\u0280\\x07A\\x02\\x02\\u0280\\x9E\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0281\\u0282\\x07~\\x02\\x02\\u0282\\u0283\\x07?\\x02\\x02\\u0283\\xA0\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0284\\u0285\\x07`\\x02\\x02\\u0285\\u0286\\x07?\\x02\\x02\\u0286\\xA2\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0287\\u0288\\x07(\\x02\\x02\\u0288\\u0289\\x07?\\x02\\x02\\u0289\\xA4\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u028A\\u028B\\x07>\\x02\\x02\\u028B\\u028C\\x07>\\x02\\x02\\u028C\\u028D\" +\n\t\t\"\\x07?\\x02\\x02\\u028D\\xA6\\x03\\x02\\x02\\x02\\u028E\\u028F\\x07@\\x02\\x02\\u028F\" +\n\t\t\"\\u0290\\x07@\\x02\\x02\\u0290\\u0291\\x07?\\x02\\x02\\u0291\\xA8\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0292\\u0293\\x07-\\x02\\x02\\u0293\\u0294\\x07?\\x02\\x02\\u0294\\xAA\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0295\\u0296\\x07/\\x02\\x02\\u0296\\u0297\\x07?\\x02\\x02\\u0297\\xAC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0298\\u0299\\x07,\\x02\\x02\\u0299\\u029A\\x07?\\x02\\x02\\u029A\\xAE\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u029B\\u029C\\x071\\x02\\x02\\u029C\\u029D\\x07?\\x02\\x02\\u029D\\xB0\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u029E\\u029F\\x07\\'\\x02\\x02\\u029F\\u02A0\\x07?\\x02\\x02\\u02A0\" +\n\t\t\"\\xB2\\x03\\x02\\x02\\x02\\u02A1\\u02A2\\x07n\\x02\\x02\\u02A2\\u02A3\\x07g\\x02\\x02\" +\n\t\t\"\\u02A3\\u02A4\\x07v\\x02\\x02\\u02A4\\xB4\\x03\\x02\\x02\\x02\\u02A5\\u02A6\\x07<\\x02\" +\n\t\t\"\\x02\\u02A6\\u02A7\\x07?\\x02\\x02\\u02A7\\xB6\\x03\\x02\\x02\\x02\\u02A8\\u02A9\\x07\" +\n\t\t\"?\\x02\\x02\\u02A9\\u02AA\\x07<\\x02\\x02\\u02AA\\xB8\\x03\\x02\\x02\\x02\\u02AB\\u02AC\" +\n\t\t\"\\x07u\\x02\\x02\\u02AC\\u02AD\\x07y\\x02\\x02\\u02AD\\u02AE\\x07k\\x02\\x02\\u02AE\" +\n\t\t\"\\u02AF\\x07v\\x02\\x02\\u02AF\\u02B0\\x07e\\x02\\x02\\u02B0\\u02B1\\x07j\\x02\\x02\" +\n\t\t\"\\u02B1\\xBA\\x03\\x02\\x02\\x02\\u02B2\\u02B3\\x07e\\x02\\x02\\u02B3\\u02B4\\x07c\\x02\" +\n\t\t\"\\x02\\u02B4\\u02B5\\x07u\\x02\\x02\\u02B5\\u02B6\\x07g\\x02\\x02\\u02B6\\xBC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02B7\\u02B8\\x07f\\x02\\x02\\u02B8\\u02B9\\x07g\\x02\\x02\\u02B9\\u02BA\" +\n\t\t\"\\x07h\\x02\\x02\\u02BA\\u02BB\\x07c\\x02\\x02\\u02BB\\u02BC\\x07w\\x02\\x02\\u02BC\" +\n\t\t\"\\u02BD\\x07n\\x02\\x02\\u02BD\\u02BE\\x07v\\x02\\x02\\u02BE\\xBE\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02BF\\u02C0\\x07/\\x02\\x02\\u02C0\\u02C1\\x07@\\x02\\x02\\u02C1\\xC0\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02C2\\u02C3\\x07e\\x02\\x02\\u02C3\\u02C4\\x07c\\x02\\x02\\u02C4\\u02C5\\x07\" +\n\t\t\"n\\x02\\x02\\u02C5\\u02C6\\x07n\\x02\\x02\\u02C6\\u02C7\\x07d\\x02\\x02\\u02C7\\u02C8\" +\n\t\t\"\\x07c\\x02\\x02\\u02C8\\u02C9\\x07e\\x02\\x02\\u02C9\\u02CA\\x07m\\x02\\x02\\u02CA\" +\n\t\t\"\\xC2\\x03\\x02\\x02\\x02\\u02CB\\u02CC\\x07q\\x02\\x02\\u02CC\\u02CD\\x07x\\x02\\x02\" +\n\t\t\"\\u02CD\\u02CE\\x07g\\x02\\x02\\u02CE\\u02CF\\x07t\\x02\\x02\\u02CF\\u02D0\\x07t\\x02\" +\n\t\t\"\\x02\\u02D0\\u02D1\\x07k\\x02\\x02\\u02D1\\u02D2\\x07f\\x02\\x02\\u02D2\\u02D3\\x07\" +\n\t\t\"g\\x02\\x02\\u02D3\\xC4\\x03\\x02\\x02\\x02\\u02D4\\u02D5\\x07k\\x02\\x02\\u02D5\\u02D6\" +\n\t\t\"\\x07p\\x02\\x02\\u02D6\\u038B\\x07v\\x02\\x02\\u02D7\\u02D8\\x07k\\x02\\x02\\u02D8\" +\n\t\t\"\\u02D9\\x07p\\x02\\x02\\u02D9\\u02DA\\x07v\\x02\\x02\\u02DA\\u038B\\x07:\\x02\\x02\" +\n\t\t\"\\u02DB\\u02DC\\x07k\\x02\\x02\\u02DC\\u02DD\\x07p\\x02\\x02\\u02DD\\u02DE\\x07v\\x02\" +\n\t\t\"\\x02\\u02DE\\u02DF\\x073\\x02\\x02\\u02DF\\u038B\\x078\\x02\\x02\\u02E0\\u02E1\\x07\" +\n\t\t\"k\\x02\\x02\\u02E1\\u02E2\\x07p\\x02\\x02\\u02E2\\u02E3\\x07v\\x02\\x02\\u02E3\\u02E4\" +\n\t\t\"\\x074\\x02\\x02\\u02E4\\u038B\\x076\\x02\\x02\\u02E5\\u02E6\\x07k\\x02\\x02\\u02E6\" +\n\t\t\"\\u02E7\\x07p\\x02\\x02\\u02E7\\u02E8\\x07v\\x02\\x02\\u02E8\\u02E9\\x075\\x02\\x02\" +\n\t\t\"\\u02E9\\u038B\\x074\\x02\\x02\\u02EA\\u02EB\\x07k\\x02\\x02\\u02EB\\u02EC\\x07p\\x02\" +\n\t\t\"\\x02\\u02EC\\u02ED\\x07v\\x02\\x02\\u02ED\\u02EE\\x076\\x02\\x02\\u02EE\\u038B\\x07\" +\n\t\t\"2\\x02\\x02\\u02EF\\u02F0\\x07k\\x02\\x02\\u02F0\\u02F1\\x07p\\x02\\x02\\u02F1\\u02F2\" +\n\t\t\"\\x07v\\x02\\x02\\u02F2\\u02F3\\x076\\x02\\x02\\u02F3\\u038B\\x07:\\x02\\x02\\u02F4\" +\n\t\t\"\\u02F5\\x07k\\x02\\x02\\u02F5\\u02F6\\x07p\\x02\\x02\\u02F6\\u02F7\\x07v\\x02\\x02\" +\n\t\t\"\\u02F7\\u02F8\\x077\\x02\\x02\\u02F8\\u038B\\x078\\x02\\x02\\u02F9\\u02FA\\x07k\\x02\" +\n\t\t\"\\x02\\u02FA\\u02FB\\x07p\\x02\\x02\\u02FB\\u02FC\\x07v\\x02\\x02\\u02FC\\u02FD\\x07\" +\n\t\t\"8\\x02\\x02\\u02FD\\u038B\\x076\\x02\\x02\\u02FE\\u02FF\\x07k\\x02\\x02\\u02FF\\u0300\" +\n\t\t\"\\x07p\\x02\\x02\\u0300\\u0301\\x07v\\x02\\x02\\u0301\\u0302\\x079\\x02\\x02\\u0302\" +\n\t\t\"\\u038B\\x074\\x02\\x02\\u0303\\u0304\\x07k\\x02\\x02\\u0304\\u0305\\x07p\\x02\\x02\" +\n\t\t\"\\u0305\\u0306\\x07v\\x02\\x02\\u0306\\u0307\\x07:\\x02\\x02\\u0307\\u038B\\x072\\x02\" +\n\t\t\"\\x02\\u0308\\u0309\\x07k\\x02\\x02\\u0309\\u030A\\x07p\\x02\\x02\\u030A\\u030B\\x07\" +\n\t\t\"v\\x02\\x02\\u030B\\u030C\\x07:\\x02\\x02\\u030C\\u038B\\x07:\\x02\\x02\\u030D\\u030E\" +\n\t\t\"\\x07k\\x02\\x02\\u030E\\u030F\\x07p\\x02\\x02\\u030F\\u0310\\x07v\\x02\\x02\\u0310\" +\n\t\t\"\\u0311\\x07;\\x02\\x02\\u0311\\u038B\\x078\\x02\\x02\\u0312\\u0313\\x07k\\x02\\x02\" +\n\t\t\"\\u0313\\u0314\\x07p\\x02\\x02\\u0314\\u0315\\x07v\\x02\\x02\\u0315\\u0316\\x073\\x02\" +\n\t\t\"\\x02\\u0316\\u0317\\x072\\x02\\x02\\u0317\\u038B\\x076\\x02\\x02\\u0318\\u0319\\x07\" +\n\t\t\"k\\x02\\x02\\u0319\\u031A\\x07p\\x02\\x02\\u031A\\u031B\\x07v\\x02\\x02\\u031B\\u031C\" +\n\t\t\"\\x073\\x02\\x02\\u031C\\u031D\\x073\\x02\\x02\\u031D\\u038B\\x074\\x02\\x02\\u031E\" +\n\t\t\"\\u031F\\x07k\\x02\\x02\\u031F\\u0320\\x07p\\x02\\x02\\u0320\\u0321\\x07v\\x02\\x02\" +\n\t\t\"\\u0321\\u0322\\x073\\x02\\x02\\u0322\\u0323\\x074\\x02\\x02\\u0323\\u038B\\x072\\x02\" +\n\t\t\"\\x02\\u0324\\u0325\\x07k\\x02\\x02\\u0325\\u0326\\x07p\\x02\\x02\\u0326\\u0327\\x07\" +\n\t\t\"v\\x02\\x02\\u0327\\u0328\\x073\\x02\\x02\\u0328\\u0329\\x074\\x02\\x02\\u0329\\u038B\" +\n\t\t\"\\x07:\\x02\\x02\\u032A\\u032B\\x07k\\x02\\x02\\u032B\\u032C\\x07p\\x02\\x02\\u032C\" +\n\t\t\"\\u032D\\x07v\\x02\\x02\\u032D\\u032E\\x073\\x02\\x02\\u032E\\u032F\\x075\\x02\\x02\" +\n\t\t\"\\u032F\\u038B\\x078\\x02\\x02\\u0330\\u0331\\x07k\\x02\\x02\\u0331\\u0332\\x07p\\x02\" +\n\t\t\"\\x02\\u0332\\u0333\\x07v\\x02\\x02\\u0333\\u0334\\x073\\x02\\x02\\u0334\\u0335\\x07\" +\n\t\t\"6\\x02\\x02\\u0335\\u038B\\x076\\x02\\x02\\u0336\\u0337\\x07k\\x02\\x02\\u0337\\u0338\" +\n\t\t\"\\x07p\\x02\\x02\\u0338\\u0339\\x07v\\x02\\x02\\u0339\\u033A\\x073\\x02\\x02\\u033A\" +\n\t\t\"\\u033B\\x077\\x02\\x02\\u033B\\u038B\\x074\\x02\\x02\\u033C\\u033D\\x07k\\x02\\x02\" +\n\t\t\"\\u033D\\u033E\\x07p\\x02\\x02\\u033E\\u033F\\x07v\\x02\\x02\\u033F\\u0340\\x073\\x02\" +\n\t\t\"\\x02\\u0340\\u0341\\x078\\x02\\x02\\u0341\\u038B\\x072\\x02\\x02\\u0342\\u0343\\x07\" +\n\t\t\"k\\x02\\x02\\u0343\\u0344\\x07p\\x02\\x02\\u0344\\u0345\\x07v\\x02\\x02\\u0345\\u0346\" +\n\t\t\"\\x073\\x02\\x02\\u0346\\u0347\\x078\\x02\\x02\\u0347\\u038B\\x07:\\x02\\x02\\u0348\" +\n\t\t\"\\u0349\\x07k\\x02\\x02\\u0349\\u034A\\x07p\\x02\\x02\\u034A\\u034B\\x07v\\x02\\x02\" +\n\t\t\"\\u034B\\u034C\\x073\\x02\\x02\\u034C\\u034D\\x079\\x02\\x02\\u034D\\u038B\\x078\\x02\" +\n\t\t\"\\x02\\u034E\\u034F\\x07k\\x02\\x02\\u034F\\u0350\\x07p\\x02\\x02\\u0350\\u0351\\x07\" +\n\t\t\"v\\x02\\x02\\u0351\\u0352\\x073\\x02\\x02\\u0352\\u0353\\x07:\\x02\\x02\\u0353\\u038B\" +\n\t\t\"\\x076\\x02\\x02\\u0354\\u0355\\x07k\\x02\\x02\\u0355\\u0356\\x07p\\x02\\x02\\u0356\" +\n\t\t\"\\u0357\\x07v\\x02\\x02\\u0357\\u0358\\x073\\x02\\x02\\u0358\\u0359\\x07;\\x02\\x02\" +\n\t\t\"\\u0359\\u038B\\x074\\x02\\x02\\u035A\\u035B\\x07k\\x02\\x02\\u035B\\u035C\\x07p\\x02\" +\n\t\t\"\\x02\\u035C\\u035D\\x07v\\x02\\x02\\u035D\\u035E\\x074\\x02\\x02\\u035E\\u035F\\x07\" +\n\t\t\"2\\x02\\x02\\u035F\\u038B\\x072\\x02\\x02\\u0360\\u0361\\x07k\\x02\\x02\\u0361\\u0362\" +\n\t\t\"\\x07p\\x02\\x02\\u0362\\u0363\\x07v\\x02\\x02\\u0363\\u0364\\x074\\x02\\x02\\u0364\" +\n\t\t\"\\u0365\\x072\\x02\\x02\\u0365\\u038B\\x07:\\x02\\x02\\u0366\\u0367\\x07k\\x02\\x02\" +\n\t\t\"\\u0367\\u0368\\x07p\\x02\\x02\\u0368\\u0369\\x07v\\x02\\x02\\u0369\\u036A\\x074\\x02\" +\n\t\t\"\\x02\\u036A\\u036B\\x073\\x02\\x02\\u036B\\u038B\\x078\\x02\\x02\\u036C\\u036D\\x07\" +\n\t\t\"k\\x02\\x02\\u036D\\u036E\\x07p\\x02\\x02\\u036E\\u036F\\x07v\\x02\\x02\\u036F\\u0370\" +\n\t\t\"\\x074\\x02\\x02\\u0370\\u0371\\x074\\x02\\x02\\u0371\\u038B\\x076\\x02\\x02\\u0372\" +\n\t\t\"\\u0373\\x07k\\x02\\x02\\u0373\\u0374\\x07p\\x02\\x02\\u0374\\u0375\\x07v\\x02\\x02\" +\n\t\t\"\\u0375\\u0376\\x074\\x02\\x02\\u0376\\u0377\\x075\\x02\\x02\\u0377\\u038B\\x074\\x02\" +\n\t\t\"\\x02\\u0378\\u0379\\x07k\\x02\\x02\\u0379\\u037A\\x07p\\x02\\x02\\u037A\\u037B\\x07\" +\n\t\t\"v\\x02\\x02\\u037B\\u037C\\x074\\x02\\x02\\u037C\\u037D\\x076\\x02\\x02\\u037D\\u038B\" +\n\t\t\"\\x072\\x02\\x02\\u037E\\u037F\\x07k\\x02\\x02\\u037F\\u0380\\x07p\\x02\\x02\\u0380\" +\n\t\t\"\\u0381\\x07v\\x02\\x02\\u0381\\u0382\\x074\\x02\\x02\\u0382\\u0383\\x076\\x02\\x02\" +\n\t\t\"\\u0383\\u038B\\x07:\\x02\\x02\\u0384\\u0385\\x07k\\x02\\x02\\u0385\\u0386\\x07p\\x02\" +\n\t\t\"\\x02\\u0386\\u0387\\x07v\\x02\\x02\\u0387\\u0388\\x074\\x02\\x02\\u0388\\u0389\\x07\" +\n\t\t\"7\\x02\\x02\\u0389\\u038B\\x078\\x02\\x02\\u038A\\u02D4\\x03\\x02\\x02\\x02\\u038A\\u02D7\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u038A\\u02DB\\x03\\x02\\x02\\x02\\u038A\\u02E0\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u038A\\u02E5\\x03\\x02\\x02\\x02\\u038A\\u02EA\\x03\\x02\\x02\\x02\\u038A\\u02EF\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u038A\\u02F4\\x03\\x02\\x02\\x02\\u038A\\u02F9\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u02FE\\x03\\x02\\x02\\x02\\u038A\\u0303\\x03\\x02\\x02\\x02\\u038A\\u0308\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u030D\\x03\\x02\\x02\\x02\\u038A\\u0312\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0318\\x03\\x02\\x02\\x02\\u038A\\u031E\\x03\\x02\\x02\\x02\\u038A\\u0324\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u032A\\x03\\x02\\x02\\x02\\u038A\\u0330\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0336\\x03\\x02\\x02\\x02\\u038A\\u033C\\x03\\x02\\x02\\x02\\u038A\\u0342\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u0348\\x03\\x02\\x02\\x02\\u038A\\u034E\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0354\\x03\\x02\\x02\\x02\\u038A\\u035A\\x03\\x02\\x02\\x02\\u038A\\u0360\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u0366\\x03\\x02\\x02\\x02\\u038A\\u036C\\x03\\x02\\x02\\x02\\u038A\" +\n\t\t\"\\u0372\\x03\\x02\\x02\\x02\\u038A\\u0378\\x03\\x02\\x02\\x02\\u038A\\u037E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u038A\\u0384\\x03\\x02\\x02\\x02\\u038B\\xC6\\x03\\x02\\x02\\x02\\u038C\\u038D\" +\n\t\t\"\\x07w\\x02\\x02\\u038D\\u038E\\x07k\\x02\\x02\\u038E\\u038F\\x07p\\x02\\x02\\u038F\" +\n\t\t\"\\u0464\\x07v\\x02\\x02\\u0390\\u0391\\x07w\\x02\\x02\\u0391\\u0392\\x07k\\x02\\x02\" +\n\t\t\"\\u0392\\u0393\\x07p\\x02\\x02\\u0393\\u0394\\x07v\\x02\\x02\\u0394\\u0464\\x07:\\x02\" +\n\t\t\"\\x02\\u0395\\u0396\\x07w\\x02\\x02\\u0396\\u0397\\x07k\\x02\\x02\\u0397\\u0398\\x07\" +\n\t\t\"p\\x02\\x02\\u0398\\u0399\\x07v\\x02\\x02\\u0399\\u039A\\x073\\x02\\x02\\u039A\\u0464\" +\n\t\t\"\\x078\\x02\\x02\\u039B\\u039C\";\n\tprivate static readonly _serializedATNSegment2: string =\n\t\t\"\\x07w\\x02\\x02\\u039C\\u039D\\x07k\\x02\\x02\\u039D\\u039E\\x07p\\x02\\x02\\u039E\" +\n\t\t\"\\u039F\\x07v\\x02\\x02\\u039F\\u03A0\\x074\\x02\\x02\\u03A0\\u0464\\x076\\x02\\x02\" +\n\t\t\"\\u03A1\\u03A2\\x07w\\x02\\x02\\u03A2\\u03A3\\x07k\\x02\\x02\\u03A3\\u03A4\\x07p\\x02\" +\n\t\t\"\\x02\\u03A4\\u03A5\\x07v\\x02\\x02\\u03A5\\u03A6\\x075\\x02\\x02\\u03A6\\u0464\\x07\" +\n\t\t\"4\\x02\\x02\\u03A7\\u03A8\\x07w\\x02\\x02\\u03A8\\u03A9\\x07k\\x02\\x02\\u03A9\\u03AA\" +\n\t\t\"\\x07p\\x02\\x02\\u03AA\\u03AB\\x07v\\x02\\x02\\u03AB\\u03AC\\x076\\x02\\x02\\u03AC\" +\n\t\t\"\\u0464\\x072\\x02\\x02\\u03AD\\u03AE\\x07w\\x02\\x02\\u03AE\\u03AF\\x07k\\x02\\x02\" +\n\t\t\"\\u03AF\\u03B0\\x07p\\x02\\x02\\u03B0\\u03B1\\x07v\\x02\\x02\\u03B1\\u03B2\\x076\\x02\" +\n\t\t\"\\x02\\u03B2\\u0464\\x07:\\x02\\x02\\u03B3\\u03B4\\x07w\\x02\\x02\\u03B4\\u03B5\\x07\" +\n\t\t\"k\\x02\\x02\\u03B5\\u03B6\\x07p\\x02\\x02\\u03B6\\u03B7\\x07v\\x02\\x02\\u03B7\\u03B8\" +\n\t\t\"\\x077\\x02\\x02\\u03B8\\u0464\\x078\\x02\\x02\\u03B9\\u03BA\\x07w\\x02\\x02\\u03BA\" +\n\t\t\"\\u03BB\\x07k\\x02\\x02\\u03BB\\u03BC\\x07p\\x02\\x02\\u03BC\\u03BD\\x07v\\x02\\x02\" +\n\t\t\"\\u03BD\\u03BE\\x078\\x02\\x02\\u03BE\\u0464\\x076\\x02\\x02\\u03BF\\u03C0\\x07w\\x02\" +\n\t\t\"\\x02\\u03C0\\u03C1\\x07k\\x02\\x02\\u03C1\\u03C2\\x07p\\x02\\x02\\u03C2\\u03C3\\x07\" +\n\t\t\"v\\x02\\x02\\u03C3\\u03C4\\x079\\x02\\x02\\u03C4\\u0464\\x074\\x02\\x02\\u03C5\\u03C6\" +\n\t\t\"\\x07w\\x02\\x02\\u03C6\\u03C7\\x07k\\x02\\x02\\u03C7\\u03C8\\x07p\\x02\\x02\\u03C8\" +\n\t\t\"\\u03C9\\x07v\\x02\\x02\\u03C9\\u03CA\\x07:\\x02\\x02\\u03CA\\u0464\\x072\\x02\\x02\" +\n\t\t\"\\u03CB\\u03CC\\x07w\\x02\\x02\\u03CC\\u03CD\\x07k\\x02\\x02\\u03CD\\u03CE\\x07p\\x02\" +\n\t\t\"\\x02\\u03CE\\u03CF\\x07v\\x02\\x02\\u03CF\\u03D0\\x07:\\x02\\x02\\u03D0\\u0464\\x07\" +\n\t\t\":\\x02\\x02\\u03D1\\u03D2\\x07w\\x02\\x02\\u03D2\\u03D3\\x07k\\x02\\x02\\u03D3\\u03D4\" +\n\t\t\"\\x07p\\x02\\x02\\u03D4\\u03D5\\x07v\\x02\\x02\\u03D5\\u03D6\\x07;\\x02\\x02\\u03D6\" +\n\t\t\"\\u0464\\x078\\x02\\x02\\u03D7\\u03D8\\x07w\\x02\\x02\\u03D8\\u03D9\\x07k\\x02\\x02\" +\n\t\t\"\\u03D9\\u03DA\\x07p\\x02\\x02\\u03DA\\u03DB\\x07v\\x02\\x02\\u03DB\\u03DC\\x073\\x02\" +\n\t\t\"\\x02\\u03DC\\u03DD\\x072\\x02\\x02\\u03DD\\u0464\\x076\\x02\\x02\\u03DE\\u03DF\\x07\" +\n\t\t\"w\\x02\\x02\\u03DF\\u03E0\\x07k\\x02\\x02\\u03E0\\u03E1\\x07p\\x02\\x02\\u03E1\\u03E2\" +\n\t\t\"\\x07v\\x02\\x02\\u03E2\\u03E3\\x073\\x02\\x02\\u03E3\\u03E4\\x073\\x02\\x02\\u03E4\" +\n\t\t\"\\u0464\\x074\\x02\\x02\\u03E5\\u03E6\\x07w\\x02\\x02\\u03E6\\u03E7\\x07k\\x02\\x02\" +\n\t\t\"\\u03E7\\u03E8\\x07p\\x02\\x02\\u03E8\\u03E9\\x07v\\x02\\x02\\u03E9\\u03EA\\x073\\x02\" +\n\t\t\"\\x02\\u03EA\\u03EB\\x074\\x02\\x02\\u03EB\\u0464\\x072\\x02\\x02\\u03EC\\u03ED\\x07\" +\n\t\t\"w\\x02\\x02\\u03ED\\u03EE\\x07k\\x02\\x02\\u03EE\\u03EF\\x07p\\x02\\x02\\u03EF\\u03F0\" +\n\t\t\"\\x07v\\x02\\x02\\u03F0\\u03F1\\x073\\x02\\x02\\u03F1\\u03F2\\x074\\x02\\x02\\u03F2\" +\n\t\t\"\\u0464\\x07:\\x02\\x02\\u03F3\\u03F4\\x07w\\x02\\x02\\u03F4\\u03F5\\x07k\\x02\\x02\" +\n\t\t\"\\u03F5\\u03F6\\x07p\\x02\\x02\\u03F6\\u03F7\\x07v\\x02\\x02\\u03F7\\u03F8\\x073\\x02\" +\n\t\t\"\\x02\\u03F8\\u03F9\\x075\\x02\\x02\\u03F9\\u0464\\x078\\x02\\x02\\u03FA\\u03FB\\x07\" +\n\t\t\"w\\x02\\x02\\u03FB\\u03FC\\x07k\\x02\\x02\\u03FC\\u03FD\\x07p\\x02\\x02\\u03FD\\u03FE\" +\n\t\t\"\\x07v\\x02\\x02\\u03FE\\u03FF\\x073\\x02\\x02\\u03FF\\u0400\\x076\\x02\\x02\\u0400\" +\n\t\t\"\\u0464\\x076\\x02\\x02\\u0401\\u0402\\x07w\\x02\\x02\\u0402\\u0403\\x07k\\x02\\x02\" +\n\t\t\"\\u0403\\u0404\\x07p\\x02\\x02\\u0404\\u0405\\x07v\\x02\\x02\\u0405\\u0406\\x073\\x02\" +\n\t\t\"\\x02\\u0406\\u0407\\x077\\x02\\x02\\u0407\\u0464\\x074\\x02\\x02\\u0408\\u0409\\x07\" +\n\t\t\"w\\x02\\x02\\u0409\\u040A\\x07k\\x02\\x02\\u040A\\u040B\\x07p\\x02\\x02\\u040B\\u040C\" +\n\t\t\"\\x07v\\x02\\x02\\u040C\\u040D\\x073\\x02\\x02\\u040D\\u040E\\x078\\x02\\x02\\u040E\" +\n\t\t\"\\u0464\\x072\\x02\\x02\\u040F\\u0410\\x07w\\x02\\x02\\u0410\\u0411\\x07k\\x02\\x02\" +\n\t\t\"\\u0411\\u0412\\x07p\\x02\\x02\\u0412\\u0413\\x07v\\x02\\x02\\u0413\\u0414\\x073\\x02\" +\n\t\t\"\\x02\\u0414\\u0415\\x078\\x02\\x02\\u0415\\u0464\\x07:\\x02\\x02\\u0416\\u0417\\x07\" +\n\t\t\"w\\x02\\x02\\u0417\\u0418\\x07k\\x02\\x02\\u0418\\u0419\\x07p\\x02\\x02\\u0419\\u041A\" +\n\t\t\"\\x07v\\x02\\x02\\u041A\\u041B\\x073\\x02\\x02\\u041B\\u041C\\x079\\x02\\x02\\u041C\" +\n\t\t\"\\u0464\\x078\\x02\\x02\\u041D\\u041E\\x07w\\x02\\x02\\u041E\\u041F\\x07k\\x02\\x02\" +\n\t\t\"\\u041F\\u0420\\x07p\\x02\\x02\\u0420\\u0421\\x07v\\x02\\x02\\u0421\\u0422\\x073\\x02\" +\n\t\t\"\\x02\\u0422\\u0423\\x07:\\x02\\x02\\u0423\\u0464\\x076\\x02\\x02\\u0424\\u0425\\x07\" +\n\t\t\"w\\x02\\x02\\u0425\\u0426\\x07k\\x02\\x02\\u0426\\u0427\\x07p\\x02\\x02\\u0427\\u0428\" +\n\t\t\"\\x07v\\x02\\x02\\u0428\\u0429\\x073\\x02\\x02\\u0429\\u042A\\x07;\\x02\\x02\\u042A\" +\n\t\t\"\\u0464\\x074\\x02\\x02\\u042B\\u042C\\x07w\\x02\\x02\\u042C\\u042D\\x07k\\x02\\x02\" +\n\t\t\"\\u042D\\u042E\\x07p\\x02\\x02\\u042E\\u042F\\x07v\\x02\\x02\\u042F\\u0430\\x074\\x02\" +\n\t\t\"\\x02\\u0430\\u0431\\x072\\x02\\x02\\u0431\\u0464\\x072\\x02\\x02\\u0432\\u0433\\x07\" +\n\t\t\"w\\x02\\x02\\u0433\\u0434\\x07k\\x02\\x02\\u0434\\u0435\\x07p\\x02\\x02\\u0435\\u0436\" +\n\t\t\"\\x07v\\x02\\x02\\u0436\\u0437\\x074\\x02\\x02\\u0437\\u0438\\x072\\x02\\x02\\u0438\" +\n\t\t\"\\u0464\\x07:\\x02\\x02\\u0439\\u043A\\x07w\\x02\\x02\\u043A\\u043B\\x07k\\x02\\x02\" +\n\t\t\"\\u043B\\u043C\\x07p\\x02\\x02\\u043C\\u043D\\x07v\\x02\\x02\\u043D\\u043E\\x074\\x02\" +\n\t\t\"\\x02\\u043E\\u043F\\x073\\x02\\x02\\u043F\\u0464\\x078\\x02\\x02\\u0440\\u0441\\x07\" +\n\t\t\"w\\x02\\x02\\u0441\\u0442\\x07k\\x02\\x02\\u0442\\u0443\\x07p\\x02\\x02\\u0443\\u0444\" +\n\t\t\"\\x07v\\x02\\x02\\u0444\\u0445\\x074\\x02\\x02\\u0445\\u0446\\x074\\x02\\x02\\u0446\" +\n\t\t\"\\u0464\\x076\\x02\\x02\\u0447\\u0448\\x07w\\x02\\x02\\u0448\\u0449\\x07k\\x02\\x02\" +\n\t\t\"\\u0449\\u044A\\x07p\\x02\\x02\\u044A\\u044B\\x07v\\x02\\x02\\u044B\\u044C\\x074\\x02\" +\n\t\t\"\\x02\\u044C\\u044D\\x075\\x02\\x02\\u044D\\u0464\\x074\\x02\\x02\\u044E\\u044F\\x07\" +\n\t\t\"w\\x02\\x02\\u044F\\u0450\\x07k\\x02\\x02\\u0450\\u0451\\x07p\\x02\\x02\\u0451\\u0452\" +\n\t\t\"\\x07v\\x02\\x02\\u0452\\u0453\\x074\\x02\\x02\\u0453\\u0454\\x076\\x02\\x02\\u0454\" +\n\t\t\"\\u0464\\x072\\x02\\x02\\u0455\\u0456\\x07w\\x02\\x02\\u0456\\u0457\\x07k\\x02\\x02\" +\n\t\t\"\\u0457\\u0458\\x07p\\x02\\x02\\u0458\\u0459\\x07v\\x02\\x02\\u0459\\u045A\\x074\\x02\" +\n\t\t\"\\x02\\u045A\\u045B\\x076\\x02\\x02\\u045B\\u0464\\x07:\\x02\\x02\\u045C\\u045D\\x07\" +\n\t\t\"w\\x02\\x02\\u045D\\u045E\\x07k\\x02\\x02\\u045E\\u045F\\x07p\\x02\\x02\\u045F\\u0460\" +\n\t\t\"\\x07v\\x02\\x02\\u0460\\u0461\\x074\\x02\\x02\\u0461\\u0462\\x077\\x02\\x02\\u0462\" +\n\t\t\"\\u0464\\x078\\x02\\x02\\u0463\\u038C\\x03\\x02\\x02\\x02\\u0463\\u0390\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0463\\u0395\\x03\\x02\\x02\\x02\\u0463\\u039B\\x03\\x02\\x02\\x02\\u0463\\u03A1\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0463\\u03A7\\x03\\x02\\x02\\x02\\u0463\\u03AD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0463\\u03B3\\x03\\x02\\x02\\x02\\u0463\\u03B9\\x03\\x02\\x02\\x02\\u0463\\u03BF\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0463\\u03C5\\x03\\x02\\x02\\x02\\u0463\\u03CB\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u03D1\\x03\\x02\\x02\\x02\\u0463\\u03D7\\x03\\x02\\x02\\x02\\u0463\\u03DE\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u03E5\\x03\\x02\\x02\\x02\\u0463\\u03EC\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u03F3\\x03\\x02\\x02\\x02\\u0463\\u03FA\\x03\\x02\\x02\\x02\\u0463\\u0401\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u0408\\x03\\x02\\x02\\x02\\u0463\\u040F\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u0416\\x03\\x02\\x02\\x02\\u0463\\u041D\\x03\\x02\\x02\\x02\\u0463\\u0424\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u042B\\x03\\x02\\x02\\x02\\u0463\\u0432\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u0439\\x03\\x02\\x02\\x02\\u0463\\u0440\\x03\\x02\\x02\\x02\\u0463\\u0447\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0463\\u044E\\x03\\x02\\x02\\x02\\u0463\\u0455\\x03\\x02\\x02\\x02\\u0463\" +\n\t\t\"\\u045C\\x03\\x02\\x02\\x02\\u0464\\xC8\\x03\\x02\\x02\\x02\\u0465\\u0466\\x07d\\x02\" +\n\t\t\"\\x02\\u0466\\u0467\\x07{\\x02\\x02\\u0467\\u0468\\x07v\\x02\\x02\\u0468\\u0469\\x07\" +\n\t\t\"g\\x02\\x02\\u0469\\u0542\\x07u\\x02\\x02\\u046A\\u046B\\x07d\\x02\\x02\\u046B\\u046C\" +\n\t\t\"\\x07{\\x02\\x02\\u046C\\u046D\\x07v\\x02\\x02\\u046D\\u046E\\x07g\\x02\\x02\\u046E\" +\n\t\t\"\\u046F\\x07u\\x02\\x02\\u046F\\u0542\\x073\\x02\\x02\\u0470\\u0471\\x07d\\x02\\x02\" +\n\t\t\"\\u0471\\u0472\\x07{\\x02\\x02\\u0472\\u0473\\x07v\\x02\\x02\\u0473\\u0474\\x07g\\x02\" +\n\t\t\"\\x02\\u0474\\u0475\\x07u\\x02\\x02\\u0475\\u0542\\x074\\x02\\x02\\u0476\\u0477\\x07\" +\n\t\t\"d\\x02\\x02\\u0477\\u0478\\x07{\\x02\\x02\\u0478\\u0479\\x07v\\x02\\x02\\u0479\\u047A\" +\n\t\t\"\\x07g\\x02\\x02\\u047A\\u047B\\x07u\\x02\\x02\\u047B\\u0542\\x075\\x02\\x02\\u047C\" +\n\t\t\"\\u047D\\x07d\\x02\\x02\\u047D\\u047E\\x07{\\x02\\x02\\u047E\\u047F\\x07v\\x02\\x02\" +\n\t\t\"\\u047F\\u0480\\x07g\\x02\\x02\\u0480\\u0481\\x07u\\x02\\x02\\u0481\\u0542\\x076\\x02\" +\n\t\t\"\\x02\\u0482\\u0483\\x07d\\x02\\x02\\u0483\\u0484\\x07{\\x02\\x02\\u0484\\u0485\\x07\" +\n\t\t\"v\\x02\\x02\\u0485\\u0486\\x07g\\x02\\x02\\u0486\\u0487\\x07u\\x02\\x02\\u0487\\u0542\" +\n\t\t\"\\x077\\x02\\x02\\u0488\\u0489\\x07d\\x02\\x02\\u0489\\u048A\\x07{\\x02\\x02\\u048A\" +\n\t\t\"\\u048B\\x07v\\x02\\x02\\u048B\\u048C\\x07g\\x02\\x02\\u048C\\u048D\\x07u\\x02\\x02\" +\n\t\t\"\\u048D\\u0542\\x078\\x02\\x02\\u048E\\u048F\\x07d\\x02\\x02\\u048F\\u0490\\x07{\\x02\" +\n\t\t\"\\x02\\u0490\\u0491\\x07v\\x02\\x02\\u0491\\u0492\\x07g\\x02\\x02\\u0492\\u0493\\x07\" +\n\t\t\"u\\x02\\x02\\u0493\\u0542\\x079\\x02\\x02\\u0494\\u0495\\x07d\\x02\\x02\\u0495\\u0496\" +\n\t\t\"\\x07{\\x02\\x02\\u0496\\u0497\\x07v\\x02\\x02\\u0497\\u0498\\x07g\\x02\\x02\\u0498\" +\n\t\t\"\\u0499\\x07u\\x02\\x02\\u0499\\u0542\\x07:\\x02\\x02\\u049A\\u049B\\x07d\\x02\\x02\" +\n\t\t\"\\u049B\\u049C\\x07{\\x02\\x02\\u049C\\u049D\\x07v\\x02\\x02\\u049D\\u049E\\x07g\\x02\" +\n\t\t\"\\x02\\u049E\\u049F\\x07u\\x02\\x02\\u049F\\u0542\\x07;\\x02\\x02\\u04A0\\u04A1\\x07\" +\n\t\t\"d\\x02\\x02\\u04A1\\u04A2\\x07{\\x02\\x02\\u04A2\\u04A3\\x07v\\x02\\x02\\u04A3\\u04A4\" +\n\t\t\"\\x07g\\x02\\x02\\u04A4\\u04A5\\x07u\\x02\\x02\\u04A5\\u04A6\\x073\\x02\\x02\\u04A6\" +\n\t\t\"\\u0542\\x072\\x02\\x02\\u04A7\\u04A8\\x07d\\x02\\x02\\u04A8\\u04A9\\x07{\\x02\\x02\" +\n\t\t\"\\u04A9\\u04AA\\x07v\\x02\\x02\\u04AA\\u04AB\\x07g\\x02\\x02\\u04AB\\u04AC\\x07u\\x02\" +\n\t\t\"\\x02\\u04AC\\u04AD\\x073\\x02\\x02\\u04AD\\u0542\\x073\\x02\\x02\\u04AE\\u04AF\\x07\" +\n\t\t\"d\\x02\\x02\\u04AF\\u04B0\\x07{\\x02\\x02\\u04B0\\u04B1\\x07v\\x02\\x02\\u04B1\\u04B2\" +\n\t\t\"\\x07g\\x02\\x02\\u04B2\\u04B3\\x07u\\x02\\x02\\u04B3\\u04B4\\x073\\x02\\x02\\u04B4\" +\n\t\t\"\\u0542\\x074\\x02\\x02\\u04B5\\u04B6\\x07d\\x02\\x02\\u04B6\\u04B7\\x07{\\x02\\x02\" +\n\t\t\"\\u04B7\\u04B8\\x07v\\x02\\x02\\u04B8\\u04B9\\x07g\\x02\\x02\\u04B9\\u04BA\\x07u\\x02\" +\n\t\t\"\\x02\\u04BA\\u04BB\\x073\\x02\\x02\\u04BB\\u0542\\x075\\x02\\x02\\u04BC\\u04BD\\x07\" +\n\t\t\"d\\x02\\x02\\u04BD\\u04BE\\x07{\\x02\\x02\\u04BE\\u04BF\\x07v\\x02\\x02\\u04BF\\u04C0\" +\n\t\t\"\\x07g\\x02\\x02\\u04C0\\u04C1\\x07u\\x02\\x02\\u04C1\\u04C2\\x073\\x02\\x02\\u04C2\" +\n\t\t\"\\u0542\\x076\\x02\\x02\\u04C3\\u04C4\\x07d\\x02\\x02\\u04C4\\u04C5\\x07{\\x02\\x02\" +\n\t\t\"\\u04C5\\u04C6\\x07v\\x02\\x02\\u04C6\\u04C7\\x07g\\x02\\x02\\u04C7\\u04C8\\x07u\\x02\" +\n\t\t\"\\x02\\u04C8\\u04C9\\x073\\x02\\x02\\u04C9\\u0542\\x077\\x02\\x02\\u04CA\\u04CB\\x07\" +\n\t\t\"d\\x02\\x02\\u04CB\\u04CC\\x07{\\x02\\x02\\u04CC\\u04CD\\x07v\\x02\\x02\\u04CD\\u04CE\" +\n\t\t\"\\x07g\\x02\\x02\\u04CE\\u04CF\\x07u\\x02\\x02\\u04CF\\u04D0\\x073\\x02\\x02\\u04D0\" +\n\t\t\"\\u0542\\x078\\x02\\x02\\u04D1\\u04D2\\x07d\\x02\\x02\\u04D2\\u04D3\\x07{\\x02\\x02\" +\n\t\t\"\\u04D3\\u04D4\\x07v\\x02\\x02\\u04D4\\u04D5\\x07g\\x02\\x02\\u04D5\\u04D6\\x07u\\x02\" +\n\t\t\"\\x02\\u04D6\\u04D7\\x073\\x02\\x02\\u04D7\\u0542\\x079\\x02\\x02\\u04D8\\u04D9\\x07\" +\n\t\t\"d\\x02\\x02\\u04D9\\u04DA\\x07{\\x02\\x02\\u04DA\\u04DB\\x07v\\x02\\x02\\u04DB\\u04DC\" +\n\t\t\"\\x07g\\x02\\x02\\u04DC\\u04DD\\x07u\\x02\\x02\\u04DD\\u04DE\\x073\\x02\\x02\\u04DE\" +\n\t\t\"\\u0542\\x07:\\x02\\x02\\u04DF\\u04E0\\x07d\\x02\\x02\\u04E0\\u04E1\\x07{\\x02\\x02\" +\n\t\t\"\\u04E1\\u04E2\\x07v\\x02\\x02\\u04E2\\u04E3\\x07g\\x02\\x02\\u04E3\\u04E4\\x07u\\x02\" +\n\t\t\"\\x02\\u04E4\\u04E5\\x073\\x02\\x02\\u04E5\\u0542\\x07;\\x02\\x02\\u04E6\\u04E7\\x07\" +\n\t\t\"d\\x02\\x02\\u04E7\\u04E8\\x07{\\x02\\x02\\u04E8\\u04E9\\x07v\\x02\\x02\\u04E9\\u04EA\" +\n\t\t\"\\x07g\\x02\\x02\\u04EA\\u04EB\\x07u\\x02\\x02\\u04EB\\u04EC\\x074\\x02\\x02\\u04EC\" +\n\t\t\"\\u0542\\x072\\x02\\x02\\u04ED\\u04EE\\x07d\\x02\\x02\\u04EE\\u04EF\\x07{\\x02\\x02\" +\n\t\t\"\\u04EF\\u04F0\\x07v\\x02\\x02\\u04F0\\u04F1\\x07g\\x02\\x02\\u04F1\\u04F2\\x07u\\x02\" +\n\t\t\"\\x02\\u04F2\\u04F3\\x074\\x02\\x02\\u04F3\\u0542\\x073\\x02\\x02\\u04F4\\u04F5\\x07\" +\n\t\t\"d\\x02\\x02\\u04F5\\u04F6\\x07{\\x02\\x02\\u04F6\\u04F7\\x07v\\x02\\x02\\u04F7\\u04F8\" +\n\t\t\"\\x07g\\x02\\x02\\u04F8\\u04F9\\x07u\\x02\\x02\\u04F9\\u04FA\\x074\\x02\\x02\\u04FA\" +\n\t\t\"\\u0542\\x074\\x02\\x02\\u04FB\\u04FC\\x07d\\x02\\x02\\u04FC\\u04FD\\x07{\\x02\\x02\" +\n\t\t\"\\u04FD\\u04FE\\x07v\\x02\\x02\\u04FE\\u04FF\\x07g\\x02\\x02\\u04FF\\u0500\\x07u\\x02\" +\n\t\t\"\\x02\\u0500\\u0501\\x074\\x02\\x02\\u0501\\u0542\\x075\\x02\\x02\\u0502\\u0503\\x07\" +\n\t\t\"d\\x02\\x02\\u0503\\u0504\\x07{\\x02\\x02\\u0504\\u0505\\x07v\\x02\\x02\\u0505\\u0506\" +\n\t\t\"\\x07g\\x02\\x02\\u0506\\u0507\\x07u\\x02\\x02\\u0507\\u0508\\x074\\x02\\x02\\u0508\" +\n\t\t\"\\u0542\\x076\\x02\\x02\\u0509\\u050A\\x07d\\x02\\x02\\u050A\\u050B\\x07{\\x02\\x02\" +\n\t\t\"\\u050B\\u050C\\x07v\\x02\\x02\\u050C\\u050D\\x07g\\x02\\x02\\u050D\\u050E\\x07u\\x02\" +\n\t\t\"\\x02\\u050E\\u050F\\x074\\x02\\x02\\u050F\\u0542\\x077\\x02\\x02\\u0510\\u0511\\x07\" +\n\t\t\"d\\x02\\x02\\u0511\\u0512\\x07{\\x02\\x02\\u0512\\u0513\\x07v\\x02\\x02\\u0513\\u0514\" +\n\t\t\"\\x07g\\x02\\x02\\u0514\\u0515\\x07u\\x02\\x02\\u0515\\u0516\\x074\\x02\\x02\\u0516\" +\n\t\t\"\\u0542\\x078\\x02\\x02\\u0517\\u0518\\x07d\\x02\\x02\\u0518\\u0519\\x07{\\x02\\x02\" +\n\t\t\"\\u0519\\u051A\\x07v\\x02\\x02\\u051A\\u051B\\x07g\\x02\\x02\\u051B\\u051C\\x07u\\x02\" +\n\t\t\"\\x02\\u051C\\u051D\\x074\\x02\\x02\\u051D\\u0542\\x079\\x02\\x02\\u051E\\u051F\\x07\" +\n\t\t\"d\\x02\\x02\\u051F\\u0520\\x07{\\x02\\x02\\u0520\\u0521\\x07v\\x02\\x02\\u0521\\u0522\" +\n\t\t\"\\x07g\\x02\\x02\\u0522\\u0523\\x07u\\x02\\x02\\u0523\\u0524\\x074\\x02\\x02\\u0524\" +\n\t\t\"\\u0542\\x07:\\x02\\x02\\u0525\\u0526\\x07d\\x02\\x02\\u0526\\u0527\\x07{\\x02\\x02\" +\n\t\t\"\\u0527\\u0528\\x07v\\x02\\x02\\u0528\\u0529\\x07g\\x02\\x02\\u0529\\u052A\\x07u\\x02\" +\n\t\t\"\\x02\\u052A\\u052B\\x074\\x02\\x02\\u052B\\u0542\\x07;\\x02\\x02\\u052C\\u052D\\x07\" +\n\t\t\"d\\x02\\x02\\u052D\\u052E\\x07{\\x02\\x02\\u052E\\u052F\\x07v\\x02\\x02\\u052F\\u0530\" +\n\t\t\"\\x07g\\x02\\x02\\u0530\\u0531\\x07u\\x02\\x02\\u0531\\u0532\\x075\\x02\\x02\\u0532\" +\n\t\t\"\\u0542\\x072\\x02\\x02\\u0533\\u0534\\x07d\\x02\\x02\\u0534\\u0535\\x07{\\x02\\x02\" +\n\t\t\"\\u0535\\u0536\\x07v\\x02\\x02\\u0536\\u0537\\x07g\\x02\\x02\\u0537\\u0538\\x07u\\x02\" +\n\t\t\"\\x02\\u0538\\u0539\\x075\\x02\\x02\\u0539\\u0542\\x073\\x02\\x02\\u053A\\u053B\\x07\" +\n\t\t\"d\\x02\\x02\\u053B\\u053C\\x07{\\x02\\x02\\u053C\\u053D\\x07v\\x02\\x02\\u053D\\u053E\" +\n\t\t\"\\x07g\\x02\\x02\\u053E\\u053F\\x07u\\x02\\x02\\u053F\\u0540\\x075\\x02\\x02\\u0540\" +\n\t\t\"\\u0542\\x074\\x02\\x02\\u0541\\u0465\\x03\\x02\\x02\\x02\\u0541\\u046A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0541\\u0470\\x03\\x02\\x02\\x02\\u0541\\u0476\\x03\\x02\\x02\\x02\\u0541\\u047C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0541\\u0482\\x03\\x02\\x02\\x02\\u0541\\u0488\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0541\\u048E\\x03\\x02\\x02\\x02\\u0541\\u0494\\x03\\x02\\x02\\x02\\u0541\\u049A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0541\\u04A0\\x03\\x02\\x02\\x02\\u0541\\u04A7\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u04AE\\x03\\x02\\x02\\x02\\u0541\\u04B5\\x03\\x02\\x02\\x02\\u0541\\u04BC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u04C3\\x03\\x02\\x02\\x02\\u0541\\u04CA\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u04D1\\x03\\x02\\x02\\x02\\u0541\\u04D8\\x03\\x02\\x02\\x02\\u0541\\u04DF\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u04E6\\x03\\x02\\x02\\x02\\u0541\\u04ED\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u04F4\\x03\\x02\\x02\\x02\\u0541\\u04FB\\x03\\x02\\x02\\x02\\u0541\\u0502\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u0509\\x03\\x02\\x02\\x02\\u0541\\u0510\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u0517\\x03\\x02\\x02\\x02\\u0541\\u051E\\x03\\x02\\x02\\x02\\u0541\\u0525\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0541\\u052C\\x03\\x02\\x02\\x02\\u0541\\u0533\\x03\\x02\\x02\\x02\\u0541\" +\n\t\t\"\\u053A\\x03\\x02\\x02\\x02\\u0542\\xCA\\x03\\x02\\x02\\x02\\u0543\\u0544\\x07h\\x02\" +\n\t\t\"\\x02\\u0544\\u0545\\x07k\\x02\\x02\\u0545\\u0546\\x07z\\x02\\x02\\u0546\\u0547\\x07\" +\n\t\t\"g\\x02\\x02\\u0547\\u055A\\x07f\\x02\\x02\\u0548\\u0549\\x07h\\x02\\x02\\u0549\\u054A\" +\n\t\t\"\\x07k\\x02\\x02\\u054A\\u054B\\x07z\\x02\\x02\\u054B\\u054C\\x07g\\x02\\x02\\u054C\" +\n\t\t\"\\u054D\\x07f\\x02\\x02\\u054D\\u054F\\x03\\x02\\x02\\x02\\u054E\\u0550\\t\\x02\\x02\" +\n\t\t\"\\x02\\u054F\\u054E\\x03\\x02\\x02\\x02\\u0550\\u0551\\x03\\x02\\x02\\x02\\u0551\\u054F\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0551\\u0552\\x03\\x02\\x02\\x02\\u0552\\u0553\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0553\\u0555\\x07z\\x02\\x02\\u0554\\u0556\\t\\x02\\x02\\x02\\u0555\\u0554\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0556\\u0557\\x03\\x02\\x02\\x02\\u0557\\u0555\\x03\\x02\\x02\\x02\\u0557\" +\n\t\t\"\\u0558\\x03\\x02\\x02\\x02\\u0558\\u055A\\x03\\x02\\x02\\x02\\u0559\\u0543\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0559\\u0548\\x03\\x02\\x02\\x02\\u055A\\xCC\\x03\\x02\\x02\\x02\\u055B\\u055C\" +\n\t\t\"\\x07w\\x02\\x02\\u055C\\u055D\\x07h\\x02\\x02\\u055D\\u055E\\x07k\\x02\\x02\\u055E\" +\n\t\t\"\\u055F\\x07z\\x02\\x02\\u055F\\u0560\\x07g\\x02\\x02\\u0560\\u0574\\x07f\\x02\\x02\" +\n\t\t\"\\u0561\\u0562\\x07w\\x02\\x02\\u0562\\u0563\\x07h\\x02\\x02\\u0563\\u0564\\x07k\\x02\" +\n\t\t\"\\x02\\u0564\\u0565\\x07z\\x02\\x02\\u0565\\u0566\\x07g\\x02\\x02\\u0566\\u0567\\x07\" +\n\t\t\"f\\x02\\x02\\u0567\\u0569\\x03\\x02\\x02\\x02\\u0568\\u056A\\t\\x02\\x02\\x02\\u0569\" +\n\t\t\"\\u0568\\x03\\x02\\x02\\x02\\u056A\\u056B\\x03\\x02\\x02\\x02\\u056B\\u0569\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u056B\\u056C\\x03\\x02\\x02\\x02\\u056C\\u056D\\x03\\x02\\x02\\x02\\u056D\" +\n\t\t\"\\u056F\\x07z\\x02\\x02\\u056E\\u0570\\t\\x02\\x02\\x02\\u056F\\u056E\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0570\\u0571\\x03\\x02\\x02\\x02\\u0571\\u056F\\x03\\x02\\x02\\x02\\u0571\\u0572\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0572\\u0574\\x03\\x02\\x02\\x02\\u0573\\u055B\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0573\\u0561\\x03\\x02\\x02\\x02\\u0574\\xCE\\x03\\x02\\x02\\x02\\u0575\\u0576\\x07\" +\n\t\t\"v\\x02\\x02\\u0576\\u0577\\x07t\\x02\\x02\\u0577\\u0578\\x07w\\x02\\x02\\u0578\\u057F\" +\n\t\t\"\\x07g\\x02\\x02\\u0579\\u057A\\x07h\\x02\\x02\\u057A\\u057B\\x07c\\x02\\x02\\u057B\" +\n\t\t\"\\u057C\\x07n\\x02\\x02\\u057C\\u057D\\x07u\\x02\\x02\\u057D\\u057F\\x07g\\x02\\x02\" +\n\t\t\"\\u057E\\u0575\\x03\\x02\\x02\\x02\\u057E\\u0579\\x03\\x02\\x02\\x02\\u057F\\xD0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0580\\u0587\\x05\\xD3j\\x02\\u0581\\u0583\\x05\\xD3j\\x02\\u0582\\u0581\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0582\\u0583\\x03\\x02\\x02\\x02\\u0583\\u0584\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0584\\u0585\\x070\\x02\\x02\\u0585\\u0587\\x05\\xD3j\\x02\\u0586\\u0580\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0586\\u0582\\x03\\x02\\x02\\x02\\u0587\\u058A\\x03\\x02\\x02\\x02\\u0588\" +\n\t\t\"\\u0589\\t\\x03\\x02\\x02\\u0589\\u058B\\x05\\xD3j\\x02\\u058A\\u0588\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u058A\\u058B\\x03\\x02\\x02\\x02\\u058B\\xD2\\x03\\x02\\x02\\x02\\u058C\\u0593\" +\n\t\t\"\\t\\x02\\x02\\x02\\u058D\\u058F\\x07a\\x02\\x02\\u058E\\u058D\\x03\\x02\\x02\\x02\\u058E\" +\n\t\t\"\\u058F\\x03\\x02\\x02\\x02\\u058F\\u0590\\x03\\x02\\x02\\x02\\u0590\\u0592\\t\\x02\\x02\" +\n\t\t\"\\x02\\u0591\\u058E\\x03\\x02\\x02\\x02\\u0592\\u0595\\x03\\x02\\x02\\x02\\u0593\\u0591\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0593\\u0594\\x03\\x02\\x02\\x02\\u0594\\xD4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0595\\u0593\\x03\\x02\\x02\\x02\\u0596\\u0597\\x072\\x02\\x02\\u0597\\u0598\\t\\x04\" +\n\t\t\"\\x02\\x02\\u0598\\u0599\\x05\\xD7l\\x02\\u0599\\xD6\\x03\\x02\\x02\\x02\\u059A\\u05A1\" +\n\t\t\"\\x05\\xDFp\\x02\\u059B\\u059D\\x07a\\x02\\x02\\u059C\\u059B\\x03\\x02\\x02\\x02\\u059C\" +\n\t\t\"\\u059D\\x03\\x02\\x02\\x02\\u059D\\u059E\\x03\\x02\\x02\\x02\\u059E\\u05A0\\x05\\xDF\" +\n\t\t\"p\\x02\\u059F\\u059C\\x03\\x02\\x02\\x02\\u05A0\\u05A3\\x03\\x02\\x02\\x02\\u05A1\\u059F\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05A1\\u05A2\\x03\\x02\\x02\\x02\\u05A2\\xD8\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u05A3\\u05A1\\x03\\x02\\x02\\x02\\u05A4\\u05A5\\x07y\\x02\\x02\\u05A5\\u05A6\\x07\" +\n\t\t\"g\\x02\\x02\\u05A6\\u05DD\\x07k\\x02\\x02\\u05A7\\u05A8\\x07i\\x02\\x02\\u05A8\\u05A9\" +\n\t\t\"\\x07y\\x02\\x02\\u05A9\\u05AA\\x07g\\x02\\x02\\u05AA\\u05DD\\x07k\\x02\\x02\\u05AB\" +\n\t\t\"\\u05AC\\x07u\\x02\\x02\\u05AC\\u05AD\\x07|\\x02\\x02\\u05AD\\u05AE\\x07c\\x02\\x02\" +\n\t\t\"\\u05AE\\u05AF\\x07d\\x02\\x02\\u05AF\\u05DD\\x07q\\x02\\x02\\u05B0\\u05B1\\x07h\\x02\" +\n\t\t\"\\x02\\u05B1\\u05B2\\x07k\\x02\\x02\\u05B2\\u05B3\\x07p\\x02\\x02\\u05B3\\u05B4\\x07\" +\n\t\t\"p\\x02\\x02\\u05B4\\u05B5\\x07g\\x02\\x02\\u05B5\\u05DD\\x07{\\x02\\x02\\u05B6\\u05B7\" +\n\t\t\"\\x07g\\x02\\x02\\u05B7\\u05B8\\x07v\\x02\\x02\\u05B8\\u05B9\\x07j\\x02\\x02\\u05B9\" +\n\t\t\"\\u05BA\\x07g\\x02\\x02\\u05BA\\u05DD\\x07t\\x02\\x02\\u05BB\\u05BC\\x07u\\x02\\x02\" +\n\t\t\"\\u05BC\\u05BD\\x07g\\x02\\x02\\u05BD\\u05BE\\x07e\\x02\\x02\\u05BE\\u05BF\\x07q\\x02\" +\n\t\t\"\\x02\\u05BF\\u05C0\\x07p\\x02\\x02\\u05C0\\u05C1\\x07f\\x02\\x02\\u05C1\\u05DD\\x07\" +\n\t\t\"u\\x02\\x02\\u05C2\\u05C3\\x07o\\x02\\x02\\u05C3\\u05C4\\x07k\\x02\\x02\\u05C4\\u05C5\" +\n\t\t\"\\x07p\\x02\\x02\\u05C5\\u05C6\\x07w\\x02\\x02\\u05C6\\u05C7\\x07v\\x02\\x02\\u05C7\" +\n\t\t\"\\u05C8\\x07g\\x02\\x02\\u05C8\\u05DD\\x07u\\x02\\x02\\u05C9\\u05CA\\x07j\\x02\\x02\" +\n\t\t\"\\u05CA\\u05CB\\x07q\\x02\\x02\\u05CB\\u05CC\\x07w\\x02\\x02\\u05CC\\u05CD\\x07t\\x02\" +\n\t\t\"\\x02\\u05CD\\u05DD\\x07u\\x02\\x02\\u05CE\\u05CF\\x07f\\x02\\x02\\u05CF\\u05D0\\x07\" +\n\t\t\"c\\x02\\x02\\u05D0\\u05D1\\x07{\\x02\\x02\\u05D1\\u05DD\\x07u\\x02\\x02\\u05D2\\u05D3\" +\n\t\t\"\\x07y\\x02\\x02\\u05D3\\u05D4\\x07g\\x02\\x02\\u05D4\\u05D5\\x07g\\x02\\x02\\u05D5\" +\n\t\t\"\\u05D6\\x07m\\x02\\x02\\u05D6\\u05DD\\x07u\\x02\\x02\\u05D7\\u05D8\\x07{\\x02\\x02\" +\n\t\t\"\\u05D8\\u05D9\\x07g\\x02\\x02\\u05D9\\u05DA\\x07c\\x02\\x02\\u05DA\\u05DB\\x07t\\x02\" +\n\t\t\"\\x02\\u05DB\\u05DD\\x07u\\x02\\x02\\u05DC\\u05A4\\x03\\x02\\x02\\x02\\u05DC\\u05A7\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05DC\\u05AB\\x03\\x02\\x02\\x02\\u05DC\\u05B0\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u05DC\\u05B6\\x03\\x02\\x02\\x02\\u05DC\\u05BB\\x03\\x02\\x02\\x02\\u05DC\\u05C2\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u05DC\\u05C9\\x03\\x02\\x02\\x02\\u05DC\\u05CE\\x03\\x02\\x02\\x02\\u05DC\" +\n\t\t\"\\u05D2\\x03\\x02\\x02\\x02\\u05DC\\u05D7\\x03\\x02\\x02\\x02\\u05DD\\xDA\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u05DE\\u05DF\\x07j\\x02\\x02\\u05DF\\u05E0\\x07g\\x02\\x02\\u05E0\\u05E1\\x07\" +\n\t\t\"z\\x02\\x02\\u05E1\\u05EC\\x03\\x02\\x02\\x02\\u05E2\\u05E4\\x07$\\x02\\x02\\u05E3\\u05E5\" +\n\t\t\"\\x05\\xD7l\\x02\\u05E4\\u05E3\\x03\\x02\\x02\\x02\\u05E4\\u05E5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u05E5\\u05E6\\x03\\x02\\x02\\x02\\u05E6\\u05ED\\x07$\\x02\\x02\\u05E7\\u05E9\\x07\" +\n\t\t\")\\x02\\x02\\u05E8\\u05EA\\x05\\xD7l\\x02\\u05E9\\u05E8\\x03\\x02\\x02\\x02\\u05E9\\u05EA\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05EA\\u05EB\\x03\\x02\\x02\\x02\\u05EB\\u05ED\\x07)\\x02\\x02\" +\n\t\t\"\\u05EC\\u05E2\\x03\\x02\\x02\\x02\\u05EC\\u05E7\\x03\\x02\\x02\\x02\\u05ED\\xDC\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u05EE\\u05EF\\x05\\xDFp\\x02\\u05EF\\u05F0\\x05\\xDFp\\x02\\u05F0\\xDE\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u05F1\\u05F2\\t\\x05\\x02\\x02\\u05F2\\xE0\\x03\\x02\\x02\\x02\\u05F3\" +\n\t\t\"\\u05F4\\x07c\\x02\\x02\\u05F4\\u05F5\\x07d\\x02\\x02\\u05F5\\u05F6\\x07u\\x02\\x02\" +\n\t\t\"\\u05F6\\u05F7\\x07v\\x02\\x02\\u05F7\\u05F8\\x07t\\x02\\x02\\u05F8\\u05F9\\x07c\\x02\" +\n\t\t\"\\x02\\u05F9\\u05FA\\x07e\\x02\\x02\\u05FA\\u064C\\x07v\\x02\\x02\\u05FB\\u05FC\\x07\" +\n\t\t\"c\\x02\\x02\\u05FC\\u05FD\\x07h\\x02\\x02\\u05FD\\u05FE\\x07v\\x02\\x02\\u05FE\\u05FF\" +\n\t\t\"\\x07g\\x02\\x02\\u05FF\\u064C\\x07t\\x02\\x02\\u0600\\u0601\\x07e\\x02\\x02\\u0601\" +\n\t\t\"\\u0602\\x07c\\x02\\x02\\u0602\\u0603\\x07u\\x02\\x02\\u0603\\u064C\\x07g\\x02\\x02\" +\n\t\t\"\\u0604\\u0605\\x07e\\x02\\x02\\u0605\\u0606\\x07c\\x02\\x02\\u0606\\u0607\\x07v\\x02\" +\n\t\t\"\\x02\\u0607\\u0608\\x07e\\x02\\x02\\u0608\\u064C\\x07j\\x02\\x02\\u0609\\u060A\\x07\" +\n\t\t\"f\\x02\\x02\\u060A\\u060B\\x07g\\x02\\x02\\u060B\\u060C\\x07h\\x02\\x02\\u060C\\u060D\" +\n\t\t\"\\x07c\\x02\\x02\\u060D\\u060E\\x07w\\x02\\x02\\u060E\\u060F\\x07n\\x02\\x02\\u060F\" +\n\t\t\"\\u064C\\x07v\\x02\\x02\\u0610\\u0611\\x07h\\x02\\x02\\u0611\\u0612\\x07k\\x02\\x02\" +\n\t\t\"\\u0612\\u0613\\x07p\\x02\\x02\\u0613\\u0614\\x07c\\x02\\x02\\u0614\\u064C\\x07n\\x02\" +\n\t\t\"\\x02\\u0615\\u0616\\x07k\\x02\\x02\\u0616\\u064C\\x07p\\x02\\x02\\u0617\\u0618\\x07\" +\n\t\t\"k\\x02\\x02\\u0618\\u0619\\x07p\\x02\\x02\\u0619\\u061A\\x07n\\x02\\x02\\u061A\\u061B\" +\n\t\t\"\\x07k\\x02\\x02\\u061B\\u061C\\x07p\\x02\\x02\\u061C\\u064C\\x07g\\x02\\x02\\u061D\" +\n\t\t\"\\u061E\\x07n\\x02\\x02\\u061E\\u061F\\x07g\\x02\\x02\\u061F\\u064C\\x07v\\x02\\x02\" +\n\t\t\"\\u0620\\u0621\\x07o\\x02\\x02\\u0621\\u0622\\x07c\\x02\\x02\\u0622\\u0623\\x07v\\x02\" +\n\t\t\"\\x02\\u0623\\u0624\\x07e\\x02\\x02\\u0624\\u064C\\x07j\\x02\\x02\\u0625\\u0626\\x07\" +\n\t\t\"p\\x02\\x02\\u0626\\u0627\\x07w\\x02\\x02\\u0627\\u0628\\x07n\\x02\\x02\\u0628\\u064C\" +\n\t\t\"\\x07n\\x02\\x02\\u0629\\u062A\\x07q\\x02\\x02\\u062A\\u064C\\x07h\\x02\\x02\\u062B\" +\n\t\t\"\\u062C\\x07t\\x02\\x02\\u062C\\u062D\\x07g\\x02\\x02\\u062D\\u062E\\x07n\\x02\\x02\" +\n\t\t\"\\u062E\\u062F\\x07q\\x02\\x02\\u062F\\u0630\\x07e\\x02\\x02\\u0630\\u0631\\x07c\\x02\" +\n\t\t\"\\x02\\u0631\\u0632\\x07v\\x02\\x02\\u0632\\u0633\\x07c\\x02\\x02\\u0633\\u0634\\x07\" +\n\t\t\"d\\x02\\x02\\u0634\\u0635\\x07n\\x02\\x02\\u0635\\u064C\\x07g\\x02\\x02\\u0636\\u0637\" +\n\t\t\"\\x07u\\x02\\x02\\u0637\\u0638\\x07v\\x02\\x02\\u0638\\u0639\\x07c\\x02\\x02\\u0639\" +\n\t\t\"\\u063A\\x07v\\x02\\x02\\u063A\\u063B\\x07k\\x02\\x02\\u063B\\u064C\\x07e\\x02\\x02\" +\n\t\t\"\\u063C\\u063D\\x07u\\x02\\x02\\u063D\\u063E\\x07y\\x02\\x02\\u063E\\u063F\\x07k\\x02\" +\n\t\t\"\\x02\\u063F\\u0640\\x07v\\x02\\x02\\u0640\\u0641\\x07e\\x02\\x02\\u0641\\u064C\\x07\" +\n\t\t\"j\\x02\\x02\\u0642\\u0643\\x07v\\x02\\x02\\u0643\\u0644\\x07t\\x02\\x02\\u0644\\u064C\" +\n\t\t\"\\x07{\\x02\\x02\\u0645\\u0646\\x07v\\x02\\x02\\u0646\\u0647\\x07{\\x02\\x02\\u0647\" +\n\t\t\"\\u0648\\x07r\\x02\\x02\\u0648\\u0649\\x07g\\x02\\x02\\u0649\\u064A\\x07q\\x02\\x02\" +\n\t\t\"\\u064A\\u064C\\x07h\\x02\\x02\\u064B\\u05F3\\x03\\x02\\x02\\x02\\u064B\\u05FB\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u064B\\u0600\\x03\\x02\\x02\\x02\\u064B\\u0604\\x03\\x02\\x02\\x02\\u064B\" +\n\t\t\"\\u0609\\x03\\x02\\x02\\x02\\u064B\\u0610\\x03\\x02\\x02\\x02\\u064B\\u0615\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u064B\\u0617\\x03\\x02\\x02\\x02\\u064B\\u061D\\x03\\x02\\x02\\x02\\u064B\" +\n\t\t\"\\u0620\\x03\\x02\\x02\\x02\\u064B\\u0625\\x03\\x02\\x02\\x02\\u064B\\u0629\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u064B\\u062B\\x03\\x02\\x02\\x02\\u064B\\u0636\\x03\\x02\\x02\\x02\\u064B\" +\n\t\t\"\\u063C\\x03\\x02\\x02\\x02\\u064B\\u0642\\x03\\x02\\x02\\x02\\u064B\\u0645\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u064C\\xE2\\x03\\x02\\x02\\x02\\u064D\\u064E\\x07c\\x02\\x02\\u064E\\u064F\" +\n\t\t\"\\x07p\\x02\\x02\\u064F\\u0650\\x07q\\x02\\x02\\u0650\\u0651\\x07p\\x02\\x02\\u0651\" +\n\t\t\"\\u0652\\x07{\\x02\\x02\\u0652\\u0653\\x07o\\x02\\x02\\u0653\\u0654\\x07q\\x02\\x02\" +\n\t\t\"\\u0654\\u0655\\x07w\\x02\\x02\\u0655\\u0656\\x07u\\x02\\x02\\u0656\\xE4\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0657\\u0658\\x07d\\x02\\x02\\u0658\\u0659\\x07t\\x02\\x02\\u0659\\u065A\\x07\" +\n\t\t\"g\\x02\\x02\\u065A\\u065B\\x07c\\x02\\x02\\u065B\\u065C\\x07m\\x02\\x02\\u065C\\xE6\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u065D\\u065E\\x07e\\x02\\x02\\u065E\\u065F\\x07q\\x02\\x02\\u065F\" +\n\t\t\"\\u0660\\x07p\\x02\\x02\\u0660\\u0661\\x07u\\x02\\x02\\u0661\\u0662\\x07v\\x02\\x02\" +\n\t\t\"\\u0662\\u0663\\x07c\\x02\\x02\\u0663\\u0664\\x07p\\x02\\x02\\u0664\\u0665\\x07v\\x02\" +\n\t\t\"\\x02\\u0665\\xE8\\x03\\x02\\x02\\x02\\u0666\\u0667\\x07k\\x02\\x02\\u0667\\u0668\\x07\" +\n\t\t\"o\\x02\\x02\\u0668\\u0669\\x07o\\x02\\x02\\u0669\\u066A\\x07w\\x02\\x02\\u066A\\u066B\" +\n\t\t\"\\x07v\\x02\\x02\\u066B\\u066C\\x07c\\x02\\x02\\u066C\\u066D\\x07d\\x02\\x02\\u066D\" +\n\t\t\"\\u066E\\x07n\\x02\\x02\\u066E\\u066F\\x07g\\x02\\x02\\u066F\\xEA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0670\\u0671\\x07e\\x02\\x02\\u0671\\u0672\\x07q\";\n\tprivate static readonly _serializedATNSegment3: string =\n\t\t\"\\x02\\x02\\u0672\\u0673\\x07p\\x02\\x02\\u0673\\u0674\\x07v\\x02\\x02\\u0674\\u0675\" +\n\t\t\"\\x07k\\x02\\x02\\u0675\\u0676\\x07p\\x02\\x02\\u0676\\u0677\\x07w\\x02\\x02\\u0677\" +\n\t\t\"\\u0678\\x07g\\x02\\x02\\u0678\\xEC\\x03\\x02\\x02\\x02\\u0679\\u067A\\x07n\\x02\\x02\" +\n\t\t\"\\u067A\\u067B\\x07g\\x02\\x02\\u067B\\u067C\\x07c\\x02\\x02\\u067C\\u067D\\x07x\\x02\" +\n\t\t\"\\x02\\u067D\\u067E\\x07g\\x02\\x02\\u067E\\xEE\\x03\\x02\\x02\\x02\\u067F\\u0680\\x07\" +\n\t\t\"g\\x02\\x02\\u0680\\u0681\\x07z\\x02\\x02\\u0681\\u0682\\x07v\\x02\\x02\\u0682\\u0683\" +\n\t\t\"\\x07g\\x02\\x02\\u0683\\u0684\\x07t\\x02\\x02\\u0684\\u0685\\x07p\\x02\\x02\\u0685\" +\n\t\t\"\\u0686\\x07c\\x02\\x02\\u0686\\u0687\\x07n\\x02\\x02\\u0687\\xF0\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0688\\u0689\\x07k\\x02\\x02\\u0689\\u068A\\x07p\\x02\\x02\\u068A\\u068B\\x07f\\x02\" +\n\t\t\"\\x02\\u068B\\u068C\\x07g\\x02\\x02\\u068C\\u068D\\x07z\\x02\\x02\\u068D\\u068E\\x07\" +\n\t\t\"g\\x02\\x02\\u068E\\u068F\\x07f\\x02\\x02\\u068F\\xF2\\x03\\x02\\x02\\x02\\u0690\\u0691\" +\n\t\t\"\\x07k\\x02\\x02\\u0691\\u0692\\x07p\\x02\\x02\\u0692\\u0693\\x07v\\x02\\x02\\u0693\" +\n\t\t\"\\u0694\\x07g\\x02\\x02\\u0694\\u0695\\x07t\\x02\\x02\\u0695\\u0696\\x07p\\x02\\x02\" +\n\t\t\"\\u0696\\u0697\\x07c\\x02\\x02\\u0697\\u0698\\x07n\\x02\\x02\\u0698\\xF4\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0699\\u069A\\x07r\\x02\\x02\\u069A\\u069B\\x07c\\x02\\x02\\u069B\\u069C\\x07\" +\n\t\t\"{\\x02\\x02\\u069C\\u069D\\x07c\\x02\\x02\\u069D\\u069E\\x07d\\x02\\x02\\u069E\\u069F\" +\n\t\t\"\\x07n\\x02\\x02\\u069F\\u06A0\\x07g\\x02\\x02\\u06A0\\xF6\\x03\\x02\\x02\\x02\\u06A1\" +\n\t\t\"\\u06A2\\x07r\\x02\\x02\\u06A2\\u06A3\\x07t\\x02\\x02\\u06A3\\u06A4\\x07k\\x02\\x02\" +\n\t\t\"\\u06A4\\u06A5\\x07x\\x02\\x02\\u06A5\\u06A6\\x07c\\x02\\x02\\u06A6\\u06A7\\x07v\\x02\" +\n\t\t\"\\x02\\u06A7\\u06A8\\x07g\\x02\\x02\\u06A8\\xF8\\x03\\x02\\x02\\x02\\u06A9\\u06AA\\x07\" +\n\t\t\"r\\x02\\x02\\u06AA\\u06AB\\x07w\\x02\\x02\\u06AB\\u06AC\\x07d\\x02\\x02\\u06AC\\u06AD\" +\n\t\t\"\\x07n\\x02\\x02\\u06AD\\u06AE\\x07k\\x02\\x02\\u06AE\\u06AF\\x07e\\x02\\x02\\u06AF\" +\n\t\t\"\\xFA\\x03\\x02\\x02\\x02\\u06B0\\u06B1\\x07x\\x02\\x02\\u06B1\\u06B2\\x07k\\x02\\x02\" +\n\t\t\"\\u06B2\\u06B3\\x07t\\x02\\x02\\u06B3\\u06B4\\x07v\\x02\\x02\\u06B4\\u06B5\\x07w\\x02\" +\n\t\t\"\\x02\\u06B5\\u06B6\\x07c\\x02\\x02\\u06B6\\u06B7\\x07n\\x02\\x02\\u06B7\\xFC\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u06B8\\u06B9\\x07r\\x02\\x02\\u06B9\\u06BA\\x07w\\x02\\x02\\u06BA\\u06BB\" +\n\t\t\"\\x07t\\x02\\x02\\u06BB\\u06BC\\x07g\\x02\\x02\\u06BC\\xFE\\x03\\x02\\x02\\x02\\u06BD\" +\n\t\t\"\\u06BE\\x07v\\x02\\x02\\u06BE\\u06BF\\x07{\\x02\\x02\\u06BF\\u06C0\\x07r\\x02\\x02\" +\n\t\t\"\\u06C0\\u06C1\\x07g\\x02\\x02\\u06C1\\u0100\\x03\\x02\\x02\\x02\\u06C2\\u06C3\\x07\" +\n\t\t\"x\\x02\\x02\\u06C3\\u06C4\\x07k\\x02\\x02\\u06C4\\u06C5\\x07g\\x02\\x02\\u06C5\\u06C6\" +\n\t\t\"\\x07y\\x02\\x02\\u06C6\\u0102\\x03\\x02\\x02\\x02\\u06C7\\u06C8\\x07i\\x02\\x02\\u06C8\" +\n\t\t\"\\u06C9\\x07n\\x02\\x02\\u06C9\\u06CA\\x07q\\x02\\x02\\u06CA\\u06CB\\x07d\\x02\\x02\" +\n\t\t\"\\u06CB\\u06CC\\x07c\\x02\\x02\\u06CC\\u06CD\\x07n\\x02\\x02\\u06CD\\u0104\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u06CE\\u06CF\\x07e\\x02\\x02\\u06CF\\u06D0\\x07q\\x02\\x02\\u06D0\\u06D1\" +\n\t\t\"\\x07p\\x02\\x02\\u06D1\\u06D2\\x07u\\x02\\x02\\u06D2\\u06D3\\x07v\\x02\\x02\\u06D3\" +\n\t\t\"\\u06D4\\x07t\\x02\\x02\\u06D4\\u06D5\\x07w\\x02\\x02\\u06D5\\u06D6\\x07e\\x02\\x02\" +\n\t\t\"\\u06D6\\u06D7\\x07v\\x02\\x02\\u06D7\\u06D8\\x07q\\x02\\x02\\u06D8\\u06D9\\x07t\\x02\" +\n\t\t\"\\x02\\u06D9\\u0106\\x03\\x02\\x02\\x02\\u06DA\\u06DB\\x07h\\x02\\x02\\u06DB\\u06DC\" +\n\t\t\"\\x07c\\x02\\x02\\u06DC\\u06DD\\x07n\\x02\\x02\\u06DD\\u06DE\\x07n\\x02\\x02\\u06DE\" +\n\t\t\"\\u06DF\\x07d\\x02\\x02\\u06DF\\u06E0\\x07c\\x02\\x02\\u06E0\\u06E1\\x07e\\x02\\x02\" +\n\t\t\"\\u06E1\\u06E2\\x07m\\x02\\x02\\u06E2\\u0108\\x03\\x02\\x02\\x02\\u06E3\\u06E4\\x07\" +\n\t\t\"t\\x02\\x02\\u06E4\\u06E5\\x07g\\x02\\x02\\u06E5\\u06E6\\x07e\\x02\\x02\\u06E6\\u06E7\" +\n\t\t\"\\x07g\\x02\\x02\\u06E7\\u06E8\\x07k\\x02\\x02\\u06E8\\u06E9\\x07x\\x02\\x02\\u06E9\" +\n\t\t\"\\u06EA\\x07g\\x02\\x02\\u06EA\\u010A\\x03\\x02\\x02\\x02\\u06EB\\u06EF\\x05\\u010D\" +\n\t\t\"\\x87\\x02\\u06EC\\u06EE\\x05\\u010F\\x88\\x02\\u06ED\\u06EC\\x03\\x02\\x02\\x02\\u06EE\" +\n\t\t\"\\u06F1\\x03\\x02\\x02\\x02\\u06EF\\u06ED\\x03\\x02\\x02\\x02\\u06EF\\u06F0\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u06F0\\u010C\\x03\\x02\\x02\\x02\\u06F1\\u06EF\\x03\\x02\\x02\\x02\\u06F2\" +\n\t\t\"\\u06F3\\t\\x06\\x02\\x02\\u06F3\\u010E\\x03\\x02\\x02\\x02\\u06F4\\u06F5\\t\\x07\\x02\" +\n\t\t\"\\x02\\u06F5\\u0110\\x03\\x02\\x02\\x02\\u06F6\\u06F7\\x07w\\x02\\x02\\u06F7\\u06F8\" +\n\t\t\"\\x07p\\x02\\x02\\u06F8\\u06F9\\x07k\\x02\\x02\\u06F9\\u06FA\\x07e\\x02\\x02\\u06FA\" +\n\t\t\"\\u06FB\\x07q\\x02\\x02\\u06FB\\u06FC\\x07f\\x02\\x02\\u06FC\\u06FE\\x07g\\x02\\x02\" +\n\t\t\"\\u06FD\\u06F6\\x03\\x02\\x02\\x02\\u06FD\\u06FE\\x03\\x02\\x02\\x02\\u06FE\\u06FF\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u06FF\\u0703\\x07$\\x02\\x02\\u0700\\u0702\\x05\\u0113\\x8A\\x02\\u0701\" +\n\t\t\"\\u0700\\x03\\x02\\x02\\x02\\u0702\\u0705\\x03\\x02\\x02\\x02\\u0703\\u0701\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0703\\u0704\\x03\\x02\\x02\\x02\\u0704\\u0706\\x03\\x02\\x02\\x02\\u0705\" +\n\t\t\"\\u0703\\x03\\x02\\x02\\x02\\u0706\\u0719\\x07$\\x02\\x02\\u0707\\u0708\\x07w\\x02\\x02\" +\n\t\t\"\\u0708\\u0709\\x07p\\x02\\x02\\u0709\\u070A\\x07k\\x02\\x02\\u070A\\u070B\\x07e\\x02\" +\n\t\t\"\\x02\\u070B\\u070C\\x07q\\x02\\x02\\u070C\\u070D\\x07f\\x02\\x02\\u070D\\u070F\\x07\" +\n\t\t\"g\\x02\\x02\\u070E\\u0707\\x03\\x02\\x02\\x02\\u070E\\u070F\\x03\\x02\\x02\\x02\\u070F\" +\n\t\t\"\\u0710\\x03\\x02\\x02\\x02\\u0710\\u0714\\x07)\\x02\\x02\\u0711\\u0713\\x05\\u0115\" +\n\t\t\"\\x8B\\x02\\u0712\\u0711\\x03\\x02\\x02\\x02\\u0713\\u0716\\x03\\x02\\x02\\x02\\u0714\" +\n\t\t\"\\u0712\\x03\\x02\\x02\\x02\\u0714\\u0715\\x03\\x02\\x02\\x02\\u0715\\u0717\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0716\\u0714\\x03\\x02\\x02\\x02\\u0717\\u0719\\x07)\\x02\\x02\\u0718\\u06FD\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0718\\u070E\\x03\\x02\\x02\\x02\\u0719\\u0112\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u071A\\u071E\\n\\b\\x02\\x02\\u071B\\u071C\\x07^\\x02\\x02\\u071C\\u071E\\v\\x02\\x02\" +\n\t\t\"\\x02\\u071D\\u071A\\x03\\x02\\x02\\x02\\u071D\\u071B\\x03\\x02\\x02\\x02\\u071E\\u0114\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u071F\\u0723\\n\\t\\x02\\x02\\u0720\\u0721\\x07^\\x02\\x02\\u0721\" +\n\t\t\"\\u0723\\v\\x02\\x02\\x02\\u0722\\u071F\\x03\\x02\\x02\\x02\\u0722\\u0720\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0723\\u0116\\x03\\x02\\x02\\x02\\u0724\\u0726\\t\\x02\\x02\\x02\\u0725\\u0724\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0726\\u0727\\x03\\x02\\x02\\x02\\u0727\\u0725\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0727\\u0728\\x03\\x02\\x02\\x02\\u0728\\u0729\\x03\\x02\\x02\\x02\\u0729\\u072B\\x07\" +\n\t\t\"0\\x02\\x02\\u072A\\u072C\\t\\x02\\x02\\x02\\u072B\\u072A\\x03\\x02\\x02\\x02\\u072C\" +\n\t\t\"\\u072D\\x03\\x02\\x02\\x02\\u072D\\u072B\\x03\\x02\\x02\\x02\\u072D\\u072E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u072E\\u0735\\x03\\x02\\x02\\x02\\u072F\\u0731\\x070\\x02\\x02\\u0730\\u0732\" +\n\t\t\"\\t\\x02\\x02\\x02\\u0731\\u0730\\x03\\x02\\x02\\x02\\u0732\\u0733\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0733\\u0731\\x03\\x02\\x02\\x02\\u0733\\u0734\\x03\\x02\\x02\\x02\\u0734\\u0736\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0735\\u072F\\x03\\x02\\x02\\x02\\u0735\\u0736\\x03\\x02\\x02\\x02\\u0736\" +\n\t\t\"\\u0118\\x03\\x02\\x02\\x02\\u0737\\u0739\\t\\n\\x02\\x02\\u0738\\u0737\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0739\\u073A\\x03\\x02\\x02\\x02\\u073A\\u0738\\x03\\x02\\x02\\x02\\u073A\\u073B\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u073B\\u073C\\x03\\x02\\x02\\x02\\u073C\\u073D\\b\\x8D\\x02\\x02\" +\n\t\t\"\\u073D\\u011A\\x03\\x02\\x02\\x02\\u073E\\u073F\\x071\\x02\\x02\\u073F\\u0740\\x07\" +\n\t\t\",\\x02\\x02\\u0740\\u0744\\x03\\x02\\x02\\x02\\u0741\\u0743\\v\\x02\\x02\\x02\\u0742\" +\n\t\t\"\\u0741\\x03\\x02\\x02\\x02\\u0743\\u0746\\x03\\x02\\x02\\x02\\u0744\\u0745\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0744\\u0742\\x03\\x02\\x02\\x02\\u0745\\u0747\\x03\\x02\\x02\\x02\\u0746\" +\n\t\t\"\\u0744\\x03\\x02\\x02\\x02\\u0747\\u0748\\x07,\\x02\\x02\\u0748\\u0749\\x071\\x02\\x02\" +\n\t\t\"\\u0749\\u074A\\x03\\x02\\x02\\x02\\u074A\\u074B\\b\\x8E\\x03\\x02\\u074B\\u011C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u074C\\u074D\\x071\\x02\\x02\\u074D\\u074E\\x071\\x02\\x02\\u074E\\u0752\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u074F\\u0751\\n\\v\\x02\\x02\\u0750\\u074F\\x03\\x02\\x02\\x02\\u0751\" +\n\t\t\"\\u0754\\x03\\x02\\x02\\x02\\u0752\\u0750\\x03\\x02\\x02\\x02\\u0752\\u0753\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0753\\u0755\\x03\\x02\\x02\\x02\\u0754\\u0752\\x03\\x02\\x02\\x02\\u0755\" +\n\t\t\"\\u0756\\b\\x8F\\x03\\x02\\u0756\\u011E\\x03\\x02\\x02\\x02(\\x02\\u038A\\u0463\\u0541\" +\n\t\t\"\\u0551\\u0557\\u0559\\u056B\\u0571\\u0573\\u057E\\u0582\\u0586\\u058A\\u058E\\u0593\" +\n\t\t\"\\u059C\\u05A1\\u05DC\\u05E4\\u05E9\\u05EC\\u064B\\u06EF\\u06FD\\u0703\\u070E\\u0714\" +\n\t\t\"\\u0718\\u071D\\u0722\\u0727\\u072D\\u0733\\u0735\\u073A\\u0744\\u0752\\x04\\b\\x02\" +\n\t\t\"\\x02\\x02\\x03\\x02\";\n\tpublic static readonly _serializedATN: string = Utils.join(\n\t\t[\n\t\t\tSolidityLexer._serializedATNSegment0,\n\t\t\tSolidityLexer._serializedATNSegment1,\n\t\t\tSolidityLexer._serializedATNSegment2,\n\t\t\tSolidityLexer._serializedATNSegment3,\n\t\t],\n\t\t\"\",\n\t);\n\tpublic static __ATN: ATN;\n\tpublic static get _ATN(): ATN {\n\t\tif (!SolidityLexer.__ATN) {\n\t\t\tSolidityLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(SolidityLexer._serializedATN));\n\t\t}\n\n\t\treturn SolidityLexer.__ATN;\n\t}\n\n}\n\n", "// Generated from antlr/Solidity.g4 by ANTLR 4.9.0-SNAPSHOT\n\n\nimport { ATN } from \"antlr4ts/atn/ATN\";\nimport { ATNDeserializer } from \"antlr4ts/atn/ATNDeserializer\";\nimport { FailedPredicateException } from \"antlr4ts/FailedPredicateException\";\nimport { NotNull } from \"antlr4ts/Decorators\";\nimport { NoViableAltException } from \"antlr4ts/NoViableAltException\";\nimport { Override } from \"antlr4ts/Decorators\";\nimport { Parser } from \"antlr4ts/Parser\";\nimport { ParserRuleContext } from \"antlr4ts/ParserRuleContext\";\nimport { ParserATNSimulator } from \"antlr4ts/atn/ParserATNSimulator\";\nimport { ParseTreeListener } from \"antlr4ts/tree/ParseTreeListener\";\nimport { ParseTreeVisitor } from \"antlr4ts/tree/ParseTreeVisitor\";\nimport { RecognitionException } from \"antlr4ts/RecognitionException\";\nimport { RuleContext } from \"antlr4ts/RuleContext\";\n//import { RuleVersion } from \"antlr4ts/RuleVersion\";\nimport { TerminalNode } from \"antlr4ts/tree/TerminalNode\";\nimport { Token } from \"antlr4ts/Token\";\nimport { TokenStream } from \"antlr4ts/TokenStream\";\nimport { Vocabulary } from \"antlr4ts/Vocabulary\";\nimport { VocabularyImpl } from \"antlr4ts/VocabularyImpl\";\n\nimport * as Utils from \"antlr4ts/misc/Utils\";\n\nimport { SolidityListener } from \"./SolidityListener\";\nimport { SolidityVisitor } from \"./SolidityVisitor\";\n\n\nexport class SolidityParser extends Parser {\n\tpublic static readonly T__0 = 1;\n\tpublic static readonly T__1 = 2;\n\tpublic static readonly T__2 = 3;\n\tpublic static readonly T__3 = 4;\n\tpublic static readonly T__4 = 5;\n\tpublic static readonly T__5 = 6;\n\tpublic static readonly T__6 = 7;\n\tpublic static readonly T__7 = 8;\n\tpublic static readonly T__8 = 9;\n\tpublic static readonly T__9 = 10;\n\tpublic static readonly T__10 = 11;\n\tpublic static readonly T__11 = 12;\n\tpublic static readonly T__12 = 13;\n\tpublic static readonly T__13 = 14;\n\tpublic static readonly T__14 = 15;\n\tpublic static readonly T__15 = 16;\n\tpublic static readonly T__16 = 17;\n\tpublic static readonly T__17 = 18;\n\tpublic static readonly T__18 = 19;\n\tpublic static readonly T__19 = 20;\n\tpublic static readonly T__20 = 21;\n\tpublic static readonly T__21 = 22;\n\tpublic static readonly T__22 = 23;\n\tpublic static readonly T__23 = 24;\n\tpublic static readonly T__24 = 25;\n\tpublic static readonly T__25 = 26;\n\tpublic static readonly T__26 = 27;\n\tpublic static readonly T__27 = 28;\n\tpublic static readonly T__28 = 29;\n\tpublic static readonly T__29 = 30;\n\tpublic static readonly T__30 = 31;\n\tpublic static readonly T__31 = 32;\n\tpublic static readonly T__32 = 33;\n\tpublic static readonly T__33 = 34;\n\tpublic static readonly T__34 = 35;\n\tpublic static readonly T__35 = 36;\n\tpublic static readonly T__36 = 37;\n\tpublic static readonly T__37 = 38;\n\tpublic static readonly T__38 = 39;\n\tpublic static readonly T__39 = 40;\n\tpublic static readonly T__40 = 41;\n\tpublic static readonly T__41 = 42;\n\tpublic static readonly T__42 = 43;\n\tpublic static readonly T__43 = 44;\n\tpublic static readonly T__44 = 45;\n\tpublic static readonly T__45 = 46;\n\tpublic static readonly T__46 = 47;\n\tpublic static readonly T__47 = 48;\n\tpublic static readonly T__48 = 49;\n\tpublic static readonly T__49 = 50;\n\tpublic static readonly T__50 = 51;\n\tpublic static readonly T__51 = 52;\n\tpublic static readonly T__52 = 53;\n\tpublic static readonly T__53 = 54;\n\tpublic static readonly T__54 = 55;\n\tpublic static readonly T__55 = 56;\n\tpublic static readonly T__56 = 57;\n\tpublic static readonly T__57 = 58;\n\tpublic static readonly T__58 = 59;\n\tpublic static readonly T__59 = 60;\n\tpublic static readonly T__60 = 61;\n\tpublic static readonly T__61 = 62;\n\tpublic static readonly T__62 = 63;\n\tpublic static readonly T__63 = 64;\n\tpublic static readonly T__64 = 65;\n\tpublic static readonly T__65 = 66;\n\tpublic static readonly T__66 = 67;\n\tpublic static readonly T__67 = 68;\n\tpublic static readonly T__68 = 69;\n\tpublic static readonly T__69 = 70;\n\tpublic static readonly T__70 = 71;\n\tpublic static readonly T__71 = 72;\n\tpublic static readonly T__72 = 73;\n\tpublic static readonly T__73 = 74;\n\tpublic static readonly T__74 = 75;\n\tpublic static readonly T__75 = 76;\n\tpublic static readonly T__76 = 77;\n\tpublic static readonly T__77 = 78;\n\tpublic static readonly T__78 = 79;\n\tpublic static readonly T__79 = 80;\n\tpublic static readonly T__80 = 81;\n\tpublic static readonly T__81 = 82;\n\tpublic static readonly T__82 = 83;\n\tpublic static readonly T__83 = 84;\n\tpublic static readonly T__84 = 85;\n\tpublic static readonly T__85 = 86;\n\tpublic static readonly T__86 = 87;\n\tpublic static readonly T__87 = 88;\n\tpublic static readonly T__88 = 89;\n\tpublic static readonly T__89 = 90;\n\tpublic static readonly T__90 = 91;\n\tpublic static readonly T__91 = 92;\n\tpublic static readonly T__92 = 93;\n\tpublic static readonly T__93 = 94;\n\tpublic static readonly T__94 = 95;\n\tpublic static readonly T__95 = 96;\n\tpublic static readonly T__96 = 97;\n\tpublic static readonly Int = 98;\n\tpublic static readonly Uint = 99;\n\tpublic static readonly Byte = 100;\n\tpublic static readonly Fixed = 101;\n\tpublic static readonly Ufixed = 102;\n\tpublic static readonly BooleanLiteral = 103;\n\tpublic static readonly DecimalNumber = 104;\n\tpublic static readonly HexNumber = 105;\n\tpublic static readonly NumberUnit = 106;\n\tpublic static readonly HexLiteralFragment = 107;\n\tpublic static readonly ReservedKeyword = 108;\n\tpublic static readonly AnonymousKeyword = 109;\n\tpublic static readonly BreakKeyword = 110;\n\tpublic static readonly ConstantKeyword = 111;\n\tpublic static readonly ImmutableKeyword = 112;\n\tpublic static readonly ContinueKeyword = 113;\n\tpublic static readonly LeaveKeyword = 114;\n\tpublic static readonly ExternalKeyword = 115;\n\tpublic static readonly IndexedKeyword = 116;\n\tpublic static readonly InternalKeyword = 117;\n\tpublic static readonly PayableKeyword = 118;\n\tpublic static readonly PrivateKeyword = 119;\n\tpublic static readonly PublicKeyword = 120;\n\tpublic static readonly VirtualKeyword = 121;\n\tpublic static readonly PureKeyword = 122;\n\tpublic static readonly TypeKeyword = 123;\n\tpublic static readonly ViewKeyword = 124;\n\tpublic static readonly GlobalKeyword = 125;\n\tpublic static readonly ConstructorKeyword = 126;\n\tpublic static readonly FallbackKeyword = 127;\n\tpublic static readonly ReceiveKeyword = 128;\n\tpublic static readonly Identifier = 129;\n\tpublic static readonly StringLiteralFragment = 130;\n\tpublic static readonly VersionLiteral = 131;\n\tpublic static readonly WS = 132;\n\tpublic static readonly COMMENT = 133;\n\tpublic static readonly LINE_COMMENT = 134;\n\tpublic static readonly RULE_sourceUnit = 0;\n\tpublic static readonly RULE_pragmaDirective = 1;\n\tpublic static readonly RULE_pragmaName = 2;\n\tpublic static readonly RULE_pragmaValue = 3;\n\tpublic static readonly RULE_version = 4;\n\tpublic static readonly RULE_versionOperator = 5;\n\tpublic static readonly RULE_versionConstraint = 6;\n\tpublic static readonly RULE_importDeclaration = 7;\n\tpublic static readonly RULE_importDirective = 8;\n\tpublic static readonly RULE_importPath = 9;\n\tpublic static readonly RULE_contractDefinition = 10;\n\tpublic static readonly RULE_inheritanceSpecifier = 11;\n\tpublic static readonly RULE_contractPart = 12;\n\tpublic static readonly RULE_stateVariableDeclaration = 13;\n\tpublic static readonly RULE_fileLevelConstant = 14;\n\tpublic static readonly RULE_customErrorDefinition = 15;\n\tpublic static readonly RULE_typeDefinition = 16;\n\tpublic static readonly RULE_usingForDeclaration = 17;\n\tpublic static readonly RULE_usingForObject = 18;\n\tpublic static readonly RULE_structDefinition = 19;\n\tpublic static readonly RULE_modifierDefinition = 20;\n\tpublic static readonly RULE_modifierInvocation = 21;\n\tpublic static readonly RULE_functionDefinition = 22;\n\tpublic static readonly RULE_functionDescriptor = 23;\n\tpublic static readonly RULE_returnParameters = 24;\n\tpublic static readonly RULE_modifierList = 25;\n\tpublic static readonly RULE_eventDefinition = 26;\n\tpublic static readonly RULE_enumValue = 27;\n\tpublic static readonly RULE_enumDefinition = 28;\n\tpublic static readonly RULE_parameterList = 29;\n\tpublic static readonly RULE_parameter = 30;\n\tpublic static readonly RULE_eventParameterList = 31;\n\tpublic static readonly RULE_eventParameter = 32;\n\tpublic static readonly RULE_functionTypeParameterList = 33;\n\tpublic static readonly RULE_functionTypeParameter = 34;\n\tpublic static readonly RULE_variableDeclaration = 35;\n\tpublic static readonly RULE_typeName = 36;\n\tpublic static readonly RULE_userDefinedTypeName = 37;\n\tpublic static readonly RULE_mappingKey = 38;\n\tpublic static readonly RULE_mapping = 39;\n\tpublic static readonly RULE_functionTypeName = 40;\n\tpublic static readonly RULE_storageLocation = 41;\n\tpublic static readonly RULE_stateMutability = 42;\n\tpublic static readonly RULE_block = 43;\n\tpublic static readonly RULE_statement = 44;\n\tpublic static readonly RULE_expressionStatement = 45;\n\tpublic static readonly RULE_ifStatement = 46;\n\tpublic static readonly RULE_tryStatement = 47;\n\tpublic static readonly RULE_catchClause = 48;\n\tpublic static readonly RULE_whileStatement = 49;\n\tpublic static readonly RULE_simpleStatement = 50;\n\tpublic static readonly RULE_uncheckedStatement = 51;\n\tpublic static readonly RULE_forStatement = 52;\n\tpublic static readonly RULE_inlineAssemblyStatement = 53;\n\tpublic static readonly RULE_inlineAssemblyStatementFlag = 54;\n\tpublic static readonly RULE_doWhileStatement = 55;\n\tpublic static readonly RULE_continueStatement = 56;\n\tpublic static readonly RULE_breakStatement = 57;\n\tpublic static readonly RULE_returnStatement = 58;\n\tpublic static readonly RULE_throwStatement = 59;\n\tpublic static readonly RULE_emitStatement = 60;\n\tpublic static readonly RULE_revertStatement = 61;\n\tpublic static readonly RULE_variableDeclarationStatement = 62;\n\tpublic static readonly RULE_variableDeclarationList = 63;\n\tpublic static readonly RULE_identifierList = 64;\n\tpublic static readonly RULE_elementaryTypeName = 65;\n\tpublic static readonly RULE_expression = 66;\n\tpublic static readonly RULE_primaryExpression = 67;\n\tpublic static readonly RULE_expressionList = 68;\n\tpublic static readonly RULE_nameValueList = 69;\n\tpublic static readonly RULE_nameValue = 70;\n\tpublic static readonly RULE_functionCallArguments = 71;\n\tpublic static readonly RULE_functionCall = 72;\n\tpublic static readonly RULE_assemblyBlock = 73;\n\tpublic static readonly RULE_assemblyItem = 74;\n\tpublic static readonly RULE_assemblyExpression = 75;\n\tpublic static readonly RULE_assemblyMember = 76;\n\tpublic static readonly RULE_assemblyCall = 77;\n\tpublic static readonly RULE_assemblyLocalDefinition = 78;\n\tpublic static readonly RULE_assemblyAssignment = 79;\n\tpublic static readonly RULE_assemblyIdentifierOrList = 80;\n\tpublic static readonly RULE_assemblyIdentifierList = 81;\n\tpublic static readonly RULE_assemblyStackAssignment = 82;\n\tpublic static readonly RULE_labelDefinition = 83;\n\tpublic static readonly RULE_assemblySwitch = 84;\n\tpublic static readonly RULE_assemblyCase = 85;\n\tpublic static readonly RULE_assemblyFunctionDefinition = 86;\n\tpublic static readonly RULE_assemblyFunctionReturns = 87;\n\tpublic static readonly RULE_assemblyFor = 88;\n\tpublic static readonly RULE_assemblyIf = 89;\n\tpublic static readonly RULE_assemblyLiteral = 90;\n\tpublic static readonly RULE_subAssembly = 91;\n\tpublic static readonly RULE_tupleExpression = 92;\n\tpublic static readonly RULE_numberLiteral = 93;\n\tpublic static readonly RULE_identifier = 94;\n\tpublic static readonly RULE_hexLiteral = 95;\n\tpublic static readonly RULE_overrideSpecifier = 96;\n\tpublic static readonly RULE_stringLiteral = 97;\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly ruleNames: string[] = [\n\t\t\"sourceUnit\", \"pragmaDirective\", \"pragmaName\", \"pragmaValue\", \"version\", \n\t\t\"versionOperator\", \"versionConstraint\", \"importDeclaration\", \"importDirective\", \n\t\t\"importPath\", \"contractDefinition\", \"inheritanceSpecifier\", \"contractPart\", \n\t\t\"stateVariableDeclaration\", \"fileLevelConstant\", \"customErrorDefinition\", \n\t\t\"typeDefinition\", \"usingForDeclaration\", \"usingForObject\", \"structDefinition\", \n\t\t\"modifierDefinition\", \"modifierInvocation\", \"functionDefinition\", \"functionDescriptor\", \n\t\t\"returnParameters\", \"modifierList\", \"eventDefinition\", \"enumValue\", \"enumDefinition\", \n\t\t\"parameterList\", \"parameter\", \"eventParameterList\", \"eventParameter\", \n\t\t\"functionTypeParameterList\", \"functionTypeParameter\", \"variableDeclaration\", \n\t\t\"typeName\", \"userDefinedTypeName\", \"mappingKey\", \"mapping\", \"functionTypeName\", \n\t\t\"storageLocation\", \"stateMutability\", \"block\", \"statement\", \"expressionStatement\", \n\t\t\"ifStatement\", \"tryStatement\", \"catchClause\", \"whileStatement\", \"simpleStatement\", \n\t\t\"uncheckedStatement\", \"forStatement\", \"inlineAssemblyStatement\", \"inlineAssemblyStatementFlag\", \n\t\t\"doWhileStatement\", \"continueStatement\", \"breakStatement\", \"returnStatement\", \n\t\t\"throwStatement\", \"emitStatement\", \"revertStatement\", \"variableDeclarationStatement\", \n\t\t\"variableDeclarationList\", \"identifierList\", \"elementaryTypeName\", \"expression\", \n\t\t\"primaryExpression\", \"expressionList\", \"nameValueList\", \"nameValue\", \"functionCallArguments\", \n\t\t\"functionCall\", \"assemblyBlock\", \"assemblyItem\", \"assemblyExpression\", \n\t\t\"assemblyMember\", \"assemblyCall\", \"assemblyLocalDefinition\", \"assemblyAssignment\", \n\t\t\"assemblyIdentifierOrList\", \"assemblyIdentifierList\", \"assemblyStackAssignment\", \n\t\t\"labelDefinition\", \"assemblySwitch\", \"assemblyCase\", \"assemblyFunctionDefinition\", \n\t\t\"assemblyFunctionReturns\", \"assemblyFor\", \"assemblyIf\", \"assemblyLiteral\", \n\t\t\"subAssembly\", \"tupleExpression\", \"numberLiteral\", \"identifier\", \"hexLiteral\", \n\t\t\"overrideSpecifier\", \"stringLiteral\",\n\t];\n\n\tprivate static readonly _LITERAL_NAMES: Array = [\n\t\tundefined, \"'pragma'\", \"';'\", \"'*'\", \"'||'\", \"'^'\", \"'~'\", \"'>='\", \"'>'\", \n\t\t\"'<'\", \"'<='\", \"'='\", \"'as'\", \"'import'\", \"'from'\", \"'{'\", \"','\", \"'}'\", \n\t\t\"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'is'\", \"'('\", \n\t\t\"')'\", \"'error'\", \"'using'\", \"'for'\", \"'struct'\", \"'modifier'\", \"'function'\", \n\t\t\"'returns'\", \"'event'\", \"'enum'\", \"'['\", \"']'\", \"'address'\", \"'.'\", \"'mapping'\", \n\t\t\"'=>'\", \"'memory'\", \"'storage'\", \"'calldata'\", \"'if'\", \"'else'\", \"'try'\", \n\t\t\"'catch'\", \"'while'\", \"'unchecked'\", \"'assembly'\", \"'do'\", \"'return'\", \n\t\t\"'throw'\", \"'emit'\", \"'revert'\", \"'var'\", \"'bool'\", \"'string'\", \"'byte'\", \n\t\t\"'++'\", \"'--'\", \"'new'\", \"':'\", \"'+'\", \"'-'\", \"'after'\", \"'delete'\", \"'!'\", \n\t\t\"'**'\", \"'/'\", \"'%'\", \"'<<'\", \"'>>'\", \"'&'\", \"'|'\", \"'=='\", \"'!='\", \"'&&'\", \n\t\t\"'?'\", \"'|='\", \"'^='\", \"'&='\", \"'<<='\", \"'>>='\", \"'+='\", \"'-='\", \"'*='\", \n\t\t\"'/='\", \"'%='\", \"'let'\", \"':='\", \"'=:'\", \"'switch'\", \"'case'\", \"'default'\", \n\t\t\"'->'\", \"'callback'\", \"'override'\", undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"'anonymous'\", \"'break'\", \"'constant'\", \"'immutable'\", \"'continue'\", \"'leave'\", \n\t\t\"'external'\", \"'indexed'\", \"'internal'\", \"'payable'\", \"'private'\", \"'public'\", \n\t\t\"'virtual'\", \"'pure'\", \"'type'\", \"'view'\", \"'global'\", \"'constructor'\", \n\t\t\"'fallback'\", \"'receive'\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, undefined, undefined, undefined, undefined, \n\t\t\"Int\", \"Uint\", \"Byte\", \"Fixed\", \"Ufixed\", \"BooleanLiteral\", \"DecimalNumber\", \n\t\t\"HexNumber\", \"NumberUnit\", \"HexLiteralFragment\", \"ReservedKeyword\", \"AnonymousKeyword\", \n\t\t\"BreakKeyword\", \"ConstantKeyword\", \"ImmutableKeyword\", \"ContinueKeyword\", \n\t\t\"LeaveKeyword\", \"ExternalKeyword\", \"IndexedKeyword\", \"InternalKeyword\", \n\t\t\"PayableKeyword\", \"PrivateKeyword\", \"PublicKeyword\", \"VirtualKeyword\", \n\t\t\"PureKeyword\", \"TypeKeyword\", \"ViewKeyword\", \"GlobalKeyword\", \"ConstructorKeyword\", \n\t\t\"FallbackKeyword\", \"ReceiveKeyword\", \"Identifier\", \"StringLiteralFragment\", \n\t\t\"VersionLiteral\", \"WS\", \"COMMENT\", \"LINE_COMMENT\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityParser._LITERAL_NAMES, SolidityParser._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityParser.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"Solidity.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityParser.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityParser._serializedATN; }\n\n\tprotected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {\n\t\treturn new FailedPredicateException(this, predicate, message);\n\t}\n\n\tconstructor(input: TokenStream) {\n\t\tsuper(input);\n\t\tthis._interp = new ParserATNSimulator(SolidityParser._ATN, this);\n\t}\n\t// @RuleVersion(0)\n\tpublic sourceUnit(): SourceUnitContext {\n\t\tlet _localctx: SourceUnitContext = new SourceUnitContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 0, SolidityParser.RULE_sourceUnit);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 208;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__0) | (1 << SolidityParser.T__12) | (1 << SolidityParser.T__13) | (1 << SolidityParser.T__17) | (1 << SolidityParser.T__18) | (1 << SolidityParser.T__19) | (1 << SolidityParser.T__20) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__25) | (1 << SolidityParser.T__27) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (SolidityParser.T__32 - 33)) | (1 << (SolidityParser.T__35 - 33)) | (1 << (SolidityParser.T__37 - 33)) | (1 << (SolidityParser.T__41 - 33)) | (1 << (SolidityParser.T__53 - 33)) | (1 << (SolidityParser.T__54 - 33)) | (1 << (SolidityParser.T__55 - 33)) | (1 << (SolidityParser.T__56 - 33)) | (1 << (SolidityParser.T__57 - 33)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)) | (1 << (SolidityParser.FallbackKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 206;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 0, this._ctx) ) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 196;\n\t\t\t\t\tthis.pragmaDirective();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 197;\n\t\t\t\t\tthis.importDirective();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 198;\n\t\t\t\t\tthis.contractDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 199;\n\t\t\t\t\tthis.enumDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 200;\n\t\t\t\t\tthis.structDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 201;\n\t\t\t\t\tthis.functionDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 7:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 202;\n\t\t\t\t\tthis.fileLevelConstant();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 203;\n\t\t\t\t\tthis.customErrorDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 9:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 204;\n\t\t\t\t\tthis.typeDefinition();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 10:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 205;\n\t\t\t\t\tthis.usingForDeclaration();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 210;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 211;\n\t\t\tthis.match(SolidityParser.EOF);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic pragmaDirective(): PragmaDirectiveContext {\n\t\tlet _localctx: PragmaDirectiveContext = new PragmaDirectiveContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 2, SolidityParser.RULE_pragmaDirective);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 213;\n\t\t\tthis.match(SolidityParser.T__0);\n\t\t\tthis.state = 214;\n\t\t\tthis.pragmaName();\n\t\t\tthis.state = 215;\n\t\t\tthis.pragmaValue();\n\t\t\tthis.state = 216;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic pragmaName(): PragmaNameContext {\n\t\tlet _localctx: PragmaNameContext = new PragmaNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 4, SolidityParser.RULE_pragmaName);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 218;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic pragmaValue(): PragmaValueContext {\n\t\tlet _localctx: PragmaValueContext = new PragmaValueContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 6, SolidityParser.RULE_pragmaValue);\n\t\ttry {\n\t\t\tthis.state = 223;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 2, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 220;\n\t\t\t\tthis.match(SolidityParser.T__2);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 221;\n\t\t\t\tthis.version();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 222;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic version(): VersionContext {\n\t\tlet _localctx: VersionContext = new VersionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 8, SolidityParser.RULE_version);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 225;\n\t\t\tthis.versionConstraint();\n\t\t\tthis.state = 232;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__3) | (1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0) || _la === SolidityParser.DecimalNumber || _la === SolidityParser.VersionLiteral) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 227;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__3) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 226;\n\t\t\t\t\tthis.match(SolidityParser.T__3);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 229;\n\t\t\t\tthis.versionConstraint();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 234;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic versionOperator(): VersionOperatorContext {\n\t\tlet _localctx: VersionOperatorContext = new VersionOperatorContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 10, SolidityParser.RULE_versionOperator);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 235;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic versionConstraint(): VersionConstraintContext {\n\t\tlet _localctx: VersionConstraintContext = new VersionConstraintContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 12, SolidityParser.RULE_versionConstraint);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 245;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 7, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 238;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 237;\n\t\t\t\t\tthis.versionOperator();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 240;\n\t\t\t\tthis.match(SolidityParser.VersionLiteral);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 242;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__4) | (1 << SolidityParser.T__5) | (1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9) | (1 << SolidityParser.T__10))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 241;\n\t\t\t\t\tthis.versionOperator();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 244;\n\t\t\t\tthis.match(SolidityParser.DecimalNumber);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic importDeclaration(): ImportDeclarationContext {\n\t\tlet _localctx: ImportDeclarationContext = new ImportDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 14, SolidityParser.RULE_importDeclaration);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 247;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 250;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__11) {\n\t\t\t\t{\n\t\t\t\tthis.state = 248;\n\t\t\t\tthis.match(SolidityParser.T__11);\n\t\t\t\tthis.state = 249;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic importDirective(): ImportDirectiveContext {\n\t\tlet _localctx: ImportDirectiveContext = new ImportDirectiveContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 16, SolidityParser.RULE_importDirective);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 288;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 13, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 252;\n\t\t\t\tthis.match(SolidityParser.T__12);\n\t\t\t\tthis.state = 253;\n\t\t\t\tthis.importPath();\n\t\t\t\tthis.state = 256;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__11) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 254;\n\t\t\t\t\tthis.match(SolidityParser.T__11);\n\t\t\t\t\tthis.state = 255;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 258;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 260;\n\t\t\t\tthis.match(SolidityParser.T__12);\n\t\t\t\tthis.state = 263;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\tcase SolidityParser.T__2:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 261;\n\t\t\t\t\tthis.match(SolidityParser.T__2);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.T__13:\n\t\t\t\tcase SolidityParser.T__24:\n\t\t\t\tcase SolidityParser.T__41:\n\t\t\t\tcase SolidityParser.T__53:\n\t\t\t\tcase SolidityParser.T__95:\n\t\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\t\tcase SolidityParser.Identifier:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 262;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\tthis.state = 267;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__11) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 265;\n\t\t\t\t\tthis.match(SolidityParser.T__11);\n\t\t\t\t\tthis.state = 266;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 269;\n\t\t\t\tthis.match(SolidityParser.T__13);\n\t\t\t\tthis.state = 270;\n\t\t\t\tthis.importPath();\n\t\t\t\tthis.state = 271;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 273;\n\t\t\t\tthis.match(SolidityParser.T__12);\n\t\t\t\tthis.state = 274;\n\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\tthis.state = 275;\n\t\t\t\tthis.importDeclaration();\n\t\t\t\tthis.state = 280;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 276;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 277;\n\t\t\t\t\tthis.importDeclaration();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 282;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 283;\n\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\tthis.state = 284;\n\t\t\t\tthis.match(SolidityParser.T__13);\n\t\t\t\tthis.state = 285;\n\t\t\t\tthis.importPath();\n\t\t\t\tthis.state = 286;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic importPath(): ImportPathContext {\n\t\tlet _localctx: ImportPathContext = new ImportPathContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 18, SolidityParser.RULE_importPath);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 290;\n\t\t\tthis.match(SolidityParser.StringLiteralFragment);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic contractDefinition(): ContractDefinitionContext {\n\t\tlet _localctx: ContractDefinitionContext = new ContractDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 20, SolidityParser.RULE_contractDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 293;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__17) {\n\t\t\t\t{\n\t\t\t\tthis.state = 292;\n\t\t\t\tthis.match(SolidityParser.T__17);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 295;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__18) | (1 << SolidityParser.T__19) | (1 << SolidityParser.T__20))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\tthis.state = 296;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 306;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__21) {\n\t\t\t\t{\n\t\t\t\tthis.state = 297;\n\t\t\t\tthis.match(SolidityParser.T__21);\n\t\t\t\tthis.state = 298;\n\t\t\t\tthis.inheritanceSpecifier();\n\t\t\t\tthis.state = 303;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 299;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 300;\n\t\t\t\t\tthis.inheritanceSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 305;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 308;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 312;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__25) | (1 << SolidityParser.T__27) | (1 << SolidityParser.T__28) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (SolidityParser.T__31 - 32)) | (1 << (SolidityParser.T__32 - 32)) | (1 << (SolidityParser.T__35 - 32)) | (1 << (SolidityParser.T__37 - 32)) | (1 << (SolidityParser.T__41 - 32)) | (1 << (SolidityParser.T__53 - 32)) | (1 << (SolidityParser.T__54 - 32)) | (1 << (SolidityParser.T__55 - 32)) | (1 << (SolidityParser.T__56 - 32)) | (1 << (SolidityParser.T__57 - 32)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)) | (1 << (SolidityParser.FallbackKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 309;\n\t\t\t\tthis.contractPart();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 314;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 315;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic inheritanceSpecifier(): InheritanceSpecifierContext {\n\t\tlet _localctx: InheritanceSpecifierContext = new InheritanceSpecifierContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 22, SolidityParser.RULE_inheritanceSpecifier);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 317;\n\t\t\tthis.userDefinedTypeName();\n\t\t\tthis.state = 323;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 318;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 320;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 319;\n\t\t\t\t\tthis.expressionList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 322;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic contractPart(): ContractPartContext {\n\t\tlet _localctx: ContractPartContext = new ContractPartContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 24, SolidityParser.RULE_contractPart);\n\t\ttry {\n\t\t\tthis.state = 334;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 20, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 325;\n\t\t\t\tthis.stateVariableDeclaration();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 326;\n\t\t\t\tthis.usingForDeclaration();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 327;\n\t\t\t\tthis.structDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 328;\n\t\t\t\tthis.modifierDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 329;\n\t\t\t\tthis.functionDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 330;\n\t\t\t\tthis.eventDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 331;\n\t\t\t\tthis.enumDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 332;\n\t\t\t\tthis.customErrorDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 333;\n\t\t\t\tthis.typeDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic stateVariableDeclaration(): StateVariableDeclarationContext {\n\t\tlet _localctx: StateVariableDeclarationContext = new StateVariableDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 26, SolidityParser.RULE_stateVariableDeclaration);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 336;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 345;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (SolidityParser.T__96 - 97)) | (1 << (SolidityParser.ConstantKeyword - 97)) | (1 << (SolidityParser.ImmutableKeyword - 97)) | (1 << (SolidityParser.InternalKeyword - 97)) | (1 << (SolidityParser.PrivateKeyword - 97)) | (1 << (SolidityParser.PublicKeyword - 97)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 343;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\tcase SolidityParser.PublicKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 337;\n\t\t\t\t\tthis.match(SolidityParser.PublicKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.InternalKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 338;\n\t\t\t\t\tthis.match(SolidityParser.InternalKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.PrivateKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 339;\n\t\t\t\t\tthis.match(SolidityParser.PrivateKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.ConstantKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 340;\n\t\t\t\t\tthis.match(SolidityParser.ConstantKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.ImmutableKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 341;\n\t\t\t\t\tthis.match(SolidityParser.ImmutableKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.T__96:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 342;\n\t\t\t\t\tthis.overrideSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 347;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 348;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 351;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__10) {\n\t\t\t\t{\n\t\t\t\tthis.state = 349;\n\t\t\t\tthis.match(SolidityParser.T__10);\n\t\t\t\tthis.state = 350;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 353;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic fileLevelConstant(): FileLevelConstantContext {\n\t\tlet _localctx: FileLevelConstantContext = new FileLevelConstantContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 28, SolidityParser.RULE_fileLevelConstant);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 355;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 356;\n\t\t\tthis.match(SolidityParser.ConstantKeyword);\n\t\t\tthis.state = 357;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 358;\n\t\t\tthis.match(SolidityParser.T__10);\n\t\t\tthis.state = 359;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 360;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic customErrorDefinition(): CustomErrorDefinitionContext {\n\t\tlet _localctx: CustomErrorDefinitionContext = new CustomErrorDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 30, SolidityParser.RULE_customErrorDefinition);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 362;\n\t\t\tthis.match(SolidityParser.T__24);\n\t\t\tthis.state = 363;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 364;\n\t\t\tthis.parameterList();\n\t\t\tthis.state = 365;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic typeDefinition(): TypeDefinitionContext {\n\t\tlet _localctx: TypeDefinitionContext = new TypeDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 32, SolidityParser.RULE_typeDefinition);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 367;\n\t\t\tthis.match(SolidityParser.TypeKeyword);\n\t\t\tthis.state = 368;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 369;\n\t\t\tthis.match(SolidityParser.T__21);\n\t\t\tthis.state = 370;\n\t\t\tthis.elementaryTypeName();\n\t\t\tthis.state = 371;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic usingForDeclaration(): UsingForDeclarationContext {\n\t\tlet _localctx: UsingForDeclarationContext = new UsingForDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 34, SolidityParser.RULE_usingForDeclaration);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 373;\n\t\t\tthis.match(SolidityParser.T__25);\n\t\t\tthis.state = 374;\n\t\t\tthis.usingForObject();\n\t\t\tthis.state = 375;\n\t\t\tthis.match(SolidityParser.T__26);\n\t\t\tthis.state = 378;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__2:\n\t\t\t\t{\n\t\t\t\tthis.state = 376;\n\t\t\t\tthis.match(SolidityParser.T__2);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\t{\n\t\t\t\tthis.state = 377;\n\t\t\t\tthis.typeName(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 381;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.GlobalKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 380;\n\t\t\t\tthis.match(SolidityParser.GlobalKeyword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 383;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic usingForObject(): UsingForObjectContext {\n\t\tlet _localctx: UsingForObjectContext = new UsingForObjectContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 36, SolidityParser.RULE_usingForObject);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 397;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 385;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 386;\n\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\tthis.state = 387;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\tthis.state = 392;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 388;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 389;\n\t\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 394;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 395;\n\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic structDefinition(): StructDefinitionContext {\n\t\tlet _localctx: StructDefinitionContext = new StructDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 38, SolidityParser.RULE_structDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 399;\n\t\t\tthis.match(SolidityParser.T__27);\n\t\t\tthis.state = 400;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 401;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 412;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 402;\n\t\t\t\tthis.variableDeclaration();\n\t\t\t\tthis.state = 403;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\tthis.state = 409;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 404;\n\t\t\t\t\tthis.variableDeclaration();\n\t\t\t\t\tthis.state = 405;\n\t\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 411;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 414;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic modifierDefinition(): ModifierDefinitionContext {\n\t\tlet _localctx: ModifierDefinitionContext = new ModifierDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 40, SolidityParser.RULE_modifierDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 416;\n\t\t\tthis.match(SolidityParser.T__28);\n\t\t\tthis.state = 417;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 419;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 418;\n\t\t\t\tthis.parameterList();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 425;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__96 || _la === SolidityParser.VirtualKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 423;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\tcase SolidityParser.VirtualKeyword:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 421;\n\t\t\t\t\tthis.match(SolidityParser.VirtualKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SolidityParser.T__96:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 422;\n\t\t\t\t\tthis.overrideSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 427;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 430;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 428;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 429;\n\t\t\t\tthis.block();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic modifierInvocation(): ModifierInvocationContext {\n\t\tlet _localctx: ModifierInvocationContext = new ModifierInvocationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 42, SolidityParser.RULE_modifierInvocation);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 432;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 438;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 433;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 435;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 434;\n\t\t\t\t\tthis.expressionList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 437;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionDefinition(): FunctionDefinitionContext {\n\t\tlet _localctx: FunctionDefinitionContext = new FunctionDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 44, SolidityParser.RULE_functionDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 440;\n\t\t\tthis.functionDescriptor();\n\t\t\tthis.state = 441;\n\t\t\tthis.parameterList();\n\t\t\tthis.state = 442;\n\t\t\tthis.modifierList();\n\t\t\tthis.state = 444;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__30) {\n\t\t\t\t{\n\t\t\t\tthis.state = 443;\n\t\t\t\tthis.returnParameters();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 448;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 446;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 447;\n\t\t\t\tthis.block();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionDescriptor(): FunctionDescriptorContext {\n\t\tlet _localctx: FunctionDescriptorContext = new FunctionDescriptorContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 46, SolidityParser.RULE_functionDescriptor);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 457;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__29:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 450;\n\t\t\t\tthis.match(SolidityParser.T__29);\n\t\t\t\tthis.state = 452;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 451;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 454;\n\t\t\t\tthis.match(SolidityParser.ConstructorKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.FallbackKeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 455;\n\t\t\t\tthis.match(SolidityParser.FallbackKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 456;\n\t\t\t\tthis.match(SolidityParser.ReceiveKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic returnParameters(): ReturnParametersContext {\n\t\tlet _localctx: ReturnParametersContext = new ReturnParametersContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 48, SolidityParser.RULE_returnParameters);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 459;\n\t\t\tthis.match(SolidityParser.T__30);\n\t\t\tthis.state = 460;\n\t\t\tthis.parameterList();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic modifierList(): ModifierListContext {\n\t\tlet _localctx: ModifierListContext = new ModifierListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 50, SolidityParser.RULE_modifierList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 472;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.T__96 - 96)) | (1 << (SolidityParser.ConstantKeyword - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.ExternalKeyword - 96)) | (1 << (SolidityParser.InternalKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.PrivateKeyword - 96)) | (1 << (SolidityParser.PublicKeyword - 96)) | (1 << (SolidityParser.VirtualKeyword - 96)) | (1 << (SolidityParser.PureKeyword - 96)) | (1 << (SolidityParser.ViewKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 470;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 40, this._ctx) ) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 462;\n\t\t\t\t\tthis.match(SolidityParser.ExternalKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 463;\n\t\t\t\t\tthis.match(SolidityParser.PublicKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 464;\n\t\t\t\t\tthis.match(SolidityParser.InternalKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 465;\n\t\t\t\t\tthis.match(SolidityParser.PrivateKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 466;\n\t\t\t\t\tthis.match(SolidityParser.VirtualKeyword);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 467;\n\t\t\t\t\tthis.stateMutability();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 7:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 468;\n\t\t\t\t\tthis.modifierInvocation();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 469;\n\t\t\t\t\tthis.overrideSpecifier();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 474;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic eventDefinition(): EventDefinitionContext {\n\t\tlet _localctx: EventDefinitionContext = new EventDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 52, SolidityParser.RULE_eventDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 475;\n\t\t\tthis.match(SolidityParser.T__31);\n\t\t\tthis.state = 476;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 477;\n\t\t\tthis.eventParameterList();\n\t\t\tthis.state = 479;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.AnonymousKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 478;\n\t\t\t\tthis.match(SolidityParser.AnonymousKeyword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 481;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic enumValue(): EnumValueContext {\n\t\tlet _localctx: EnumValueContext = new EnumValueContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 54, SolidityParser.RULE_enumValue);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 483;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic enumDefinition(): EnumDefinitionContext {\n\t\tlet _localctx: EnumDefinitionContext = new EnumDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 56, SolidityParser.RULE_enumDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 485;\n\t\t\tthis.match(SolidityParser.T__32);\n\t\t\tthis.state = 486;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 487;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 489;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 488;\n\t\t\t\tthis.enumValue();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 495;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 491;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 492;\n\t\t\t\tthis.enumValue();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 497;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 498;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic parameterList(): ParameterListContext {\n\t\tlet _localctx: ParameterListContext = new ParameterListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 58, SolidityParser.RULE_parameterList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 500;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 509;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 501;\n\t\t\t\tthis.parameter();\n\t\t\t\tthis.state = 506;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 502;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 503;\n\t\t\t\t\tthis.parameter();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 508;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 511;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic parameter(): ParameterContext {\n\t\tlet _localctx: ParameterContext = new ParameterContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 60, SolidityParser.RULE_parameter);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 513;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 515;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 47, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 514;\n\t\t\t\tthis.storageLocation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.state = 518;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 517;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic eventParameterList(): EventParameterListContext {\n\t\tlet _localctx: EventParameterListContext = new EventParameterListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 62, SolidityParser.RULE_eventParameterList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 520;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 529;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 521;\n\t\t\t\tthis.eventParameter();\n\t\t\t\tthis.state = 526;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 522;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 523;\n\t\t\t\t\tthis.eventParameter();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 528;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 531;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic eventParameter(): EventParameterContext {\n\t\tlet _localctx: EventParameterContext = new EventParameterContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 64, SolidityParser.RULE_eventParameter);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 533;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 535;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.IndexedKeyword) {\n\t\t\t\t{\n\t\t\t\tthis.state = 534;\n\t\t\t\tthis.match(SolidityParser.IndexedKeyword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 538;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 537;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionTypeParameterList(): FunctionTypeParameterListContext {\n\t\tlet _localctx: FunctionTypeParameterListContext = new FunctionTypeParameterListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 66, SolidityParser.RULE_functionTypeParameterList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 540;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 549;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 541;\n\t\t\t\tthis.functionTypeParameter();\n\t\t\t\tthis.state = 546;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 542;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 543;\n\t\t\t\t\tthis.functionTypeParameter();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 548;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 551;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionTypeParameter(): FunctionTypeParameterContext {\n\t\tlet _localctx: FunctionTypeParameterContext = new FunctionTypeParameterContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 68, SolidityParser.RULE_functionTypeParameter);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 553;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 555;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (((((_la - 40)) & ~0x1F) === 0 && ((1 << (_la - 40)) & ((1 << (SolidityParser.T__39 - 40)) | (1 << (SolidityParser.T__40 - 40)) | (1 << (SolidityParser.T__41 - 40)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 554;\n\t\t\t\tthis.storageLocation();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic variableDeclaration(): VariableDeclarationContext {\n\t\tlet _localctx: VariableDeclarationContext = new VariableDeclarationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 70, SolidityParser.RULE_variableDeclaration);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 557;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 559;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 56, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 558;\n\t\t\t\tthis.storageLocation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.state = 561;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic typeName(): TypeNameContext;\n\tpublic typeName(_p: number): TypeNameContext;\n\t// @RuleVersion(0)\n\tpublic typeName(_p?: number): TypeNameContext {\n\t\tif (_p === undefined) {\n\t\t\t_p = 0;\n\t\t}\n\n\t\tlet _parentctx: ParserRuleContext = this._ctx;\n\t\tlet _parentState: number = this.state;\n\t\tlet _localctx: TypeNameContext = new TypeNameContext(this._ctx, _parentState);\n\t\tlet _prevctx: TypeNameContext = _localctx;\n\t\tlet _startState: number = 72;\n\t\tthis.enterRecursionRule(_localctx, 72, SolidityParser.RULE_typeName, _p);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 570;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 57, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 564;\n\t\t\t\tthis.elementaryTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 565;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t{\n\t\t\t\tthis.state = 566;\n\t\t\t\tthis.mapping();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\t{\n\t\t\t\tthis.state = 567;\n\t\t\t\tthis.functionTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\t{\n\t\t\t\tthis.state = 568;\n\t\t\t\tthis.match(SolidityParser.T__35);\n\t\t\t\tthis.state = 569;\n\t\t\t\tthis.match(SolidityParser.PayableKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis._ctx._stop = this._input.tryLT(-1);\n\t\t\tthis.state = 580;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 59, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\tif (this._parseListeners != null) {\n\t\t\t\t\t\tthis.triggerExitRuleEvent();\n\t\t\t\t\t}\n\t\t\t\t\t_prevctx = _localctx;\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\t_localctx = new TypeNameContext(_parentctx, _parentState);\n\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_typeName);\n\t\t\t\t\tthis.state = 572;\n\t\t\t\t\tif (!(this.precpred(this._ctx, 3))) {\n\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 3)\");\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 573;\n\t\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\t\tthis.state = 575;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 574;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.state = 577;\n\t\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 582;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 59, this._ctx);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.unrollRecursionContexts(_parentctx);\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext {\n\t\tlet _localctx: UserDefinedTypeNameContext = new UserDefinedTypeNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 74, SolidityParser.RULE_userDefinedTypeName);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 583;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 588;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 60, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 584;\n\t\t\t\t\tthis.match(SolidityParser.T__36);\n\t\t\t\t\tthis.state = 585;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 590;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 60, this._ctx);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic mappingKey(): MappingKeyContext {\n\t\tlet _localctx: MappingKeyContext = new MappingKeyContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 76, SolidityParser.RULE_mappingKey);\n\t\ttry {\n\t\t\tthis.state = 593;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 591;\n\t\t\t\tthis.elementaryTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 592;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic mapping(): MappingContext {\n\t\tlet _localctx: MappingContext = new MappingContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 78, SolidityParser.RULE_mapping);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 595;\n\t\t\tthis.match(SolidityParser.T__37);\n\t\t\tthis.state = 596;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 597;\n\t\t\tthis.mappingKey();\n\t\t\tthis.state = 598;\n\t\t\tthis.match(SolidityParser.T__38);\n\t\t\tthis.state = 599;\n\t\t\tthis.typeName(0);\n\t\t\tthis.state = 600;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionTypeName(): FunctionTypeNameContext {\n\t\tlet _localctx: FunctionTypeNameContext = new FunctionTypeNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 80, SolidityParser.RULE_functionTypeName);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 602;\n\t\t\tthis.match(SolidityParser.T__29);\n\t\t\tthis.state = 603;\n\t\t\tthis.functionTypeParameterList();\n\t\t\tthis.state = 609;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 63, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 607;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\t\tcase SolidityParser.InternalKeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 604;\n\t\t\t\t\t\tthis.match(SolidityParser.InternalKeyword);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SolidityParser.ExternalKeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 605;\n\t\t\t\t\t\tthis.match(SolidityParser.ExternalKeyword);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SolidityParser.ConstantKeyword:\n\t\t\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\t\t\tcase SolidityParser.PureKeyword:\n\t\t\t\t\tcase SolidityParser.ViewKeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 606;\n\t\t\t\t\t\tthis.stateMutability();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 611;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 63, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 614;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 64, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 612;\n\t\t\t\tthis.match(SolidityParser.T__30);\n\t\t\t\tthis.state = 613;\n\t\t\t\tthis.functionTypeParameterList();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic storageLocation(): StorageLocationContext {\n\t\tlet _localctx: StorageLocationContext = new StorageLocationContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 82, SolidityParser.RULE_storageLocation);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 616;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 40)) & ~0x1F) === 0 && ((1 << (_la - 40)) & ((1 << (SolidityParser.T__39 - 40)) | (1 << (SolidityParser.T__40 - 40)) | (1 << (SolidityParser.T__41 - 40)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic stateMutability(): StateMutabilityContext {\n\t\tlet _localctx: StateMutabilityContext = new StateMutabilityContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 84, SolidityParser.RULE_stateMutability);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 618;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 111)) & ~0x1F) === 0 && ((1 << (_la - 111)) & ((1 << (SolidityParser.ConstantKeyword - 111)) | (1 << (SolidityParser.PayableKeyword - 111)) | (1 << (SolidityParser.PureKeyword - 111)) | (1 << (SolidityParser.ViewKeyword - 111)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic block(): BlockContext {\n\t\tlet _localctx: BlockContext = new BlockContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 86, SolidityParser.RULE_block);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 620;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 624;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__14 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__26 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__42 - 38)) | (1 << (SolidityParser.T__44 - 38)) | (1 << (SolidityParser.T__46 - 38)) | (1 << (SolidityParser.T__47 - 38)) | (1 << (SolidityParser.T__48 - 38)) | (1 << (SolidityParser.T__49 - 38)) | (1 << (SolidityParser.T__50 - 38)) | (1 << (SolidityParser.T__51 - 38)) | (1 << (SolidityParser.T__52 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.BreakKeyword - 96)) | (1 << (SolidityParser.ContinueKeyword - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 621;\n\t\t\t\tthis.statement();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 626;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 627;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic statement(): StatementContext {\n\t\tlet _localctx: StatementContext = new StatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 88, SolidityParser.RULE_statement);\n\t\ttry {\n\t\t\tthis.state = 644;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 66, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 629;\n\t\t\t\tthis.ifStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 630;\n\t\t\t\tthis.tryStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 631;\n\t\t\t\tthis.whileStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 632;\n\t\t\t\tthis.forStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 633;\n\t\t\t\tthis.block();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 634;\n\t\t\t\tthis.inlineAssemblyStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 635;\n\t\t\t\tthis.doWhileStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 636;\n\t\t\t\tthis.continueStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 637;\n\t\t\t\tthis.breakStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 10:\n\t\t\t\tthis.enterOuterAlt(_localctx, 10);\n\t\t\t\t{\n\t\t\t\tthis.state = 638;\n\t\t\t\tthis.returnStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 11:\n\t\t\t\tthis.enterOuterAlt(_localctx, 11);\n\t\t\t\t{\n\t\t\t\tthis.state = 639;\n\t\t\t\tthis.throwStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 12:\n\t\t\t\tthis.enterOuterAlt(_localctx, 12);\n\t\t\t\t{\n\t\t\t\tthis.state = 640;\n\t\t\t\tthis.emitStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 13:\n\t\t\t\tthis.enterOuterAlt(_localctx, 13);\n\t\t\t\t{\n\t\t\t\tthis.state = 641;\n\t\t\t\tthis.simpleStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 14);\n\t\t\t\t{\n\t\t\t\tthis.state = 642;\n\t\t\t\tthis.uncheckedStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 15:\n\t\t\t\tthis.enterOuterAlt(_localctx, 15);\n\t\t\t\t{\n\t\t\t\tthis.state = 643;\n\t\t\t\tthis.revertStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic expressionStatement(): ExpressionStatementContext {\n\t\tlet _localctx: ExpressionStatementContext = new ExpressionStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 90, SolidityParser.RULE_expressionStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 646;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 647;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic ifStatement(): IfStatementContext {\n\t\tlet _localctx: IfStatementContext = new IfStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 92, SolidityParser.RULE_ifStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 649;\n\t\t\tthis.match(SolidityParser.T__42);\n\t\t\tthis.state = 650;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 651;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 652;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 653;\n\t\t\tthis.statement();\n\t\t\tthis.state = 656;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 67, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 654;\n\t\t\t\tthis.match(SolidityParser.T__43);\n\t\t\t\tthis.state = 655;\n\t\t\t\tthis.statement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic tryStatement(): TryStatementContext {\n\t\tlet _localctx: TryStatementContext = new TryStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 94, SolidityParser.RULE_tryStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 658;\n\t\t\tthis.match(SolidityParser.T__44);\n\t\t\tthis.state = 659;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 661;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__30) {\n\t\t\t\t{\n\t\t\t\tthis.state = 660;\n\t\t\t\tthis.returnParameters();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 663;\n\t\t\tthis.block();\n\t\t\tthis.state = 665;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tdo {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 664;\n\t\t\t\tthis.catchClause();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 667;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t} while (_la === SolidityParser.T__45);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic catchClause(): CatchClauseContext {\n\t\tlet _localctx: CatchClauseContext = new CatchClauseContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 96, SolidityParser.RULE_catchClause);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 669;\n\t\t\tthis.match(SolidityParser.T__45);\n\t\t\tthis.state = 674;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__22) | (1 << SolidityParser.T__24))) !== 0) || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 671;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 670;\n\t\t\t\t\tthis.identifier();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 673;\n\t\t\t\tthis.parameterList();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 676;\n\t\t\tthis.block();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic whileStatement(): WhileStatementContext {\n\t\tlet _localctx: WhileStatementContext = new WhileStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 98, SolidityParser.RULE_whileStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 678;\n\t\t\tthis.match(SolidityParser.T__46);\n\t\t\tthis.state = 679;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 680;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 681;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 682;\n\t\t\tthis.statement();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic simpleStatement(): SimpleStatementContext {\n\t\tlet _localctx: SimpleStatementContext = new SimpleStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 100, SolidityParser.RULE_simpleStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 686;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 72, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 684;\n\t\t\t\tthis.variableDeclarationStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 685;\n\t\t\t\tthis.expressionStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic uncheckedStatement(): UncheckedStatementContext {\n\t\tlet _localctx: UncheckedStatementContext = new UncheckedStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 102, SolidityParser.RULE_uncheckedStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 688;\n\t\t\tthis.match(SolidityParser.T__47);\n\t\t\tthis.state = 689;\n\t\t\tthis.block();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic forStatement(): ForStatementContext {\n\t\tlet _localctx: ForStatementContext = new ForStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 104, SolidityParser.RULE_forStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 691;\n\t\t\tthis.match(SolidityParser.T__26);\n\t\t\tthis.state = 692;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 695;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__5:\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__22:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__33:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__58:\n\t\t\tcase SolidityParser.T__59:\n\t\t\tcase SolidityParser.T__60:\n\t\t\tcase SolidityParser.T__62:\n\t\t\tcase SolidityParser.T__63:\n\t\t\tcase SolidityParser.T__64:\n\t\t\tcase SolidityParser.T__65:\n\t\t\tcase SolidityParser.T__66:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.BooleanLiteral:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.TypeKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 693;\n\t\t\t\tthis.simpleStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 694;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 699;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__5:\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__22:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__33:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__58:\n\t\t\tcase SolidityParser.T__59:\n\t\t\tcase SolidityParser.T__60:\n\t\t\tcase SolidityParser.T__62:\n\t\t\tcase SolidityParser.T__63:\n\t\t\tcase SolidityParser.T__64:\n\t\t\tcase SolidityParser.T__65:\n\t\t\tcase SolidityParser.T__66:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.BooleanLiteral:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.TypeKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 697;\n\t\t\t\tthis.expressionStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__1:\n\t\t\t\t{\n\t\t\t\tthis.state = 698;\n\t\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 702;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 701;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 704;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 705;\n\t\t\tthis.statement();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic inlineAssemblyStatement(): InlineAssemblyStatementContext {\n\t\tlet _localctx: InlineAssemblyStatementContext = new InlineAssemblyStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 106, SolidityParser.RULE_inlineAssemblyStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 707;\n\t\t\tthis.match(SolidityParser.T__48);\n\t\t\tthis.state = 709;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.StringLiteralFragment) {\n\t\t\t\t{\n\t\t\t\tthis.state = 708;\n\t\t\t\tthis.match(SolidityParser.StringLiteralFragment);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 715;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 711;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 712;\n\t\t\t\tthis.inlineAssemblyStatementFlag();\n\t\t\t\tthis.state = 713;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 717;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic inlineAssemblyStatementFlag(): InlineAssemblyStatementFlagContext {\n\t\tlet _localctx: InlineAssemblyStatementFlagContext = new InlineAssemblyStatementFlagContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 108, SolidityParser.RULE_inlineAssemblyStatementFlag);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 719;\n\t\t\tthis.stringLiteral();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic doWhileStatement(): DoWhileStatementContext {\n\t\tlet _localctx: DoWhileStatementContext = new DoWhileStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 110, SolidityParser.RULE_doWhileStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 721;\n\t\t\tthis.match(SolidityParser.T__49);\n\t\t\tthis.state = 722;\n\t\t\tthis.statement();\n\t\t\tthis.state = 723;\n\t\t\tthis.match(SolidityParser.T__46);\n\t\t\tthis.state = 724;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 725;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 726;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 727;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic continueStatement(): ContinueStatementContext {\n\t\tlet _localctx: ContinueStatementContext = new ContinueStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 112, SolidityParser.RULE_continueStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 729;\n\t\t\tthis.match(SolidityParser.ContinueKeyword);\n\t\t\tthis.state = 730;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic breakStatement(): BreakStatementContext {\n\t\tlet _localctx: BreakStatementContext = new BreakStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 114, SolidityParser.RULE_breakStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 732;\n\t\t\tthis.match(SolidityParser.BreakKeyword);\n\t\t\tthis.state = 733;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic returnStatement(): ReturnStatementContext {\n\t\tlet _localctx: ReturnStatementContext = new ReturnStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 116, SolidityParser.RULE_returnStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 735;\n\t\t\tthis.match(SolidityParser.T__50);\n\t\t\tthis.state = 737;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\tthis.state = 736;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 739;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic throwStatement(): ThrowStatementContext {\n\t\tlet _localctx: ThrowStatementContext = new ThrowStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 118, SolidityParser.RULE_throwStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 741;\n\t\t\tthis.match(SolidityParser.T__51);\n\t\t\tthis.state = 742;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic emitStatement(): EmitStatementContext {\n\t\tlet _localctx: EmitStatementContext = new EmitStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 120, SolidityParser.RULE_emitStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 744;\n\t\t\tthis.match(SolidityParser.T__52);\n\t\t\tthis.state = 745;\n\t\t\tthis.functionCall();\n\t\t\tthis.state = 746;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic revertStatement(): RevertStatementContext {\n\t\tlet _localctx: RevertStatementContext = new RevertStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 122, SolidityParser.RULE_revertStatement);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 748;\n\t\t\tthis.match(SolidityParser.T__53);\n\t\t\tthis.state = 749;\n\t\t\tthis.functionCall();\n\t\t\tthis.state = 750;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic variableDeclarationStatement(): VariableDeclarationStatementContext {\n\t\tlet _localctx: VariableDeclarationStatementContext = new VariableDeclarationStatementContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 124, SolidityParser.RULE_variableDeclarationStatement);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 759;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 79, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 752;\n\t\t\t\tthis.match(SolidityParser.T__54);\n\t\t\t\tthis.state = 753;\n\t\t\t\tthis.identifierList();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 754;\n\t\t\t\tthis.variableDeclaration();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t{\n\t\t\t\tthis.state = 755;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 756;\n\t\t\t\tthis.variableDeclarationList();\n\t\t\t\tthis.state = 757;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.state = 763;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__10) {\n\t\t\t\t{\n\t\t\t\tthis.state = 761;\n\t\t\t\tthis.match(SolidityParser.T__10);\n\t\t\t\tthis.state = 762;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 765;\n\t\t\tthis.match(SolidityParser.T__1);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic variableDeclarationList(): VariableDeclarationListContext {\n\t\tlet _localctx: VariableDeclarationListContext = new VariableDeclarationListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 126, SolidityParser.RULE_variableDeclarationList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 768;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 767;\n\t\t\t\tthis.variableDeclaration();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 776;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 770;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 772;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__37 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 771;\n\t\t\t\t\tthis.variableDeclaration();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 778;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic identifierList(): IdentifierListContext {\n\t\tlet _localctx: IdentifierListContext = new IdentifierListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 128, SolidityParser.RULE_identifierList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 779;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 786;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 85, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 781;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 780;\n\t\t\t\t\t\tthis.identifier();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.state = 783;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 788;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 85, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 790;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 789;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 792;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic elementaryTypeName(): ElementaryTypeNameContext {\n\t\tlet _localctx: ElementaryTypeNameContext = new ElementaryTypeNameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 130, SolidityParser.RULE_elementaryTypeName);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 794;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__54 - 36)) | (1 << (SolidityParser.T__55 - 36)) | (1 << (SolidityParser.T__56 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 98)) & ~0x1F) === 0 && ((1 << (_la - 98)) & ((1 << (SolidityParser.Int - 98)) | (1 << (SolidityParser.Uint - 98)) | (1 << (SolidityParser.Byte - 98)) | (1 << (SolidityParser.Fixed - 98)) | (1 << (SolidityParser.Ufixed - 98)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic expression(): ExpressionContext;\n\tpublic expression(_p: number): ExpressionContext;\n\t// @RuleVersion(0)\n\tpublic expression(_p?: number): ExpressionContext {\n\t\tif (_p === undefined) {\n\t\t\t_p = 0;\n\t\t}\n\n\t\tlet _parentctx: ParserRuleContext = this._ctx;\n\t\tlet _parentState: number = this.state;\n\t\tlet _localctx: ExpressionContext = new ExpressionContext(this._ctx, _parentState);\n\t\tlet _prevctx: ExpressionContext = _localctx;\n\t\tlet _startState: number = 132;\n\t\tthis.enterRecursionRule(_localctx, 132, SolidityParser.RULE_expression, _p);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 814;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 87, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 797;\n\t\t\t\tthis.match(SolidityParser.T__60);\n\t\t\t\tthis.state = 798;\n\t\t\t\tthis.typeName(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\tthis.state = 799;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 800;\n\t\t\t\tthis.expression(0);\n\t\t\t\tthis.state = 801;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t{\n\t\t\t\tthis.state = 803;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(_la === SolidityParser.T__58 || _la === SolidityParser.T__59)) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\tthis.state = 804;\n\t\t\t\tthis.expression(19);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\t{\n\t\t\t\tthis.state = 805;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(_la === SolidityParser.T__62 || _la === SolidityParser.T__63)) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\tthis.state = 806;\n\t\t\t\tthis.expression(18);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\t{\n\t\t\t\tthis.state = 807;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(_la === SolidityParser.T__64 || _la === SolidityParser.T__65)) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\tthis.state = 808;\n\t\t\t\tthis.expression(17);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\t{\n\t\t\t\tthis.state = 809;\n\t\t\t\tthis.match(SolidityParser.T__66);\n\t\t\t\tthis.state = 810;\n\t\t\t\tthis.expression(16);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\t{\n\t\t\t\tthis.state = 811;\n\t\t\t\tthis.match(SolidityParser.T__5);\n\t\t\t\tthis.state = 812;\n\t\t\t\tthis.expression(15);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\t{\n\t\t\t\tthis.state = 813;\n\t\t\t\tthis.primaryExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis._ctx._stop = this._input.tryLT(-1);\n\t\t\tthis.state = 890;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 91, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\tif (this._parseListeners != null) {\n\t\t\t\t\t\tthis.triggerExitRuleEvent();\n\t\t\t\t\t}\n\t\t\t\t\t_prevctx = _localctx;\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 888;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 90, this._ctx) ) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 816;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 14))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 14)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 817;\n\t\t\t\t\t\tthis.match(SolidityParser.T__67);\n\t\t\t\t\t\tthis.state = 818;\n\t\t\t\t\t\tthis.expression(15);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 819;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 13))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 13)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 820;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__2 || _la === SolidityParser.T__68 || _la === SolidityParser.T__69)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 821;\n\t\t\t\t\t\tthis.expression(14);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 822;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 12))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 12)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 823;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__62 || _la === SolidityParser.T__63)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 824;\n\t\t\t\t\t\tthis.expression(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 825;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 11))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 11)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 826;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__70 || _la === SolidityParser.T__71)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 827;\n\t\t\t\t\t\tthis.expression(12);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 828;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 10))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 10)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 829;\n\t\t\t\t\t\tthis.match(SolidityParser.T__72);\n\t\t\t\t\t\tthis.state = 830;\n\t\t\t\t\t\tthis.expression(11);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 831;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 9))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 9)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 832;\n\t\t\t\t\t\tthis.match(SolidityParser.T__4);\n\t\t\t\t\t\tthis.state = 833;\n\t\t\t\t\t\tthis.expression(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 834;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 8))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 8)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 835;\n\t\t\t\t\t\tthis.match(SolidityParser.T__73);\n\t\t\t\t\t\tthis.state = 836;\n\t\t\t\t\t\tthis.expression(9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 837;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 7))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 7)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 838;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__6) | (1 << SolidityParser.T__7) | (1 << SolidityParser.T__8) | (1 << SolidityParser.T__9))) !== 0))) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 839;\n\t\t\t\t\t\tthis.expression(8);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 9:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 840;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 6))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 6)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 841;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__74 || _la === SolidityParser.T__75)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 842;\n\t\t\t\t\t\tthis.expression(7);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 843;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 5))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 5)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 844;\n\t\t\t\t\t\tthis.match(SolidityParser.T__76);\n\t\t\t\t\t\tthis.state = 845;\n\t\t\t\t\t\tthis.expression(6);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 846;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 4))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 4)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 847;\n\t\t\t\t\t\tthis.match(SolidityParser.T__3);\n\t\t\t\t\t\tthis.state = 848;\n\t\t\t\t\t\tthis.expression(5);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 849;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 3))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 3)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 850;\n\t\t\t\t\t\tthis.match(SolidityParser.T__77);\n\t\t\t\t\t\tthis.state = 851;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\tthis.state = 852;\n\t\t\t\t\t\tthis.match(SolidityParser.T__61);\n\t\t\t\t\t\tthis.state = 853;\n\t\t\t\t\t\tthis.expression(4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 13:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 855;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 2))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 2)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 856;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__10 || ((((_la - 79)) & ~0x1F) === 0 && ((1 << (_la - 79)) & ((1 << (SolidityParser.T__78 - 79)) | (1 << (SolidityParser.T__79 - 79)) | (1 << (SolidityParser.T__80 - 79)) | (1 << (SolidityParser.T__81 - 79)) | (1 << (SolidityParser.T__82 - 79)) | (1 << (SolidityParser.T__83 - 79)) | (1 << (SolidityParser.T__84 - 79)) | (1 << (SolidityParser.T__85 - 79)) | (1 << (SolidityParser.T__86 - 79)) | (1 << (SolidityParser.T__87 - 79)))) !== 0))) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 857;\n\t\t\t\t\t\tthis.expression(3);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 858;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 27))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 27)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 859;\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (!(_la === SolidityParser.T__58 || _la === SolidityParser.T__59)) {\n\t\t\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\t\t\tthis.consume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 15:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 860;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 25))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 25)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 861;\n\t\t\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\t\t\tthis.state = 862;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\tthis.state = 863;\n\t\t\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 865;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 24))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 24)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 866;\n\t\t\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\t\t\tthis.state = 868;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.state = 867;\n\t\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.state = 870;\n\t\t\t\t\t\tthis.match(SolidityParser.T__61);\n\t\t\t\t\t\tthis.state = 872;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.state = 871;\n\t\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.state = 874;\n\t\t\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 17:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 875;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 23))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 23)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 876;\n\t\t\t\t\t\tthis.match(SolidityParser.T__36);\n\t\t\t\t\t\tthis.state = 877;\n\t\t\t\t\t\tthis.identifier();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 878;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 22))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 22)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 879;\n\t\t\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\t\t\tthis.state = 880;\n\t\t\t\t\t\tthis.nameValueList();\n\t\t\t\t\t\tthis.state = 881;\n\t\t\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 19:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t_localctx = new ExpressionContext(_parentctx, _parentState);\n\t\t\t\t\t\tthis.pushNewRecursionContext(_localctx, _startState, SolidityParser.RULE_expression);\n\t\t\t\t\t\tthis.state = 883;\n\t\t\t\t\t\tif (!(this.precpred(this._ctx, 21))) {\n\t\t\t\t\t\t\tthrow this.createFailedPredicateException(\"this.precpred(this._ctx, 21)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 884;\n\t\t\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\t\t\tthis.state = 885;\n\t\t\t\t\t\tthis.functionCallArguments();\n\t\t\t\t\t\tthis.state = 886;\n\t\t\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 892;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 91, this._ctx);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.unrollRecursionContexts(_parentctx);\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic primaryExpression(): PrimaryExpressionContext {\n\t\tlet _localctx: PrimaryExpressionContext = new PrimaryExpressionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 134, SolidityParser.RULE_primaryExpression);\n\t\ttry {\n\t\t\tthis.state = 902;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 92, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 893;\n\t\t\t\tthis.match(SolidityParser.BooleanLiteral);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 894;\n\t\t\t\tthis.numberLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 895;\n\t\t\t\tthis.hexLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 896;\n\t\t\t\tthis.stringLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 897;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 898;\n\t\t\t\tthis.match(SolidityParser.TypeKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 899;\n\t\t\t\tthis.match(SolidityParser.PayableKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 900;\n\t\t\t\tthis.tupleExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 901;\n\t\t\t\tthis.typeName(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic expressionList(): ExpressionListContext {\n\t\tlet _localctx: ExpressionListContext = new ExpressionListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 136, SolidityParser.RULE_expressionList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 904;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 909;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 905;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 906;\n\t\t\t\tthis.expression(0);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 911;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic nameValueList(): NameValueListContext {\n\t\tlet _localctx: NameValueListContext = new NameValueListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 138, SolidityParser.RULE_nameValueList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 912;\n\t\t\tthis.nameValue();\n\t\t\tthis.state = 917;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 94, this._ctx);\n\t\t\twhile (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 913;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 914;\n\t\t\t\t\tthis.nameValue();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 919;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 94, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 921;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\tthis.state = 920;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic nameValue(): NameValueContext {\n\t\tlet _localctx: NameValueContext = new NameValueContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 140, SolidityParser.RULE_nameValue);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 923;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 924;\n\t\t\tthis.match(SolidityParser.T__61);\n\t\t\tthis.state = 925;\n\t\t\tthis.expression(0);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionCallArguments(): FunctionCallArgumentsContext {\n\t\tlet _localctx: FunctionCallArgumentsContext = new FunctionCallArgumentsContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 142, SolidityParser.RULE_functionCallArguments);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 935;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 927;\n\t\t\t\tthis.match(SolidityParser.T__14);\n\t\t\t\tthis.state = 929;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 928;\n\t\t\t\t\tthis.nameValueList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 931;\n\t\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__5:\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__22:\n\t\t\tcase SolidityParser.T__23:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__29:\n\t\t\tcase SolidityParser.T__33:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__37:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__54:\n\t\t\tcase SolidityParser.T__55:\n\t\t\tcase SolidityParser.T__56:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__58:\n\t\t\tcase SolidityParser.T__59:\n\t\t\tcase SolidityParser.T__60:\n\t\t\tcase SolidityParser.T__62:\n\t\t\tcase SolidityParser.T__63:\n\t\t\tcase SolidityParser.T__64:\n\t\t\tcase SolidityParser.T__65:\n\t\t\tcase SolidityParser.T__66:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.Int:\n\t\t\tcase SolidityParser.Uint:\n\t\t\tcase SolidityParser.Byte:\n\t\t\tcase SolidityParser.Fixed:\n\t\t\tcase SolidityParser.Ufixed:\n\t\t\tcase SolidityParser.BooleanLiteral:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.TypeKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 933;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 932;\n\t\t\t\t\tthis.expressionList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionCall(): FunctionCallContext {\n\t\tlet _localctx: FunctionCallContext = new FunctionCallContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 144, SolidityParser.RULE_functionCall);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 937;\n\t\t\tthis.expression(0);\n\t\t\tthis.state = 938;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 939;\n\t\t\tthis.functionCallArguments();\n\t\t\tthis.state = 940;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\tlet _localctx: AssemblyBlockContext = new AssemblyBlockContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 146, SolidityParser.RULE_assemblyBlock);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 942;\n\t\t\tthis.match(SolidityParser.T__14);\n\t\t\tthis.state = 946;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityParser.T__13) | (1 << SolidityParser.T__14) | (1 << SolidityParser.T__22) | (1 << SolidityParser.T__24) | (1 << SolidityParser.T__26) | (1 << SolidityParser.T__29))) !== 0) || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__42 - 36)) | (1 << (SolidityParser.T__48 - 36)) | (1 << (SolidityParser.T__50 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 89)) & ~0x1F) === 0 && ((1 << (_la - 89)) & ((1 << (SolidityParser.T__88 - 89)) | (1 << (SolidityParser.T__91 - 89)) | (1 << (SolidityParser.T__95 - 89)) | (1 << (SolidityParser.DecimalNumber - 89)) | (1 << (SolidityParser.HexNumber - 89)) | (1 << (SolidityParser.HexLiteralFragment - 89)) | (1 << (SolidityParser.BreakKeyword - 89)) | (1 << (SolidityParser.ContinueKeyword - 89)) | (1 << (SolidityParser.LeaveKeyword - 89)) | (1 << (SolidityParser.PayableKeyword - 89)))) !== 0) || ((((_la - 126)) & ~0x1F) === 0 && ((1 << (_la - 126)) & ((1 << (SolidityParser.ConstructorKeyword - 126)) | (1 << (SolidityParser.ReceiveKeyword - 126)) | (1 << (SolidityParser.Identifier - 126)) | (1 << (SolidityParser.StringLiteralFragment - 126)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 943;\n\t\t\t\tthis.assemblyItem();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 948;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 949;\n\t\t\tthis.match(SolidityParser.T__16);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyItem(): AssemblyItemContext {\n\t\tlet _localctx: AssemblyItemContext = new AssemblyItemContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 148, SolidityParser.RULE_assemblyItem);\n\t\ttry {\n\t\t\tthis.state = 969;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 100, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 951;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 952;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 953;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 954;\n\t\t\t\tthis.assemblyLocalDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 5:\n\t\t\t\tthis.enterOuterAlt(_localctx, 5);\n\t\t\t\t{\n\t\t\t\tthis.state = 955;\n\t\t\t\tthis.assemblyAssignment();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\tthis.enterOuterAlt(_localctx, 6);\n\t\t\t\t{\n\t\t\t\tthis.state = 956;\n\t\t\t\tthis.assemblyStackAssignment();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 7:\n\t\t\t\tthis.enterOuterAlt(_localctx, 7);\n\t\t\t\t{\n\t\t\t\tthis.state = 957;\n\t\t\t\tthis.labelDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tthis.enterOuterAlt(_localctx, 8);\n\t\t\t\t{\n\t\t\t\tthis.state = 958;\n\t\t\t\tthis.assemblySwitch();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 9:\n\t\t\t\tthis.enterOuterAlt(_localctx, 9);\n\t\t\t\t{\n\t\t\t\tthis.state = 959;\n\t\t\t\tthis.assemblyFunctionDefinition();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 10:\n\t\t\t\tthis.enterOuterAlt(_localctx, 10);\n\t\t\t\t{\n\t\t\t\tthis.state = 960;\n\t\t\t\tthis.assemblyFor();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 11:\n\t\t\t\tthis.enterOuterAlt(_localctx, 11);\n\t\t\t\t{\n\t\t\t\tthis.state = 961;\n\t\t\t\tthis.assemblyIf();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 12:\n\t\t\t\tthis.enterOuterAlt(_localctx, 12);\n\t\t\t\t{\n\t\t\t\tthis.state = 962;\n\t\t\t\tthis.match(SolidityParser.BreakKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 13:\n\t\t\t\tthis.enterOuterAlt(_localctx, 13);\n\t\t\t\t{\n\t\t\t\tthis.state = 963;\n\t\t\t\tthis.match(SolidityParser.ContinueKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 14:\n\t\t\t\tthis.enterOuterAlt(_localctx, 14);\n\t\t\t\t{\n\t\t\t\tthis.state = 964;\n\t\t\t\tthis.match(SolidityParser.LeaveKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 15:\n\t\t\t\tthis.enterOuterAlt(_localctx, 15);\n\t\t\t\t{\n\t\t\t\tthis.state = 965;\n\t\t\t\tthis.subAssembly();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 16:\n\t\t\t\tthis.enterOuterAlt(_localctx, 16);\n\t\t\t\t{\n\t\t\t\tthis.state = 966;\n\t\t\t\tthis.numberLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 17:\n\t\t\t\tthis.enterOuterAlt(_localctx, 17);\n\t\t\t\t{\n\t\t\t\tthis.state = 967;\n\t\t\t\tthis.stringLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 18:\n\t\t\t\tthis.enterOuterAlt(_localctx, 18);\n\t\t\t\t{\n\t\t\t\tthis.state = 968;\n\t\t\t\tthis.hexLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\tlet _localctx: AssemblyExpressionContext = new AssemblyExpressionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 150, SolidityParser.RULE_assemblyExpression);\n\t\ttry {\n\t\t\tthis.state = 974;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 101, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 971;\n\t\t\t\tthis.assemblyCall();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 972;\n\t\t\t\tthis.assemblyLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 973;\n\t\t\t\tthis.assemblyMember();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyMember(): AssemblyMemberContext {\n\t\tlet _localctx: AssemblyMemberContext = new AssemblyMemberContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 152, SolidityParser.RULE_assemblyMember);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 976;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 977;\n\t\t\tthis.match(SolidityParser.T__36);\n\t\t\tthis.state = 978;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyCall(): AssemblyCallContext {\n\t\tlet _localctx: AssemblyCallContext = new AssemblyCallContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 154, SolidityParser.RULE_assemblyCall);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 984;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__50:\n\t\t\t\t{\n\t\t\t\tthis.state = 980;\n\t\t\t\tthis.match(SolidityParser.T__50);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__35:\n\t\t\t\t{\n\t\t\t\tthis.state = 981;\n\t\t\t\tthis.match(SolidityParser.T__35);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__57:\n\t\t\t\t{\n\t\t\t\tthis.state = 982;\n\t\t\t\tthis.match(SolidityParser.T__57);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\t\t{\n\t\t\t\tthis.state = 983;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 998;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 105, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 986;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 988;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || ((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & ((1 << (SolidityParser.T__35 - 36)) | (1 << (SolidityParser.T__41 - 36)) | (1 << (SolidityParser.T__50 - 36)) | (1 << (SolidityParser.T__53 - 36)) | (1 << (SolidityParser.T__57 - 36)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 987;\n\t\t\t\t\tthis.assemblyExpression();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 994;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 990;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 991;\n\t\t\t\t\tthis.assemblyExpression();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 996;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 997;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyLocalDefinition(): AssemblyLocalDefinitionContext {\n\t\tlet _localctx: AssemblyLocalDefinitionContext = new AssemblyLocalDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 156, SolidityParser.RULE_assemblyLocalDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1000;\n\t\t\tthis.match(SolidityParser.T__88);\n\t\t\tthis.state = 1001;\n\t\t\tthis.assemblyIdentifierOrList();\n\t\t\tthis.state = 1004;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__89) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1002;\n\t\t\t\tthis.match(SolidityParser.T__89);\n\t\t\t\tthis.state = 1003;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyAssignment(): AssemblyAssignmentContext {\n\t\tlet _localctx: AssemblyAssignmentContext = new AssemblyAssignmentContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 158, SolidityParser.RULE_assemblyAssignment);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1006;\n\t\t\tthis.assemblyIdentifierOrList();\n\t\t\tthis.state = 1007;\n\t\t\tthis.match(SolidityParser.T__89);\n\t\t\tthis.state = 1008;\n\t\t\tthis.assemblyExpression();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyIdentifierOrList(): AssemblyIdentifierOrListContext {\n\t\tlet _localctx: AssemblyIdentifierOrListContext = new AssemblyIdentifierOrListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 160, SolidityParser.RULE_assemblyIdentifierOrList);\n\t\ttry {\n\t\t\tthis.state = 1016;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 107, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1010;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1011;\n\t\t\t\tthis.assemblyMember();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 1012;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 1013;\n\t\t\t\tthis.assemblyIdentifierList();\n\t\t\t\tthis.state = 1014;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext {\n\t\tlet _localctx: AssemblyIdentifierListContext = new AssemblyIdentifierListContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 162, SolidityParser.RULE_assemblyIdentifierList);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1018;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1023;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 1019;\n\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\tthis.state = 1020;\n\t\t\t\tthis.identifier();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 1025;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyStackAssignment(): AssemblyStackAssignmentContext {\n\t\tlet _localctx: AssemblyStackAssignmentContext = new AssemblyStackAssignmentContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 164, SolidityParser.RULE_assemblyStackAssignment);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1026;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1027;\n\t\t\tthis.match(SolidityParser.T__90);\n\t\t\tthis.state = 1028;\n\t\t\tthis.identifier();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic labelDefinition(): LabelDefinitionContext {\n\t\tlet _localctx: LabelDefinitionContext = new LabelDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 166, SolidityParser.RULE_labelDefinition);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1030;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1031;\n\t\t\tthis.match(SolidityParser.T__61);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblySwitch(): AssemblySwitchContext {\n\t\tlet _localctx: AssemblySwitchContext = new AssemblySwitchContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 168, SolidityParser.RULE_assemblySwitch);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1033;\n\t\t\tthis.match(SolidityParser.T__91);\n\t\t\tthis.state = 1034;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1038;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityParser.T__92 || _la === SolidityParser.T__93) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 1035;\n\t\t\t\tthis.assemblyCase();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 1040;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyCase(): AssemblyCaseContext {\n\t\tlet _localctx: AssemblyCaseContext = new AssemblyCaseContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 170, SolidityParser.RULE_assemblyCase);\n\t\ttry {\n\t\t\tthis.state = 1047;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__92:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1041;\n\t\t\t\tthis.match(SolidityParser.T__92);\n\t\t\t\tthis.state = 1042;\n\t\t\t\tthis.assemblyLiteral();\n\t\t\t\tthis.state = 1043;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__93:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1045;\n\t\t\t\tthis.match(SolidityParser.T__93);\n\t\t\t\tthis.state = 1046;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyFunctionDefinition(): AssemblyFunctionDefinitionContext {\n\t\tlet _localctx: AssemblyFunctionDefinitionContext = new AssemblyFunctionDefinitionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 172, SolidityParser.RULE_assemblyFunctionDefinition);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1049;\n\t\t\tthis.match(SolidityParser.T__29);\n\t\t\tthis.state = 1050;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1051;\n\t\t\tthis.match(SolidityParser.T__22);\n\t\t\tthis.state = 1053;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1052;\n\t\t\t\tthis.assemblyIdentifierList();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 1055;\n\t\t\tthis.match(SolidityParser.T__23);\n\t\t\tthis.state = 1057;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__94) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1056;\n\t\t\t\tthis.assemblyFunctionReturns();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 1059;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyFunctionReturns(): AssemblyFunctionReturnsContext {\n\t\tlet _localctx: AssemblyFunctionReturnsContext = new AssemblyFunctionReturnsContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 174, SolidityParser.RULE_assemblyFunctionReturns);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\t{\n\t\t\tthis.state = 1061;\n\t\t\tthis.match(SolidityParser.T__94);\n\t\t\tthis.state = 1062;\n\t\t\tthis.assemblyIdentifierList();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyFor(): AssemblyForContext {\n\t\tlet _localctx: AssemblyForContext = new AssemblyForContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 176, SolidityParser.RULE_assemblyFor);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1064;\n\t\t\tthis.match(SolidityParser.T__26);\n\t\t\tthis.state = 1067;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 1065;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__50:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 1066;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 1069;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1072;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__14:\n\t\t\t\t{\n\t\t\t\tthis.state = 1070;\n\t\t\t\tthis.assemblyBlock();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__13:\n\t\t\tcase SolidityParser.T__24:\n\t\t\tcase SolidityParser.T__35:\n\t\t\tcase SolidityParser.T__41:\n\t\t\tcase SolidityParser.T__50:\n\t\t\tcase SolidityParser.T__53:\n\t\t\tcase SolidityParser.T__57:\n\t\t\tcase SolidityParser.T__95:\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\tcase SolidityParser.LeaveKeyword:\n\t\t\tcase SolidityParser.PayableKeyword:\n\t\t\tcase SolidityParser.ConstructorKeyword:\n\t\t\tcase SolidityParser.ReceiveKeyword:\n\t\t\tcase SolidityParser.Identifier:\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\t{\n\t\t\t\tthis.state = 1071;\n\t\t\t\tthis.assemblyExpression();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t\tthis.state = 1074;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyIf(): AssemblyIfContext {\n\t\tlet _localctx: AssemblyIfContext = new AssemblyIfContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 178, SolidityParser.RULE_assemblyIf);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1076;\n\t\t\tthis.match(SolidityParser.T__42);\n\t\t\tthis.state = 1077;\n\t\t\tthis.assemblyExpression();\n\t\t\tthis.state = 1078;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic assemblyLiteral(): AssemblyLiteralContext {\n\t\tlet _localctx: AssemblyLiteralContext = new AssemblyLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 180, SolidityParser.RULE_assemblyLiteral);\n\t\ttry {\n\t\t\tthis.state = 1084;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.StringLiteralFragment:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1080;\n\t\t\t\tthis.stringLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.DecimalNumber:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1081;\n\t\t\t\tthis.match(SolidityParser.DecimalNumber);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.HexNumber:\n\t\t\t\tthis.enterOuterAlt(_localctx, 3);\n\t\t\t\t{\n\t\t\t\tthis.state = 1082;\n\t\t\t\tthis.match(SolidityParser.HexNumber);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.HexLiteralFragment:\n\t\t\t\tthis.enterOuterAlt(_localctx, 4);\n\t\t\t\t{\n\t\t\t\tthis.state = 1083;\n\t\t\t\tthis.hexLiteral();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic subAssembly(): SubAssemblyContext {\n\t\tlet _localctx: SubAssemblyContext = new SubAssemblyContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 182, SolidityParser.RULE_subAssembly);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1086;\n\t\t\tthis.match(SolidityParser.T__48);\n\t\t\tthis.state = 1087;\n\t\t\tthis.identifier();\n\t\t\tthis.state = 1088;\n\t\t\tthis.assemblyBlock();\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic tupleExpression(): TupleExpressionContext {\n\t\tlet _localctx: TupleExpressionContext = new TupleExpressionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 184, SolidityParser.RULE_tupleExpression);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.state = 1116;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityParser.T__22:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 1090;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\t{\n\t\t\t\tthis.state = 1092;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1091;\n\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 1100;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1094;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 1096;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 1095;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 1102;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 1103;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityParser.T__33:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 1104;\n\t\t\t\tthis.match(SolidityParser.T__33);\n\t\t\t\tthis.state = 1113;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (((((_la - 6)) & ~0x1F) === 0 && ((1 << (_la - 6)) & ((1 << (SolidityParser.T__5 - 6)) | (1 << (SolidityParser.T__13 - 6)) | (1 << (SolidityParser.T__22 - 6)) | (1 << (SolidityParser.T__24 - 6)) | (1 << (SolidityParser.T__29 - 6)) | (1 << (SolidityParser.T__33 - 6)) | (1 << (SolidityParser.T__35 - 6)))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (SolidityParser.T__37 - 38)) | (1 << (SolidityParser.T__41 - 38)) | (1 << (SolidityParser.T__53 - 38)) | (1 << (SolidityParser.T__54 - 38)) | (1 << (SolidityParser.T__55 - 38)) | (1 << (SolidityParser.T__56 - 38)) | (1 << (SolidityParser.T__57 - 38)) | (1 << (SolidityParser.T__58 - 38)) | (1 << (SolidityParser.T__59 - 38)) | (1 << (SolidityParser.T__60 - 38)) | (1 << (SolidityParser.T__62 - 38)) | (1 << (SolidityParser.T__63 - 38)) | (1 << (SolidityParser.T__64 - 38)) | (1 << (SolidityParser.T__65 - 38)) | (1 << (SolidityParser.T__66 - 38)))) !== 0) || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.Int - 96)) | (1 << (SolidityParser.Uint - 96)) | (1 << (SolidityParser.Byte - 96)) | (1 << (SolidityParser.Fixed - 96)) | (1 << (SolidityParser.Ufixed - 96)) | (1 << (SolidityParser.BooleanLiteral - 96)) | (1 << (SolidityParser.DecimalNumber - 96)) | (1 << (SolidityParser.HexNumber - 96)) | (1 << (SolidityParser.HexLiteralFragment - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.TypeKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || ((((_la - 128)) & ~0x1F) === 0 && ((1 << (_la - 128)) & ((1 << (SolidityParser.ReceiveKeyword - 128)) | (1 << (SolidityParser.Identifier - 128)) | (1 << (SolidityParser.StringLiteralFragment - 128)))) !== 0)) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1105;\n\t\t\t\t\tthis.expression(0);\n\t\t\t\t\tthis.state = 1110;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 1106;\n\t\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\t\tthis.state = 1107;\n\t\t\t\t\t\tthis.expression(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 1112;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.state = 1115;\n\t\t\t\tthis.match(SolidityParser.T__34);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic numberLiteral(): NumberLiteralContext {\n\t\tlet _localctx: NumberLiteralContext = new NumberLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 186, SolidityParser.RULE_numberLiteral);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1118;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(_la === SolidityParser.DecimalNumber || _la === SolidityParser.HexNumber)) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\tthis.state = 1120;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 122, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 1119;\n\t\t\t\tthis.match(SolidityParser.NumberUnit);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic identifier(): IdentifierContext {\n\t\tlet _localctx: IdentifierContext = new IdentifierContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 188, SolidityParser.RULE_identifier);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1122;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(_la === SolidityParser.T__13 || _la === SolidityParser.T__24 || _la === SolidityParser.T__41 || _la === SolidityParser.T__53 || ((((_la - 96)) & ~0x1F) === 0 && ((1 << (_la - 96)) & ((1 << (SolidityParser.T__95 - 96)) | (1 << (SolidityParser.LeaveKeyword - 96)) | (1 << (SolidityParser.PayableKeyword - 96)) | (1 << (SolidityParser.ConstructorKeyword - 96)))) !== 0) || _la === SolidityParser.ReceiveKeyword || _la === SolidityParser.Identifier)) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic hexLiteral(): HexLiteralContext {\n\t\tlet _localctx: HexLiteralContext = new HexLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 190, SolidityParser.RULE_hexLiteral);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1125;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = 1;\n\t\t\tdo {\n\t\t\t\tswitch (_alt) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1124;\n\t\t\t\t\tthis.match(SolidityParser.HexLiteralFragment);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\tthis.state = 1127;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 123, this._ctx);\n\t\t\t} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic overrideSpecifier(): OverrideSpecifierContext {\n\t\tlet _localctx: OverrideSpecifierContext = new OverrideSpecifierContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 192, SolidityParser.RULE_overrideSpecifier);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1129;\n\t\t\tthis.match(SolidityParser.T__96);\n\t\t\tthis.state = 1141;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityParser.T__22) {\n\t\t\t\t{\n\t\t\t\tthis.state = 1130;\n\t\t\t\tthis.match(SolidityParser.T__22);\n\t\t\t\tthis.state = 1131;\n\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\tthis.state = 1136;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\twhile (_la === SolidityParser.T__15) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1132;\n\t\t\t\t\tthis.match(SolidityParser.T__15);\n\t\t\t\t\tthis.state = 1133;\n\t\t\t\t\tthis.userDefinedTypeName();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.state = 1138;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t}\n\t\t\t\tthis.state = 1139;\n\t\t\t\tthis.match(SolidityParser.T__23);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic stringLiteral(): StringLiteralContext {\n\t\tlet _localctx: StringLiteralContext = new StringLiteralContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 194, SolidityParser.RULE_stringLiteral);\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 1144;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = 1;\n\t\t\tdo {\n\t\t\t\tswitch (_alt) {\n\t\t\t\tcase 1:\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 1143;\n\t\t\t\t\tthis.match(SolidityParser.StringLiteralFragment);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t}\n\t\t\t\tthis.state = 1146;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 126, this._ctx);\n\t\t\t} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean {\n\t\tswitch (ruleIndex) {\n\t\tcase 36:\n\t\t\treturn this.typeName_sempred(_localctx as TypeNameContext, predIndex);\n\n\t\tcase 66:\n\t\t\treturn this.expression_sempred(_localctx as ExpressionContext, predIndex);\n\t\t}\n\t\treturn true;\n\t}\n\tprivate typeName_sempred(_localctx: TypeNameContext, predIndex: number): boolean {\n\t\tswitch (predIndex) {\n\t\tcase 0:\n\t\t\treturn this.precpred(this._ctx, 3);\n\t\t}\n\t\treturn true;\n\t}\n\tprivate expression_sempred(_localctx: ExpressionContext, predIndex: number): boolean {\n\t\tswitch (predIndex) {\n\t\tcase 1:\n\t\t\treturn this.precpred(this._ctx, 14);\n\n\t\tcase 2:\n\t\t\treturn this.precpred(this._ctx, 13);\n\n\t\tcase 3:\n\t\t\treturn this.precpred(this._ctx, 12);\n\n\t\tcase 4:\n\t\t\treturn this.precpred(this._ctx, 11);\n\n\t\tcase 5:\n\t\t\treturn this.precpred(this._ctx, 10);\n\n\t\tcase 6:\n\t\t\treturn this.precpred(this._ctx, 9);\n\n\t\tcase 7:\n\t\t\treturn this.precpred(this._ctx, 8);\n\n\t\tcase 8:\n\t\t\treturn this.precpred(this._ctx, 7);\n\n\t\tcase 9:\n\t\t\treturn this.precpred(this._ctx, 6);\n\n\t\tcase 10:\n\t\t\treturn this.precpred(this._ctx, 5);\n\n\t\tcase 11:\n\t\t\treturn this.precpred(this._ctx, 4);\n\n\t\tcase 12:\n\t\t\treturn this.precpred(this._ctx, 3);\n\n\t\tcase 13:\n\t\t\treturn this.precpred(this._ctx, 2);\n\n\t\tcase 14:\n\t\t\treturn this.precpred(this._ctx, 27);\n\n\t\tcase 15:\n\t\t\treturn this.precpred(this._ctx, 25);\n\n\t\tcase 16:\n\t\t\treturn this.precpred(this._ctx, 24);\n\n\t\tcase 17:\n\t\t\treturn this.precpred(this._ctx, 23);\n\n\t\tcase 18:\n\t\t\treturn this.precpred(this._ctx, 22);\n\n\t\tcase 19:\n\t\t\treturn this.precpred(this._ctx, 21);\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate static readonly _serializedATNSegments: number = 3;\n\tprivate static readonly _serializedATNSegment0: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x03\\x88\\u047F\\x04\" +\n\t\t\"\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\\x04\" +\n\t\t\"\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x04\\n\\t\\n\\x04\\v\\t\\v\\x04\\f\\t\\f\\x04\\r\\t\\r\" +\n\t\t\"\\x04\\x0E\\t\\x0E\\x04\\x0F\\t\\x0F\\x04\\x10\\t\\x10\\x04\\x11\\t\\x11\\x04\\x12\\t\\x12\" +\n\t\t\"\\x04\\x13\\t\\x13\\x04\\x14\\t\\x14\\x04\\x15\\t\\x15\\x04\\x16\\t\\x16\\x04\\x17\\t\\x17\" +\n\t\t\"\\x04\\x18\\t\\x18\\x04\\x19\\t\\x19\\x04\\x1A\\t\\x1A\\x04\\x1B\\t\\x1B\\x04\\x1C\\t\\x1C\" +\n\t\t\"\\x04\\x1D\\t\\x1D\\x04\\x1E\\t\\x1E\\x04\\x1F\\t\\x1F\\x04 \\t \\x04!\\t!\\x04\\\"\\t\\\"\\x04\" +\n\t\t\"#\\t#\\x04$\\t$\\x04%\\t%\\x04&\\t&\\x04\\'\\t\\'\\x04(\\t(\\x04)\\t)\\x04*\\t*\\x04+\\t\" +\n\t\t\"+\\x04,\\t,\\x04-\\t-\\x04.\\t.\\x04/\\t/\\x040\\t0\\x041\\t1\\x042\\t2\\x043\\t3\\x04\" +\n\t\t\"4\\t4\\x045\\t5\\x046\\t6\\x047\\t7\\x048\\t8\\x049\\t9\\x04:\\t:\\x04;\\t;\\x04<\\t<\\x04\" +\n\t\t\"=\\t=\\x04>\\t>\\x04?\\t?\\x04@\\t@\\x04A\\tA\\x04B\\tB\\x04C\\tC\\x04D\\tD\\x04E\\tE\\x04\" +\n\t\t\"F\\tF\\x04G\\tG\\x04H\\tH\\x04I\\tI\\x04J\\tJ\\x04K\\tK\\x04L\\tL\\x04M\\tM\\x04N\\tN\\x04\" +\n\t\t\"O\\tO\\x04P\\tP\\x04Q\\tQ\\x04R\\tR\\x04S\\tS\\x04T\\tT\\x04U\\tU\\x04V\\tV\\x04W\\tW\\x04\" +\n\t\t\"X\\tX\\x04Y\\tY\\x04Z\\tZ\\x04[\\t[\\x04\\\\\\t\\\\\\x04]\\t]\\x04^\\t^\\x04_\\t_\\x04`\\t\" +\n\t\t\"`\\x04a\\ta\\x04b\\tb\\x04c\\tc\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\" +\n\t\t\"\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x07\\x02\\xD1\\n\\x02\\f\\x02\\x0E\\x02\\xD4\" +\n\t\t\"\\v\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x04\" +\n\t\t\"\\x03\\x04\\x03\\x05\\x03\\x05\\x03\\x05\\x05\\x05\\xE2\\n\\x05\\x03\\x06\\x03\\x06\\x05\" +\n\t\t\"\\x06\\xE6\\n\\x06\\x03\\x06\\x07\\x06\\xE9\\n\\x06\\f\\x06\\x0E\\x06\\xEC\\v\\x06\\x03\\x07\" +\n\t\t\"\\x03\\x07\\x03\\b\\x05\\b\\xF1\\n\\b\\x03\\b\\x03\\b\\x05\\b\\xF5\\n\\b\\x03\\b\\x05\\b\\xF8\" +\n\t\t\"\\n\\b\\x03\\t\\x03\\t\\x03\\t\\x05\\t\\xFD\\n\\t\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x05\\n\\u0103\" +\n\t\t\"\\n\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x05\\n\\u010A\\n\\n\\x03\\n\\x03\\n\\x05\\n\\u010E\" +\n\t\t\"\\n\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x07\\n\\u0119\" +\n\t\t\"\\n\\n\\f\\n\\x0E\\n\\u011C\\v\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x05\\n\\u0123\\n\\n\" +\n\t\t\"\\x03\\v\\x03\\v\\x03\\f\\x05\\f\\u0128\\n\\f\\x03\\f\\x03\\f\\x03\\f\\x03\\f\\x03\\f\\x03\\f\" +\n\t\t\"\\x07\\f\\u0130\\n\\f\\f\\f\\x0E\\f\\u0133\\v\\f\\x05\\f\\u0135\\n\\f\\x03\\f\\x03\\f\\x07\\f\" +\n\t\t\"\\u0139\\n\\f\\f\\f\\x0E\\f\\u013C\\v\\f\\x03\\f\\x03\\f\\x03\\r\\x03\\r\\x03\\r\\x05\\r\\u0143\" +\n\t\t\"\\n\\r\\x03\\r\\x05\\r\\u0146\\n\\r\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\" +\n\t\t\"\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x05\\x0E\\u0151\\n\\x0E\\x03\\x0F\\x03\\x0F\\x03\\x0F\" +\n\t\t\"\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x07\\x0F\\u015A\\n\\x0F\\f\\x0F\\x0E\\x0F\\u015D\" +\n\t\t\"\\v\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x05\\x0F\\u0162\\n\\x0F\\x03\\x0F\\x03\\x0F\\x03\" +\n\t\t\"\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x10\\x03\\x11\\x03\\x11\\x03\" +\n\t\t\"\\x11\\x03\\x11\\x03\\x11\\x03\\x12\\x03\\x12\\x03\\x12\\x03\\x12\\x03\\x12\\x03\\x12\\x03\" +\n\t\t\"\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x03\\x13\\x05\\x13\\u017D\\n\\x13\\x03\\x13\\x05\\x13\" +\n\t\t\"\\u0180\\n\\x13\\x03\\x13\\x03\\x13\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x03\\x14\\x07\" +\n\t\t\"\\x14\\u0189\\n\\x14\\f\\x14\\x0E\\x14\\u018C\\v\\x14\\x03\\x14\\x03\\x14\\x05\\x14\\u0190\" +\n\t\t\"\\n\\x14\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\\x03\\x15\" +\n\t\t\"\\x07\\x15\\u019A\\n\\x15\\f\\x15\\x0E\\x15\\u019D\\v\\x15\\x05\\x15\\u019F\\n\\x15\\x03\" +\n\t\t\"\\x15\\x03\\x15\\x03\\x16\\x03\\x16\\x03\\x16\\x05\\x16\\u01A6\\n\\x16\\x03\\x16\\x03\\x16\" +\n\t\t\"\\x07\\x16\\u01AA\\n\\x16\\f\\x16\\x0E\\x16\\u01AD\\v\\x16\\x03\\x16\\x03\\x16\\x05\\x16\" +\n\t\t\"\\u01B1\\n\\x16\\x03\\x17\\x03\\x17\\x03\\x17\\x05\\x17\\u01B6\\n\\x17\\x03\\x17\\x05\\x17\" +\n\t\t\"\\u01B9\\n\\x17\\x03\\x18\\x03\\x18\\x03\\x18\\x03\\x18\\x05\\x18\\u01BF\\n\\x18\\x03\\x18\" +\n\t\t\"\\x03\\x18\\x05\\x18\\u01C3\\n\\x18\\x03\\x19\\x03\\x19\\x05\\x19\\u01C7\\n\\x19\\x03\\x19\" +\n\t\t\"\\x03\\x19\\x03\\x19\\x05\\x19\\u01CC\\n\\x19\\x03\\x1A\\x03\\x1A\\x03\\x1A\\x03\\x1B\\x03\" +\n\t\t\"\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x03\\x1B\\x07\\x1B\\u01D9\\n\\x1B\" +\n\t\t\"\\f\\x1B\\x0E\\x1B\\u01DC\\v\\x1B\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1C\\x05\\x1C\\u01E2\" +\n\t\t\"\\n\\x1C\\x03\\x1C\\x03\\x1C\\x03\\x1D\\x03\\x1D\\x03\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1E\" +\n\t\t\"\\x05\\x1E\\u01EC\\n\\x1E\\x03\\x1E\\x03\\x1E\\x07\\x1E\\u01F0\\n\\x1E\\f\\x1E\\x0E\\x1E\" +\n\t\t\"\\u01F3\\v\\x1E\\x03\\x1E\\x03\\x1E\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x03\\x1F\\x07\\x1F\\u01FB\" +\n\t\t\"\\n\\x1F\\f\\x1F\\x0E\\x1F\\u01FE\\v\\x1F\\x05\\x1F\\u0200\\n\\x1F\\x03\\x1F\\x03\\x1F\\x03\" +\n\t\t\" \\x03 \\x05 \\u0206\\n \\x03 \\x05 \\u0209\\n \\x03!\\x03!\\x03!\\x03!\\x07!\\u020F\" +\n\t\t\"\\n!\\f!\\x0E!\\u0212\\v!\\x05!\\u0214\\n!\\x03!\\x03!\\x03\\\"\\x03\\\"\\x05\\\"\\u021A\\n\" +\n\t\t\"\\\"\\x03\\\"\\x05\\\"\\u021D\\n\\\"\\x03#\\x03#\\x03#\\x03#\\x07#\\u0223\\n#\\f#\\x0E#\\u0226\" +\n\t\t\"\\v#\\x05#\\u0228\\n#\\x03#\\x03#\\x03$\\x03$\\x05$\\u022E\\n$\\x03%\\x03%\\x05%\\u0232\" +\n\t\t\"\\n%\\x03%\\x03%\\x03&\\x03&\\x03&\\x03&\\x03&\\x03&\\x03&\\x05&\\u023D\\n&\\x03&\\x03\" +\n\t\t\"&\\x03&\\x05&\\u0242\\n&\\x03&\\x07&\\u0245\\n&\\f&\\x0E&\\u0248\\v&\\x03\\'\\x03\\'\\x03\" +\n\t\t\"\\'\\x07\\'\\u024D\\n\\'\\f\\'\\x0E\\'\\u0250\\v\\'\\x03(\\x03(\\x05(\\u0254\\n(\\x03)\\x03\" +\n\t\t\")\\x03)\\x03)\\x03)\\x03)\\x03)\\x03*\\x03*\\x03*\\x03*\\x03*\\x07*\\u0262\\n*\\f*\\x0E\" +\n\t\t\"*\\u0265\\v*\\x03*\\x03*\\x05*\\u0269\\n*\\x03+\\x03+\\x03,\\x03,\\x03-\\x03-\\x07-\" +\n\t\t\"\\u0271\\n-\\f-\\x0E-\\u0274\\v-\\x03-\\x03-\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x03\" +\n\t\t\".\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x03.\\x05.\\u0287\\n.\\x03/\\x03/\\x03\" +\n\t\t\"/\\x030\\x030\\x030\\x030\\x030\\x030\\x030\\x050\\u0293\\n0\\x031\\x031\\x031\\x05\" +\n\t\t\"1\\u0298\\n1\\x031\\x031\\x061\\u029C\\n1\\r1\\x0E1\\u029D\\x032\\x032\\x052\\u02A2\" +\n\t\t\"\\n2\\x032\\x052\\u02A5\\n2\\x032\\x032\\x033\\x033\\x033\\x033\\x033\\x033\\x034\\x03\" +\n\t\t\"4\\x054\\u02B1\\n4\\x035\\x035\\x035\\x036\\x036\\x036\\x036\\x056\\u02BA\\n6\\x036\" +\n\t\t\"\\x036\\x056\\u02BE\\n6\\x036\\x056\\u02C1\\n6\\x036\\x036\\x036\\x037\\x037\\x057\\u02C8\" +\n\t\t\"\\n7\\x037\\x037\\x037\\x037\\x057\\u02CE\\n7\\x037\\x037\\x038\\x038\\x039\\x039\\x03\" +\n\t\t\"9\\x039\\x039\\x039\\x039\\x039\\x03:\\x03:\\x03:\\x03;\\x03;\\x03;\\x03<\\x03<\\x05\" +\n\t\t\"<\\u02E4\\n<\\x03<\\x03<\\x03=\\x03=\\x03=\\x03>\\x03>\\x03>\\x03>\\x03?\\x03?\\x03\" +\n\t\t\"?\\x03?\\x03@\\x03@\\x03@\\x03@\\x03@\\x03@\\x03@\\x05@\\u02FA\\n@\\x03@\\x03@\\x05\" +\n\t\t\"@\\u02FE\\n@\\x03@\\x03@\\x03A\\x05A\\u0303\\nA\\x03A\\x03A\\x05A\\u0307\\nA\\x07A\\u0309\" +\n\t\t\"\\nA\\fA\\x0EA\\u030C\\vA\\x03B\\x03B\\x05B\\u0310\\nB\\x03B\\x07B\\u0313\\nB\\fB\\x0E\" +\n\t\t\"B\\u0316\\vB\\x03B\\x05B\\u0319\\nB\\x03B\\x03B\\x03C\\x03C\\x03D\\x03D\\x03D\\x03D\" +\n\t\t\"\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x05D\\u0331\\nD\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03\" +\n\t\t\"D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x05\" +\n\t\t\"D\\u0367\\nD\\x03D\\x03D\\x05D\\u036B\\nD\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\" +\n\t\t\"\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x03D\\x07D\\u037B\\nD\\fD\\x0ED\\u037E\\vD\\x03\" +\n\t\t\"E\\x03E\\x03E\\x03E\\x03E\\x03E\\x03E\\x03E\\x03E\\x05E\\u0389\\nE\\x03F\\x03F\\x03\" +\n\t\t\"F\\x07F\\u038E\\nF\\fF\\x0EF\\u0391\\vF\\x03G\\x03G\\x03G\\x07G\\u0396\\nG\\fG\\x0EG\" +\n\t\t\"\\u0399\\vG\\x03G\\x05G\\u039C\\nG\\x03H\\x03H\\x03H\\x03H\\x03I\\x03I\\x05I\\u03A4\" +\n\t\t\"\\nI\\x03I\\x03I\\x05I\\u03A8\\nI\\x05I\\u03AA\\nI\\x03J\\x03J\\x03J\\x03J\\x03J\\x03\" +\n\t\t\"K\\x03K\\x07K\\u03B3\\nK\\fK\\x0EK\\u03B6\\vK\\x03K\\x03K\\x03L\\x03L\\x03L\\x03L\\x03\" +\n\t\t\"L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x03L\\x05\" +\n\t\t\"L\\u03CC\\nL\\x03M\\x03M\\x03M\\x05M\\u03D1\\nM\\x03N\\x03N\\x03N\\x03N\\x03O\\x03O\" +\n\t\t\"\\x03O\\x03O\\x05O\\u03DB\\nO\\x03O\\x03O\\x05O\\u03DF\\nO\\x03O\\x03O\\x07O\\u03E3\" +\n\t\t\"\\nO\\fO\\x0EO\\u03E6\\vO\\x03O\\x05O\\u03E9\\nO\\x03P\\x03P\\x03P\\x03P\\x05P\\u03EF\" +\n\t\t\"\\nP\\x03Q\\x03Q\\x03Q\\x03Q\\x03R\\x03R\\x03R\\x03R\\x03R\\x03R\\x05R\\u03FB\\nR\\x03\" +\n\t\t\"S\\x03S\\x03S\\x07S\\u0400\\nS\\fS\\x0ES\\u0403\\vS\\x03T\\x03T\\x03T\\x03T\\x03U\\x03\" +\n\t\t\"U\\x03U\\x03V\\x03V\\x03V\\x07V\\u040F\\nV\\fV\\x0EV\\u0412\\vV\\x03W\\x03W\\x03W\\x03\" +\n\t\t\"W\\x03W\\x03W\\x05W\\u041A\\nW\\x03X\\x03X\\x03X\\x03X\\x05X\\u0420\\nX\\x03X\\x03X\" +\n\t\t\"\\x05X\\u0424\\nX\\x03X\\x03X\\x03Y\\x03Y\\x03Y\\x03Z\\x03Z\\x03Z\\x05Z\\u042E\\nZ\\x03\" +\n\t\t\"Z\\x03Z\\x03Z\\x05Z\\u0433\\nZ\\x03Z\\x03Z\\x03[\\x03[\\x03[\\x03[\\x03\\\\\\x03\\\\\\x03\" +\n\t\t\"\\\\\\x03\\\\\\x05\\\\\\u043F\\n\\\\\\x03]\\x03]\\x03]\\x03]\\x03^\\x03^\\x05^\\u0447\\n^\\x03\" +\n\t\t\"^\\x03^\\x05^\\u044B\\n^\\x07^\\u044D\\n^\\f^\\x0E^\\u0450\\v^\\x03^\\x03^\\x03^\\x03\" +\n\t\t\"^\\x03^\\x07^\\u0457\\n^\\f^\\x0E^\\u045A\\v^\\x05^\\u045C\\n^\\x03^\\x05^\\u045F\\n\" +\n\t\t\"^\\x03_\\x03_\\x05_\\u0463\\n_\\x03`\\x03`\\x03a\\x06a\\u0468\\na\\ra\\x0Ea\\u0469\\x03\" +\n\t\t\"b\\x03b\\x03b\\x03b\\x03b\\x07b\\u0471\\nb\\fb\\x0Eb\\u0474\\vb\\x03b\\x03b\\x05b\\u0478\" +\n\t\t\"\\nb\\x03c\\x06c\\u047B\\nc\\rc\\x0Ec\\u047C\\x03c\\x02\\x02\\x04J\\x86d\\x02\\x02\\x04\" +\n\t\t\"\\x02\\x06\\x02\\b\\x02\\n\\x02\\f\\x02\\x0E\\x02\\x10\\x02\\x12\\x02\\x14\\x02\\x16\\x02\" +\n\t\t\"\\x18\\x02\\x1A\\x02\\x1C\\x02\\x1E\\x02 \\x02\\\"\\x02$\\x02&\\x02(\\x02*\\x02,\\x02.\" +\n\t\t\"\\x020\\x022\\x024\\x026\\x028\\x02:\\x02<\\x02>\\x02@\\x02B\\x02D\\x02F\\x02H\\x02\" +\n\t\t\"J\\x02L\\x02N\\x02P\\x02R\\x02T\\x02V\\x02X\\x02Z\\x02\\\\\\x02^\\x02`\\x02b\\x02d\\x02\" +\n\t\t\"f\\x02h\\x02j\\x02l\\x02n\\x02p\\x02r\\x02t\\x02v\\x02x\\x02z\\x02|\\x02~\\x02\\x80\" +\n\t\t\"\\x02\\x82\\x02\\x84\\x02\\x86\\x02\\x88\\x02\\x8A\\x02\\x8C\\x02\\x8E\\x02\\x90\\x02\\x92\" +\n\t\t\"\\x02\\x94\\x02\\x96\\x02\\x98\\x02\\x9A\\x02\\x9C\\x02\\x9E\\x02\\xA0\\x02\\xA2\\x02\\xA4\" +\n\t\t\"\\x02\\xA6\\x02\\xA8\\x02\\xAA\\x02\\xAC\\x02\\xAE\\x02\\xB0\\x02\\xB2\\x02\\xB4\\x02\\xB6\" +\n\t\t\"\\x02\\xB8\\x02\\xBA\\x02\\xBC\\x02\\xBE\\x02\\xC0\\x02\\xC2\\x02\\xC4\\x02\\x02\\x11\\x03\" +\n\t\t\"\\x02\\x07\\r\\x03\\x02\\x15\\x17\\x03\\x02*,\\x06\\x02qqxx||~~\\x05\\x02&&9\\x03\\x02AB\\x03\\x02CD\\x04\\x02\\x05\\x05GH\\x03\\x02IJ\\x03\\x02\\t\\f\\x03\" +\n\t\t\"\\x02MN\\x04\\x02\\r\\rQZ\\x03\\x02jk\\v\\x02\\x10\\x10\\x1B\\x1B,,88bbttxx\\x80\\x80\" +\n\t\t\"\\x82\\x83\\x02\\u04FE\\x02\\xD2\\x03\\x02\\x02\\x02\\x04\\xD7\\x03\\x02\\x02\\x02\\x06\" +\n\t\t\"\\xDC\\x03\\x02\\x02\\x02\\b\\xE1\\x03\\x02\\x02\\x02\\n\\xE3\\x03\\x02\\x02\\x02\\f\\xED\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x0E\\xF7\\x03\\x02\\x02\\x02\\x10\\xF9\\x03\\x02\\x02\\x02\\x12\\u0122\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x14\\u0124\\x03\\x02\\x02\\x02\\x16\\u0127\\x03\\x02\\x02\\x02\\x18\" +\n\t\t\"\\u013F\\x03\\x02\\x02\\x02\\x1A\\u0150\\x03\\x02\\x02\\x02\\x1C\\u0152\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x1E\\u0165\\x03\\x02\\x02\\x02 \\u016C\\x03\\x02\\x02\\x02\\\"\\u0171\\x03\\x02\" +\n\t\t\"\\x02\\x02$\\u0177\\x03\\x02\\x02\\x02&\\u018F\\x03\\x02\\x02\\x02(\\u0191\\x03\\x02\" +\n\t\t\"\\x02\\x02*\\u01A2\\x03\\x02\\x02\\x02,\\u01B2\\x03\\x02\\x02\\x02.\\u01BA\\x03\\x02\" +\n\t\t\"\\x02\\x020\\u01CB\\x03\\x02\\x02\\x022\\u01CD\\x03\\x02\\x02\\x024\\u01DA\\x03\\x02\" +\n\t\t\"\\x02\\x026\\u01DD\\x03\\x02\\x02\\x028\\u01E5\\x03\\x02\\x02\\x02:\\u01E7\\x03\\x02\" +\n\t\t\"\\x02\\x02<\\u01F6\\x03\\x02\\x02\\x02>\\u0203\\x03\\x02\\x02\\x02@\\u020A\\x03\\x02\" +\n\t\t\"\\x02\\x02B\\u0217\\x03\\x02\\x02\\x02D\\u021E\\x03\\x02\\x02\\x02F\\u022B\\x03\\x02\" +\n\t\t\"\\x02\\x02H\\u022F\\x03\\x02\\x02\\x02J\\u023C\\x03\\x02\\x02\\x02L\\u0249\\x03\\x02\" +\n\t\t\"\\x02\\x02N\\u0253\\x03\\x02\\x02\\x02P\\u0255\\x03\\x02\\x02\\x02R\\u025C\\x03\\x02\" +\n\t\t\"\\x02\\x02T\\u026A\\x03\\x02\\x02\\x02V\\u026C\\x03\\x02\\x02\\x02X\\u026E\\x03\\x02\" +\n\t\t\"\\x02\\x02Z\\u0286\\x03\\x02\\x02\\x02\\\\\\u0288\\x03\\x02\\x02\\x02^\\u028B\\x03\\x02\" +\n\t\t\"\\x02\\x02`\\u0294\\x03\\x02\\x02\\x02b\\u029F\\x03\\x02\\x02\\x02d\\u02A8\\x03\\x02\" +\n\t\t\"\\x02\\x02f\\u02B0\\x03\\x02\\x02\\x02h\\u02B2\\x03\\x02\\x02\\x02j\\u02B5\\x03\\x02\" +\n\t\t\"\\x02\\x02l\\u02C5\\x03\\x02\\x02\\x02n\\u02D1\\x03\\x02\\x02\\x02p\\u02D3\\x03\\x02\" +\n\t\t\"\\x02\\x02r\\u02DB\\x03\\x02\\x02\\x02t\\u02DE\\x03\\x02\\x02\\x02v\\u02E1\\x03\\x02\" +\n\t\t\"\\x02\\x02x\\u02E7\\x03\\x02\\x02\\x02z\\u02EA\\x03\\x02\\x02\\x02|\\u02EE\\x03\\x02\" +\n\t\t\"\\x02\\x02~\\u02F9\\x03\\x02\\x02\\x02\\x80\\u0302\\x03\\x02\\x02\\x02\\x82\\u030D\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x84\\u031C\\x03\\x02\\x02\\x02\\x86\\u0330\\x03\\x02\\x02\\x02\\x88\\u0388\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x8A\\u038A\\x03\\x02\\x02\\x02\\x8C\\u0392\\x03\\x02\\x02\\x02\\x8E\" +\n\t\t\"\\u039D\\x03\\x02\\x02\\x02\\x90\\u03A9\\x03\\x02\\x02\\x02\\x92\\u03AB\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x94\\u03B0\\x03\\x02\\x02\\x02\\x96\\u03CB\\x03\\x02\\x02\\x02\\x98\\u03D0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x9A\\u03D2\\x03\\x02\\x02\\x02\\x9C\\u03DA\\x03\\x02\\x02\\x02\\x9E\\u03EA\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA0\\u03F0\\x03\\x02\\x02\\x02\\xA2\\u03FA\\x03\\x02\\x02\\x02\\xA4\" +\n\t\t\"\\u03FC\\x03\\x02\\x02\\x02\\xA6\\u0404\\x03\\x02\\x02\\x02\\xA8\\u0408\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xAA\\u040B\\x03\\x02\\x02\\x02\\xAC\\u0419\\x03\\x02\\x02\\x02\\xAE\\u041B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xB0\\u0427\\x03\\x02\\x02\\x02\\xB2\\u042A\\x03\\x02\\x02\\x02\\xB4\\u0436\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xB6\\u043E\\x03\\x02\\x02\\x02\\xB8\\u0440\\x03\\x02\\x02\\x02\\xBA\" +\n\t\t\"\\u045E\\x03\\x02\\x02\\x02\\xBC\\u0460\\x03\\x02\\x02\\x02\\xBE\\u0464\\x03\\x02\\x02\" +\n\t\t\"\\x02\\xC0\\u0467\\x03\\x02\\x02\\x02\\xC2\\u046B\\x03\\x02\\x02\\x02\\xC4\\u047A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xC6\\xD1\\x05\\x04\\x03\\x02\\xC7\\xD1\\x05\\x12\\n\\x02\\xC8\\xD1\\x05\" +\n\t\t\"\\x16\\f\\x02\\xC9\\xD1\\x05:\\x1E\\x02\\xCA\\xD1\\x05(\\x15\\x02\\xCB\\xD1\\x05.\\x18\" +\n\t\t\"\\x02\\xCC\\xD1\\x05\\x1E\\x10\\x02\\xCD\\xD1\\x05 \\x11\\x02\\xCE\\xD1\\x05\\\"\\x12\\x02\" +\n\t\t\"\\xCF\\xD1\\x05$\\x13\\x02\\xD0\\xC6\\x03\\x02\\x02\\x02\\xD0\\xC7\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD0\\xC8\\x03\\x02\\x02\\x02\\xD0\\xC9\\x03\\x02\\x02\\x02\\xD0\\xCA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD0\\xCB\\x03\\x02\\x02\\x02\\xD0\\xCC\\x03\\x02\\x02\\x02\\xD0\\xCD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD0\\xCE\\x03\\x02\\x02\\x02\\xD0\\xCF\\x03\\x02\\x02\\x02\\xD1\\xD4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD2\\xD0\\x03\\x02\\x02\\x02\\xD2\\xD3\\x03\\x02\\x02\\x02\\xD3\\xD5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD4\\xD2\\x03\\x02\\x02\\x02\\xD5\\xD6\\x07\\x02\\x02\\x03\\xD6\\x03\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xD7\\xD8\\x07\\x03\\x02\\x02\\xD8\\xD9\\x05\\x06\\x04\\x02\\xD9\\xDA\\x05\\b\\x05\\x02\" +\n\t\t\"\\xDA\\xDB\\x07\\x04\\x02\\x02\\xDB\\x05\\x03\\x02\\x02\\x02\\xDC\\xDD\\x05\\xBE`\\x02\" +\n\t\t\"\\xDD\\x07\\x03\\x02\\x02\\x02\\xDE\\xE2\\x07\\x05\\x02\\x02\\xDF\\xE2\\x05\\n\\x06\\x02\" +\n\t\t\"\\xE0\\xE2\\x05\\x86D\\x02\\xE1\\xDE\\x03\\x02\\x02\\x02\\xE1\\xDF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xE1\\xE0\\x03\\x02\\x02\\x02\\xE2\\t\\x03\\x02\\x02\\x02\\xE3\\xEA\\x05\\x0E\\b\\x02\\xE4\" +\n\t\t\"\\xE6\\x07\\x06\\x02\\x02\\xE5\\xE4\\x03\\x02\\x02\\x02\\xE5\\xE6\\x03\\x02\\x02\\x02\\xE6\" +\n\t\t\"\\xE7\\x03\\x02\\x02\\x02\\xE7\\xE9\\x05\\x0E\\b\\x02\\xE8\\xE5\\x03\\x02\\x02\\x02\\xE9\" +\n\t\t\"\\xEC\\x03\\x02\\x02\\x02\\xEA\\xE8\\x03\\x02\\x02\\x02\\xEA\\xEB\\x03\\x02\\x02\\x02\\xEB\" +\n\t\t\"\\v\\x03\\x02\\x02\\x02\\xEC\\xEA\\x03\\x02\\x02\\x02\\xED\\xEE\\t\\x02\\x02\\x02\\xEE\\r\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xEF\\xF1\\x05\\f\\x07\\x02\\xF0\\xEF\\x03\\x02\\x02\\x02\\xF0\\xF1\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF1\\xF2\\x03\\x02\\x02\\x02\\xF2\\xF8\\x07\\x85\\x02\\x02\\xF3\\xF5\" +\n\t\t\"\\x05\\f\\x07\\x02\\xF4\\xF3\\x03\\x02\\x02\\x02\\xF4\\xF5\\x03\\x02\\x02\\x02\\xF5\\xF6\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF6\\xF8\\x07j\\x02\\x02\\xF7\\xF0\\x03\\x02\\x02\\x02\\xF7\\xF4\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xF8\\x0F\\x03\\x02\\x02\\x02\\xF9\\xFC\\x05\\xBE`\\x02\\xFA\\xFB\" +\n\t\t\"\\x07\\x0E\\x02\\x02\\xFB\\xFD\\x05\\xBE`\\x02\\xFC\\xFA\\x03\\x02\\x02\\x02\\xFC\\xFD\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xFD\\x11\\x03\\x02\\x02\\x02\\xFE\\xFF\\x07\\x0F\\x02\\x02\\xFF\\u0102\" +\n\t\t\"\\x05\\x14\\v\\x02\\u0100\\u0101\\x07\\x0E\\x02\\x02\\u0101\\u0103\\x05\\xBE`\\x02\\u0102\" +\n\t\t\"\\u0100\\x03\\x02\\x02\\x02\\u0102\\u0103\\x03\\x02\\x02\\x02\\u0103\\u0104\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0104\\u0105\\x07\\x04\\x02\\x02\\u0105\\u0123\\x03\\x02\\x02\\x02\\u0106\" +\n\t\t\"\\u0109\\x07\\x0F\\x02\\x02\\u0107\\u010A\\x07\\x05\\x02\\x02\\u0108\\u010A\\x05\\xBE\" +\n\t\t\"`\\x02\\u0109\\u0107\\x03\\x02\\x02\\x02\\u0109\\u0108\\x03\\x02\\x02\\x02\\u010A\\u010D\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u010B\\u010C\\x07\\x0E\\x02\\x02\\u010C\\u010E\\x05\\xBE`\\x02\" +\n\t\t\"\\u010D\\u010B\\x03\\x02\\x02\\x02\\u010D\\u010E\\x03\\x02\\x02\\x02\\u010E\\u010F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u010F\\u0110\\x07\\x10\\x02\\x02\\u0110\\u0111\\x05\\x14\\v\\x02\\u0111\" +\n\t\t\"\\u0112\\x07\\x04\\x02\\x02\\u0112\\u0123\\x03\\x02\\x02\\x02\\u0113\\u0114\\x07\\x0F\" +\n\t\t\"\\x02\\x02\\u0114\\u0115\\x07\\x11\\x02\\x02\\u0115\\u011A\\x05\\x10\\t\\x02\\u0116\\u0117\" +\n\t\t\"\\x07\\x12\\x02\\x02\\u0117\\u0119\\x05\\x10\\t\\x02\\u0118\\u0116\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0119\\u011C\\x03\\x02\\x02\\x02\\u011A\\u0118\\x03\\x02\\x02\\x02\\u011A\\u011B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u011B\\u011D\\x03\\x02\\x02\\x02\\u011C\\u011A\\x03\\x02\\x02\\x02\\u011D\" +\n\t\t\"\\u011E\\x07\\x13\\x02\\x02\\u011E\\u011F\\x07\\x10\\x02\\x02\\u011F\\u0120\\x05\\x14\" +\n\t\t\"\\v\\x02\\u0120\\u0121\\x07\\x04\\x02\\x02\\u0121\\u0123\\x03\\x02\\x02\\x02\\u0122\\xFE\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0122\\u0106\\x03\\x02\\x02\\x02\\u0122\\u0113\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0123\\x13\\x03\\x02\\x02\\x02\\u0124\\u0125\\x07\\x84\\x02\\x02\\u0125\\x15\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0126\\u0128\\x07\\x14\\x02\\x02\\u0127\\u0126\\x03\\x02\\x02\\x02\\u0127\" +\n\t\t\"\\u0128\\x03\\x02\\x02\\x02\\u0128\\u0129\\x03\\x02\\x02\\x02\\u0129\\u012A\\t\\x03\\x02\" +\n\t\t\"\\x02\\u012A\\u0134\\x05\\xBE`\\x02\\u012B\\u012C\\x07\\x18\\x02\\x02\\u012C\\u0131\" +\n\t\t\"\\x05\\x18\\r\\x02\\u012D\\u012E\\x07\\x12\\x02\\x02\\u012E\\u0130\\x05\\x18\\r\\x02\\u012F\" +\n\t\t\"\\u012D\\x03\\x02\\x02\\x02\\u0130\\u0133\\x03\\x02\\x02\\x02\\u0131\\u012F\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0131\\u0132\\x03\\x02\\x02\\x02\\u0132\\u0135\\x03\\x02\\x02\\x02\\u0133\" +\n\t\t\"\\u0131\\x03\\x02\\x02\\x02\\u0134\\u012B\\x03\\x02\\x02\\x02\\u0134\\u0135\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0135\\u0136\\x03\\x02\\x02\\x02\\u0136\\u013A\\x07\\x11\\x02\\x02\\u0137\" +\n\t\t\"\\u0139\\x05\\x1A\\x0E\\x02\\u0138\\u0137\\x03\\x02\\x02\\x02\\u0139\\u013C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u013A\\u0138\\x03\\x02\\x02\\x02\\u013A\\u013B\\x03\\x02\\x02\\x02\\u013B\" +\n\t\t\"\\u013D\\x03\\x02\\x02\\x02\\u013C\\u013A\\x03\\x02\\x02\\x02\\u013D\\u013E\\x07\\x13\" +\n\t\t\"\\x02\\x02\\u013E\\x17\\x03\\x02\\x02\\x02\\u013F\\u0145\\x05L\\'\\x02\\u0140\\u0142\" +\n\t\t\"\\x07\\x19\\x02\\x02\\u0141\\u0143\\x05\\x8AF\\x02\\u0142\\u0141\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0142\\u0143\\x03\\x02\\x02\\x02\\u0143\\u0144\\x03\\x02\\x02\\x02\\u0144\\u0146\\x07\" +\n\t\t\"\\x1A\\x02\\x02\\u0145\\u0140\\x03\\x02\\x02\\x02\\u0145\\u0146\\x03\\x02\\x02\\x02\\u0146\" +\n\t\t\"\\x19\\x03\\x02\\x02\\x02\\u0147\\u0151\\x05\\x1C\\x0F\\x02\\u0148\\u0151\\x05$\\x13\" +\n\t\t\"\\x02\\u0149\\u0151\\x05(\\x15\\x02\\u014A\\u0151\\x05*\\x16\\x02\\u014B\\u0151\\x05\" +\n\t\t\".\\x18\\x02\\u014C\\u0151\\x056\\x1C\\x02\\u014D\\u0151\\x05:\\x1E\\x02\\u014E\\u0151\" +\n\t\t\"\\x05 \\x11\\x02\\u014F\\u0151\\x05\\\"\\x12\\x02\\u0150\\u0147\\x03\\x02\\x02\\x02\\u0150\" +\n\t\t\"\\u0148\\x03\\x02\\x02\\x02\\u0150\\u0149\\x03\\x02\\x02\\x02\\u0150\\u014A\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0150\\u014B\\x03\\x02\\x02\\x02\\u0150\\u014C\\x03\\x02\\x02\\x02\\u0150\" +\n\t\t\"\\u014D\\x03\\x02\\x02\\x02\\u0150\\u014E\\x03\\x02\\x02\\x02\\u0150\\u014F\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0151\\x1B\\x03\\x02\\x02\\x02\\u0152\\u015B\\x05J&\\x02\\u0153\\u015A\\x07\" +\n\t\t\"z\\x02\\x02\\u0154\\u015A\\x07w\\x02\\x02\\u0155\\u015A\\x07y\\x02\\x02\\u0156\\u015A\" +\n\t\t\"\\x07q\\x02\\x02\\u0157\\u015A\\x07r\\x02\\x02\\u0158\\u015A\\x05\\xC2b\\x02\\u0159\" +\n\t\t\"\\u0153\\x03\\x02\\x02\\x02\\u0159\\u0154\\x03\\x02\\x02\\x02\\u0159\\u0155\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0159\\u0156\\x03\\x02\\x02\\x02\\u0159\\u0157\\x03\\x02\\x02\\x02\\u0159\" +\n\t\t\"\\u0158\\x03\\x02\\x02\\x02\\u015A\\u015D\\x03\\x02\\x02\\x02\\u015B\\u0159\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u015B\\u015C\\x03\\x02\\x02\\x02\\u015C\\u015E\\x03\\x02\\x02\\x02\\u015D\" +\n\t\t\"\\u015B\\x03\\x02\\x02\\x02\\u015E\\u0161\\x05\\xBE`\\x02\\u015F\\u0160\\x07\\r\\x02\" +\n\t\t\"\\x02\\u0160\\u0162\\x05\\x86D\\x02\\u0161\\u015F\\x03\\x02\\x02\\x02\\u0161\\u0162\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0162\\u0163\\x03\\x02\\x02\\x02\\u0163\\u0164\\x07\\x04\\x02\\x02\" +\n\t\t\"\\u0164\\x1D\\x03\\x02\\x02\\x02\\u0165\\u0166\\x05J&\\x02\\u0166\\u0167\\x07q\\x02\" +\n\t\t\"\\x02\\u0167\\u0168\\x05\\xBE`\\x02\\u0168\\u0169\\x07\\r\\x02\\x02\\u0169\\u016A\\x05\" +\n\t\t\"\\x86D\\x02\\u016A\\u016B\\x07\\x04\\x02\\x02\\u016B\\x1F\\x03\\x02\\x02\\x02\\u016C\" +\n\t\t\"\\u016D\\x07\\x1B\\x02\\x02\\u016D\\u016E\\x05\\xBE`\\x02\\u016E\\u016F\\x05<\\x1F\\x02\" +\n\t\t\"\\u016F\\u0170\\x07\\x04\\x02\\x02\\u0170!\\x03\\x02\\x02\\x02\\u0171\\u0172\\x07}\\x02\" +\n\t\t\"\\x02\\u0172\\u0173\\x05\\xBE`\\x02\\u0173\\u0174\\x07\\x18\\x02\\x02\\u0174\\u0175\" +\n\t\t\"\\x05\\x84C\\x02\\u0175\\u0176\\x07\\x04\\x02\\x02\\u0176#\\x03\\x02\\x02\\x02\\u0177\" +\n\t\t\"\\u0178\\x07\\x1C\\x02\\x02\\u0178\\u0179\\x05&\\x14\\x02\\u0179\\u017C\\x07\\x1D\\x02\" +\n\t\t\"\\x02\\u017A\\u017D\\x07\\x05\\x02\\x02\\u017B\\u017D\\x05J&\\x02\\u017C\\u017A\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u017C\\u017B\\x03\\x02\\x02\\x02\\u017D\\u017F\\x03\\x02\\x02\\x02\\u017E\" +\n\t\t\"\\u0180\\x07\\x7F\\x02\\x02\\u017F\\u017E\\x03\\x02\\x02\\x02\\u017F\\u0180\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0180\\u0181\\x03\\x02\\x02\\x02\\u0181\\u0182\\x07\\x04\\x02\\x02\\u0182\" +\n\t\t\"%\\x03\\x02\\x02\\x02\\u0183\\u0190\\x05L\\'\\x02\\u0184\\u0185\\x07\\x11\\x02\\x02\\u0185\" +\n\t\t\"\\u018A\\x05L\\'\\x02\\u0186\\u0187\\x07\\x12\\x02\\x02\\u0187\\u0189\\x05L\\'\\x02\\u0188\" +\n\t\t\"\\u0186\\x03\\x02\\x02\\x02\\u0189\\u018C\\x03\\x02\\x02\\x02\\u018A\\u0188\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u018A\\u018B\\x03\\x02\\x02\\x02\\u018B\\u018D\\x03\\x02\\x02\\x02\\u018C\" +\n\t\t\"\\u018A\\x03\\x02\\x02\\x02\\u018D\\u018E\\x07\\x13\\x02\\x02\\u018E\\u0190\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u018F\\u0183\\x03\\x02\\x02\\x02\\u018F\\u0184\\x03\\x02\\x02\\x02\\u0190\" +\n\t\t\"\\'\\x03\\x02\\x02\\x02\\u0191\\u0192\\x07\\x1E\\x02\\x02\\u0192\\u0193\\x05\\xBE`\\x02\" +\n\t\t\"\\u0193\\u019E\\x07\\x11\\x02\\x02\\u0194\\u0195\\x05H%\\x02\\u0195\\u019B\\x07\\x04\" +\n\t\t\"\\x02\\x02\\u0196\\u0197\\x05H%\\x02\\u0197\\u0198\\x07\\x04\\x02\\x02\\u0198\\u019A\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0199\\u0196\\x03\\x02\\x02\\x02\\u019A\\u019D\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u019B\\u0199\\x03\\x02\\x02\\x02\\u019B\\u019C\\x03\\x02\\x02\\x02\\u019C\\u019F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u019D\\u019B\\x03\\x02\\x02\\x02\\u019E\\u0194\\x03\\x02\\x02\\x02\\u019E\" +\n\t\t\"\\u019F\\x03\\x02\\x02\\x02\\u019F\\u01A0\\x03\\x02\\x02\\x02\\u01A0\\u01A1\\x07\\x13\" +\n\t\t\"\\x02\\x02\\u01A1)\\x03\\x02\\x02\\x02\\u01A2\\u01A3\\x07\\x1F\\x02\\x02\\u01A3\\u01A5\" +\n\t\t\"\\x05\\xBE`\\x02\\u01A4\\u01A6\\x05<\\x1F\\x02\\u01A5\\u01A4\\x03\\x02\\x02\\x02\\u01A5\" +\n\t\t\"\\u01A6\";\n\tprivate static readonly _serializedATNSegment1: string =\n\t\t\"\\x03\\x02\\x02\\x02\\u01A6\\u01AB\\x03\\x02\\x02\\x02\\u01A7\\u01AA\\x07{\\x02\\x02\" +\n\t\t\"\\u01A8\\u01AA\\x05\\xC2b\\x02\\u01A9\\u01A7\\x03\\x02\\x02\\x02\\u01A9\\u01A8\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01AA\\u01AD\\x03\\x02\\x02\\x02\\u01AB\\u01A9\\x03\\x02\\x02\\x02\\u01AB\" +\n\t\t\"\\u01AC\\x03\\x02\\x02\\x02\\u01AC\\u01B0\\x03\\x02\\x02\\x02\\u01AD\\u01AB\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01AE\\u01B1\\x07\\x04\\x02\\x02\\u01AF\\u01B1\\x05X-\\x02\\u01B0\\u01AE\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01B0\\u01AF\\x03\\x02\\x02\\x02\\u01B1+\\x03\\x02\\x02\\x02\\u01B2\" +\n\t\t\"\\u01B8\\x05\\xBE`\\x02\\u01B3\\u01B5\\x07\\x19\\x02\\x02\\u01B4\\u01B6\\x05\\x8AF\\x02\" +\n\t\t\"\\u01B5\\u01B4\\x03\\x02\\x02\\x02\\u01B5\\u01B6\\x03\\x02\\x02\\x02\\u01B6\\u01B7\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01B7\\u01B9\\x07\\x1A\\x02\\x02\\u01B8\\u01B3\\x03\\x02\\x02\\x02\\u01B8\" +\n\t\t\"\\u01B9\\x03\\x02\\x02\\x02\\u01B9-\\x03\\x02\\x02\\x02\\u01BA\\u01BB\\x050\\x19\\x02\" +\n\t\t\"\\u01BB\\u01BC\\x05<\\x1F\\x02\\u01BC\\u01BE\\x054\\x1B\\x02\\u01BD\\u01BF\\x052\\x1A\" +\n\t\t\"\\x02\\u01BE\\u01BD\\x03\\x02\\x02\\x02\\u01BE\\u01BF\\x03\\x02\\x02\\x02\\u01BF\\u01C2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01C0\\u01C3\\x07\\x04\\x02\\x02\\u01C1\\u01C3\\x05X-\\x02\\u01C2\" +\n\t\t\"\\u01C0\\x03\\x02\\x02\\x02\\u01C2\\u01C1\\x03\\x02\\x02\\x02\\u01C3/\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01C4\\u01C6\\x07 \\x02\\x02\\u01C5\\u01C7\\x05\\xBE`\\x02\\u01C6\\u01C5\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01C6\\u01C7\\x03\\x02\\x02\\x02\\u01C7\\u01CC\\x03\\x02\\x02\\x02\\u01C8\" +\n\t\t\"\\u01CC\\x07\\x80\\x02\\x02\\u01C9\\u01CC\\x07\\x81\\x02\\x02\\u01CA\\u01CC\\x07\\x82\" +\n\t\t\"\\x02\\x02\\u01CB\\u01C4\\x03\\x02\\x02\\x02\\u01CB\\u01C8\\x03\\x02\\x02\\x02\\u01CB\" +\n\t\t\"\\u01C9\\x03\\x02\\x02\\x02\\u01CB\\u01CA\\x03\\x02\\x02\\x02\\u01CC1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01CD\\u01CE\\x07!\\x02\\x02\\u01CE\\u01CF\\x05<\\x1F\\x02\\u01CF3\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01D0\\u01D9\\x07u\\x02\\x02\\u01D1\\u01D9\\x07z\\x02\\x02\\u01D2\\u01D9\" +\n\t\t\"\\x07w\\x02\\x02\\u01D3\\u01D9\\x07y\\x02\\x02\\u01D4\\u01D9\\x07{\\x02\\x02\\u01D5\" +\n\t\t\"\\u01D9\\x05V,\\x02\\u01D6\\u01D9\\x05,\\x17\\x02\\u01D7\\u01D9\\x05\\xC2b\\x02\\u01D8\" +\n\t\t\"\\u01D0\\x03\\x02\\x02\\x02\\u01D8\\u01D1\\x03\\x02\\x02\\x02\\u01D8\\u01D2\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01D8\\u01D3\\x03\\x02\\x02\\x02\\u01D8\\u01D4\\x03\\x02\\x02\\x02\\u01D8\" +\n\t\t\"\\u01D5\\x03\\x02\\x02\\x02\\u01D8\\u01D6\\x03\\x02\\x02\\x02\\u01D8\\u01D7\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u01D9\\u01DC\\x03\\x02\\x02\\x02\\u01DA\\u01D8\\x03\\x02\\x02\\x02\\u01DA\" +\n\t\t\"\\u01DB\\x03\\x02\\x02\\x02\\u01DB5\\x03\\x02\\x02\\x02\\u01DC\\u01DA\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u01DD\\u01DE\\x07\\\"\\x02\\x02\\u01DE\\u01DF\\x05\\xBE`\\x02\\u01DF\\u01E1\\x05\" +\n\t\t\"@!\\x02\\u01E0\\u01E2\\x07o\\x02\\x02\\u01E1\\u01E0\\x03\\x02\\x02\\x02\\u01E1\\u01E2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01E2\\u01E3\\x03\\x02\\x02\\x02\\u01E3\\u01E4\\x07\\x04\\x02\\x02\" +\n\t\t\"\\u01E47\\x03\\x02\\x02\\x02\\u01E5\\u01E6\\x05\\xBE`\\x02\\u01E69\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u01E7\\u01E8\\x07#\\x02\\x02\\u01E8\\u01E9\\x05\\xBE`\\x02\\u01E9\\u01EB\\x07\\x11\" +\n\t\t\"\\x02\\x02\\u01EA\\u01EC\\x058\\x1D\\x02\\u01EB\\u01EA\\x03\\x02\\x02\\x02\\u01EB\\u01EC\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01EC\\u01F1\\x03\\x02\\x02\\x02\\u01ED\\u01EE\\x07\\x12\\x02\\x02\" +\n\t\t\"\\u01EE\\u01F0\\x058\\x1D\\x02\\u01EF\\u01ED\\x03\\x02\\x02\\x02\\u01F0\\u01F3\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01F1\\u01EF\\x03\\x02\\x02\\x02\\u01F1\\u01F2\\x03\\x02\\x02\\x02\\u01F2\" +\n\t\t\"\\u01F4\\x03\\x02\\x02\\x02\\u01F3\\u01F1\\x03\\x02\\x02\\x02\\u01F4\\u01F5\\x07\\x13\" +\n\t\t\"\\x02\\x02\\u01F5;\\x03\\x02\\x02\\x02\\u01F6\\u01FF\\x07\\x19\\x02\\x02\\u01F7\\u01FC\" +\n\t\t\"\\x05> \\x02\\u01F8\\u01F9\\x07\\x12\\x02\\x02\\u01F9\\u01FB\\x05> \\x02\\u01FA\\u01F8\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u01FB\\u01FE\\x03\\x02\\x02\\x02\\u01FC\\u01FA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u01FC\\u01FD\\x03\\x02\\x02\\x02\\u01FD\\u0200\\x03\\x02\\x02\\x02\\u01FE\\u01FC\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u01FF\\u01F7\\x03\\x02\\x02\\x02\\u01FF\\u0200\\x03\\x02\\x02\\x02\\u0200\" +\n\t\t\"\\u0201\\x03\\x02\\x02\\x02\\u0201\\u0202\\x07\\x1A\\x02\\x02\\u0202=\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0203\\u0205\\x05J&\\x02\\u0204\\u0206\\x05T+\\x02\\u0205\\u0204\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0205\\u0206\\x03\\x02\\x02\\x02\\u0206\\u0208\\x03\\x02\\x02\\x02\\u0207\\u0209\" +\n\t\t\"\\x05\\xBE`\\x02\\u0208\\u0207\\x03\\x02\\x02\\x02\\u0208\\u0209\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0209?\\x03\\x02\\x02\\x02\\u020A\\u0213\\x07\\x19\\x02\\x02\\u020B\\u0210\\x05B\\\"\" +\n\t\t\"\\x02\\u020C\\u020D\\x07\\x12\\x02\\x02\\u020D\\u020F\\x05B\\\"\\x02\\u020E\\u020C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u020F\\u0212\\x03\\x02\\x02\\x02\\u0210\\u020E\\x03\\x02\\x02\\x02\\u0210\" +\n\t\t\"\\u0211\\x03\\x02\\x02\\x02\\u0211\\u0214\\x03\\x02\\x02\\x02\\u0212\\u0210\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0213\\u020B\\x03\\x02\\x02\\x02\\u0213\\u0214\\x03\\x02\\x02\\x02\\u0214\" +\n\t\t\"\\u0215\\x03\\x02\\x02\\x02\\u0215\\u0216\\x07\\x1A\\x02\\x02\\u0216A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0217\\u0219\\x05J&\\x02\\u0218\\u021A\\x07v\\x02\\x02\\u0219\\u0218\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0219\\u021A\\x03\\x02\\x02\\x02\\u021A\\u021C\\x03\\x02\\x02\\x02\\u021B\" +\n\t\t\"\\u021D\\x05\\xBE`\\x02\\u021C\\u021B\\x03\\x02\\x02\\x02\\u021C\\u021D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u021DC\\x03\\x02\\x02\\x02\\u021E\\u0227\\x07\\x19\\x02\\x02\\u021F\\u0224\\x05\" +\n\t\t\"F$\\x02\\u0220\\u0221\\x07\\x12\\x02\\x02\\u0221\\u0223\\x05F$\\x02\\u0222\\u0220\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0223\\u0226\\x03\\x02\\x02\\x02\\u0224\\u0222\\x03\\x02\\x02\\x02\\u0224\" +\n\t\t\"\\u0225\\x03\\x02\\x02\\x02\\u0225\\u0228\\x03\\x02\\x02\\x02\\u0226\\u0224\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0227\\u021F\\x03\\x02\\x02\\x02\\u0227\\u0228\\x03\\x02\\x02\\x02\\u0228\" +\n\t\t\"\\u0229\\x03\\x02\\x02\\x02\\u0229\\u022A\\x07\\x1A\\x02\\x02\\u022AE\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u022B\\u022D\\x05J&\\x02\\u022C\\u022E\\x05T+\\x02\\u022D\\u022C\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u022D\\u022E\\x03\\x02\\x02\\x02\\u022EG\\x03\\x02\\x02\\x02\\u022F\\u0231\\x05\" +\n\t\t\"J&\\x02\\u0230\\u0232\\x05T+\\x02\\u0231\\u0230\\x03\\x02\\x02\\x02\\u0231\\u0232\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0232\\u0233\\x03\\x02\\x02\\x02\\u0233\\u0234\\x05\\xBE`\\x02\\u0234\" +\n\t\t\"I\\x03\\x02\\x02\\x02\\u0235\\u0236\\b&\\x01\\x02\\u0236\\u023D\\x05\\x84C\\x02\\u0237\" +\n\t\t\"\\u023D\\x05L\\'\\x02\\u0238\\u023D\\x05P)\\x02\\u0239\\u023D\\x05R*\\x02\\u023A\\u023B\" +\n\t\t\"\\x07&\\x02\\x02\\u023B\\u023D\\x07x\\x02\\x02\\u023C\\u0235\\x03\\x02\\x02\\x02\\u023C\" +\n\t\t\"\\u0237\\x03\\x02\\x02\\x02\\u023C\\u0238\\x03\\x02\\x02\\x02\\u023C\\u0239\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u023C\\u023A\\x03\\x02\\x02\\x02\\u023D\\u0246\\x03\\x02\\x02\\x02\\u023E\" +\n\t\t\"\\u023F\\f\\x05\\x02\\x02\\u023F\\u0241\\x07$\\x02\\x02\\u0240\\u0242\\x05\\x86D\\x02\" +\n\t\t\"\\u0241\\u0240\\x03\\x02\\x02\\x02\\u0241\\u0242\\x03\\x02\\x02\\x02\\u0242\\u0243\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0243\\u0245\\x07%\\x02\\x02\\u0244\\u023E\\x03\\x02\\x02\\x02\\u0245\" +\n\t\t\"\\u0248\\x03\\x02\\x02\\x02\\u0246\\u0244\\x03\\x02\\x02\\x02\\u0246\\u0247\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0247K\\x03\\x02\\x02\\x02\\u0248\\u0246\\x03\\x02\\x02\\x02\\u0249\\u024E\" +\n\t\t\"\\x05\\xBE`\\x02\\u024A\\u024B\\x07\\'\\x02\\x02\\u024B\\u024D\\x05\\xBE`\\x02\\u024C\" +\n\t\t\"\\u024A\\x03\\x02\\x02\\x02\\u024D\\u0250\\x03\\x02\\x02\\x02\\u024E\\u024C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u024E\\u024F\\x03\\x02\\x02\\x02\\u024FM\\x03\\x02\\x02\\x02\\u0250\\u024E\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0251\\u0254\\x05\\x84C\\x02\\u0252\\u0254\\x05L\\'\\x02\\u0253\" +\n\t\t\"\\u0251\\x03\\x02\\x02\\x02\\u0253\\u0252\\x03\\x02\\x02\\x02\\u0254O\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0255\\u0256\\x07(\\x02\\x02\\u0256\\u0257\\x07\\x19\\x02\\x02\\u0257\\u0258\" +\n\t\t\"\\x05N(\\x02\\u0258\\u0259\\x07)\\x02\\x02\\u0259\\u025A\\x05J&\\x02\\u025A\\u025B\" +\n\t\t\"\\x07\\x1A\\x02\\x02\\u025BQ\\x03\\x02\\x02\\x02\\u025C\\u025D\\x07 \\x02\\x02\\u025D\" +\n\t\t\"\\u0263\\x05D#\\x02\\u025E\\u0262\\x07w\\x02\\x02\\u025F\\u0262\\x07u\\x02\\x02\\u0260\" +\n\t\t\"\\u0262\\x05V,\\x02\\u0261\\u025E\\x03\\x02\\x02\\x02\\u0261\\u025F\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0261\\u0260\\x03\\x02\\x02\\x02\\u0262\\u0265\\x03\\x02\\x02\\x02\\u0263\\u0261\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0263\\u0264\\x03\\x02\\x02\\x02\\u0264\\u0268\\x03\\x02\\x02\\x02\\u0265\" +\n\t\t\"\\u0263\\x03\\x02\\x02\\x02\\u0266\\u0267\\x07!\\x02\\x02\\u0267\\u0269\\x05D#\\x02\" +\n\t\t\"\\u0268\\u0266\\x03\\x02\\x02\\x02\\u0268\\u0269\\x03\\x02\\x02\\x02\\u0269S\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u026A\\u026B\\t\\x04\\x02\\x02\\u026BU\\x03\\x02\\x02\\x02\\u026C\\u026D\" +\n\t\t\"\\t\\x05\\x02\\x02\\u026DW\\x03\\x02\\x02\\x02\\u026E\\u0272\\x07\\x11\\x02\\x02\\u026F\" +\n\t\t\"\\u0271\\x05Z.\\x02\\u0270\\u026F\\x03\\x02\\x02\\x02\\u0271\\u0274\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0272\\u0270\\x03\\x02\\x02\\x02\\u0272\\u0273\\x03\\x02\\x02\\x02\\u0273\\u0275\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0274\\u0272\\x03\\x02\\x02\\x02\\u0275\\u0276\\x07\\x13\\x02\\x02\\u0276\" +\n\t\t\"Y\\x03\\x02\\x02\\x02\\u0277\\u0287\\x05^0\\x02\\u0278\\u0287\\x05`1\\x02\\u0279\\u0287\" +\n\t\t\"\\x05d3\\x02\\u027A\\u0287\\x05j6\\x02\\u027B\\u0287\\x05X-\\x02\\u027C\\u0287\\x05\" +\n\t\t\"l7\\x02\\u027D\\u0287\\x05p9\\x02\\u027E\\u0287\\x05r:\\x02\\u027F\\u0287\\x05t;\\x02\" +\n\t\t\"\\u0280\\u0287\\x05v<\\x02\\u0281\\u0287\\x05x=\\x02\\u0282\\u0287\\x05z>\\x02\\u0283\" +\n\t\t\"\\u0287\\x05f4\\x02\\u0284\\u0287\\x05h5\\x02\\u0285\\u0287\\x05|?\\x02\\u0286\\u0277\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0286\\u0278\\x03\\x02\\x02\\x02\\u0286\\u0279\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0286\\u027A\\x03\\x02\\x02\\x02\\u0286\\u027B\\x03\\x02\\x02\\x02\\u0286\\u027C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0286\\u027D\\x03\\x02\\x02\\x02\\u0286\\u027E\\x03\\x02\\x02\\x02\\u0286\" +\n\t\t\"\\u027F\\x03\\x02\\x02\\x02\\u0286\\u0280\\x03\\x02\\x02\\x02\\u0286\\u0281\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0286\\u0282\\x03\\x02\\x02\\x02\\u0286\\u0283\\x03\\x02\\x02\\x02\\u0286\" +\n\t\t\"\\u0284\\x03\\x02\\x02\\x02\\u0286\\u0285\\x03\\x02\\x02\\x02\\u0287[\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0288\\u0289\\x05\\x86D\\x02\\u0289\\u028A\\x07\\x04\\x02\\x02\\u028A]\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u028B\\u028C\\x07-\\x02\\x02\\u028C\\u028D\\x07\\x19\\x02\\x02\\u028D\\u028E\" +\n\t\t\"\\x05\\x86D\\x02\\u028E\\u028F\\x07\\x1A\\x02\\x02\\u028F\\u0292\\x05Z.\\x02\\u0290\" +\n\t\t\"\\u0291\\x07.\\x02\\x02\\u0291\\u0293\\x05Z.\\x02\\u0292\\u0290\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0292\\u0293\\x03\\x02\\x02\\x02\\u0293_\\x03\\x02\\x02\\x02\\u0294\\u0295\\x07/\\x02\" +\n\t\t\"\\x02\\u0295\\u0297\\x05\\x86D\\x02\\u0296\\u0298\\x052\\x1A\\x02\\u0297\\u0296\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0297\\u0298\\x03\\x02\\x02\\x02\\u0298\\u0299\\x03\\x02\\x02\\x02\\u0299\" +\n\t\t\"\\u029B\\x05X-\\x02\\u029A\\u029C\\x05b2\\x02\\u029B\\u029A\\x03\\x02\\x02\\x02\\u029C\" +\n\t\t\"\\u029D\\x03\\x02\\x02\\x02\\u029D\\u029B\\x03\\x02\\x02\\x02\\u029D\\u029E\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u029Ea\\x03\\x02\\x02\\x02\\u029F\\u02A4\\x070\\x02\\x02\\u02A0\\u02A2\\x05\" +\n\t\t\"\\xBE`\\x02\\u02A1\\u02A0\\x03\\x02\\x02\\x02\\u02A1\\u02A2\\x03\\x02\\x02\\x02\\u02A2\" +\n\t\t\"\\u02A3\\x03\\x02\\x02\\x02\\u02A3\\u02A5\\x05<\\x1F\\x02\\u02A4\\u02A1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02A4\\u02A5\\x03\\x02\\x02\\x02\\u02A5\\u02A6\\x03\\x02\\x02\\x02\\u02A6\\u02A7\" +\n\t\t\"\\x05X-\\x02\\u02A7c\\x03\\x02\\x02\\x02\\u02A8\\u02A9\\x071\\x02\\x02\\u02A9\\u02AA\" +\n\t\t\"\\x07\\x19\\x02\\x02\\u02AA\\u02AB\\x05\\x86D\\x02\\u02AB\\u02AC\\x07\\x1A\\x02\\x02\" +\n\t\t\"\\u02AC\\u02AD\\x05Z.\\x02\\u02ADe\\x03\\x02\\x02\\x02\\u02AE\\u02B1\\x05~@\\x02\\u02AF\" +\n\t\t\"\\u02B1\\x05\\\\/\\x02\\u02B0\\u02AE\\x03\\x02\\x02\\x02\\u02B0\\u02AF\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02B1g\\x03\\x02\\x02\\x02\\u02B2\\u02B3\\x072\\x02\\x02\\u02B3\\u02B4\\x05X\" +\n\t\t\"-\\x02\\u02B4i\\x03\\x02\\x02\\x02\\u02B5\\u02B6\\x07\\x1D\\x02\\x02\\u02B6\\u02B9\\x07\" +\n\t\t\"\\x19\\x02\\x02\\u02B7\\u02BA\\x05f4\\x02\\u02B8\\u02BA\\x07\\x04\\x02\\x02\\u02B9\\u02B7\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u02B9\\u02B8\\x03\\x02\\x02\\x02\\u02BA\\u02BD\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02BB\\u02BE\\x05\\\\/\\x02\\u02BC\\u02BE\\x07\\x04\\x02\\x02\\u02BD\\u02BB\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02BD\\u02BC\\x03\\x02\\x02\\x02\\u02BE\\u02C0\\x03\\x02\\x02\\x02\\u02BF\" +\n\t\t\"\\u02C1\\x05\\x86D\\x02\\u02C0\\u02BF\\x03\\x02\\x02\\x02\\u02C0\\u02C1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02C1\\u02C2\\x03\\x02\\x02\\x02\\u02C2\\u02C3\\x07\\x1A\\x02\\x02\\u02C3\\u02C4\" +\n\t\t\"\\x05Z.\\x02\\u02C4k\\x03\\x02\\x02\\x02\\u02C5\\u02C7\\x073\\x02\\x02\\u02C6\\u02C8\" +\n\t\t\"\\x07\\x84\\x02\\x02\\u02C7\\u02C6\\x03\\x02\\x02\\x02\\u02C7\\u02C8\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02C8\\u02CD\\x03\\x02\\x02\\x02\\u02C9\\u02CA\\x07\\x19\\x02\\x02\\u02CA\\u02CB\\x05\" +\n\t\t\"n8\\x02\\u02CB\\u02CC\\x07\\x1A\\x02\\x02\\u02CC\\u02CE\\x03\\x02\\x02\\x02\\u02CD\\u02C9\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u02CD\\u02CE\\x03\\x02\\x02\\x02\\u02CE\\u02CF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02CF\\u02D0\\x05\\x94K\\x02\\u02D0m\\x03\\x02\\x02\\x02\\u02D1\\u02D2\\x05\\xC4c\" +\n\t\t\"\\x02\\u02D2o\\x03\\x02\\x02\\x02\\u02D3\\u02D4\\x074\\x02\\x02\\u02D4\\u02D5\\x05Z\" +\n\t\t\".\\x02\\u02D5\\u02D6\\x071\\x02\\x02\\u02D6\\u02D7\\x07\\x19\\x02\\x02\\u02D7\\u02D8\" +\n\t\t\"\\x05\\x86D\\x02\\u02D8\\u02D9\\x07\\x1A\\x02\\x02\\u02D9\\u02DA\\x07\\x04\\x02\\x02\" +\n\t\t\"\\u02DAq\\x03\\x02\\x02\\x02\\u02DB\\u02DC\\x07s\\x02\\x02\\u02DC\\u02DD\\x07\\x04\\x02\" +\n\t\t\"\\x02\\u02DDs\\x03\\x02\\x02\\x02\\u02DE\\u02DF\\x07p\\x02\\x02\\u02DF\\u02E0\\x07\\x04\" +\n\t\t\"\\x02\\x02\\u02E0u\\x03\\x02\\x02\\x02\\u02E1\\u02E3\\x075\\x02\\x02\\u02E2\\u02E4\\x05\" +\n\t\t\"\\x86D\\x02\\u02E3\\u02E2\\x03\\x02\\x02\\x02\\u02E3\\u02E4\\x03\\x02\\x02\\x02\\u02E4\" +\n\t\t\"\\u02E5\\x03\\x02\\x02\\x02\\u02E5\\u02E6\\x07\\x04\\x02\\x02\\u02E6w\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u02E7\\u02E8\\x076\\x02\\x02\\u02E8\\u02E9\\x07\\x04\\x02\\x02\\u02E9y\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02EA\\u02EB\\x077\\x02\\x02\\u02EB\\u02EC\\x05\\x92J\\x02\\u02EC\\u02ED\" +\n\t\t\"\\x07\\x04\\x02\\x02\\u02ED{\\x03\\x02\\x02\\x02\\u02EE\\u02EF\\x078\\x02\\x02\\u02EF\" +\n\t\t\"\\u02F0\\x05\\x92J\\x02\\u02F0\\u02F1\\x07\\x04\\x02\\x02\\u02F1}\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02F2\\u02F3\\x079\\x02\\x02\\u02F3\\u02FA\\x05\\x82B\\x02\\u02F4\\u02FA\\x05H%\\x02\" +\n\t\t\"\\u02F5\\u02F6\\x07\\x19\\x02\\x02\\u02F6\\u02F7\\x05\\x80A\\x02\\u02F7\\u02F8\\x07\" +\n\t\t\"\\x1A\\x02\\x02\\u02F8\\u02FA\\x03\\x02\\x02\\x02\\u02F9\\u02F2\\x03\\x02\\x02\\x02\\u02F9\" +\n\t\t\"\\u02F4\\x03\\x02\\x02\\x02\\u02F9\\u02F5\\x03\\x02\\x02\\x02\\u02FA\\u02FD\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u02FB\\u02FC\\x07\\r\\x02\\x02\\u02FC\\u02FE\\x05\\x86D\\x02\\u02FD\\u02FB\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u02FD\\u02FE\\x03\\x02\\x02\\x02\\u02FE\\u02FF\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u02FF\\u0300\\x07\\x04\\x02\\x02\\u0300\\x7F\\x03\\x02\\x02\\x02\\u0301\\u0303\\x05\" +\n\t\t\"H%\\x02\\u0302\\u0301\\x03\\x02\\x02\\x02\\u0302\\u0303\\x03\\x02\\x02\\x02\\u0303\\u030A\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0304\\u0306\\x07\\x12\\x02\\x02\\u0305\\u0307\\x05H%\\x02\\u0306\" +\n\t\t\"\\u0305\\x03\\x02\\x02\\x02\\u0306\\u0307\\x03\\x02\\x02\\x02\\u0307\\u0309\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0308\\u0304\\x03\\x02\\x02\\x02\\u0309\\u030C\\x03\\x02\\x02\\x02\\u030A\" +\n\t\t\"\\u0308\\x03\\x02\\x02\\x02\\u030A\\u030B\\x03\\x02\\x02\\x02\\u030B\\x81\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u030C\\u030A\\x03\\x02\\x02\\x02\\u030D\\u0314\\x07\\x19\\x02\\x02\\u030E\\u0310\" +\n\t\t\"\\x05\\xBE`\\x02\\u030F\\u030E\\x03\\x02\\x02\\x02\\u030F\\u0310\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0310\\u0311\\x03\\x02\\x02\\x02\\u0311\\u0313\\x07\\x12\\x02\\x02\\u0312\\u030F\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0313\\u0316\\x03\\x02\\x02\\x02\\u0314\\u0312\\x03\\x02\\x02\\x02\\u0314\" +\n\t\t\"\\u0315\\x03\\x02\\x02\\x02\\u0315\\u0318\\x03\\x02\\x02\\x02\\u0316\\u0314\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0317\\u0319\\x05\\xBE`\\x02\\u0318\\u0317\\x03\\x02\\x02\\x02\\u0318\\u0319\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0319\\u031A\\x03\\x02\\x02\\x02\\u031A\\u031B\\x07\\x1A\\x02\\x02\" +\n\t\t\"\\u031B\\x83\\x03\\x02\\x02\\x02\\u031C\\u031D\\t\\x06\\x02\\x02\\u031D\\x85\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u031E\\u031F\\bD\\x01\\x02\\u031F\\u0320\\x07?\\x02\\x02\\u0320\\u0331\\x05\" +\n\t\t\"J&\\x02\\u0321\\u0322\\x07\\x19\\x02\\x02\\u0322\\u0323\\x05\\x86D\\x02\\u0323\\u0324\" +\n\t\t\"\\x07\\x1A\\x02\\x02\\u0324\\u0331\\x03\\x02\\x02\\x02\\u0325\\u0326\\t\\x07\\x02\\x02\" +\n\t\t\"\\u0326\\u0331\\x05\\x86D\\x15\\u0327\\u0328\\t\\b\\x02\\x02\\u0328\\u0331\\x05\\x86\" +\n\t\t\"D\\x14\\u0329\\u032A\\t\\t\\x02\\x02\\u032A\\u0331\\x05\\x86D\\x13\\u032B\\u032C\\x07\" +\n\t\t\"E\\x02\\x02\\u032C\\u0331\\x05\\x86D\\x12\\u032D\\u032E\\x07\\b\\x02\\x02\\u032E\\u0331\" +\n\t\t\"\\x05\\x86D\\x11\\u032F\\u0331\\x05\\x88E\\x02\\u0330\\u031E\\x03\\x02\\x02\\x02\\u0330\" +\n\t\t\"\\u0321\\x03\\x02\\x02\\x02\\u0330\\u0325\\x03\\x02\\x02\\x02\\u0330\\u0327\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0330\\u0329\\x03\\x02\\x02\\x02\\u0330\\u032B\\x03\\x02\\x02\\x02\\u0330\" +\n\t\t\"\\u032D\\x03\\x02\\x02\\x02\\u0330\\u032F\\x03\\x02\\x02\\x02\\u0331\\u037C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0332\\u0333\\f\\x10\\x02\\x02\\u0333\\u0334\\x07F\\x02\\x02\\u0334\\u037B\" +\n\t\t\"\\x05\\x86D\\x11\\u0335\\u0336\\f\\x0F\\x02\\x02\\u0336\\u0337\\t\\n\\x02\\x02\\u0337\" +\n\t\t\"\\u037B\\x05\\x86D\\x10\\u0338\\u0339\\f\\x0E\\x02\\x02\\u0339\\u033A\\t\\b\\x02\\x02\" +\n\t\t\"\\u033A\\u037B\\x05\\x86D\\x0F\\u033B\\u033C\\f\\r\\x02\\x02\\u033C\\u033D\\t\\v\\x02\" +\n\t\t\"\\x02\\u033D\\u037B\\x05\\x86D\\x0E\\u033E\\u033F\\f\\f\\x02\\x02\\u033F\\u0340\\x07\" +\n\t\t\"K\\x02\\x02\\u0340\\u037B\\x05\\x86D\\r\\u0341\\u0342\\f\\v\\x02\\x02\\u0342\\u0343\\x07\" +\n\t\t\"\\x07\\x02\\x02\\u0343\\u037B\\x05\\x86D\\f\\u0344\\u0345\\f\\n\\x02\\x02\\u0345\\u0346\" +\n\t\t\"\\x07L\\x02\\x02\\u0346\\u037B\\x05\\x86D\\v\\u0347\\u0348\\f\\t\\x02\\x02\\u0348\\u0349\" +\n\t\t\"\\t\\f\\x02\\x02\\u0349\\u037B\\x05\\x86D\\n\\u034A\\u034B\\f\\b\\x02\\x02\\u034B\\u034C\" +\n\t\t\"\\t\\r\\x02\\x02\\u034C\\u037B\\x05\\x86D\\t\\u034D\\u034E\\f\\x07\\x02\\x02\\u034E\\u034F\" +\n\t\t\"\\x07O\\x02\\x02\\u034F\\u037B\\x05\\x86D\\b\\u0350\\u0351\\f\\x06\\x02\\x02\\u0351\\u0352\" +\n\t\t\"\\x07\\x06\\x02\\x02\\u0352\\u037B\\x05\\x86D\\x07\\u0353\\u0354\\f\\x05\\x02\\x02\\u0354\" +\n\t\t\"\\u0355\\x07P\\x02\\x02\\u0355\\u0356\\x05\\x86D\\x02\\u0356\\u0357\\x07@\\x02\\x02\" +\n\t\t\"\\u0357\\u0358\\x05\\x86D\\x06\\u0358\\u037B\\x03\\x02\\x02\\x02\\u0359\\u035A\\f\\x04\" +\n\t\t\"\\x02\\x02\\u035A\\u035B\\t\\x0E\\x02\\x02\\u035B\\u037B\\x05\\x86D\\x05\\u035C\\u035D\" +\n\t\t\"\\f\\x1D\\x02\\x02\\u035D\\u037B\\t\\x07\\x02\\x02\\u035E\\u035F\\f\\x1B\\x02\\x02\\u035F\" +\n\t\t\"\\u0360\\x07$\\x02\\x02\\u0360\\u0361\\x05\\x86D\\x02\\u0361\\u0362\\x07%\\x02\\x02\" +\n\t\t\"\\u0362\\u037B\\x03\\x02\\x02\\x02\\u0363\\u0364\\f\\x1A\\x02\\x02\\u0364\\u0366\\x07\" +\n\t\t\"$\\x02\\x02\\u0365\\u0367\\x05\\x86D\\x02\\u0366\\u0365\\x03\\x02\\x02\\x02\\u0366\\u0367\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0367\\u0368\\x03\\x02\\x02\\x02\\u0368\\u036A\\x07@\\x02\\x02\" +\n\t\t\"\\u0369\\u036B\\x05\\x86D\\x02\\u036A\\u0369\\x03\\x02\\x02\\x02\\u036A\\u036B\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u036B\\u036C\\x03\\x02\\x02\\x02\\u036C\\u037B\\x07%\\x02\\x02\\u036D\" +\n\t\t\"\\u036E\\f\\x19\\x02\\x02\\u036E\\u036F\\x07\\'\\x02\\x02\\u036F\\u037B\\x05\\xBE`\\x02\" +\n\t\t\"\\u0370\\u0371\\f\\x18\\x02\\x02\\u0371\\u0372\\x07\\x11\\x02\\x02\\u0372\\u0373\\x05\" +\n\t\t\"\\x8CG\\x02\\u0373\\u0374\\x07\\x13\\x02\\x02\\u0374\\u037B\\x03\\x02\\x02\\x02\\u0375\" +\n\t\t\"\\u0376\\f\\x17\\x02\\x02\\u0376\\u0377\\x07\\x19\\x02\\x02\\u0377\\u0378\\x05\\x90I\" +\n\t\t\"\\x02\\u0378\\u0379\\x07\\x1A\\x02\\x02\\u0379\\u037B\\x03\\x02\\x02\\x02\\u037A\\u0332\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u037A\\u0335\\x03\\x02\\x02\\x02\\u037A\\u0338\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u037A\\u033B\\x03\\x02\\x02\\x02\\u037A\\u033E\\x03\\x02\\x02\\x02\\u037A\\u0341\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u037A\\u0344\\x03\\x02\\x02\\x02\\u037A\\u0347\\x03\\x02\\x02\\x02\\u037A\" +\n\t\t\"\\u034A\\x03\\x02\\x02\\x02\\u037A\\u034D\\x03\\x02\\x02\\x02\\u037A\\u0350\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u037A\\u0353\\x03\\x02\\x02\\x02\\u037A\\u0359\\x03\\x02\\x02\\x02\\u037A\" +\n\t\t\"\\u035C\\x03\\x02\\x02\\x02\\u037A\\u035E\\x03\\x02\\x02\\x02\\u037A\\u0363\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u037A\\u036D\\x03\\x02\\x02\\x02\\u037A\\u0370\\x03\\x02\\x02\\x02\\u037A\" +\n\t\t\"\\u0375\\x03\\x02\\x02\\x02\\u037B\\u037E\\x03\\x02\\x02\\x02\\u037C\\u037A\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u037C\\u037D\\x03\\x02\\x02\\x02\\u037D\\x87\\x03\\x02\\x02\\x02\\u037E\\u037C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u037F\\u0389\\x07i\\x02\\x02\\u0380\\u0389\\x05\\xBC_\\x02\\u0381\" +\n\t\t\"\\u0389\\x05\\xC0a\\x02\\u0382\\u0389\\x05\\xC4c\\x02\\u0383\\u0389\\x05\\xBE`\\x02\" +\n\t\t\"\\u0384\\u0389\\x07}\\x02\\x02\\u0385\\u0389\\x07x\\x02\\x02\\u0386\\u0389\\x05\\xBA\" +\n\t\t\"^\\x02\\u0387\\u0389\\x05J&\\x02\\u0388\\u037F\\x03\\x02\\x02\\x02\\u0388\\u0380\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0388\\u0381\\x03\\x02\\x02\\x02\\u0388\\u0382\\x03\\x02\\x02\\x02\\u0388\" +\n\t\t\"\\u0383\\x03\\x02\\x02\\x02\\u0388\\u0384\\x03\\x02\\x02\\x02\\u0388\\u0385\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0388\\u0386\\x03\\x02\\x02\\x02\\u0388\\u0387\\x03\\x02\\x02\\x02\\u0389\" +\n\t\t\"\\x89\\x03\\x02\\x02\\x02\\u038A\\u038F\\x05\\x86D\\x02\\u038B\\u038C\\x07\\x12\\x02\" +\n\t\t\"\\x02\\u038C\\u038E\\x05\\x86D\\x02\\u038D\\u038B\\x03\\x02\\x02\\x02\\u038E\\u0391\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u038F\\u038D\\x03\\x02\\x02\\x02\\u038F\\u0390\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0390\\x8B\\x03\\x02\\x02\\x02\\u0391\\u038F\\x03\\x02\\x02\\x02\\u0392\\u0397\\x05\" +\n\t\t\"\\x8EH\\x02\\u0393\\u0394\\x07\\x12\\x02\\x02\\u0394\\u0396\\x05\\x8EH\\x02\\u0395\\u0393\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0396\\u0399\\x03\\x02\\x02\\x02\\u0397\\u0395\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0397\\u0398\\x03\\x02\\x02\\x02\\u0398\\u039B\\x03\\x02\\x02\\x02\\u0399\\u0397\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u039A\\u039C\\x07\\x12\\x02\\x02\\u039B\\u039A\\x03\\x02\\x02\\x02\\u039B\" +\n\t\t\"\\u039C\\x03\\x02\\x02\\x02\\u039C\\x8D\\x03\\x02\\x02\\x02\\u039D\\u039E\\x05\\xBE`\" +\n\t\t\"\\x02\\u039E\\u039F\\x07@\\x02\\x02\\u039F\\u03A0\\x05\\x86D\\x02\\u03A0\\x8F\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03A1\\u03A3\\x07\\x11\\x02\\x02\\u03A2\\u03A4\\x05\\x8CG\\x02\\u03A3\\u03A2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u03A3\\u03A4\\x03\\x02\\x02\\x02\\u03A4\\u03A5\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03A5\\u03AA\\x07\\x13\\x02\\x02\\u03A6\\u03A8\\x05\\x8AF\\x02\\u03A7\\u03A6\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03A7\\u03A8\\x03\\x02\\x02\\x02\\u03A8\\u03AA\\x03\\x02\\x02\\x02\\u03A9\" +\n\t\t\"\\u03A1\\x03\\x02\\x02\\x02\\u03A9\\u03A7\\x03\\x02\\x02\\x02\\u03AA\\x91\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u03AB\\u03AC\\x05\\x86D\\x02\\u03AC\\u03AD\\x07\\x19\\x02\\x02\\u03AD\\u03AE\" +\n\t\t\"\\x05\\x90I\\x02\\u03AE\\u03AF\\x07\\x1A\\x02\\x02\\u03AF\\x93\\x03\\x02\\x02\\x02\\u03B0\" +\n\t\t\"\\u03B4\\x07\\x11\\x02\\x02\\u03B1\\u03B3\\x05\\x96L\\x02\\u03B2\\u03B1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u03B3\\u03B6\\x03\\x02\\x02\\x02\\u03B4\\u03B2\\x03\\x02\\x02\\x02\\u03B4\\u03B5\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u03B5\\u03B7\\x03\\x02\\x02\\x02\\u03B6\\u03B4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03B7\\u03B8\\x07\\x13\\x02\\x02\\u03B8\\x95\\x03\\x02\\x02\\x02\\u03B9\\u03CC\\x05\" +\n\t\t\"\\xBE`\\x02\\u03BA\\u03CC\\x05\\x94K\\x02\\u03BB\\u03CC\\x05\\x98M\\x02\\u03BC\\u03CC\" +\n\t\t\"\\x05\\x9EP\\x02\\u03BD\\u03CC\\x05\\xA0Q\\x02\\u03BE\\u03CC\\x05\\xA6T\\x02\\u03BF\" +\n\t\t\"\\u03CC\\x05\\xA8U\\x02\\u03C0\\u03CC\\x05\\xAAV\\x02\\u03C1\\u03CC\\x05\\xAEX\\x02\" +\n\t\t\"\\u03C2\\u03CC\\x05\\xB2Z\\x02\\u03C3\\u03CC\\x05\\xB4[\\x02\\u03C4\\u03CC\\x07p\\x02\" +\n\t\t\"\\x02\\u03C5\\u03CC\\x07s\\x02\\x02\\u03C6\\u03CC\\x07t\\x02\\x02\\u03C7\\u03CC\\x05\" +\n\t\t\"\\xB8]\\x02\\u03C8\\u03CC\\x05\\xBC_\\x02\\u03C9\\u03CC\\x05\\xC4c\\x02\\u03CA\\u03CC\" +\n\t\t\"\\x05\\xC0a\\x02\\u03CB\\u03B9\\x03\\x02\\x02\\x02\\u03CB\\u03BA\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03CB\\u03BB\\x03\\x02\\x02\\x02\\u03CB\\u03BC\\x03\\x02\\x02\\x02\\u03CB\\u03BD\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03CB\\u03BE\\x03\\x02\\x02\\x02\\u03CB\\u03BF\\x03\\x02\\x02\\x02\\u03CB\" +\n\t\t\"\\u03C0\\x03\\x02\\x02\\x02\\u03CB\\u03C1\\x03\\x02\\x02\\x02\\u03CB\\u03C2\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03CB\\u03C3\\x03\\x02\\x02\\x02\\u03CB\\u03C4\\x03\\x02\\x02\\x02\\u03CB\" +\n\t\t\"\\u03C5\\x03\\x02\\x02\\x02\\u03CB\\u03C6\\x03\\x02\\x02\\x02\\u03CB\\u03C7\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03CB\\u03C8\\x03\\x02\\x02\\x02\\u03CB\\u03C9\\x03\\x02\\x02\\x02\\u03CB\" +\n\t\t\"\\u03CA\\x03\\x02\\x02\\x02\\u03CC\\x97\\x03\\x02\\x02\\x02\\u03CD\\u03D1\\x05\\x9CO\" +\n\t\t\"\\x02\\u03CE\\u03D1\\x05\\xB6\\\\\\x02\\u03CF\\u03D1\\x05\\x9AN\\x02\\u03D0\\u03CD\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03D0\\u03CE\\x03\\x02\\x02\\x02\\u03D0\\u03CF\\x03\\x02\\x02\\x02\\u03D1\" +\n\t\t\"\\x99\\x03\\x02\\x02\\x02\\u03D2\\u03D3\\x05\\xBE`\\x02\\u03D3\\u03D4\\x07\\'\\x02\\x02\" +\n\t\t\"\\u03D4\\u03D5\\x05\\xBE`\\x02\\u03D5\\x9B\\x03\\x02\\x02\\x02\\u03D6\\u03DB\\x075\\x02\" +\n\t\t\"\\x02\\u03D7\\u03DB\\x07&\\x02\\x02\\u03D8\\u03DB\\x07<\\x02\\x02\\u03D9\\u03DB\\x05\" +\n\t\t\"\\xBE`\\x02\\u03DA\\u03D6\\x03\\x02\\x02\\x02\\u03DA\\u03D7\\x03\\x02\\x02\\x02\\u03DA\" +\n\t\t\"\\u03D8\\x03\\x02\\x02\\x02\\u03DA\\u03D9\\x03\\x02\\x02\\x02\\u03DB\\u03E8\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03DC\\u03DE\\x07\\x19\\x02\\x02\\u03DD\\u03DF\\x05\\x98M\\x02\\u03DE\\u03DD\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u03DE\\u03DF\\x03\\x02\\x02\\x02\\u03DF\\u03E4\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03E0\\u03E1\\x07\\x12\\x02\\x02\\u03E1\\u03E3\\x05\\x98M\\x02\\u03E2\\u03E0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03E3\\u03E6\\x03\\x02\\x02\\x02\\u03E4\\u03E2\\x03\\x02\\x02\\x02\\u03E4\" +\n\t\t\"\\u03E5\\x03\\x02\\x02\\x02\\u03E5\\u03E7\\x03\\x02\\x02\\x02\\u03E6\\u03E4\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u03E7\\u03E9\\x07\\x1A\\x02\\x02\\u03E8\\u03DC\\x03\\x02\\x02\\x02\\u03E8\" +\n\t\t\"\\u03E9\\x03\\x02\\x02\\x02\\u03E9\\x9D\\x03\\x02\\x02\\x02\\u03EA\\u03EB\\x07[\\x02\" +\n\t\t\"\\x02\\u03EB\\u03EE\\x05\\xA2R\\x02\\u03EC\\u03ED\\x07\\\\\\x02\\x02\\u03ED\\u03EF\\x05\" +\n\t\t\"\\x98M\\x02\\u03EE\\u03EC\\x03\\x02\\x02\\x02\\u03EE\\u03EF\\x03\\x02\\x02\\x02\\u03EF\" +\n\t\t\"\\x9F\\x03\\x02\\x02\\x02\\u03F0\\u03F1\\x05\\xA2R\\x02\\u03F1\\u03F2\\x07\\\\\\x02\\x02\" +\n\t\t\"\\u03F2\\u03F3\\x05\\x98M\\x02\\u03F3\\xA1\\x03\\x02\\x02\\x02\\u03F4\\u03FB\\x05\\xBE\" +\n\t\t\"`\\x02\\u03F5\\u03FB\\x05\\x9AN\\x02\\u03F6\\u03F7\\x07\\x19\\x02\\x02\\u03F7\\u03F8\" +\n\t\t\"\\x05\\xA4S\\x02\\u03F8\\u03F9\\x07\\x1A\\x02\\x02\\u03F9\\u03FB\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u03FA\\u03F4\\x03\\x02\\x02\\x02\\u03FA\\u03F5\\x03\\x02\\x02\\x02\\u03FA\\u03F6\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u03FB\\xA3\\x03\\x02\\x02\\x02\\u03FC\\u0401\\x05\\xBE`\\x02\\u03FD\" +\n\t\t\"\\u03FE\\x07\\x12\\x02\\x02\\u03FE\\u0400\\x05\\xBE`\\x02\\u03FF\\u03FD\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0400\\u0403\\x03\\x02\\x02\\x02\\u0401\\u03FF\\x03\\x02\\x02\\x02\\u0401\\u0402\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0402\\xA5\\x03\\x02\\x02\\x02\\u0403\\u0401\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0404\\u0405\\x05\\x98M\\x02\\u0405\\u0406\\x07]\\x02\\x02\\u0406\\u0407\\x05\\xBE\" +\n\t\t\"`\\x02\\u0407\\xA7\\x03\\x02\\x02\\x02\\u0408\\u0409\\x05\\xBE`\\x02\\u0409\\u040A\\x07\" +\n\t\t\"@\\x02\\x02\\u040A\\xA9\\x03\\x02\\x02\\x02\\u040B\\u040C\\x07^\\x02\\x02\\u040C\\u0410\" +\n\t\t\"\\x05\\x98M\\x02\\u040D\\u040F\\x05\\xACW\\x02\\u040E\\u040D\\x03\\x02\\x02\\x02\\u040F\" +\n\t\t\"\\u0412\\x03\\x02\\x02\\x02\\u0410\\u040E\\x03\\x02\\x02\\x02\\u0410\\u0411\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u0411\\xAB\\x03\\x02\\x02\\x02\\u0412\\u0410\\x03\\x02\\x02\\x02\\u0413\\u0414\" +\n\t\t\"\\x07_\\x02\\x02\\u0414\\u0415\\x05\\xB6\\\\\\x02\\u0415\\u0416\\x05\\x94K\\x02\\u0416\" +\n\t\t\"\\u041A\\x03\\x02\\x02\\x02\\u0417\\u0418\\x07`\\x02\\x02\\u0418\\u041A\\x05\\x94K\\x02\" +\n\t\t\"\\u0419\\u0413\\x03\\x02\\x02\\x02\\u0419\\u0417\\x03\\x02\\x02\\x02\\u041A\\xAD\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u041B\\u041C\\x07 \\x02\\x02\\u041C\\u041D\\x05\\xBE`\\x02\\u041D\\u041F\" +\n\t\t\"\\x07\\x19\\x02\\x02\\u041E\\u0420\\x05\\xA4S\\x02\\u041F\\u041E\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u041F\\u0420\\x03\\x02\\x02\\x02\\u0420\\u0421\\x03\\x02\\x02\\x02\\u0421\\u0423\\x07\" +\n\t\t\"\\x1A\\x02\\x02\\u0422\\u0424\\x05\\xB0Y\\x02\\u0423\\u0422\\x03\\x02\\x02\\x02\\u0423\" +\n\t\t\"\\u0424\\x03\\x02\\x02\\x02\\u0424\\u0425\\x03\\x02\\x02\\x02\\u0425\\u0426\\x05\\x94\" +\n\t\t\"K\\x02\\u0426\\xAF\\x03\\x02\\x02\\x02\\u0427\\u0428\\x07a\\x02\\x02\\u0428\\u0429\\x05\" +\n\t\t\"\\xA4S\\x02\\u0429\\xB1\\x03\\x02\\x02\\x02\\u042A\\u042D\\x07\\x1D\\x02\\x02\\u042B\" +\n\t\t\"\\u042E\\x05\\x94K\\x02\\u042C\\u042E\\x05\\x98M\\x02\\u042D\\u042B\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u042D\\u042C\\x03\\x02\\x02\\x02\\u042E\\u042F\\x03\\x02\\x02\\x02\\u042F\\u0432\\x05\" +\n\t\t\"\\x98M\\x02\\u0430\\u0433\\x05\\x94K\\x02\\u0431\\u0433\\x05\\x98M\\x02\\u0432\\u0430\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0432\\u0431\\x03\\x02\\x02\\x02\\u0433\\u0434\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0434\\u0435\\x05\\x94K\\x02\\u0435\\xB3\\x03\\x02\\x02\\x02\\u0436\\u0437\\x07-\\x02\" +\n\t\t\"\\x02\\u0437\\u0438\\x05\\x98M\\x02\\u0438\\u0439\\x05\\x94K\\x02\\u0439\\xB5\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u043A\\u043F\\x05\\xC4c\\x02\\u043B\\u043F\\x07j\\x02\\x02\\u043C\\u043F\" +\n\t\t\"\\x07k\\x02\\x02\\u043D\\u043F\\x05\\xC0a\\x02\\u043E\\u043A\\x03\\x02\\x02\\x02\\u043E\" +\n\t\t\"\\u043B\\x03\\x02\\x02\\x02\\u043E\\u043C\\x03\\x02\\x02\\x02\\u043E\\u043D\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u043F\\xB7\\x03\\x02\\x02\\x02\\u0440\\u0441\\x073\\x02\\x02\\u0441\\u0442\" +\n\t\t\"\\x05\\xBE`\\x02\\u0442\\u0443\\x05\\x94K\\x02\\u0443\\xB9\\x03\\x02\";\n\tprivate static readonly _serializedATNSegment2: string =\n\t\t\"\\x02\\x02\\u0444\\u0446\\x07\\x19\\x02\\x02\\u0445\\u0447\\x05\\x86D\\x02\\u0446\\u0445\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0446\\u0447\\x03\\x02\\x02\\x02\\u0447\\u044E\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0448\\u044A\\x07\\x12\\x02\\x02\\u0449\\u044B\\x05\\x86D\\x02\\u044A\\u0449\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u044A\\u044B\\x03\\x02\\x02\\x02\\u044B\\u044D\\x03\\x02\\x02\\x02\\u044C\" +\n\t\t\"\\u0448\\x03\\x02\\x02\\x02\\u044D\\u0450\\x03\\x02\\x02\\x02\\u044E\\u044C\\x03\\x02\" +\n\t\t\"\\x02\\x02\\u044E\\u044F\\x03\\x02\\x02\\x02\\u044F\\u0451\\x03\\x02\\x02\\x02\\u0450\" +\n\t\t\"\\u044E\\x03\\x02\\x02\\x02\\u0451\\u045F\\x07\\x1A\\x02\\x02\\u0452\\u045B\\x07$\\x02\" +\n\t\t\"\\x02\\u0453\\u0458\\x05\\x86D\\x02\\u0454\\u0455\\x07\\x12\\x02\\x02\\u0455\\u0457\" +\n\t\t\"\\x05\\x86D\\x02\\u0456\\u0454\\x03\\x02\\x02\\x02\\u0457\\u045A\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0458\\u0456\\x03\\x02\\x02\\x02\\u0458\\u0459\\x03\\x02\\x02\\x02\\u0459\\u045C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u045A\\u0458\\x03\\x02\\x02\\x02\\u045B\\u0453\\x03\\x02\\x02\\x02\\u045B\" +\n\t\t\"\\u045C\\x03\\x02\\x02\\x02\\u045C\\u045D\\x03\\x02\\x02\\x02\\u045D\\u045F\\x07%\\x02\" +\n\t\t\"\\x02\\u045E\\u0444\\x03\\x02\\x02\\x02\\u045E\\u0452\\x03\\x02\\x02\\x02\\u045F\\xBB\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0460\\u0462\\t\\x0F\\x02\\x02\\u0461\\u0463\\x07l\\x02\\x02\\u0462\" +\n\t\t\"\\u0461\\x03\\x02\\x02\\x02\\u0462\\u0463\\x03\\x02\\x02\\x02\\u0463\\xBD\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0464\\u0465\\t\\x10\\x02\\x02\\u0465\\xBF\\x03\\x02\\x02\\x02\\u0466\\u0468\\x07\" +\n\t\t\"m\\x02\\x02\\u0467\\u0466\\x03\\x02\\x02\\x02\\u0468\\u0469\\x03\\x02\\x02\\x02\\u0469\" +\n\t\t\"\\u0467\\x03\\x02\\x02\\x02\\u0469\\u046A\\x03\\x02\\x02\\x02\\u046A\\xC1\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u046B\\u0477\\x07c\\x02\\x02\\u046C\\u046D\\x07\\x19\\x02\\x02\\u046D\\u0472\" +\n\t\t\"\\x05L\\'\\x02\\u046E\\u046F\\x07\\x12\\x02\\x02\\u046F\\u0471\\x05L\\'\\x02\\u0470\\u046E\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u0471\\u0474\\x03\\x02\\x02\\x02\\u0472\\u0470\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u0472\\u0473\\x03\\x02\\x02\\x02\\u0473\\u0475\\x03\\x02\\x02\\x02\\u0474\\u0472\\x03\" +\n\t\t\"\\x02\\x02\\x02\\u0475\\u0476\\x07\\x1A\\x02\\x02\\u0476\\u0478\\x03\\x02\\x02\\x02\\u0477\" +\n\t\t\"\\u046C\\x03\\x02\\x02\\x02\\u0477\\u0478\\x03\\x02\\x02\\x02\\u0478\\xC3\\x03\\x02\\x02\" +\n\t\t\"\\x02\\u0479\\u047B\\x07\\x84\\x02\\x02\\u047A\\u0479\\x03\\x02\\x02\\x02\\u047B\\u047C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\u047C\\u047A\\x03\\x02\\x02\\x02\\u047C\\u047D\\x03\\x02\\x02\\x02\" +\n\t\t\"\\u047D\\xC5\\x03\\x02\\x02\\x02\\x81\\xD0\\xD2\\xE1\\xE5\\xEA\\xF0\\xF4\\xF7\\xFC\\u0102\" +\n\t\t\"\\u0109\\u010D\\u011A\\u0122\\u0127\\u0131\\u0134\\u013A\\u0142\\u0145\\u0150\\u0159\" +\n\t\t\"\\u015B\\u0161\\u017C\\u017F\\u018A\\u018F\\u019B\\u019E\\u01A5\\u01A9\\u01AB\\u01B0\" +\n\t\t\"\\u01B5\\u01B8\\u01BE\\u01C2\\u01C6\\u01CB\\u01D8\\u01DA\\u01E1\\u01EB\\u01F1\\u01FC\" +\n\t\t\"\\u01FF\\u0205\\u0208\\u0210\\u0213\\u0219\\u021C\\u0224\\u0227\\u022D\\u0231\\u023C\" +\n\t\t\"\\u0241\\u0246\\u024E\\u0253\\u0261\\u0263\\u0268\\u0272\\u0286\\u0292\\u0297\\u029D\" +\n\t\t\"\\u02A1\\u02A4\\u02B0\\u02B9\\u02BD\\u02C0\\u02C7\\u02CD\\u02E3\\u02F9\\u02FD\\u0302\" +\n\t\t\"\\u0306\\u030A\\u030F\\u0314\\u0318\\u0330\\u0366\\u036A\\u037A\\u037C\\u0388\\u038F\" +\n\t\t\"\\u0397\\u039B\\u03A3\\u03A7\\u03A9\\u03B4\\u03CB\\u03D0\\u03DA\\u03DE\\u03E4\\u03E8\" +\n\t\t\"\\u03EE\\u03FA\\u0401\\u0410\\u0419\\u041F\\u0423\\u042D\\u0432\\u043E\\u0446\\u044A\" +\n\t\t\"\\u044E\\u0458\\u045B\\u045E\\u0462\\u0469\\u0472\\u0477\\u047C\";\n\tpublic static readonly _serializedATN: string = Utils.join(\n\t\t[\n\t\t\tSolidityParser._serializedATNSegment0,\n\t\t\tSolidityParser._serializedATNSegment1,\n\t\t\tSolidityParser._serializedATNSegment2,\n\t\t],\n\t\t\"\",\n\t);\n\tpublic static __ATN: ATN;\n\tpublic static get _ATN(): ATN {\n\t\tif (!SolidityParser.__ATN) {\n\t\t\tSolidityParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(SolidityParser._serializedATN));\n\t\t}\n\n\t\treturn SolidityParser.__ATN;\n\t}\n\n}\n\nexport class SourceUnitContext extends ParserRuleContext {\n\tpublic EOF(): TerminalNode { return this.getToken(SolidityParser.EOF, 0); }\n\tpublic pragmaDirective(): PragmaDirectiveContext[];\n\tpublic pragmaDirective(i: number): PragmaDirectiveContext;\n\tpublic pragmaDirective(i?: number): PragmaDirectiveContext | PragmaDirectiveContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(PragmaDirectiveContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, PragmaDirectiveContext);\n\t\t}\n\t}\n\tpublic importDirective(): ImportDirectiveContext[];\n\tpublic importDirective(i: number): ImportDirectiveContext;\n\tpublic importDirective(i?: number): ImportDirectiveContext | ImportDirectiveContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ImportDirectiveContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ImportDirectiveContext);\n\t\t}\n\t}\n\tpublic contractDefinition(): ContractDefinitionContext[];\n\tpublic contractDefinition(i: number): ContractDefinitionContext;\n\tpublic contractDefinition(i?: number): ContractDefinitionContext | ContractDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ContractDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ContractDefinitionContext);\n\t\t}\n\t}\n\tpublic enumDefinition(): EnumDefinitionContext[];\n\tpublic enumDefinition(i: number): EnumDefinitionContext;\n\tpublic enumDefinition(i?: number): EnumDefinitionContext | EnumDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(EnumDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, EnumDefinitionContext);\n\t\t}\n\t}\n\tpublic structDefinition(): StructDefinitionContext[];\n\tpublic structDefinition(i: number): StructDefinitionContext;\n\tpublic structDefinition(i?: number): StructDefinitionContext | StructDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StructDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StructDefinitionContext);\n\t\t}\n\t}\n\tpublic functionDefinition(): FunctionDefinitionContext[];\n\tpublic functionDefinition(i: number): FunctionDefinitionContext;\n\tpublic functionDefinition(i?: number): FunctionDefinitionContext | FunctionDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FunctionDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FunctionDefinitionContext);\n\t\t}\n\t}\n\tpublic fileLevelConstant(): FileLevelConstantContext[];\n\tpublic fileLevelConstant(i: number): FileLevelConstantContext;\n\tpublic fileLevelConstant(i?: number): FileLevelConstantContext | FileLevelConstantContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FileLevelConstantContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FileLevelConstantContext);\n\t\t}\n\t}\n\tpublic customErrorDefinition(): CustomErrorDefinitionContext[];\n\tpublic customErrorDefinition(i: number): CustomErrorDefinitionContext;\n\tpublic customErrorDefinition(i?: number): CustomErrorDefinitionContext | CustomErrorDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(CustomErrorDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, CustomErrorDefinitionContext);\n\t\t}\n\t}\n\tpublic typeDefinition(): TypeDefinitionContext[];\n\tpublic typeDefinition(i: number): TypeDefinitionContext;\n\tpublic typeDefinition(i?: number): TypeDefinitionContext | TypeDefinitionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(TypeDefinitionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, TypeDefinitionContext);\n\t\t}\n\t}\n\tpublic usingForDeclaration(): UsingForDeclarationContext[];\n\tpublic usingForDeclaration(i: number): UsingForDeclarationContext;\n\tpublic usingForDeclaration(i?: number): UsingForDeclarationContext | UsingForDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(UsingForDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, UsingForDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_sourceUnit; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterSourceUnit) {\n\t\t\tlistener.enterSourceUnit(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitSourceUnit) {\n\t\t\tlistener.exitSourceUnit(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitSourceUnit) {\n\t\t\treturn visitor.visitSourceUnit(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PragmaDirectiveContext extends ParserRuleContext {\n\tpublic pragmaName(): PragmaNameContext {\n\t\treturn this.getRuleContext(0, PragmaNameContext);\n\t}\n\tpublic pragmaValue(): PragmaValueContext {\n\t\treturn this.getRuleContext(0, PragmaValueContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_pragmaDirective; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPragmaDirective) {\n\t\t\tlistener.enterPragmaDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPragmaDirective) {\n\t\t\tlistener.exitPragmaDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPragmaDirective) {\n\t\t\treturn visitor.visitPragmaDirective(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PragmaNameContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_pragmaName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPragmaName) {\n\t\t\tlistener.enterPragmaName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPragmaName) {\n\t\t\tlistener.exitPragmaName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPragmaName) {\n\t\t\treturn visitor.visitPragmaName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PragmaValueContext extends ParserRuleContext {\n\tpublic version(): VersionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VersionContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_pragmaValue; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPragmaValue) {\n\t\t\tlistener.enterPragmaValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPragmaValue) {\n\t\t\tlistener.exitPragmaValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPragmaValue) {\n\t\t\treturn visitor.visitPragmaValue(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VersionContext extends ParserRuleContext {\n\tpublic versionConstraint(): VersionConstraintContext[];\n\tpublic versionConstraint(i: number): VersionConstraintContext;\n\tpublic versionConstraint(i?: number): VersionConstraintContext | VersionConstraintContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(VersionConstraintContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, VersionConstraintContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_version; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVersion) {\n\t\t\tlistener.enterVersion(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVersion) {\n\t\t\tlistener.exitVersion(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVersion) {\n\t\t\treturn visitor.visitVersion(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VersionOperatorContext extends ParserRuleContext {\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_versionOperator; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVersionOperator) {\n\t\t\tlistener.enterVersionOperator(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVersionOperator) {\n\t\t\tlistener.exitVersionOperator(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVersionOperator) {\n\t\t\treturn visitor.visitVersionOperator(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VersionConstraintContext extends ParserRuleContext {\n\tpublic VersionLiteral(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.VersionLiteral, 0); }\n\tpublic versionOperator(): VersionOperatorContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VersionOperatorContext);\n\t}\n\tpublic DecimalNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.DecimalNumber, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_versionConstraint; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVersionConstraint) {\n\t\t\tlistener.enterVersionConstraint(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVersionConstraint) {\n\t\t\tlistener.exitVersionConstraint(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVersionConstraint) {\n\t\t\treturn visitor.visitVersionConstraint(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ImportDeclarationContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_importDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterImportDeclaration) {\n\t\t\tlistener.enterImportDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitImportDeclaration) {\n\t\t\tlistener.exitImportDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitImportDeclaration) {\n\t\t\treturn visitor.visitImportDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ImportDirectiveContext extends ParserRuleContext {\n\tpublic importPath(): ImportPathContext {\n\t\treturn this.getRuleContext(0, ImportPathContext);\n\t}\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tpublic importDeclaration(): ImportDeclarationContext[];\n\tpublic importDeclaration(i: number): ImportDeclarationContext;\n\tpublic importDeclaration(i?: number): ImportDeclarationContext | ImportDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ImportDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ImportDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_importDirective; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterImportDirective) {\n\t\t\tlistener.enterImportDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitImportDirective) {\n\t\t\tlistener.exitImportDirective(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitImportDirective) {\n\t\t\treturn visitor.visitImportDirective(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ImportPathContext extends ParserRuleContext {\n\tpublic StringLiteralFragment(): TerminalNode { return this.getToken(SolidityParser.StringLiteralFragment, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_importPath; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterImportPath) {\n\t\t\tlistener.enterImportPath(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitImportPath) {\n\t\t\tlistener.exitImportPath(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitImportPath) {\n\t\t\treturn visitor.visitImportPath(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ContractDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic inheritanceSpecifier(): InheritanceSpecifierContext[];\n\tpublic inheritanceSpecifier(i: number): InheritanceSpecifierContext;\n\tpublic inheritanceSpecifier(i?: number): InheritanceSpecifierContext | InheritanceSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(InheritanceSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, InheritanceSpecifierContext);\n\t\t}\n\t}\n\tpublic contractPart(): ContractPartContext[];\n\tpublic contractPart(i: number): ContractPartContext;\n\tpublic contractPart(i?: number): ContractPartContext | ContractPartContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ContractPartContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ContractPartContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_contractDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterContractDefinition) {\n\t\t\tlistener.enterContractDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitContractDefinition) {\n\t\t\tlistener.exitContractDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitContractDefinition) {\n\t\t\treturn visitor.visitContractDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class InheritanceSpecifierContext extends ParserRuleContext {\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext {\n\t\treturn this.getRuleContext(0, UserDefinedTypeNameContext);\n\t}\n\tpublic expressionList(): ExpressionListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_inheritanceSpecifier; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterInheritanceSpecifier) {\n\t\t\tlistener.enterInheritanceSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitInheritanceSpecifier) {\n\t\t\tlistener.exitInheritanceSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitInheritanceSpecifier) {\n\t\t\treturn visitor.visitInheritanceSpecifier(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ContractPartContext extends ParserRuleContext {\n\tpublic stateVariableDeclaration(): StateVariableDeclarationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StateVariableDeclarationContext);\n\t}\n\tpublic usingForDeclaration(): UsingForDeclarationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UsingForDeclarationContext);\n\t}\n\tpublic structDefinition(): StructDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StructDefinitionContext);\n\t}\n\tpublic modifierDefinition(): ModifierDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ModifierDefinitionContext);\n\t}\n\tpublic functionDefinition(): FunctionDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, FunctionDefinitionContext);\n\t}\n\tpublic eventDefinition(): EventDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, EventDefinitionContext);\n\t}\n\tpublic enumDefinition(): EnumDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, EnumDefinitionContext);\n\t}\n\tpublic customErrorDefinition(): CustomErrorDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, CustomErrorDefinitionContext);\n\t}\n\tpublic typeDefinition(): TypeDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeDefinitionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_contractPart; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterContractPart) {\n\t\t\tlistener.enterContractPart(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitContractPart) {\n\t\t\tlistener.exitContractPart(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitContractPart) {\n\t\t\treturn visitor.visitContractPart(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StateVariableDeclarationContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic PublicKeyword(): TerminalNode[];\n\tpublic PublicKeyword(i: number): TerminalNode;\n\tpublic PublicKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PublicKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PublicKeyword, i);\n\t\t}\n\t}\n\tpublic InternalKeyword(): TerminalNode[];\n\tpublic InternalKeyword(i: number): TerminalNode;\n\tpublic InternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.InternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.InternalKeyword, i);\n\t\t}\n\t}\n\tpublic PrivateKeyword(): TerminalNode[];\n\tpublic PrivateKeyword(i: number): TerminalNode;\n\tpublic PrivateKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PrivateKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PrivateKeyword, i);\n\t\t}\n\t}\n\tpublic ConstantKeyword(): TerminalNode[];\n\tpublic ConstantKeyword(i: number): TerminalNode;\n\tpublic ConstantKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ConstantKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ConstantKeyword, i);\n\t\t}\n\t}\n\tpublic ImmutableKeyword(): TerminalNode[];\n\tpublic ImmutableKeyword(i: number): TerminalNode;\n\tpublic ImmutableKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ImmutableKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ImmutableKeyword, i);\n\t\t}\n\t}\n\tpublic overrideSpecifier(): OverrideSpecifierContext[];\n\tpublic overrideSpecifier(i: number): OverrideSpecifierContext;\n\tpublic overrideSpecifier(i?: number): OverrideSpecifierContext | OverrideSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(OverrideSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, OverrideSpecifierContext);\n\t\t}\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_stateVariableDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStateVariableDeclaration) {\n\t\t\tlistener.enterStateVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStateVariableDeclaration) {\n\t\t\tlistener.exitStateVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStateVariableDeclaration) {\n\t\t\treturn visitor.visitStateVariableDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FileLevelConstantContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic ConstantKeyword(): TerminalNode { return this.getToken(SolidityParser.ConstantKeyword, 0); }\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_fileLevelConstant; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFileLevelConstant) {\n\t\t\tlistener.enterFileLevelConstant(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFileLevelConstant) {\n\t\t\tlistener.exitFileLevelConstant(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFileLevelConstant) {\n\t\t\treturn visitor.visitFileLevelConstant(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class CustomErrorDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic parameterList(): ParameterListContext {\n\t\treturn this.getRuleContext(0, ParameterListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_customErrorDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterCustomErrorDefinition) {\n\t\t\tlistener.enterCustomErrorDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitCustomErrorDefinition) {\n\t\t\tlistener.exitCustomErrorDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitCustomErrorDefinition) {\n\t\t\treturn visitor.visitCustomErrorDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TypeDefinitionContext extends ParserRuleContext {\n\tpublic TypeKeyword(): TerminalNode { return this.getToken(SolidityParser.TypeKeyword, 0); }\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic elementaryTypeName(): ElementaryTypeNameContext {\n\t\treturn this.getRuleContext(0, ElementaryTypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_typeDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTypeDefinition) {\n\t\t\tlistener.enterTypeDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTypeDefinition) {\n\t\t\tlistener.exitTypeDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTypeDefinition) {\n\t\t\treturn visitor.visitTypeDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UsingForDeclarationContext extends ParserRuleContext {\n\tpublic usingForObject(): UsingForObjectContext {\n\t\treturn this.getRuleContext(0, UsingForObjectContext);\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tpublic GlobalKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.GlobalKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_usingForDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUsingForDeclaration) {\n\t\t\tlistener.enterUsingForDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUsingForDeclaration) {\n\t\t\tlistener.exitUsingForDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUsingForDeclaration) {\n\t\t\treturn visitor.visitUsingForDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UsingForObjectContext extends ParserRuleContext {\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext[];\n\tpublic userDefinedTypeName(i: number): UserDefinedTypeNameContext;\n\tpublic userDefinedTypeName(i?: number): UserDefinedTypeNameContext | UserDefinedTypeNameContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(UserDefinedTypeNameContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, UserDefinedTypeNameContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_usingForObject; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUsingForObject) {\n\t\t\tlistener.enterUsingForObject(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUsingForObject) {\n\t\t\tlistener.exitUsingForObject(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUsingForObject) {\n\t\t\treturn visitor.visitUsingForObject(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StructDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic variableDeclaration(): VariableDeclarationContext[];\n\tpublic variableDeclaration(i: number): VariableDeclarationContext;\n\tpublic variableDeclaration(i?: number): VariableDeclarationContext | VariableDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(VariableDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, VariableDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_structDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStructDefinition) {\n\t\t\tlistener.enterStructDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStructDefinition) {\n\t\t\tlistener.exitStructDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStructDefinition) {\n\t\t\treturn visitor.visitStructDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ModifierDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic block(): BlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BlockContext);\n\t}\n\tpublic parameterList(): ParameterListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ParameterListContext);\n\t}\n\tpublic VirtualKeyword(): TerminalNode[];\n\tpublic VirtualKeyword(i: number): TerminalNode;\n\tpublic VirtualKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.VirtualKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.VirtualKeyword, i);\n\t\t}\n\t}\n\tpublic overrideSpecifier(): OverrideSpecifierContext[];\n\tpublic overrideSpecifier(i: number): OverrideSpecifierContext;\n\tpublic overrideSpecifier(i?: number): OverrideSpecifierContext | OverrideSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(OverrideSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, OverrideSpecifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_modifierDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterModifierDefinition) {\n\t\t\tlistener.enterModifierDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitModifierDefinition) {\n\t\t\tlistener.exitModifierDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitModifierDefinition) {\n\t\t\treturn visitor.visitModifierDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ModifierInvocationContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic expressionList(): ExpressionListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_modifierInvocation; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterModifierInvocation) {\n\t\t\tlistener.enterModifierInvocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitModifierInvocation) {\n\t\t\tlistener.exitModifierInvocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitModifierInvocation) {\n\t\t\treturn visitor.visitModifierInvocation(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionDefinitionContext extends ParserRuleContext {\n\tpublic functionDescriptor(): FunctionDescriptorContext {\n\t\treturn this.getRuleContext(0, FunctionDescriptorContext);\n\t}\n\tpublic parameterList(): ParameterListContext {\n\t\treturn this.getRuleContext(0, ParameterListContext);\n\t}\n\tpublic modifierList(): ModifierListContext {\n\t\treturn this.getRuleContext(0, ModifierListContext);\n\t}\n\tpublic block(): BlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BlockContext);\n\t}\n\tpublic returnParameters(): ReturnParametersContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ReturnParametersContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionDefinition) {\n\t\t\tlistener.enterFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionDefinition) {\n\t\t\tlistener.exitFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionDefinition) {\n\t\t\treturn visitor.visitFunctionDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionDescriptorContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic ConstructorKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ConstructorKeyword, 0); }\n\tpublic FallbackKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.FallbackKeyword, 0); }\n\tpublic ReceiveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ReceiveKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionDescriptor; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionDescriptor) {\n\t\t\tlistener.enterFunctionDescriptor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionDescriptor) {\n\t\t\tlistener.exitFunctionDescriptor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionDescriptor) {\n\t\t\treturn visitor.visitFunctionDescriptor(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ReturnParametersContext extends ParserRuleContext {\n\tpublic parameterList(): ParameterListContext {\n\t\treturn this.getRuleContext(0, ParameterListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_returnParameters; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterReturnParameters) {\n\t\t\tlistener.enterReturnParameters(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitReturnParameters) {\n\t\t\tlistener.exitReturnParameters(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitReturnParameters) {\n\t\t\treturn visitor.visitReturnParameters(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ModifierListContext extends ParserRuleContext {\n\tpublic ExternalKeyword(): TerminalNode[];\n\tpublic ExternalKeyword(i: number): TerminalNode;\n\tpublic ExternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ExternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ExternalKeyword, i);\n\t\t}\n\t}\n\tpublic PublicKeyword(): TerminalNode[];\n\tpublic PublicKeyword(i: number): TerminalNode;\n\tpublic PublicKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PublicKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PublicKeyword, i);\n\t\t}\n\t}\n\tpublic InternalKeyword(): TerminalNode[];\n\tpublic InternalKeyword(i: number): TerminalNode;\n\tpublic InternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.InternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.InternalKeyword, i);\n\t\t}\n\t}\n\tpublic PrivateKeyword(): TerminalNode[];\n\tpublic PrivateKeyword(i: number): TerminalNode;\n\tpublic PrivateKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.PrivateKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.PrivateKeyword, i);\n\t\t}\n\t}\n\tpublic VirtualKeyword(): TerminalNode[];\n\tpublic VirtualKeyword(i: number): TerminalNode;\n\tpublic VirtualKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.VirtualKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.VirtualKeyword, i);\n\t\t}\n\t}\n\tpublic stateMutability(): StateMutabilityContext[];\n\tpublic stateMutability(i: number): StateMutabilityContext;\n\tpublic stateMutability(i?: number): StateMutabilityContext | StateMutabilityContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StateMutabilityContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StateMutabilityContext);\n\t\t}\n\t}\n\tpublic modifierInvocation(): ModifierInvocationContext[];\n\tpublic modifierInvocation(i: number): ModifierInvocationContext;\n\tpublic modifierInvocation(i?: number): ModifierInvocationContext | ModifierInvocationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ModifierInvocationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ModifierInvocationContext);\n\t\t}\n\t}\n\tpublic overrideSpecifier(): OverrideSpecifierContext[];\n\tpublic overrideSpecifier(i: number): OverrideSpecifierContext;\n\tpublic overrideSpecifier(i?: number): OverrideSpecifierContext | OverrideSpecifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(OverrideSpecifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, OverrideSpecifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_modifierList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterModifierList) {\n\t\t\tlistener.enterModifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitModifierList) {\n\t\t\tlistener.exitModifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitModifierList) {\n\t\t\treturn visitor.visitModifierList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EventDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic eventParameterList(): EventParameterListContext {\n\t\treturn this.getRuleContext(0, EventParameterListContext);\n\t}\n\tpublic AnonymousKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.AnonymousKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_eventDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEventDefinition) {\n\t\t\tlistener.enterEventDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEventDefinition) {\n\t\t\tlistener.exitEventDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEventDefinition) {\n\t\t\treturn visitor.visitEventDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EnumValueContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_enumValue; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEnumValue) {\n\t\t\tlistener.enterEnumValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEnumValue) {\n\t\t\tlistener.exitEnumValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEnumValue) {\n\t\t\treturn visitor.visitEnumValue(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EnumDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic enumValue(): EnumValueContext[];\n\tpublic enumValue(i: number): EnumValueContext;\n\tpublic enumValue(i?: number): EnumValueContext | EnumValueContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(EnumValueContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, EnumValueContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_enumDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEnumDefinition) {\n\t\t\tlistener.enterEnumDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEnumDefinition) {\n\t\t\tlistener.exitEnumDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEnumDefinition) {\n\t\t\treturn visitor.visitEnumDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ParameterListContext extends ParserRuleContext {\n\tpublic parameter(): ParameterContext[];\n\tpublic parameter(i: number): ParameterContext;\n\tpublic parameter(i?: number): ParameterContext | ParameterContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ParameterContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ParameterContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_parameterList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterParameterList) {\n\t\t\tlistener.enterParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitParameterList) {\n\t\t\tlistener.exitParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitParameterList) {\n\t\t\treturn visitor.visitParameterList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ParameterContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic storageLocation(): StorageLocationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StorageLocationContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_parameter; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterParameter) {\n\t\t\tlistener.enterParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitParameter) {\n\t\t\tlistener.exitParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitParameter) {\n\t\t\treturn visitor.visitParameter(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EventParameterListContext extends ParserRuleContext {\n\tpublic eventParameter(): EventParameterContext[];\n\tpublic eventParameter(i: number): EventParameterContext;\n\tpublic eventParameter(i?: number): EventParameterContext | EventParameterContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(EventParameterContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, EventParameterContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_eventParameterList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEventParameterList) {\n\t\t\tlistener.enterEventParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEventParameterList) {\n\t\t\tlistener.exitEventParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEventParameterList) {\n\t\t\treturn visitor.visitEventParameterList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EventParameterContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic IndexedKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.IndexedKeyword, 0); }\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_eventParameter; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEventParameter) {\n\t\t\tlistener.enterEventParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEventParameter) {\n\t\t\tlistener.exitEventParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEventParameter) {\n\t\t\treturn visitor.visitEventParameter(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionTypeParameterListContext extends ParserRuleContext {\n\tpublic functionTypeParameter(): FunctionTypeParameterContext[];\n\tpublic functionTypeParameter(i: number): FunctionTypeParameterContext;\n\tpublic functionTypeParameter(i?: number): FunctionTypeParameterContext | FunctionTypeParameterContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FunctionTypeParameterContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FunctionTypeParameterContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionTypeParameterList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionTypeParameterList) {\n\t\t\tlistener.enterFunctionTypeParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionTypeParameterList) {\n\t\t\tlistener.exitFunctionTypeParameterList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionTypeParameterList) {\n\t\t\treturn visitor.visitFunctionTypeParameterList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionTypeParameterContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic storageLocation(): StorageLocationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StorageLocationContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionTypeParameter; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionTypeParameter) {\n\t\t\tlistener.enterFunctionTypeParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionTypeParameter) {\n\t\t\tlistener.exitFunctionTypeParameter(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionTypeParameter) {\n\t\t\treturn visitor.visitFunctionTypeParameter(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VariableDeclarationContext extends ParserRuleContext {\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic storageLocation(): StorageLocationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StorageLocationContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_variableDeclaration; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVariableDeclaration) {\n\t\t\tlistener.enterVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVariableDeclaration) {\n\t\t\tlistener.exitVariableDeclaration(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVariableDeclaration) {\n\t\t\treturn visitor.visitVariableDeclaration(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TypeNameContext extends ParserRuleContext {\n\tpublic elementaryTypeName(): ElementaryTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ElementaryTypeNameContext);\n\t}\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UserDefinedTypeNameContext);\n\t}\n\tpublic mapping(): MappingContext | undefined {\n\t\treturn this.tryGetRuleContext(0, MappingContext);\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tpublic functionTypeName(): FunctionTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, FunctionTypeNameContext);\n\t}\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_typeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTypeName) {\n\t\t\tlistener.enterTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTypeName) {\n\t\t\tlistener.exitTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTypeName) {\n\t\t\treturn visitor.visitTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UserDefinedTypeNameContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_userDefinedTypeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUserDefinedTypeName) {\n\t\t\tlistener.enterUserDefinedTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUserDefinedTypeName) {\n\t\t\tlistener.exitUserDefinedTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUserDefinedTypeName) {\n\t\t\treturn visitor.visitUserDefinedTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class MappingKeyContext extends ParserRuleContext {\n\tpublic elementaryTypeName(): ElementaryTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ElementaryTypeNameContext);\n\t}\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UserDefinedTypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_mappingKey; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterMappingKey) {\n\t\t\tlistener.enterMappingKey(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitMappingKey) {\n\t\t\tlistener.exitMappingKey(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitMappingKey) {\n\t\t\treturn visitor.visitMappingKey(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class MappingContext extends ParserRuleContext {\n\tpublic mappingKey(): MappingKeyContext {\n\t\treturn this.getRuleContext(0, MappingKeyContext);\n\t}\n\tpublic typeName(): TypeNameContext {\n\t\treturn this.getRuleContext(0, TypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_mapping; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterMapping) {\n\t\t\tlistener.enterMapping(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitMapping) {\n\t\t\tlistener.exitMapping(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitMapping) {\n\t\t\treturn visitor.visitMapping(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionTypeNameContext extends ParserRuleContext {\n\tpublic functionTypeParameterList(): FunctionTypeParameterListContext[];\n\tpublic functionTypeParameterList(i: number): FunctionTypeParameterListContext;\n\tpublic functionTypeParameterList(i?: number): FunctionTypeParameterListContext | FunctionTypeParameterListContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(FunctionTypeParameterListContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, FunctionTypeParameterListContext);\n\t\t}\n\t}\n\tpublic InternalKeyword(): TerminalNode[];\n\tpublic InternalKeyword(i: number): TerminalNode;\n\tpublic InternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.InternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.InternalKeyword, i);\n\t\t}\n\t}\n\tpublic ExternalKeyword(): TerminalNode[];\n\tpublic ExternalKeyword(i: number): TerminalNode;\n\tpublic ExternalKeyword(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.ExternalKeyword);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.ExternalKeyword, i);\n\t\t}\n\t}\n\tpublic stateMutability(): StateMutabilityContext[];\n\tpublic stateMutability(i: number): StateMutabilityContext;\n\tpublic stateMutability(i?: number): StateMutabilityContext | StateMutabilityContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StateMutabilityContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StateMutabilityContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionTypeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionTypeName) {\n\t\t\tlistener.enterFunctionTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionTypeName) {\n\t\t\tlistener.exitFunctionTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionTypeName) {\n\t\t\treturn visitor.visitFunctionTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StorageLocationContext extends ParserRuleContext {\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_storageLocation; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStorageLocation) {\n\t\t\tlistener.enterStorageLocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStorageLocation) {\n\t\t\tlistener.exitStorageLocation(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStorageLocation) {\n\t\t\treturn visitor.visitStorageLocation(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StateMutabilityContext extends ParserRuleContext {\n\tpublic PureKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PureKeyword, 0); }\n\tpublic ConstantKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ConstantKeyword, 0); }\n\tpublic ViewKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ViewKeyword, 0); }\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_stateMutability; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStateMutability) {\n\t\t\tlistener.enterStateMutability(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStateMutability) {\n\t\t\tlistener.exitStateMutability(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStateMutability) {\n\t\t\treturn visitor.visitStateMutability(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class BlockContext extends ParserRuleContext {\n\tpublic statement(): StatementContext[];\n\tpublic statement(i: number): StatementContext;\n\tpublic statement(i?: number): StatementContext | StatementContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StatementContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StatementContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_block; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterBlock) {\n\t\t\tlistener.enterBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitBlock) {\n\t\t\tlistener.exitBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitBlock) {\n\t\t\treturn visitor.visitBlock(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StatementContext extends ParserRuleContext {\n\tpublic ifStatement(): IfStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IfStatementContext);\n\t}\n\tpublic tryStatement(): TryStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TryStatementContext);\n\t}\n\tpublic whileStatement(): WhileStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, WhileStatementContext);\n\t}\n\tpublic forStatement(): ForStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ForStatementContext);\n\t}\n\tpublic block(): BlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BlockContext);\n\t}\n\tpublic inlineAssemblyStatement(): InlineAssemblyStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, InlineAssemblyStatementContext);\n\t}\n\tpublic doWhileStatement(): DoWhileStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, DoWhileStatementContext);\n\t}\n\tpublic continueStatement(): ContinueStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ContinueStatementContext);\n\t}\n\tpublic breakStatement(): BreakStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, BreakStatementContext);\n\t}\n\tpublic returnStatement(): ReturnStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ReturnStatementContext);\n\t}\n\tpublic throwStatement(): ThrowStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ThrowStatementContext);\n\t}\n\tpublic emitStatement(): EmitStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, EmitStatementContext);\n\t}\n\tpublic simpleStatement(): SimpleStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, SimpleStatementContext);\n\t}\n\tpublic uncheckedStatement(): UncheckedStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, UncheckedStatementContext);\n\t}\n\tpublic revertStatement(): RevertStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, RevertStatementContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_statement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStatement) {\n\t\t\tlistener.enterStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStatement) {\n\t\t\tlistener.exitStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStatement) {\n\t\t\treturn visitor.visitStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ExpressionStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_expressionStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterExpressionStatement) {\n\t\t\tlistener.enterExpressionStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitExpressionStatement) {\n\t\t\tlistener.exitExpressionStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitExpressionStatement) {\n\t\t\treturn visitor.visitExpressionStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class IfStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic statement(): StatementContext[];\n\tpublic statement(i: number): StatementContext;\n\tpublic statement(i?: number): StatementContext | StatementContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(StatementContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, StatementContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_ifStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterIfStatement) {\n\t\t\tlistener.enterIfStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitIfStatement) {\n\t\t\tlistener.exitIfStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitIfStatement) {\n\t\t\treturn visitor.visitIfStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TryStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic block(): BlockContext {\n\t\treturn this.getRuleContext(0, BlockContext);\n\t}\n\tpublic returnParameters(): ReturnParametersContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ReturnParametersContext);\n\t}\n\tpublic catchClause(): CatchClauseContext[];\n\tpublic catchClause(i: number): CatchClauseContext;\n\tpublic catchClause(i?: number): CatchClauseContext | CatchClauseContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(CatchClauseContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, CatchClauseContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_tryStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTryStatement) {\n\t\t\tlistener.enterTryStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTryStatement) {\n\t\t\tlistener.exitTryStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTryStatement) {\n\t\t\treturn visitor.visitTryStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class CatchClauseContext extends ParserRuleContext {\n\tpublic block(): BlockContext {\n\t\treturn this.getRuleContext(0, BlockContext);\n\t}\n\tpublic parameterList(): ParameterListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ParameterListContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_catchClause; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterCatchClause) {\n\t\t\tlistener.enterCatchClause(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitCatchClause) {\n\t\t\tlistener.exitCatchClause(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitCatchClause) {\n\t\t\treturn visitor.visitCatchClause(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class WhileStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic statement(): StatementContext {\n\t\treturn this.getRuleContext(0, StatementContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_whileStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterWhileStatement) {\n\t\t\tlistener.enterWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitWhileStatement) {\n\t\t\tlistener.exitWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitWhileStatement) {\n\t\t\treturn visitor.visitWhileStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class SimpleStatementContext extends ParserRuleContext {\n\tpublic variableDeclarationStatement(): VariableDeclarationStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VariableDeclarationStatementContext);\n\t}\n\tpublic expressionStatement(): ExpressionStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionStatementContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_simpleStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterSimpleStatement) {\n\t\t\tlistener.enterSimpleStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitSimpleStatement) {\n\t\t\tlistener.exitSimpleStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitSimpleStatement) {\n\t\t\treturn visitor.visitSimpleStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class UncheckedStatementContext extends ParserRuleContext {\n\tpublic block(): BlockContext {\n\t\treturn this.getRuleContext(0, BlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_uncheckedStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterUncheckedStatement) {\n\t\t\tlistener.enterUncheckedStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitUncheckedStatement) {\n\t\t\tlistener.exitUncheckedStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitUncheckedStatement) {\n\t\t\treturn visitor.visitUncheckedStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ForStatementContext extends ParserRuleContext {\n\tpublic statement(): StatementContext {\n\t\treturn this.getRuleContext(0, StatementContext);\n\t}\n\tpublic simpleStatement(): SimpleStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, SimpleStatementContext);\n\t}\n\tpublic expressionStatement(): ExpressionStatementContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionStatementContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_forStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterForStatement) {\n\t\t\tlistener.enterForStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitForStatement) {\n\t\t\tlistener.exitForStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitForStatement) {\n\t\t\treturn visitor.visitForStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class InlineAssemblyStatementContext extends ParserRuleContext {\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tpublic StringLiteralFragment(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.StringLiteralFragment, 0); }\n\tpublic inlineAssemblyStatementFlag(): InlineAssemblyStatementFlagContext | undefined {\n\t\treturn this.tryGetRuleContext(0, InlineAssemblyStatementFlagContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_inlineAssemblyStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterInlineAssemblyStatement) {\n\t\t\tlistener.enterInlineAssemblyStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitInlineAssemblyStatement) {\n\t\t\tlistener.exitInlineAssemblyStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitInlineAssemblyStatement) {\n\t\t\treturn visitor.visitInlineAssemblyStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class InlineAssemblyStatementFlagContext extends ParserRuleContext {\n\tpublic stringLiteral(): StringLiteralContext {\n\t\treturn this.getRuleContext(0, StringLiteralContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_inlineAssemblyStatementFlag; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterInlineAssemblyStatementFlag) {\n\t\t\tlistener.enterInlineAssemblyStatementFlag(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitInlineAssemblyStatementFlag) {\n\t\t\tlistener.exitInlineAssemblyStatementFlag(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitInlineAssemblyStatementFlag) {\n\t\t\treturn visitor.visitInlineAssemblyStatementFlag(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class DoWhileStatementContext extends ParserRuleContext {\n\tpublic statement(): StatementContext {\n\t\treturn this.getRuleContext(0, StatementContext);\n\t}\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_doWhileStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterDoWhileStatement) {\n\t\t\tlistener.enterDoWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitDoWhileStatement) {\n\t\t\tlistener.exitDoWhileStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitDoWhileStatement) {\n\t\t\treturn visitor.visitDoWhileStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ContinueStatementContext extends ParserRuleContext {\n\tpublic ContinueKeyword(): TerminalNode { return this.getToken(SolidityParser.ContinueKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_continueStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterContinueStatement) {\n\t\t\tlistener.enterContinueStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitContinueStatement) {\n\t\t\tlistener.exitContinueStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitContinueStatement) {\n\t\t\treturn visitor.visitContinueStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class BreakStatementContext extends ParserRuleContext {\n\tpublic BreakKeyword(): TerminalNode { return this.getToken(SolidityParser.BreakKeyword, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_breakStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterBreakStatement) {\n\t\t\tlistener.enterBreakStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitBreakStatement) {\n\t\t\tlistener.exitBreakStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitBreakStatement) {\n\t\t\treturn visitor.visitBreakStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ReturnStatementContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_returnStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterReturnStatement) {\n\t\t\tlistener.enterReturnStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitReturnStatement) {\n\t\t\tlistener.exitReturnStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitReturnStatement) {\n\t\t\treturn visitor.visitReturnStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ThrowStatementContext extends ParserRuleContext {\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_throwStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterThrowStatement) {\n\t\t\tlistener.enterThrowStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitThrowStatement) {\n\t\t\tlistener.exitThrowStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitThrowStatement) {\n\t\t\treturn visitor.visitThrowStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class EmitStatementContext extends ParserRuleContext {\n\tpublic functionCall(): FunctionCallContext {\n\t\treturn this.getRuleContext(0, FunctionCallContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_emitStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterEmitStatement) {\n\t\t\tlistener.enterEmitStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitEmitStatement) {\n\t\t\tlistener.exitEmitStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitEmitStatement) {\n\t\t\treturn visitor.visitEmitStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class RevertStatementContext extends ParserRuleContext {\n\tpublic functionCall(): FunctionCallContext {\n\t\treturn this.getRuleContext(0, FunctionCallContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_revertStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterRevertStatement) {\n\t\t\tlistener.enterRevertStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitRevertStatement) {\n\t\t\tlistener.exitRevertStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitRevertStatement) {\n\t\t\treturn visitor.visitRevertStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VariableDeclarationStatementContext extends ParserRuleContext {\n\tpublic identifierList(): IdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierListContext);\n\t}\n\tpublic variableDeclaration(): VariableDeclarationContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VariableDeclarationContext);\n\t}\n\tpublic variableDeclarationList(): VariableDeclarationListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, VariableDeclarationListContext);\n\t}\n\tpublic expression(): ExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_variableDeclarationStatement; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVariableDeclarationStatement) {\n\t\t\tlistener.enterVariableDeclarationStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVariableDeclarationStatement) {\n\t\t\tlistener.exitVariableDeclarationStatement(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVariableDeclarationStatement) {\n\t\t\treturn visitor.visitVariableDeclarationStatement(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class VariableDeclarationListContext extends ParserRuleContext {\n\tpublic variableDeclaration(): VariableDeclarationContext[];\n\tpublic variableDeclaration(i: number): VariableDeclarationContext;\n\tpublic variableDeclaration(i?: number): VariableDeclarationContext | VariableDeclarationContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(VariableDeclarationContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, VariableDeclarationContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_variableDeclarationList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterVariableDeclarationList) {\n\t\t\tlistener.enterVariableDeclarationList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitVariableDeclarationList) {\n\t\t\tlistener.exitVariableDeclarationList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitVariableDeclarationList) {\n\t\t\treturn visitor.visitVariableDeclarationList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class IdentifierListContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_identifierList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterIdentifierList) {\n\t\t\tlistener.enterIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitIdentifierList) {\n\t\t\tlistener.exitIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitIdentifierList) {\n\t\t\treturn visitor.visitIdentifierList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ElementaryTypeNameContext extends ParserRuleContext {\n\tpublic Int(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Int, 0); }\n\tpublic Uint(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Uint, 0); }\n\tpublic Byte(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Byte, 0); }\n\tpublic Fixed(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Fixed, 0); }\n\tpublic Ufixed(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Ufixed, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_elementaryTypeName; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterElementaryTypeName) {\n\t\t\tlistener.enterElementaryTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitElementaryTypeName) {\n\t\t\tlistener.exitElementaryTypeName(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitElementaryTypeName) {\n\t\t\treturn visitor.visitElementaryTypeName(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ExpressionContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext[];\n\tpublic expression(i: number): ExpressionContext;\n\tpublic expression(i?: number): ExpressionContext | ExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ExpressionContext);\n\t\t}\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic nameValueList(): NameValueListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NameValueListContext);\n\t}\n\tpublic functionCallArguments(): FunctionCallArgumentsContext | undefined {\n\t\treturn this.tryGetRuleContext(0, FunctionCallArgumentsContext);\n\t}\n\tpublic primaryExpression(): PrimaryExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, PrimaryExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_expression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterExpression) {\n\t\t\tlistener.enterExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitExpression) {\n\t\t\tlistener.exitExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitExpression) {\n\t\t\treturn visitor.visitExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class PrimaryExpressionContext extends ParserRuleContext {\n\tpublic BooleanLiteral(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.BooleanLiteral, 0); }\n\tpublic numberLiteral(): NumberLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NumberLiteralContext);\n\t}\n\tpublic hexLiteral(): HexLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, HexLiteralContext);\n\t}\n\tpublic stringLiteral(): StringLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StringLiteralContext);\n\t}\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic TypeKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.TypeKeyword, 0); }\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tpublic tupleExpression(): TupleExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TupleExpressionContext);\n\t}\n\tpublic typeName(): TypeNameContext | undefined {\n\t\treturn this.tryGetRuleContext(0, TypeNameContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_primaryExpression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterPrimaryExpression) {\n\t\t\tlistener.enterPrimaryExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitPrimaryExpression) {\n\t\t\tlistener.exitPrimaryExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitPrimaryExpression) {\n\t\t\treturn visitor.visitPrimaryExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class ExpressionListContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext[];\n\tpublic expression(i: number): ExpressionContext;\n\tpublic expression(i?: number): ExpressionContext | ExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ExpressionContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_expressionList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterExpressionList) {\n\t\t\tlistener.enterExpressionList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitExpressionList) {\n\t\t\tlistener.exitExpressionList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitExpressionList) {\n\t\t\treturn visitor.visitExpressionList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class NameValueListContext extends ParserRuleContext {\n\tpublic nameValue(): NameValueContext[];\n\tpublic nameValue(i: number): NameValueContext;\n\tpublic nameValue(i?: number): NameValueContext | NameValueContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(NameValueContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, NameValueContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_nameValueList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterNameValueList) {\n\t\t\tlistener.enterNameValueList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitNameValueList) {\n\t\t\tlistener.exitNameValueList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitNameValueList) {\n\t\t\treturn visitor.visitNameValueList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class NameValueContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_nameValue; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterNameValue) {\n\t\t\tlistener.enterNameValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitNameValue) {\n\t\t\tlistener.exitNameValue(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitNameValue) {\n\t\t\treturn visitor.visitNameValue(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionCallArgumentsContext extends ParserRuleContext {\n\tpublic nameValueList(): NameValueListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NameValueListContext);\n\t}\n\tpublic expressionList(): ExpressionListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, ExpressionListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionCallArguments; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionCallArguments) {\n\t\t\tlistener.enterFunctionCallArguments(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionCallArguments) {\n\t\t\tlistener.exitFunctionCallArguments(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionCallArguments) {\n\t\t\treturn visitor.visitFunctionCallArguments(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class FunctionCallContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext {\n\t\treturn this.getRuleContext(0, ExpressionContext);\n\t}\n\tpublic functionCallArguments(): FunctionCallArgumentsContext {\n\t\treturn this.getRuleContext(0, FunctionCallArgumentsContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_functionCall; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterFunctionCall) {\n\t\t\tlistener.enterFunctionCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitFunctionCall) {\n\t\t\tlistener.exitFunctionCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitFunctionCall) {\n\t\t\treturn visitor.visitFunctionCall(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyBlockContext extends ParserRuleContext {\n\tpublic assemblyItem(): AssemblyItemContext[];\n\tpublic assemblyItem(i: number): AssemblyItemContext;\n\tpublic assemblyItem(i?: number): AssemblyItemContext | AssemblyItemContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyItemContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyItemContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyBlock; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyBlock) {\n\t\t\tlistener.enterAssemblyBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyBlock) {\n\t\t\tlistener.exitAssemblyBlock(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyBlock) {\n\t\t\treturn visitor.visitAssemblyBlock(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyItemContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyBlockContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic assemblyLocalDefinition(): AssemblyLocalDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyLocalDefinitionContext);\n\t}\n\tpublic assemblyAssignment(): AssemblyAssignmentContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyAssignmentContext);\n\t}\n\tpublic assemblyStackAssignment(): AssemblyStackAssignmentContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyStackAssignmentContext);\n\t}\n\tpublic labelDefinition(): LabelDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, LabelDefinitionContext);\n\t}\n\tpublic assemblySwitch(): AssemblySwitchContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblySwitchContext);\n\t}\n\tpublic assemblyFunctionDefinition(): AssemblyFunctionDefinitionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyFunctionDefinitionContext);\n\t}\n\tpublic assemblyFor(): AssemblyForContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyForContext);\n\t}\n\tpublic assemblyIf(): AssemblyIfContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIfContext);\n\t}\n\tpublic BreakKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.BreakKeyword, 0); }\n\tpublic ContinueKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ContinueKeyword, 0); }\n\tpublic LeaveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.LeaveKeyword, 0); }\n\tpublic subAssembly(): SubAssemblyContext | undefined {\n\t\treturn this.tryGetRuleContext(0, SubAssemblyContext);\n\t}\n\tpublic numberLiteral(): NumberLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, NumberLiteralContext);\n\t}\n\tpublic stringLiteral(): StringLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StringLiteralContext);\n\t}\n\tpublic hexLiteral(): HexLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, HexLiteralContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyItem; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyItem) {\n\t\t\tlistener.enterAssemblyItem(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyItem) {\n\t\t\tlistener.exitAssemblyItem(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyItem) {\n\t\t\treturn visitor.visitAssemblyItem(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyExpressionContext extends ParserRuleContext {\n\tpublic assemblyCall(): AssemblyCallContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyCallContext);\n\t}\n\tpublic assemblyLiteral(): AssemblyLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyLiteralContext);\n\t}\n\tpublic assemblyMember(): AssemblyMemberContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyMemberContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyExpression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyExpression) {\n\t\t\tlistener.enterAssemblyExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyExpression) {\n\t\t\tlistener.exitAssemblyExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyExpression) {\n\t\t\treturn visitor.visitAssemblyExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyMemberContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyMember; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyMember) {\n\t\t\tlistener.enterAssemblyMember(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyMember) {\n\t\t\tlistener.exitAssemblyMember(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyMember) {\n\t\t\treturn visitor.visitAssemblyMember(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyCallContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext[];\n\tpublic assemblyExpression(i: number): AssemblyExpressionContext;\n\tpublic assemblyExpression(i?: number): AssemblyExpressionContext | AssemblyExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyExpressionContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyCall; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyCall) {\n\t\t\tlistener.enterAssemblyCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyCall) {\n\t\t\tlistener.exitAssemblyCall(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyCall) {\n\t\t\treturn visitor.visitAssemblyCall(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyLocalDefinitionContext extends ParserRuleContext {\n\tpublic assemblyIdentifierOrList(): AssemblyIdentifierOrListContext {\n\t\treturn this.getRuleContext(0, AssemblyIdentifierOrListContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyLocalDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyLocalDefinition) {\n\t\t\tlistener.enterAssemblyLocalDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyLocalDefinition) {\n\t\t\tlistener.exitAssemblyLocalDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyLocalDefinition) {\n\t\t\treturn visitor.visitAssemblyLocalDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyAssignmentContext extends ParserRuleContext {\n\tpublic assemblyIdentifierOrList(): AssemblyIdentifierOrListContext {\n\t\treturn this.getRuleContext(0, AssemblyIdentifierOrListContext);\n\t}\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyAssignment; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyAssignment) {\n\t\t\tlistener.enterAssemblyAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyAssignment) {\n\t\t\tlistener.exitAssemblyAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyAssignment) {\n\t\t\treturn visitor.visitAssemblyAssignment(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyIdentifierOrListContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext | undefined {\n\t\treturn this.tryGetRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyMember(): AssemblyMemberContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyMemberContext);\n\t}\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIdentifierListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyIdentifierOrList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyIdentifierOrList) {\n\t\t\tlistener.enterAssemblyIdentifierOrList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyIdentifierOrList) {\n\t\t\tlistener.exitAssemblyIdentifierOrList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyIdentifierOrList) {\n\t\t\treturn visitor.visitAssemblyIdentifierOrList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyIdentifierListContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext[];\n\tpublic identifier(i: number): IdentifierContext;\n\tpublic identifier(i?: number): IdentifierContext | IdentifierContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(IdentifierContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, IdentifierContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyIdentifierList; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyIdentifierList) {\n\t\t\tlistener.enterAssemblyIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyIdentifierList) {\n\t\t\tlistener.exitAssemblyIdentifierList(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyIdentifierList) {\n\t\t\treturn visitor.visitAssemblyIdentifierList(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyStackAssignmentContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyStackAssignment; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyStackAssignment) {\n\t\t\tlistener.enterAssemblyStackAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyStackAssignment) {\n\t\t\tlistener.exitAssemblyStackAssignment(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyStackAssignment) {\n\t\t\treturn visitor.visitAssemblyStackAssignment(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class LabelDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_labelDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterLabelDefinition) {\n\t\t\tlistener.enterLabelDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitLabelDefinition) {\n\t\t\tlistener.exitLabelDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitLabelDefinition) {\n\t\t\treturn visitor.visitLabelDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblySwitchContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic assemblyCase(): AssemblyCaseContext[];\n\tpublic assemblyCase(i: number): AssemblyCaseContext;\n\tpublic assemblyCase(i?: number): AssemblyCaseContext | AssemblyCaseContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyCaseContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyCaseContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblySwitch; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblySwitch) {\n\t\t\tlistener.enterAssemblySwitch(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblySwitch) {\n\t\t\tlistener.exitAssemblySwitch(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblySwitch) {\n\t\t\treturn visitor.visitAssemblySwitch(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyCaseContext extends ParserRuleContext {\n\tpublic assemblyLiteral(): AssemblyLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyLiteralContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyCase; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyCase) {\n\t\t\tlistener.enterAssemblyCase(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyCase) {\n\t\t\tlistener.exitAssemblyCase(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyCase) {\n\t\t\treturn visitor.visitAssemblyCase(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyFunctionDefinitionContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIdentifierListContext);\n\t}\n\tpublic assemblyFunctionReturns(): AssemblyFunctionReturnsContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyFunctionReturnsContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyFunctionDefinition; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyFunctionDefinition) {\n\t\t\tlistener.enterAssemblyFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyFunctionDefinition) {\n\t\t\tlistener.exitAssemblyFunctionDefinition(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyFunctionDefinition) {\n\t\t\treturn visitor.visitAssemblyFunctionDefinition(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyFunctionReturnsContext extends ParserRuleContext {\n\tpublic assemblyIdentifierList(): AssemblyIdentifierListContext | undefined {\n\t\treturn this.tryGetRuleContext(0, AssemblyIdentifierListContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyFunctionReturns; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyFunctionReturns) {\n\t\t\tlistener.enterAssemblyFunctionReturns(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyFunctionReturns) {\n\t\t\tlistener.exitAssemblyFunctionReturns(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyFunctionReturns) {\n\t\t\treturn visitor.visitAssemblyFunctionReturns(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyForContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext[];\n\tpublic assemblyExpression(i: number): AssemblyExpressionContext;\n\tpublic assemblyExpression(i?: number): AssemblyExpressionContext | AssemblyExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyExpressionContext);\n\t\t}\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext[];\n\tpublic assemblyBlock(i: number): AssemblyBlockContext;\n\tpublic assemblyBlock(i?: number): AssemblyBlockContext | AssemblyBlockContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(AssemblyBlockContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, AssemblyBlockContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyFor; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyFor) {\n\t\t\tlistener.enterAssemblyFor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyFor) {\n\t\t\tlistener.exitAssemblyFor(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyFor) {\n\t\t\treturn visitor.visitAssemblyFor(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyIfContext extends ParserRuleContext {\n\tpublic assemblyExpression(): AssemblyExpressionContext {\n\t\treturn this.getRuleContext(0, AssemblyExpressionContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyIf; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyIf) {\n\t\t\tlistener.enterAssemblyIf(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyIf) {\n\t\t\tlistener.exitAssemblyIf(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyIf) {\n\t\t\treturn visitor.visitAssemblyIf(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class AssemblyLiteralContext extends ParserRuleContext {\n\tpublic stringLiteral(): StringLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, StringLiteralContext);\n\t}\n\tpublic DecimalNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.DecimalNumber, 0); }\n\tpublic HexNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.HexNumber, 0); }\n\tpublic hexLiteral(): HexLiteralContext | undefined {\n\t\treturn this.tryGetRuleContext(0, HexLiteralContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_assemblyLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterAssemblyLiteral) {\n\t\t\tlistener.enterAssemblyLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitAssemblyLiteral) {\n\t\t\tlistener.exitAssemblyLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitAssemblyLiteral) {\n\t\t\treturn visitor.visitAssemblyLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class SubAssemblyContext extends ParserRuleContext {\n\tpublic identifier(): IdentifierContext {\n\t\treturn this.getRuleContext(0, IdentifierContext);\n\t}\n\tpublic assemblyBlock(): AssemblyBlockContext {\n\t\treturn this.getRuleContext(0, AssemblyBlockContext);\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_subAssembly; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterSubAssembly) {\n\t\t\tlistener.enterSubAssembly(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitSubAssembly) {\n\t\t\tlistener.exitSubAssembly(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitSubAssembly) {\n\t\t\treturn visitor.visitSubAssembly(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class TupleExpressionContext extends ParserRuleContext {\n\tpublic expression(): ExpressionContext[];\n\tpublic expression(i: number): ExpressionContext;\n\tpublic expression(i?: number): ExpressionContext | ExpressionContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(ExpressionContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, ExpressionContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_tupleExpression; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterTupleExpression) {\n\t\t\tlistener.enterTupleExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitTupleExpression) {\n\t\t\tlistener.exitTupleExpression(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitTupleExpression) {\n\t\t\treturn visitor.visitTupleExpression(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class NumberLiteralContext extends ParserRuleContext {\n\tpublic DecimalNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.DecimalNumber, 0); }\n\tpublic HexNumber(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.HexNumber, 0); }\n\tpublic NumberUnit(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.NumberUnit, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_numberLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterNumberLiteral) {\n\t\t\tlistener.enterNumberLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitNumberLiteral) {\n\t\t\tlistener.exitNumberLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitNumberLiteral) {\n\t\t\treturn visitor.visitNumberLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class IdentifierContext extends ParserRuleContext {\n\tpublic ReceiveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ReceiveKeyword, 0); }\n\tpublic ConstructorKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.ConstructorKeyword, 0); }\n\tpublic PayableKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.PayableKeyword, 0); }\n\tpublic LeaveKeyword(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.LeaveKeyword, 0); }\n\tpublic Identifier(): TerminalNode | undefined { return this.tryGetToken(SolidityParser.Identifier, 0); }\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_identifier; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterIdentifier) {\n\t\t\tlistener.enterIdentifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitIdentifier) {\n\t\t\tlistener.exitIdentifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitIdentifier) {\n\t\t\treturn visitor.visitIdentifier(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class HexLiteralContext extends ParserRuleContext {\n\tpublic HexLiteralFragment(): TerminalNode[];\n\tpublic HexLiteralFragment(i: number): TerminalNode;\n\tpublic HexLiteralFragment(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.HexLiteralFragment);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.HexLiteralFragment, i);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_hexLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterHexLiteral) {\n\t\t\tlistener.enterHexLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitHexLiteral) {\n\t\t\tlistener.exitHexLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitHexLiteral) {\n\t\t\treturn visitor.visitHexLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class OverrideSpecifierContext extends ParserRuleContext {\n\tpublic userDefinedTypeName(): UserDefinedTypeNameContext[];\n\tpublic userDefinedTypeName(i: number): UserDefinedTypeNameContext;\n\tpublic userDefinedTypeName(i?: number): UserDefinedTypeNameContext | UserDefinedTypeNameContext[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getRuleContexts(UserDefinedTypeNameContext);\n\t\t} else {\n\t\t\treturn this.getRuleContext(i, UserDefinedTypeNameContext);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_overrideSpecifier; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterOverrideSpecifier) {\n\t\t\tlistener.enterOverrideSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitOverrideSpecifier) {\n\t\t\tlistener.exitOverrideSpecifier(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitOverrideSpecifier) {\n\t\t\treturn visitor.visitOverrideSpecifier(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\nexport class StringLiteralContext extends ParserRuleContext {\n\tpublic StringLiteralFragment(): TerminalNode[];\n\tpublic StringLiteralFragment(i: number): TerminalNode;\n\tpublic StringLiteralFragment(i?: number): TerminalNode | TerminalNode[] {\n\t\tif (i === undefined) {\n\t\t\treturn this.getTokens(SolidityParser.StringLiteralFragment);\n\t\t} else {\n\t\t\treturn this.getToken(SolidityParser.StringLiteralFragment, i);\n\t\t}\n\t}\n\tconstructor(parent: ParserRuleContext | undefined, invokingState: number) {\n\t\tsuper(parent, invokingState);\n\t}\n\t// @Override\n\tpublic get ruleIndex(): number { return SolidityParser.RULE_stringLiteral; }\n\t// @Override\n\tpublic enterRule(listener: SolidityListener): void {\n\t\tif (listener.enterStringLiteral) {\n\t\t\tlistener.enterStringLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic exitRule(listener: SolidityListener): void {\n\t\tif (listener.exitStringLiteral) {\n\t\t\tlistener.exitStringLiteral(this);\n\t\t}\n\t}\n\t// @Override\n\tpublic accept(visitor: SolidityVisitor): Result {\n\t\tif (visitor.visitStringLiteral) {\n\t\t\treturn visitor.visitStringLiteral(this);\n\t\t} else {\n\t\t\treturn visitor.visitChildren(this);\n\t\t}\n\t}\n}\n\n\n", "// Base on the original type definitions for solidity-parser-antlr 0.2\n// by Leonid Logvinov \n// Alex Browne \n// Xiao Liang \n\ninterface Location {\n start: {\n line: number\n column: number\n }\n end: {\n line: number\n column: number\n }\n}\n\nexport interface BaseASTNode {\n type: ASTNodeTypeString\n range?: [number, number]\n loc?: Location\n}\n\nexport interface SourceUnit extends BaseASTNode {\n type: 'SourceUnit'\n children: ASTNode[]\n}\n\nexport interface ContractDefinition extends BaseASTNode {\n type: 'ContractDefinition'\n name: string\n baseContracts: InheritanceSpecifier[]\n kind: string\n subNodes: BaseASTNode[]\n}\n\nexport interface InheritanceSpecifier extends BaseASTNode {\n type: 'InheritanceSpecifier'\n baseName: UserDefinedTypeName\n arguments: Expression[]\n}\n\nexport interface UserDefinedTypeName extends BaseASTNode {\n type: 'UserDefinedTypeName'\n namePath: string\n}\n\nexport const astNodeTypes = [\n 'SourceUnit',\n 'PragmaDirective',\n 'ImportDirective',\n 'ContractDefinition',\n 'InheritanceSpecifier',\n 'StateVariableDeclaration',\n 'UsingForDeclaration',\n 'StructDefinition',\n 'ModifierDefinition',\n 'ModifierInvocation',\n 'FunctionDefinition',\n 'EventDefinition',\n 'CustomErrorDefinition',\n 'RevertStatement',\n 'EnumValue',\n 'EnumDefinition',\n 'VariableDeclaration',\n 'UserDefinedTypeName',\n 'Mapping',\n 'ArrayTypeName',\n 'FunctionTypeName',\n 'Block',\n 'ExpressionStatement',\n 'IfStatement',\n 'WhileStatement',\n 'ForStatement',\n 'InlineAssemblyStatement',\n 'DoWhileStatement',\n 'ContinueStatement',\n 'Break',\n 'Continue',\n 'BreakStatement',\n 'ReturnStatement',\n 'EmitStatement',\n 'ThrowStatement',\n 'VariableDeclarationStatement',\n 'ElementaryTypeName',\n 'FunctionCall',\n 'AssemblyBlock',\n 'AssemblyCall',\n 'AssemblyLocalDefinition',\n 'AssemblyAssignment',\n 'AssemblyStackAssignment',\n 'LabelDefinition',\n 'AssemblySwitch',\n 'AssemblyCase',\n 'AssemblyFunctionDefinition',\n 'AssemblyFunctionReturns',\n 'AssemblyFor',\n 'AssemblyIf',\n 'SubAssembly',\n 'TupleExpression',\n 'NameValueExpression',\n 'BooleanLiteral',\n 'NumberLiteral',\n 'Identifier',\n 'BinaryOperation',\n 'UnaryOperation',\n 'NewExpression',\n 'Conditional',\n 'StringLiteral',\n 'HexLiteral',\n 'HexNumber',\n 'DecimalNumber',\n 'MemberAccess',\n 'IndexAccess',\n 'IndexRangeAccess',\n 'NameValueList',\n 'UncheckedStatement',\n 'TryStatement',\n 'CatchClause',\n 'FileLevelConstant',\n 'AssemblyMemberAccess',\n 'TypeDefinition',\n 'InvalidNode'\n] as const\n\nexport type ASTNodeTypeString = typeof astNodeTypes[number]\nexport interface InvalidNode extends BaseASTNode {\n type: 'InvalidNode'\n name?: string\n value?: string\n}\nexport interface PragmaDirective extends BaseASTNode {\n type: 'PragmaDirective'\n name: string\n value: string\n}\nexport interface ImportDirective extends BaseASTNode {\n type: 'ImportDirective'\n path: string\n pathLiteral: StringLiteral\n unitAlias: string | null\n unitAliasIdentifier: Identifier | null\n symbolAliases: Array<[string, string | null]> | null\n symbolAliasesIdentifiers: Array<[Identifier, Identifier | null]> | null\n}\nexport interface StateVariableDeclaration extends BaseASTNode {\n type: 'StateVariableDeclaration'\n variables: StateVariableDeclarationVariable[]\n initialValue: Expression | null\n}\nexport interface FileLevelConstant extends BaseASTNode {\n type: 'FileLevelConstant'\n typeName: TypeName\n name: string\n initialValue: Expression\n isDeclaredConst: boolean\n isImmutable: boolean\n}\nexport interface UsingForDeclaration extends BaseASTNode {\n type: 'UsingForDeclaration'\n typeName: TypeName | null\n functions: string[]\n libraryName: string | null\n isGlobal: boolean;\n}\nexport interface StructDefinition extends BaseASTNode {\n type: 'StructDefinition'\n name: string\n members: VariableDeclaration[]\n}\nexport interface ModifierDefinition extends BaseASTNode {\n type: 'ModifierDefinition'\n name: string\n parameters: null | VariableDeclaration[]\n isVirtual: boolean\n override: null | UserDefinedTypeName[]\n body: Block | null\n}\nexport interface ModifierInvocation extends BaseASTNode {\n type: 'ModifierInvocation'\n name: string\n arguments: Expression[] | null\n}\nexport interface FunctionDefinition extends BaseASTNode {\n type: 'FunctionDefinition'\n name: string | null\n parameters: VariableDeclaration[]\n modifiers: ModifierInvocation[]\n stateMutability: 'pure' | 'constant' | 'payable' | 'view' | null\n visibility: 'default' | 'external' | 'internal' | 'public' | 'private'\n returnParameters: VariableDeclaration[] | null\n body: Block | null\n override: UserDefinedTypeName[] | null\n isConstructor: boolean\n isReceiveEther: boolean\n isFallback: boolean\n isVirtual: boolean\n}\n\nexport interface CustomErrorDefinition extends BaseASTNode {\n type: 'CustomErrorDefinition'\n name: string\n parameters: VariableDeclaration[]\n}\n\nexport interface TypeDefinition extends BaseASTNode {\n type: 'TypeDefinition'\n name: string\n definition: ElementaryTypeName\n}\n\nexport interface RevertStatement extends BaseASTNode {\n type: 'RevertStatement'\n revertCall: FunctionCall\n}\nexport interface EventDefinition extends BaseASTNode {\n type: 'EventDefinition'\n name: string\n parameters: VariableDeclaration[]\n isAnonymous: boolean\n}\nexport interface EnumValue extends BaseASTNode {\n type: 'EnumValue'\n name: string\n}\nexport interface EnumDefinition extends BaseASTNode {\n type: 'EnumDefinition'\n name: string\n members: EnumValue[]\n}\nexport interface VariableDeclaration extends BaseASTNode {\n type: 'VariableDeclaration'\n isIndexed: boolean\n isStateVar: boolean\n typeName: TypeName | null\n name: string | null\n identifier: Identifier | null\n isDeclaredConst?: boolean\n storageLocation: string | null\n expression: Expression | null\n visibility?: 'public' | 'private' | 'internal' | 'default'\n}\nexport interface StateVariableDeclarationVariable extends VariableDeclaration {\n override: null | UserDefinedTypeName[]\n isImmutable: boolean\n}\nexport interface ArrayTypeName extends BaseASTNode {\n type: 'ArrayTypeName'\n baseTypeName: TypeName\n length: Expression | null\n}\nexport interface Mapping extends BaseASTNode {\n type: 'Mapping'\n keyType: ElementaryTypeName | UserDefinedTypeName\n valueType: TypeName\n}\nexport interface FunctionTypeName extends BaseASTNode {\n type: 'FunctionTypeName'\n parameterTypes: VariableDeclaration[]\n returnTypes: VariableDeclaration[]\n visibility: string\n stateMutability: string | null\n}\n\nexport interface Block extends BaseASTNode {\n type: 'Block'\n statements: BaseASTNode[]\n}\nexport interface ExpressionStatement extends BaseASTNode {\n type: 'ExpressionStatement'\n expression: Expression | null\n}\nexport interface IfStatement extends BaseASTNode {\n type: 'IfStatement'\n condition: Expression\n trueBody: Statement\n falseBody: Statement | null\n}\nexport interface UncheckedStatement extends BaseASTNode {\n type: 'UncheckedStatement'\n block: Block\n}\nexport interface TryStatement extends BaseASTNode {\n type: 'TryStatement'\n expression: Expression\n returnParameters: VariableDeclaration[] | null\n body: Block\n catchClauses: CatchClause[]\n}\nexport interface CatchClause extends BaseASTNode {\n type: 'CatchClause'\n isReasonStringType: boolean\n kind: string | null\n parameters: VariableDeclaration[] | null\n body: Block\n}\nexport interface WhileStatement extends BaseASTNode {\n type: 'WhileStatement'\n condition: Expression\n body: Statement\n}\nexport interface ForStatement extends BaseASTNode {\n type: 'ForStatement'\n initExpression: SimpleStatement | null\n conditionExpression?: Expression\n loopExpression: ExpressionStatement\n body: Statement\n}\nexport interface InlineAssemblyStatement extends BaseASTNode {\n type: 'InlineAssemblyStatement'\n language: string | null\n flags: string[]\n body: AssemblyBlock\n}\nexport interface DoWhileStatement extends BaseASTNode {\n type: 'DoWhileStatement'\n condition: Expression\n body: Statement\n}\nexport interface ContinueStatement extends BaseASTNode {\n type: 'ContinueStatement'\n}\nexport interface Break extends BaseASTNode {\n type: 'Break'\n}\nexport interface Continue extends BaseASTNode {\n type: 'Continue'\n}\nexport interface BreakStatement extends BaseASTNode {\n type: 'BreakStatement'\n}\nexport interface ReturnStatement extends BaseASTNode {\n type: 'ReturnStatement'\n expression: Expression | null\n}\nexport interface EmitStatement extends BaseASTNode {\n type: 'EmitStatement'\n eventCall: FunctionCall\n}\nexport interface ThrowStatement extends BaseASTNode {\n type: 'ThrowStatement'\n}\nexport interface VariableDeclarationStatement extends BaseASTNode {\n type: 'VariableDeclarationStatement'\n variables: Array\n initialValue: Expression | null\n}\nexport interface ElementaryTypeName extends BaseASTNode {\n type: 'ElementaryTypeName'\n name: string\n stateMutability: string | null\n}\nexport interface FunctionCall extends BaseASTNode {\n type: 'FunctionCall'\n expression: Expression\n arguments: Expression[]\n names: string[]\n identifiers: Identifier[]\n}\nexport interface AssemblyBlock extends BaseASTNode {\n type: 'AssemblyBlock'\n operations: AssemblyItem[]\n}\nexport interface AssemblyCall extends BaseASTNode {\n type: 'AssemblyCall'\n functionName: string\n arguments: AssemblyExpression[]\n}\nexport interface AssemblyLocalDefinition extends BaseASTNode {\n type: 'AssemblyLocalDefinition'\n names: Identifier[] | AssemblyMemberAccess[]\n expression: AssemblyExpression | null\n}\nexport interface AssemblyAssignment extends BaseASTNode {\n type: 'AssemblyAssignment'\n names: Identifier[] | AssemblyMemberAccess[]\n expression: AssemblyExpression\n}\nexport interface AssemblyStackAssignment extends BaseASTNode {\n type: 'AssemblyStackAssignment'\n name: string\n expression: AssemblyExpression\n}\nexport interface LabelDefinition extends BaseASTNode {\n type: 'LabelDefinition'\n name: string\n}\nexport interface AssemblySwitch extends BaseASTNode {\n type: 'AssemblySwitch'\n expression: AssemblyExpression\n cases: AssemblyCase[]\n}\nexport interface AssemblyCase extends BaseASTNode {\n type: 'AssemblyCase'\n value: AssemblyLiteral | null\n block: AssemblyBlock\n default: boolean\n}\nexport interface AssemblyFunctionDefinition extends BaseASTNode {\n type: 'AssemblyFunctionDefinition'\n name: string\n arguments: Identifier[]\n returnArguments: Identifier[]\n body: AssemblyBlock\n}\nexport interface AssemblyFunctionReturns extends BaseASTNode {\n type: 'AssemblyFunctionReturns'\n}\nexport interface AssemblyFor extends BaseASTNode {\n type: 'AssemblyFor'\n pre: AssemblyBlock | AssemblyExpression\n condition: AssemblyExpression\n post: AssemblyBlock | AssemblyExpression\n body: AssemblyBlock\n}\nexport interface AssemblyIf extends BaseASTNode {\n type: 'AssemblyIf'\n condition: AssemblyExpression\n body: AssemblyBlock\n}\nexport type AssemblyLiteral =\n | StringLiteral\n | DecimalNumber\n | HexNumber\n | HexLiteral\nexport interface SubAssembly extends BaseASTNode {\n type: 'SubAssembly'\n}\nexport interface AssemblyMemberAccess extends BaseASTNode {\n type: 'AssemblyMemberAccess'\n expression: Identifier\n memberName: Identifier\n}\nexport interface NewExpression extends BaseASTNode {\n type: 'NewExpression'\n typeName: TypeName\n}\nexport interface TupleExpression extends BaseASTNode {\n type: 'TupleExpression'\n components: Array\n isArray: boolean\n}\nexport interface NameValueExpression extends BaseASTNode {\n type: 'NameValueExpression'\n expression: Expression\n arguments: NameValueList\n}\nexport interface NumberLiteral extends BaseASTNode {\n type: 'NumberLiteral'\n number: string\n subdenomination:\n | null\n | 'wei'\n | 'szabo'\n | 'finney'\n | 'ether'\n | 'seconds'\n | 'minutes'\n | 'hours'\n | 'days'\n | 'weeks'\n | 'years'\n}\nexport interface BooleanLiteral extends BaseASTNode {\n type: 'BooleanLiteral'\n value: boolean\n}\nexport interface HexLiteral extends BaseASTNode {\n type: 'HexLiteral'\n value: string\n parts: string[]\n}\nexport interface StringLiteral extends BaseASTNode {\n type: 'StringLiteral'\n value: string\n parts: string[]\n isUnicode: boolean[]\n}\nexport interface Identifier extends BaseASTNode {\n type: 'Identifier'\n name: string\n}\n\nexport const binaryOpValues = [\n '+',\n '-',\n '*',\n '/',\n '**',\n '%',\n '<<',\n '>>',\n '&&',\n '||',\n ',,',\n '&',\n ',',\n '^',\n '<',\n '>',\n '<=',\n '>=',\n '==',\n '!=',\n '=',\n ',=',\n '^=',\n '&=',\n '<<=',\n '>>=',\n '+=',\n '-=',\n '*=',\n '/=',\n '%=',\n '|',\n '|=',\n] as const\nexport type BinOp = typeof binaryOpValues[number]\n\nexport const unaryOpValues = [\n '-',\n '+',\n '++',\n '--',\n '~',\n 'after',\n 'delete',\n '!',\n] as const\nexport type UnaryOp = typeof unaryOpValues[number]\n\nexport interface BinaryOperation extends BaseASTNode {\n type: 'BinaryOperation'\n left: Expression\n right: Expression\n operator: BinOp\n}\nexport interface UnaryOperation extends BaseASTNode {\n type: 'UnaryOperation'\n operator: UnaryOp\n subExpression: Expression\n isPrefix: boolean\n}\nexport interface Conditional extends BaseASTNode {\n type: 'Conditional'\n condition: Expression\n trueExpression: Expression\n falseExpression: Expression\n}\nexport interface IndexAccess extends BaseASTNode {\n type: 'IndexAccess'\n base: Expression\n index: Expression\n}\nexport interface IndexRangeAccess extends BaseASTNode {\n type: 'IndexRangeAccess'\n base: Expression\n indexStart?: Expression\n indexEnd?: Expression\n}\nexport interface MemberAccess extends BaseASTNode {\n type: 'MemberAccess'\n expression: Expression\n memberName: string\n}\nexport interface HexNumber extends BaseASTNode {\n type: 'HexNumber'\n value: string\n}\nexport interface DecimalNumber extends BaseASTNode {\n type: 'DecimalNumber'\n value: string\n}\nexport interface NameValueList extends BaseASTNode {\n type: 'NameValueList'\n names: string[]\n identifiers: Identifier[]\n arguments: Expression[]\n}\nexport type ASTNode =\n | SourceUnit\n | PragmaDirective\n | ImportDirective\n | ContractDefinition\n | InheritanceSpecifier\n | StateVariableDeclaration\n | UsingForDeclaration\n | StructDefinition\n | ModifierDefinition\n | ModifierInvocation\n | FunctionDefinition\n | EventDefinition\n | CustomErrorDefinition\n | EnumValue\n | EnumDefinition\n | VariableDeclaration\n | TypeName\n | UserDefinedTypeName\n | Mapping\n | FunctionTypeName\n | Block\n | Statement\n | ElementaryTypeName\n | AssemblyBlock\n | AssemblyCall\n | AssemblyLocalDefinition\n | AssemblyAssignment\n | AssemblyStackAssignment\n | LabelDefinition\n | AssemblySwitch\n | AssemblyCase\n | AssemblyFunctionDefinition\n | AssemblyFunctionReturns\n | AssemblyFor\n | AssemblyIf\n | AssemblyLiteral\n | SubAssembly\n | TupleExpression\n | BinaryOperation\n | Conditional\n | IndexAccess\n | IndexRangeAccess\n | AssemblyItem\n | Expression\n | NameValueList\n | AssemblyMemberAccess\n | CatchClause\n | FileLevelConstant\n | TypeDefinition\n | InvalidNode\n\nexport type AssemblyItem =\n | Identifier\n | AssemblyBlock\n | AssemblyExpression\n | AssemblyLocalDefinition\n | AssemblyAssignment\n | AssemblyStackAssignment\n | LabelDefinition\n | AssemblySwitch\n | AssemblyFunctionDefinition\n | AssemblyFor\n | AssemblyIf\n | Break\n | Continue\n | SubAssembly\n | NumberLiteral\n | StringLiteral\n | HexNumber\n | HexLiteral\n | DecimalNumber\nexport type AssemblyExpression = AssemblyCall | AssemblyLiteral\nexport type Expression =\n | IndexAccess\n | IndexRangeAccess\n | TupleExpression\n | BinaryOperation\n | Conditional\n | MemberAccess\n | FunctionCall\n | UnaryOperation\n | NewExpression\n | PrimaryExpression\n | NameValueExpression\nexport type PrimaryExpression =\n | BooleanLiteral\n | HexLiteral\n | StringLiteral\n | NumberLiteral\n | Identifier\n | TupleExpression\n | TypeName\nexport type SimpleStatement = VariableDeclarationStatement | ExpressionStatement\nexport type TypeName =\n | ElementaryTypeName\n | UserDefinedTypeName\n | Mapping\n | ArrayTypeName\n | FunctionTypeName\nexport type Statement =\n | IfStatement\n | WhileStatement\n | ForStatement\n | Block\n | InlineAssemblyStatement\n | DoWhileStatement\n | ContinueStatement\n | BreakStatement\n | ReturnStatement\n | EmitStatement\n | ThrowStatement\n | SimpleStatement\n | VariableDeclarationStatement\n | UncheckedStatement\n | TryStatement\n | RevertStatement\n\ntype ASTMap = { [K in ASTNodeTypeString]: U extends { type: K } ? U : never }\ntype ASTTypeMap = ASTMap\ntype ASTVisitorEnter = {\n [K in keyof ASTTypeMap]?: (ast: ASTTypeMap[K], parent?: ASTNode) => any\n}\ntype ASTVisitorExit = {\n [K in keyof ASTTypeMap as `${K}:exit`]?: (\n ast: ASTTypeMap[K],\n parent?: ASTNode\n ) => any\n}\n\nexport type ASTVisitor = ASTVisitorEnter & ASTVisitorExit\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n * This monstrosity is here to check that there are no ASTNodeTypeString without\n * a corresponding ASTNode, no ASTNode without a corresponding ASTNodeTypeString,\n * no ASTVisitorEnter callback without a corresponding ASTNode,\n * no ASTVisitorExit callback without a corresponding ASTVisitorEnter callback,\n * and so on, and so on.\n *\n * There are probably some ways to simplify this by deriving some types\n * from others.\n */\nfunction checkTypes() {\n const astNodeType: ASTNode['type'] = '' as any\n const astNodeTypeString: ASTNodeTypeString = '' as any\n const astVisitorEnterKey: keyof ASTVisitorEnter = '' as any\n\n let assignAstNodeType: ASTNode['type'] = astNodeTypeString\n assignAstNodeType = astVisitorEnterKey\n\n let assignAstNodeTyeString: ASTNodeTypeString = astNodeType\n assignAstNodeTyeString = astVisitorEnterKey\n\n let assignAstVisitorEnterKey: keyof ASTVisitorEnter = astNodeType\n assignAstVisitorEnterKey = astNodeTypeString\n\n const astNodeTypeExit: `${ASTNode['type']}:exit` = '' as any\n const astNodeTypeStringExit: `${ASTNodeTypeString}:exit` = '' as any\n const astVisitorEnterKeyExit: `${keyof ASTVisitorEnter}:exit` = '' as any\n const astVisitorExitKey: keyof ASTVisitorExit = '' as any\n\n let letAstNodeTypeExit: `${ASTNode['type']}:exit` = astNodeTypeStringExit\n letAstNodeTypeExit = astVisitorEnterKeyExit\n letAstNodeTypeExit = astVisitorExitKey\n\n let assignAstNodeTypeStringExit: `${ASTNodeTypeString}:exit` = astNodeTypeExit\n assignAstNodeTypeStringExit = astVisitorEnterKeyExit\n assignAstNodeTypeStringExit = astVisitorExitKey\n\n let assignAstVisitorEnterKeyExit: `${keyof ASTVisitorEnter}:exit` = astNodeTypeExit\n assignAstVisitorEnterKeyExit = astNodeTypeStringExit\n assignAstVisitorEnterKeyExit = astVisitorExitKey\n\n let assignAstVisitorExitKey: keyof ASTVisitorExit = astNodeTypeExit\n assignAstVisitorExitKey = astNodeTypeStringExit\n assignAstVisitorExitKey = astVisitorEnterKeyExit\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n", "import { ParserRuleContext } from 'antlr4ts'\nimport { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor'\nimport { ParseTree } from 'antlr4ts/tree/ParseTree'\nimport * as SP from './antlr/SolidityParser'\n\nimport { SolidityVisitor } from './antlr/SolidityVisitor'\nimport { ParseOptions } from './types'\nimport * as AST from './ast-types'\nimport { ErrorNode } from 'antlr4ts/tree/ErrorNode'\n\ninterface SourceLocation {\n start: {\n line: number\n column: number\n }\n end: {\n line: number\n column: number\n }\n}\n\ninterface WithMeta {\n __withMeta: never\n}\n\ntype ASTBuilderNode = AST.ASTNode & WithMeta\n\nexport class ASTBuilder\n extends AbstractParseTreeVisitor\n implements SolidityVisitor {\n public result: AST.SourceUnit | null = null\n private _currentContract?: string\n\n constructor(public options: ParseOptions) {\n super()\n }\n\n defaultResult(): AST.ASTNode & WithMeta {\n throw new Error('Unknown node')\n }\n\n aggregateResult() {\n return ({ type: '' } as unknown) as AST.ASTNode & WithMeta\n }\n\n public visitSourceUnit(ctx: SP.SourceUnitContext): AST.SourceUnit & WithMeta {\n const children = (ctx.children ?? []).filter(\n (x) => !(x instanceof ErrorNode)\n )\n\n const node: AST.SourceUnit = {\n type: 'SourceUnit',\n children: children.slice(0, -1).map((child) => this.visit(child)),\n }\n const result = this._addMeta(node, ctx)\n this.result = result\n\n return result\n }\n\n public visitContractPart(ctx: SP.ContractPartContext) {\n return this.visit(ctx.getChild(0))\n }\n\n public visitContractDefinition(\n ctx: SP.ContractDefinitionContext\n ): AST.ContractDefinition & WithMeta {\n const name = this._toText(ctx.identifier())\n const kind = this._toText(ctx.getChild(0))\n\n this._currentContract = name\n\n const node: AST.ContractDefinition = {\n type: 'ContractDefinition',\n name,\n baseContracts: ctx\n .inheritanceSpecifier()\n .map((x) => this.visitInheritanceSpecifier(x)),\n subNodes: ctx.contractPart().map((x) => this.visit(x)),\n kind,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitStateVariableDeclaration(\n ctx: SP.StateVariableDeclarationContext\n ) {\n const type = this.visitTypeName(ctx.typeName())\n const iden = ctx.identifier()\n const name = this._toText(iden)\n\n let expression: AST.Expression | null = null\n const ctxExpression = ctx.expression()\n if (ctxExpression) {\n expression = this.visitExpression(ctxExpression)\n }\n\n let visibility: AST.VariableDeclaration['visibility'] = 'default'\n if (ctx.InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.PublicKeyword().length > 0) {\n visibility = 'public'\n } else if (ctx.PrivateKeyword().length > 0) {\n visibility = 'private'\n }\n\n let isDeclaredConst = false\n if (ctx.ConstantKeyword().length > 0) {\n isDeclaredConst = true\n }\n\n let override\n const overrideSpecifier = ctx.overrideSpecifier()\n if (overrideSpecifier.length === 0) {\n override = null\n } else {\n override = overrideSpecifier[0]\n .userDefinedTypeName()\n .map((x) => this.visitUserDefinedTypeName(x))\n }\n\n let isImmutable = false\n if (ctx.ImmutableKeyword().length > 0) {\n isImmutable = true\n }\n\n const decl: AST.StateVariableDeclarationVariable = {\n type: 'VariableDeclaration',\n typeName: type,\n name,\n identifier: this.visitIdentifier(iden),\n expression,\n visibility,\n isStateVar: true,\n isDeclaredConst,\n isIndexed: false,\n isImmutable,\n override,\n storageLocation: null,\n }\n\n const node: AST.StateVariableDeclaration = {\n type: 'StateVariableDeclaration',\n variables: [this._addMeta(decl, ctx)],\n initialValue: expression,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitVariableDeclaration(\n ctx: SP.VariableDeclarationContext\n ): AST.VariableDeclaration & WithMeta {\n let storageLocation: string | null = null\n const ctxStorageLocation = ctx.storageLocation()\n if (ctxStorageLocation) {\n storageLocation = this._toText(ctxStorageLocation)\n }\n\n const identifierCtx = ctx.identifier()\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: this.visitTypeName(ctx.typeName()),\n name: this._toText(identifierCtx),\n identifier: this.visitIdentifier(identifierCtx),\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitVariableDeclarationStatement(\n ctx: SP.VariableDeclarationStatementContext\n ): AST.VariableDeclarationStatement & WithMeta {\n let variables: Array = []\n const ctxVariableDeclaration = ctx.variableDeclaration()\n const ctxIdentifierList = ctx.identifierList()\n const ctxVariableDeclarationList = ctx.variableDeclarationList()\n if (ctxVariableDeclaration !== undefined) {\n variables = [this.visitVariableDeclaration(ctxVariableDeclaration)]\n } else if (ctxIdentifierList !== undefined) {\n variables = this.buildIdentifierList(ctxIdentifierList)\n } else if (ctxVariableDeclarationList) {\n variables = this.buildVariableDeclarationList(ctxVariableDeclarationList)\n }\n\n let initialValue: AST.Expression | null = null\n const ctxExpression = ctx.expression()\n if (ctxExpression) {\n initialValue = this.visitExpression(ctxExpression)\n }\n\n const node: AST.VariableDeclarationStatement = {\n type: 'VariableDeclarationStatement',\n variables,\n initialValue,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitStatement(ctx: SP.StatementContext) {\n try {\n return this.visit(ctx.getChild(0)) as AST.Statement & WithMeta\n } catch (e) {\n const node: any = {type: 'InvalidNode'}\n return this._addMeta(node, ctx)\n }\n }\n\n public visitSimpleStatement(ctx: SP.SimpleStatementContext) {\n try {\n return this.visit(ctx.getChild(0)) as AST.SimpleStatement & WithMeta\n } catch (e) {\n const node: any = {type: 'InvalidNode'}\n return this._addMeta(node, ctx)\n }\n }\n\n public visitEventDefinition(ctx: SP.EventDefinitionContext) {\n const parameters = ctx\n .eventParameterList()\n .eventParameter()\n .map((paramCtx) => {\n const type = this.visitTypeName(paramCtx.typeName())\n let name: string | null = null\n const paramCtxIdentifier = paramCtx.identifier()\n if (paramCtxIdentifier) {\n name = this._toText(paramCtxIdentifier)\n }\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: type,\n name,\n identifier:\n paramCtxIdentifier !== undefined\n ? this.visitIdentifier(paramCtxIdentifier)\n : null,\n isStateVar: false,\n isIndexed: paramCtx.IndexedKeyword() !== undefined,\n storageLocation: null,\n expression: null,\n }\n return this._addMeta(node, paramCtx)\n })\n\n const node: AST.EventDefinition = {\n type: 'EventDefinition',\n name: this._toText(ctx.identifier()),\n parameters,\n isAnonymous: ctx.AnonymousKeyword() !== undefined,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitBlock(ctx: SP.BlockContext): AST.Block & WithMeta {\n const node: AST.Block = {\n type: 'Block',\n statements: ctx.statement && ctx.statement().map((x) => this.visitStatement(x)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitParameter(ctx: SP.ParameterContext) {\n let storageLocation: string | null = null\n const ctxStorageLocation = ctx.storageLocation()\n if (ctxStorageLocation !== undefined) {\n storageLocation = this._toText(ctxStorageLocation)\n }\n\n let name: string | null = null\n const ctxIdentifier = ctx.identifier()\n if (ctxIdentifier !== undefined) {\n name = this._toText(ctxIdentifier)\n }\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: this.visitTypeName(ctx.typeName()),\n name,\n identifier:\n ctxIdentifier !== undefined\n ? this.visitIdentifier(ctxIdentifier)\n : null,\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionDefinition(\n ctx: SP.FunctionDefinitionContext\n ): AST.FunctionDefinition & WithMeta {\n let isConstructor = false\n let isFallback = false\n let isReceiveEther = false\n let isVirtual = false\n let name: string | null = null\n let parameters: any = []\n let returnParameters: AST.VariableDeclaration[] | null = null\n let visibility: AST.FunctionDefinition['visibility'] = 'default'\n\n let block: AST.Block | null = null\n const ctxBlock = ctx.block()\n if (ctxBlock !== undefined) {\n block = this.visitBlock(ctxBlock)\n }\n\n const modifiers = ctx\n .modifierList()\n .modifierInvocation()\n .map((mod) => this.visitModifierInvocation(mod))\n\n let stateMutability = null\n if (ctx.modifierList().stateMutability().length > 0) {\n stateMutability = this._stateMutabilityToText(\n ctx.modifierList().stateMutability(0)\n )\n }\n\n // see what type of function we're dealing with\n const ctxReturnParameters = ctx.returnParameters()\n switch (this._toText(ctx.functionDescriptor().getChild(0))) {\n case 'constructor':\n parameters = ctx\n .parameterList()\n .parameter()\n .map((x) => this.visit(x))\n\n // error out on incorrect function visibility\n if (ctx.modifierList().InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.modifierList().PublicKeyword().length > 0) {\n visibility = 'public'\n } else {\n visibility = 'default'\n }\n\n isConstructor = true\n break\n case 'fallback':\n visibility = 'external'\n isFallback = true\n break\n case 'receive':\n visibility = 'external'\n isReceiveEther = true\n break\n case 'function': {\n const identifier = ctx.functionDescriptor().identifier()\n name = identifier !== undefined ? this._toText(identifier) : ''\n\n parameters = ctx\n .parameterList()\n .parameter()\n .map((x) => this.visit(x))\n returnParameters =\n ctxReturnParameters !== undefined\n ? this.visitReturnParameters(ctxReturnParameters)\n : null\n\n // parse function visibility\n if (ctx.modifierList().ExternalKeyword().length > 0) {\n visibility = 'external'\n } else if (ctx.modifierList().InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.modifierList().PublicKeyword().length > 0) {\n visibility = 'public'\n } else if (ctx.modifierList().PrivateKeyword().length > 0) {\n visibility = 'private'\n }\n\n isConstructor = name === this._currentContract\n isFallback = name === ''\n break\n }\n }\n\n // check if function is virtual\n if (ctx.modifierList().VirtualKeyword().length > 0) {\n isVirtual = true\n }\n\n let override: AST.UserDefinedTypeName[] | null\n const overrideSpecifier = ctx.modifierList().overrideSpecifier()\n if (overrideSpecifier.length === 0) {\n override = null\n } else {\n override = overrideSpecifier[0]\n .userDefinedTypeName()\n .map((x) => this.visitUserDefinedTypeName(x))\n }\n\n const node: AST.FunctionDefinition = {\n type: 'FunctionDefinition',\n name,\n parameters,\n returnParameters,\n body: block,\n visibility,\n modifiers,\n override,\n isConstructor,\n isReceiveEther,\n isFallback,\n isVirtual,\n stateMutability,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitEnumDefinition(\n ctx: SP.EnumDefinitionContext\n ): AST.EnumDefinition & WithMeta {\n const node: AST.EnumDefinition = {\n type: 'EnumDefinition',\n name: this._toText(ctx.identifier()),\n members: ctx.enumValue().map((x) => this.visitEnumValue(x)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitEnumValue(ctx: SP.EnumValueContext): AST.EnumValue & WithMeta {\n const node: AST.EnumValue = {\n type: 'EnumValue',\n name: this._toText(ctx.identifier()),\n }\n return this._addMeta(node, ctx)\n }\n\n public visitElementaryTypeName(\n ctx: SP.ElementaryTypeNameContext\n ): AST.ElementaryTypeName & WithMeta {\n const node: AST.ElementaryTypeName = {\n type: 'ElementaryTypeName',\n name: this._toText(ctx),\n stateMutability: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitIdentifier(ctx: SP.IdentifierContext): AST.Identifier & WithMeta {\n const node: AST.Identifier = {\n type: 'Identifier',\n name: this._toText(ctx),\n }\n return this._addMeta(node, ctx)\n }\n\n public visitTypeName(ctx: SP.TypeNameContext): AST.TypeName & WithMeta {\n if (ctx.children !== undefined && ctx.children.length > 2) {\n let length = null\n if (ctx.children.length === 4) {\n const expression = ctx.expression()\n if (expression === undefined) {\n throw new Error(\n 'Assertion error: a typeName with 4 children should have an expression'\n )\n }\n length = this.visitExpression(expression)\n }\n\n const ctxTypeName = ctx.typeName()\n\n const node: AST.ArrayTypeName = {\n type: 'ArrayTypeName',\n baseTypeName: this.visitTypeName(ctxTypeName!),\n length,\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.children?.length === 2) {\n const node: AST.ElementaryTypeName = {\n type: 'ElementaryTypeName',\n name: this._toText(ctx.getChild(0)),\n stateMutability: this._toText(ctx.getChild(1)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.elementaryTypeName() !== undefined) {\n return this.visitElementaryTypeName(ctx.elementaryTypeName()!)\n }\n\n if (ctx.userDefinedTypeName() !== undefined) {\n return this.visitUserDefinedTypeName(ctx.userDefinedTypeName()!)\n }\n\n if (ctx.mapping() !== undefined) {\n return this.visitMapping(ctx.mapping()!)\n }\n\n if (ctx.functionTypeName() !== undefined) {\n return this.visitFunctionTypeName(ctx.functionTypeName()!)\n }\n\n throw new Error('Assertion error: unhandled type name case')\n }\n\n public visitUserDefinedTypeName(\n ctx: SP.UserDefinedTypeNameContext\n ): AST.UserDefinedTypeName & WithMeta {\n const node: AST.UserDefinedTypeName = {\n type: 'UserDefinedTypeName',\n namePath: this._toText(ctx),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitUsingForDeclaration(\n ctx: SP.UsingForDeclarationContext\n ): AST.UsingForDeclaration & WithMeta {\n let typeName = null\n const ctxTypeName = ctx.typeName()\n if (ctxTypeName !== undefined) {\n typeName = this.visitTypeName(ctxTypeName)\n }\n\n const isGlobal = ctx.GlobalKeyword() !== undefined;\n\n // the object of the `usingForDeclaration` can be a single identifier\n // (the library name) or a group of functions:\n // using Lib for uint;\n // using { f } for uint;\n let node: AST.UsingForDeclaration\n const usingForObject = ctx.usingForObject()\n const firstChild = this._toText(usingForObject.getChild(0))\n if (firstChild === '{') {\n node = {\n type: 'UsingForDeclaration',\n isGlobal,\n typeName,\n libraryName: null,\n functions: usingForObject\n .userDefinedTypeName()\n .map((x) => this._toText(x)),\n }\n } else {\n node = {\n type: 'UsingForDeclaration',\n isGlobal,\n typeName,\n libraryName: this._toText(usingForObject.userDefinedTypeName(0)),\n functions: [],\n }\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitPragmaDirective(\n ctx: SP.PragmaDirectiveContext\n ): AST.PragmaDirective & WithMeta {\n // this converts something like >= 0.5.0 <0.7.0\n // in >=0.5.0 <0.7.0\n const versionContext = ctx.pragmaValue().version()\n\n let value = this._toText(ctx.pragmaValue())\n if (versionContext?.children !== undefined) {\n value = versionContext.children.map((x) => this._toText(x)).join(' ')\n }\n\n const node: AST.PragmaDirective = {\n type: 'PragmaDirective',\n name: this._toText(ctx.pragmaName()),\n value,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitInheritanceSpecifier(\n ctx: SP.InheritanceSpecifierContext\n ): AST.InheritanceSpecifier & WithMeta {\n const exprList = ctx.expressionList()\n const args =\n exprList !== undefined\n ? exprList.expression().map((x) => this.visitExpression(x))\n : []\n\n const node: AST.InheritanceSpecifier = {\n type: 'InheritanceSpecifier',\n baseName: this.visitUserDefinedTypeName(ctx.userDefinedTypeName()),\n arguments: args,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitModifierInvocation(\n ctx: SP.ModifierInvocationContext\n ): AST.ModifierInvocation & WithMeta {\n const exprList = ctx.expressionList()\n\n let args\n if (exprList != null) {\n args = exprList.expression().map((x) => this.visit(x))\n } else if (ctx.children !== undefined && ctx.children.length > 1) {\n args = []\n } else {\n args = null\n }\n\n const node: AST.ModifierInvocation = {\n type: 'ModifierInvocation',\n name: this._toText(ctx.identifier()),\n arguments: args,\n }\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionTypeName(\n ctx: SP.FunctionTypeNameContext\n ): AST.FunctionTypeName & WithMeta {\n const parameterTypes = ctx\n .functionTypeParameterList(0)\n .functionTypeParameter()\n .map((typeCtx) => this.visitFunctionTypeParameter(typeCtx))\n\n let returnTypes: AST.VariableDeclaration[] = []\n if (ctx.functionTypeParameterList().length > 1) {\n returnTypes = ctx\n .functionTypeParameterList(1)\n .functionTypeParameter()\n .map((typeCtx) => this.visitFunctionTypeParameter(typeCtx))\n }\n\n let visibility = 'default'\n if (ctx.InternalKeyword().length > 0) {\n visibility = 'internal'\n } else if (ctx.ExternalKeyword().length > 0) {\n visibility = 'external'\n }\n\n let stateMutability = null\n if (ctx.stateMutability().length > 0) {\n stateMutability = this._toText(ctx.stateMutability(0))\n }\n\n const node: AST.FunctionTypeName = {\n type: 'FunctionTypeName',\n parameterTypes,\n returnTypes,\n visibility,\n stateMutability,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionTypeParameter(\n ctx: SP.FunctionTypeParameterContext\n ): AST.VariableDeclaration & WithMeta {\n let storageLocation = null\n if (ctx.storageLocation()) {\n storageLocation = this._toText(ctx.storageLocation()!)\n }\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n typeName: this.visitTypeName(ctx.typeName()),\n name: null,\n identifier: null,\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitThrowStatement(\n ctx: SP.ThrowStatementContext\n ): AST.ThrowStatement & WithMeta {\n const node: AST.ThrowStatement = {\n type: 'ThrowStatement',\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitReturnStatement(\n ctx: SP.ReturnStatementContext\n ): AST.ReturnStatement & WithMeta {\n let expression = null\n const ctxExpression = ctx.expression()\n if (ctxExpression) {\n expression = this.visitExpression(ctxExpression)\n }\n\n const node: AST.ReturnStatement = {\n type: 'ReturnStatement',\n expression,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitEmitStatement(\n ctx: SP.EmitStatementContext\n ): AST.EmitStatement & WithMeta {\n const node: AST.EmitStatement = {\n type: 'EmitStatement',\n eventCall: this.visitFunctionCall(ctx.functionCall()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitCustomErrorDefinition(\n ctx: SP.CustomErrorDefinitionContext\n ): AST.CustomErrorDefinition & WithMeta {\n const node: AST.CustomErrorDefinition = {\n type: 'CustomErrorDefinition',\n name: this._toText(ctx.identifier()),\n parameters: this.visitParameterList(ctx.parameterList()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitTypeDefinition(\n ctx: SP.TypeDefinitionContext\n ): AST.TypeDefinition & WithMeta {\n const node: AST.TypeDefinition = {\n type: 'TypeDefinition',\n name: this._toText(ctx.identifier()),\n definition: this.visitElementaryTypeName(ctx.elementaryTypeName()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitRevertStatement(\n ctx: SP.RevertStatementContext\n ): AST.RevertStatement & WithMeta {\n const node: AST.RevertStatement = {\n type: 'RevertStatement',\n revertCall: this.visitFunctionCall(ctx.functionCall()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFunctionCall(\n ctx: SP.FunctionCallContext\n ): AST.FunctionCall & WithMeta {\n let args: AST.Expression[] = []\n const names = []\n const identifiers = []\n\n const ctxArgs = ctx.functionCallArguments()\n const ctxArgsExpressionList = ctxArgs.expressionList()\n const ctxArgsNameValueList = ctxArgs.nameValueList()\n if (ctxArgsExpressionList) {\n args = ctxArgsExpressionList\n .expression()\n .map((exprCtx) => this.visitExpression(exprCtx))\n } else if (ctxArgsNameValueList) {\n for (const nameValue of ctxArgsNameValueList.nameValue()) {\n args.push(this.visitExpression(nameValue.expression()))\n names.push(this._toText(nameValue.identifier()))\n identifiers.push(this.visitIdentifier(nameValue.identifier()))\n }\n }\n\n const node: AST.FunctionCall = {\n type: 'FunctionCall',\n expression: this.visitExpression(ctx.expression()),\n arguments: args,\n names,\n identifiers,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitStructDefinition(\n ctx: SP.StructDefinitionContext\n ): AST.StructDefinition & WithMeta {\n const node: AST.StructDefinition = {\n type: 'StructDefinition',\n name: this._toText(ctx.identifier()),\n members: ctx\n .variableDeclaration()\n .map((x) => this.visitVariableDeclaration(x)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitWhileStatement(\n ctx: SP.WhileStatementContext\n ): AST.WhileStatement & WithMeta {\n const node: AST.WhileStatement = {\n type: 'WhileStatement',\n condition: this.visitExpression(ctx.expression()),\n body: this.visitStatement(ctx.statement()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitDoWhileStatement(\n ctx: SP.DoWhileStatementContext\n ): AST.DoWhileStatement & WithMeta {\n const node: AST.DoWhileStatement = {\n type: 'DoWhileStatement',\n condition: this.visitExpression(ctx.expression()),\n body: this.visitStatement(ctx.statement()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitIfStatement(\n ctx: SP.IfStatementContext\n ): AST.IfStatement & WithMeta {\n const trueBody = this.visitStatement(ctx.statement(0))\n\n let falseBody = null\n if (ctx.statement().length > 1) {\n falseBody = this.visitStatement(ctx.statement(1))\n }\n\n const node: AST.IfStatement = {\n type: 'IfStatement',\n condition: this.visitExpression(ctx.expression()),\n trueBody,\n falseBody,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitTryStatement(\n ctx: SP.TryStatementContext\n ): AST.TryStatement & WithMeta {\n let returnParameters = null\n const ctxReturnParameters = ctx.returnParameters()\n if (ctxReturnParameters !== undefined) {\n returnParameters = this.visitReturnParameters(ctxReturnParameters)\n }\n\n const catchClauses = ctx\n .catchClause()\n .map((exprCtx) => this.visitCatchClause(exprCtx))\n\n const node: AST.TryStatement = {\n type: 'TryStatement',\n expression: this.visitExpression(ctx.expression()),\n returnParameters,\n body: this.visitBlock(ctx.block()),\n catchClauses,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitCatchClause(\n ctx: SP.CatchClauseContext\n ): AST.CatchClause & WithMeta {\n let parameters = null\n if (ctx.parameterList()) {\n parameters = this.visitParameterList(ctx.parameterList()!)\n }\n\n if (\n ctx.identifier() &&\n this._toText(ctx.identifier()!) !== 'Error' &&\n this._toText(ctx.identifier()!) !== 'Panic'\n ) {\n throw new Error('Expected \"Error\" or \"Panic\" identifier in catch clause')\n }\n\n let kind = null\n const ctxIdentifier = ctx.identifier()\n if (ctxIdentifier !== undefined) {\n kind = this._toText(ctxIdentifier)\n }\n\n const node: AST.CatchClause = {\n type: 'CatchClause',\n // deprecated, use the `kind` property instead,\n isReasonStringType: kind === 'Error',\n kind,\n parameters,\n body: this.visitBlock(ctx.block()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitExpressionStatement(\n ctx: SP.ExpressionStatementContext\n ): AST.ExpressionStatement & WithMeta {\n if (!ctx) {\n return null as any\n }\n const node: AST.ExpressionStatement = {\n type: 'ExpressionStatement',\n expression: this.visitExpression(ctx.expression()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitNumberLiteral(\n ctx: SP.NumberLiteralContext\n ): AST.NumberLiteral & WithMeta {\n const number = this._toText(ctx.getChild(0))\n let subdenomination = null\n\n if (ctx.children?.length === 2) {\n subdenomination = this._toText(ctx.getChild(1))\n }\n\n const node: AST.NumberLiteral = {\n type: 'NumberLiteral',\n number,\n subdenomination: subdenomination as AST.NumberLiteral['subdenomination'],\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitMappingKey(\n ctx: SP.MappingKeyContext\n ): (AST.ElementaryTypeName | AST.UserDefinedTypeName) & WithMeta {\n if (ctx.elementaryTypeName()) {\n return this.visitElementaryTypeName(ctx.elementaryTypeName()!)\n } else if (ctx.userDefinedTypeName()) {\n return this.visitUserDefinedTypeName(ctx.userDefinedTypeName()!)\n } else {\n throw new Error(\n 'Expected MappingKey to have either ' +\n 'elementaryTypeName or userDefinedTypeName'\n )\n }\n }\n\n public visitMapping(ctx: SP.MappingContext): AST.Mapping & WithMeta {\n const node: AST.Mapping = {\n type: 'Mapping',\n keyType: this.visitMappingKey(ctx.mappingKey()),\n valueType: this.visitTypeName(ctx.typeName()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitModifierDefinition(\n ctx: SP.ModifierDefinitionContext\n ): AST.ModifierDefinition & WithMeta {\n let parameters = null\n if (ctx.parameterList()) {\n parameters = this.visitParameterList(ctx.parameterList()!)\n }\n\n let isVirtual = false\n if (ctx.VirtualKeyword().length > 0) {\n isVirtual = true\n }\n\n let override\n const overrideSpecifier = ctx.overrideSpecifier()\n if (overrideSpecifier.length === 0) {\n override = null\n } else {\n override = overrideSpecifier[0]\n .userDefinedTypeName()\n .map((x) => this.visitUserDefinedTypeName(x))\n }\n\n let body = null\n const blockCtx = ctx.block()\n if (blockCtx !== undefined) {\n body = this.visitBlock(blockCtx)\n }\n\n const node: AST.ModifierDefinition = {\n type: 'ModifierDefinition',\n name: this._toText(ctx.identifier()),\n parameters,\n body,\n isVirtual,\n override,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitUncheckedStatement(\n ctx: SP.UncheckedStatementContext\n ): AST.UncheckedStatement & WithMeta {\n const node: AST.UncheckedStatement = {\n type: 'UncheckedStatement',\n block: this.visitBlock(ctx.block()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitExpression(ctx: SP.ExpressionContext): AST.Expression & WithMeta {\n let op: string\n\n switch (ctx.children!.length) {\n case 1: {\n // primary expression\n const primaryExpressionCtx = ctx.tryGetRuleContext(\n 0,\n SP.PrimaryExpressionContext\n )\n if (primaryExpressionCtx === undefined) {\n throw new Error(\n 'Assertion error: primary expression should exist when children length is 1'\n )\n }\n return this.visitPrimaryExpression(primaryExpressionCtx)\n }\n case 2:\n op = this._toText(ctx.getChild(0))\n\n // new expression\n if (op === 'new') {\n const node: AST.NewExpression = {\n type: 'NewExpression',\n typeName: this.visitTypeName(ctx.typeName()!),\n }\n return this._addMeta(node, ctx)\n }\n\n // prefix operators\n if (AST.unaryOpValues.includes(op as AST.UnaryOp)) {\n const node: AST.UnaryOperation = {\n type: 'UnaryOperation',\n operator: op as AST.UnaryOp,\n subExpression: this.visitExpression(\n ctx.getRuleContext(0, SP.ExpressionContext)\n ),\n isPrefix: true,\n }\n return this._addMeta(node, ctx)\n }\n\n op = this._toText(ctx.getChild(1))!\n\n // postfix operators\n if (['++', '--'].includes(op)) {\n const node: AST.UnaryOperation = {\n type: 'UnaryOperation',\n operator: op as AST.UnaryOp,\n subExpression: this.visitExpression(\n ctx.getRuleContext(0, SP.ExpressionContext)\n ),\n isPrefix: false,\n }\n return this._addMeta(node, ctx)\n }\n break\n\n case 3:\n // treat parenthesis as no-op\n if (\n this._toText(ctx.getChild(0)) === '(' &&\n this._toText(ctx.getChild(2)) === ')'\n ) {\n const node: AST.TupleExpression = {\n type: 'TupleExpression',\n components: [\n this.visitExpression(ctx.getRuleContext(0, SP.ExpressionContext)),\n ],\n isArray: false,\n }\n return this._addMeta(node, ctx)\n }\n\n op = this._toText(ctx.getChild(1))!\n\n // member access\n if (op === '.') {\n const node: AST.MemberAccess = {\n type: 'MemberAccess',\n expression: this.visitExpression(ctx.expression(0)),\n memberName: this._toText(ctx.identifier()!),\n }\n return this._addMeta(node, ctx)\n }\n\n if (isBinOp(op)) {\n const node: AST.BinaryOperation = {\n type: 'BinaryOperation',\n operator: op,\n left: this.visitExpression(ctx.expression(0)),\n right: this.visitExpression(ctx.expression(1)),\n }\n return this._addMeta(node, ctx)\n }\n break\n\n case 4:\n // function call\n if (\n this._toText(ctx.getChild(1)) === '(' &&\n this._toText(ctx.getChild(3)) === ')'\n ) {\n let args: AST.Expression[] = []\n const names = []\n const identifiers = []\n\n const ctxArgs = ctx.functionCallArguments()!\n if (ctxArgs.expressionList()) {\n args = ctxArgs\n .expressionList()!\n .expression()\n .map((exprCtx) => this.visitExpression(exprCtx))\n } else if (ctxArgs.nameValueList()) {\n for (const nameValue of ctxArgs.nameValueList()!.nameValue()) {\n args.push(this.visitExpression(nameValue.expression()))\n names.push(this._toText(nameValue.identifier()))\n identifiers.push(this.visitIdentifier(nameValue.identifier()))\n }\n }\n\n const node: AST.FunctionCall = {\n type: 'FunctionCall',\n expression: this.visitExpression(ctx.expression(0)),\n arguments: args,\n names,\n identifiers,\n }\n\n return this._addMeta(node, ctx)\n }\n\n // index access\n if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(3)) === ']'\n ) {\n if (ctx.getChild(2).text === ':') {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n const node: AST.IndexAccess = {\n type: 'IndexAccess',\n base: this.visitExpression(ctx.expression(0)),\n index: this.visitExpression(ctx.expression(1)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n // expression with nameValueList\n if (\n this._toText(ctx.getChild(1)) === '{' &&\n this._toText(ctx.getChild(3)) === '}'\n ) {\n const node: AST.NameValueExpression = {\n type: 'NameValueExpression',\n expression: this.visitExpression(ctx.expression(0)),\n arguments: this.visitNameValueList(ctx.nameValueList()!),\n }\n\n return this._addMeta(node, ctx)\n }\n\n break\n\n case 5:\n // ternary operator\n if (\n this._toText(ctx.getChild(1)) === '?' &&\n this._toText(ctx.getChild(3)) === ':'\n ) {\n const node: AST.Conditional = {\n type: 'Conditional',\n condition: this.visitExpression(ctx.expression(0)),\n trueExpression: this.visitExpression(ctx.expression(1)),\n falseExpression: this.visitExpression(ctx.expression(2)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n // index range access\n if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(2)) === ':' &&\n this._toText(ctx.getChild(4)) === ']'\n ) {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n indexEnd: this.visitExpression(ctx.expression(1)),\n }\n\n return this._addMeta(node, ctx)\n } else if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(3)) === ':' &&\n this._toText(ctx.getChild(4)) === ']'\n ) {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n indexStart: this.visitExpression(ctx.expression(1)),\n }\n\n return this._addMeta(node, ctx)\n }\n break\n\n case 6:\n // index range access\n if (\n this._toText(ctx.getChild(1)) === '[' &&\n this._toText(ctx.getChild(3)) === ':' &&\n this._toText(ctx.getChild(5)) === ']'\n ) {\n const node: AST.IndexRangeAccess = {\n type: 'IndexRangeAccess',\n base: this.visitExpression(ctx.expression(0)),\n indexStart: this.visitExpression(ctx.expression(1)),\n indexEnd: this.visitExpression(ctx.expression(2)),\n }\n\n return this._addMeta(node, ctx)\n }\n break\n }\n\n throw new Error('Unrecognized expression')\n }\n\n public visitNameValueList(\n ctx: SP.NameValueListContext\n ): AST.NameValueList & WithMeta {\n const names: string[] = []\n const identifiers: AST.Identifier[] = []\n const args: AST.Expression[] = []\n\n for (const nameValue of ctx.nameValue()) {\n names.push(this._toText(nameValue.identifier()))\n identifiers.push(this.visitIdentifier(nameValue.identifier()))\n args.push(this.visitExpression(nameValue.expression()))\n }\n\n const node: AST.NameValueList = {\n type: 'NameValueList',\n names,\n identifiers,\n arguments: args,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitFileLevelConstant(ctx: SP.FileLevelConstantContext) {\n const type = this.visitTypeName(ctx.typeName())\n const iden = ctx.identifier()\n const name = this._toText(iden)\n\n const expression = this.visitExpression(ctx.expression())\n\n const node: AST.FileLevelConstant = {\n type: 'FileLevelConstant',\n typeName: type,\n name,\n initialValue: expression,\n isDeclaredConst: true,\n isImmutable: false,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitForStatement(ctx: SP.ForStatementContext) {\n let conditionExpression: any = this.visitExpressionStatement(\n ctx.expressionStatement()!\n )\n if (conditionExpression) {\n conditionExpression = conditionExpression.expression\n }\n const node: AST.ForStatement = {\n type: 'ForStatement',\n initExpression: ctx.simpleStatement()\n ? this.visitSimpleStatement(ctx.simpleStatement()!)\n : null,\n conditionExpression,\n loopExpression: {\n type: 'ExpressionStatement',\n expression:\n ctx.expression() !== undefined\n ? this.visitExpression(ctx.expression()!)\n : null,\n },\n body: this.visitStatement(ctx.statement()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitHexLiteral(ctx: SP.HexLiteralContext) {\n const parts = ctx\n .HexLiteralFragment()\n .map((x) => this._toText(x))\n .map((x) => x.substring(4, x.length - 1))\n\n const node: AST.HexLiteral = {\n type: 'HexLiteral',\n value: parts.join(''),\n parts,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitPrimaryExpression(\n ctx: SP.PrimaryExpressionContext\n ): AST.PrimaryExpression & WithMeta {\n if (ctx.BooleanLiteral()) {\n const node: AST.BooleanLiteral = {\n type: 'BooleanLiteral',\n value: this._toText(ctx.BooleanLiteral()!) === 'true',\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.hexLiteral()) {\n return this.visitHexLiteral(ctx.hexLiteral()!)\n }\n\n if (ctx.stringLiteral()) {\n const fragments = ctx\n .stringLiteral()!\n .StringLiteralFragment()\n .map((stringLiteralFragmentCtx: any) => {\n let text = this._toText(stringLiteralFragmentCtx)!\n\n const isUnicode = text.slice(0, 7) === 'unicode'\n if (isUnicode) {\n text = text.slice(7)\n }\n const singleQuotes = text[0] === \"'\"\n const textWithoutQuotes = text.substring(1, text.length - 1)\n const value = singleQuotes\n ? textWithoutQuotes.replace(new RegExp(\"\\\\\\\\'\", 'g'), \"'\")\n : textWithoutQuotes.replace(new RegExp('\\\\\\\\\"', 'g'), '\"')\n\n return { value, isUnicode }\n })\n\n const parts = fragments.map((x: any) => x.value)\n\n const node: AST.StringLiteral = {\n type: 'StringLiteral',\n value: parts.join(''),\n parts,\n isUnicode: fragments.map((x: any) => x.isUnicode),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.numberLiteral()) {\n return this.visitNumberLiteral(ctx.numberLiteral()!)\n }\n\n if (ctx.TypeKeyword()) {\n const node: AST.Identifier = {\n type: 'Identifier',\n name: 'type',\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.typeName()) {\n return this.visitTypeName(ctx.typeName()!)\n }\n\n return this.visit(ctx.getChild(0)) as any\n }\n\n public visitTupleExpression(\n ctx: SP.TupleExpressionContext\n ): AST.TupleExpression & WithMeta {\n // remove parentheses\n const children = ctx.children!.slice(1, -1)\n const components = this._mapCommasToNulls(children).map((expr) => {\n // add a null for each empty value\n if (expr === null) {\n return null\n }\n return this.visit(expr)\n })\n\n const node: AST.TupleExpression = {\n type: 'TupleExpression',\n components,\n isArray: this._toText(ctx.getChild(0)) === '[',\n }\n\n return this._addMeta(node, ctx)\n }\n\n public buildIdentifierList(ctx: SP.IdentifierListContext) {\n // remove parentheses\n const children = ctx.children!.slice(1, -1)\n const identifiers = ctx.identifier()\n let i = 0\n return this._mapCommasToNulls(children).map((idenOrNull) => {\n // add a null for each empty value\n if (!idenOrNull) {\n return null\n }\n\n const iden = identifiers[i]\n i++\n\n const node: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n name: this._toText(iden),\n identifier: this.visitIdentifier(iden),\n isStateVar: false,\n isIndexed: false,\n typeName: null,\n storageLocation: null,\n expression: null,\n }\n\n return this._addMeta(node, iden)\n })\n }\n\n public buildVariableDeclarationList(\n ctx: SP.VariableDeclarationListContext\n ): Array<(AST.VariableDeclaration & WithMeta) | null> {\n // remove parentheses\n\n const variableDeclarations = ctx.variableDeclaration()\n let i = 0\n return this._mapCommasToNulls(ctx.children!).map((declOrNull) => {\n // add a null for each empty value\n if (!declOrNull) {\n return null\n }\n\n const decl = variableDeclarations[i]\n i++\n\n let storageLocation: string | null = null\n if (decl.storageLocation()) {\n storageLocation = this._toText(decl.storageLocation()!)\n }\n\n const identifierCtx = decl.identifier()\n\n const result: AST.VariableDeclaration = {\n type: 'VariableDeclaration',\n name: this._toText(identifierCtx),\n identifier: this.visitIdentifier(identifierCtx),\n typeName: this.visitTypeName(decl.typeName()),\n storageLocation,\n isStateVar: false,\n isIndexed: false,\n expression: null,\n }\n\n return this._addMeta(result, decl)\n })\n }\n\n public visitImportDirective(ctx: SP.ImportDirectiveContext) {\n const pathString = this._toText(ctx.importPath())\n let unitAlias = null\n let unitAliasIdentifier = null\n let symbolAliases = null\n let symbolAliasesIdentifiers = null\n\n if (ctx.importDeclaration().length > 0) {\n symbolAliases = ctx.importDeclaration().map((decl) => {\n const symbol = this._toText(decl.identifier(0))\n let alias = null\n if (decl.identifier().length > 1) {\n alias = this._toText(decl.identifier(1))\n }\n return [symbol, alias] as [string, string | null]\n })\n symbolAliasesIdentifiers = ctx.importDeclaration().map((decl) => {\n const symbolIdentifier = this.visitIdentifier(decl.identifier(0))\n let aliasIdentifier = null\n if (decl.identifier().length > 1) {\n aliasIdentifier = this.visitIdentifier(decl.identifier(1))\n }\n return [symbolIdentifier, aliasIdentifier] as [\n AST.Identifier,\n AST.Identifier | null\n ]\n })\n } else {\n const identifierCtxList = ctx.identifier()\n if (identifierCtxList.length === 0) {\n // nothing to do\n } else if (identifierCtxList.length === 1) {\n const aliasIdentifierCtx = ctx.identifier(0)\n unitAlias = this._toText(aliasIdentifierCtx)\n unitAliasIdentifier = this.visitIdentifier(aliasIdentifierCtx)\n } else if (identifierCtxList.length === 2) {\n const aliasIdentifierCtx = ctx.identifier(1)\n unitAlias = this._toText(aliasIdentifierCtx)\n unitAliasIdentifier = this.visitIdentifier(aliasIdentifierCtx)\n } else {\n throw new Error(\n 'Assertion error: an import should have one or two identifiers'\n )\n }\n }\n\n const path = pathString.substring(1, pathString.length - 1)\n\n const pathLiteral: AST.StringLiteral = {\n type: 'StringLiteral',\n value: path,\n parts: [path],\n isUnicode: [false], // paths in imports don't seem to support unicode literals\n }\n\n const node: AST.ImportDirective = {\n type: 'ImportDirective',\n path,\n pathLiteral: this._addMeta(pathLiteral, ctx.importPath()),\n unitAlias,\n unitAliasIdentifier,\n symbolAliases,\n symbolAliasesIdentifiers,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public buildEventParameterList(ctx: SP.EventParameterListContext) {\n return ctx.eventParameter().map((paramCtx: any) => {\n const type = this.visit(paramCtx.typeName())\n let name = null\n if (paramCtx.identifier()) {\n name = this._toText(paramCtx.identifier())\n }\n\n return {\n type: 'VariableDeclaration',\n typeName: type,\n name,\n isStateVar: false,\n isIndexed: !!paramCtx.IndexedKeyword(0),\n }\n })\n }\n\n public visitReturnParameters(\n ctx: SP.ReturnParametersContext\n ): (AST.VariableDeclaration & WithMeta)[] {\n return this.visitParameterList(ctx.parameterList())\n }\n\n public visitParameterList(\n ctx: SP.ParameterListContext\n ): (AST.VariableDeclaration & WithMeta)[] {\n return ctx.parameter().map((paramCtx: any) => this.visitParameter(paramCtx))\n }\n\n public visitInlineAssemblyStatement(ctx: SP.InlineAssemblyStatementContext) {\n let language: string | null = null\n if (ctx.StringLiteralFragment()) {\n language = this._toText(ctx.StringLiteralFragment()!)!\n language = language.substring(1, language.length - 1)\n }\n\n const flags = []\n const flag = ctx.inlineAssemblyStatementFlag()\n if (flag !== undefined) {\n const flagString = this._toText(flag.stringLiteral())\n flags.push(flagString.slice(1, flagString.length - 1))\n }\n\n const node: AST.InlineAssemblyStatement = {\n type: 'InlineAssemblyStatement',\n language,\n flags,\n body: this.visitAssemblyBlock(ctx.assemblyBlock()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyBlock(\n ctx: SP.AssemblyBlockContext\n ): AST.AssemblyBlock & WithMeta {\n const operations = ctx\n .assemblyItem()\n .map((item) => this.visitAssemblyItem(item))\n\n const node: AST.AssemblyBlock = {\n type: 'AssemblyBlock',\n operations,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyItem(\n ctx: SP.AssemblyItemContext\n ): AST.AssemblyItem & WithMeta {\n let text\n\n if (ctx.hexLiteral()) {\n return this.visitHexLiteral(ctx.hexLiteral()!)\n }\n\n if (ctx.stringLiteral()) {\n text = this._toText(ctx.stringLiteral()!)!\n const value = text.substring(1, text.length - 1)\n const node: AST.StringLiteral = {\n type: 'StringLiteral',\n value,\n parts: [value],\n isUnicode: [false], // assembly doesn't seem to support unicode literals right now\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.BreakKeyword()) {\n const node: AST.Break = {\n type: 'Break',\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.ContinueKeyword()) {\n const node: AST.Continue = {\n type: 'Continue',\n }\n\n return this._addMeta(node, ctx)\n }\n\n return this.visit(ctx.getChild(0)) as AST.AssemblyItem & WithMeta\n }\n\n public visitAssemblyExpression(ctx: SP.AssemblyExpressionContext) {\n return this.visit(ctx.getChild(0)) as AST.AssemblyExpression & WithMeta\n }\n\n public visitAssemblyCall(ctx: SP.AssemblyCallContext) {\n const functionName = this._toText(ctx.getChild(0))\n const args = ctx\n .assemblyExpression()\n .map((assemblyExpr) => this.visitAssemblyExpression(assemblyExpr))\n\n const node: AST.AssemblyCall = {\n type: 'AssemblyCall',\n functionName,\n arguments: args,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyLiteral(\n ctx: SP.AssemblyLiteralContext\n ): AST.AssemblyLiteral & WithMeta {\n let text\n\n if (ctx.stringLiteral()) {\n text = this._toText(ctx)!\n const value = text.substring(1, text.length - 1)\n const node: AST.StringLiteral = {\n type: 'StringLiteral',\n value,\n parts: [value],\n isUnicode: [false], // assembly doesn't seem to support unicode literals right now\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.DecimalNumber()) {\n const node: AST.DecimalNumber = {\n type: 'DecimalNumber',\n value: this._toText(ctx),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.HexNumber()) {\n const node: AST.HexNumber = {\n type: 'HexNumber',\n value: this._toText(ctx),\n }\n\n return this._addMeta(node, ctx)\n }\n\n if (ctx.hexLiteral()) {\n return this.visitHexLiteral(ctx.hexLiteral()!)\n }\n\n throw new Error('Should never reach here')\n }\n\n public visitAssemblySwitch(ctx: SP.AssemblySwitchContext) {\n const node: AST.AssemblySwitch = {\n type: 'AssemblySwitch',\n expression: this.visitAssemblyExpression(ctx.assemblyExpression()),\n cases: ctx.assemblyCase().map((c) => this.visitAssemblyCase(c)),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyCase(\n ctx: SP.AssemblyCaseContext\n ): AST.AssemblyCase & WithMeta {\n let value = null\n if (this._toText(ctx.getChild(0)) === 'case') {\n value = this.visitAssemblyLiteral(ctx.assemblyLiteral()!)\n }\n\n const node: AST.AssemblyCase = {\n type: 'AssemblyCase',\n block: this.visitAssemblyBlock(ctx.assemblyBlock()),\n value,\n default: value === null,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyLocalDefinition(\n ctx: SP.AssemblyLocalDefinitionContext\n ): AST.AssemblyLocalDefinition & WithMeta {\n const ctxAssemblyIdentifierOrList = ctx.assemblyIdentifierOrList()\n let names\n if (ctxAssemblyIdentifierOrList.identifier()) {\n names = [this.visitIdentifier(ctxAssemblyIdentifierOrList.identifier()!)]\n } else if (ctxAssemblyIdentifierOrList.assemblyMember()) {\n names = [\n this.visitAssemblyMember(ctxAssemblyIdentifierOrList.assemblyMember()!),\n ]\n } else {\n names = ctxAssemblyIdentifierOrList\n .assemblyIdentifierList()!\n .identifier()!\n .map((x) => this.visitIdentifier(x))\n }\n\n let expression: AST.AssemblyExpression | null = null\n if (ctx.assemblyExpression() !== undefined) {\n expression = this.visitAssemblyExpression(ctx.assemblyExpression()!)\n }\n\n const node: AST.AssemblyLocalDefinition = {\n type: 'AssemblyLocalDefinition',\n names,\n expression,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyFunctionDefinition(\n ctx: SP.AssemblyFunctionDefinitionContext\n ) {\n const ctxAssemblyIdentifierList = ctx.assemblyIdentifierList()\n const args =\n ctxAssemblyIdentifierList !== undefined\n ? ctxAssemblyIdentifierList\n .identifier()\n .map((x) => this.visitIdentifier(x))\n : []\n\n const ctxAssemblyFunctionReturns = ctx.assemblyFunctionReturns()\n const returnArgs = ctxAssemblyFunctionReturns\n ? ctxAssemblyFunctionReturns\n .assemblyIdentifierList()!\n .identifier()\n .map((x) => this.visitIdentifier(x))\n : []\n\n const node: AST.AssemblyFunctionDefinition = {\n type: 'AssemblyFunctionDefinition',\n name: this._toText(ctx.identifier()),\n arguments: args,\n returnArguments: returnArgs,\n body: this.visitAssemblyBlock(ctx.assemblyBlock()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyAssignment(ctx: SP.AssemblyAssignmentContext) {\n const ctxAssemblyIdentifierOrList = ctx.assemblyIdentifierOrList()\n let names\n if (ctxAssemblyIdentifierOrList.identifier()) {\n names = [this.visitIdentifier(ctxAssemblyIdentifierOrList.identifier()!)]\n } else if (ctxAssemblyIdentifierOrList.assemblyMember()) {\n names = [\n this.visitAssemblyMember(ctxAssemblyIdentifierOrList.assemblyMember()!),\n ]\n } else {\n names = ctxAssemblyIdentifierOrList\n .assemblyIdentifierList()!\n .identifier()\n .map((x) => this.visitIdentifier(x))\n }\n\n const node: AST.AssemblyAssignment = {\n type: 'AssemblyAssignment',\n names,\n expression: this.visitAssemblyExpression(ctx.assemblyExpression()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyMember(\n ctx: SP.AssemblyMemberContext\n ): AST.AssemblyMemberAccess & WithMeta {\n const [accessed, member] = ctx.identifier()\n const node: AST.AssemblyMemberAccess = {\n type: 'AssemblyMemberAccess',\n expression: this.visitIdentifier(accessed),\n memberName: this.visitIdentifier(member),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitLabelDefinition(ctx: SP.LabelDefinitionContext) {\n const node: AST.LabelDefinition = {\n type: 'LabelDefinition',\n name: this._toText(ctx.identifier()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyStackAssignment(ctx: SP.AssemblyStackAssignmentContext) {\n const node: AST.AssemblyStackAssignment = {\n type: 'AssemblyStackAssignment',\n name: this._toText(ctx.identifier()),\n expression: this.visitAssemblyExpression(ctx.assemblyExpression()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyFor(ctx: SP.AssemblyForContext) {\n // TODO remove these type assertions\n const node: AST.AssemblyFor = {\n type: 'AssemblyFor',\n pre: this.visit(ctx.getChild(1)) as\n | AST.AssemblyBlock\n | AST.AssemblyExpression,\n condition: this.visit(ctx.getChild(2)) as AST.AssemblyExpression,\n post: this.visit(ctx.getChild(3)) as\n | AST.AssemblyBlock\n | AST.AssemblyExpression,\n body: this.visit(ctx.getChild(4)) as AST.AssemblyBlock,\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitAssemblyIf(ctx: SP.AssemblyIfContext) {\n const node: AST.AssemblyIf = {\n type: 'AssemblyIf',\n condition: this.visitAssemblyExpression(ctx.assemblyExpression()),\n body: this.visitAssemblyBlock(ctx.assemblyBlock()),\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitContinueStatement(\n ctx: SP.ContinueStatementContext\n ): AST.ContinueStatement & WithMeta {\n const node: AST.ContinueStatement = {\n type: 'ContinueStatement',\n }\n\n return this._addMeta(node, ctx)\n }\n\n public visitBreakStatement(\n ctx: SP.BreakStatementContext\n ): AST.BreakStatement & WithMeta {\n const node: AST.BreakStatement = {\n type: 'BreakStatement',\n }\n\n return this._addMeta(node, ctx)\n }\n\n private _toText(ctx: ParserRuleContext | ParseTree): string {\n const text = ctx.text\n if (text === undefined) {\n throw new Error('Assertion error: text should never be undefined')\n }\n\n return text\n }\n\n private _stateMutabilityToText(\n ctx: SP.StateMutabilityContext\n ): AST.FunctionDefinition['stateMutability'] {\n if (ctx.PureKeyword() !== undefined) {\n return 'pure'\n }\n if (ctx.ConstantKeyword() !== undefined) {\n return 'constant'\n }\n if (ctx.PayableKeyword() !== undefined) {\n return 'payable'\n }\n if (ctx.ViewKeyword() !== undefined) {\n return 'view'\n }\n\n throw new Error('Assertion error: non-exhaustive stateMutability check')\n }\n\n private _loc(ctx: ParserRuleContext): SourceLocation {\n const sourceLocation: SourceLocation = {\n start: {\n line: ctx.start.line,\n column: ctx.start.charPositionInLine,\n },\n end: {\n line: ctx.stop ? ctx.stop.line : ctx.start.line,\n column: ctx.stop\n ? ctx.stop.charPositionInLine\n : ctx.start.charPositionInLine,\n },\n }\n return sourceLocation\n }\n\n _range(ctx: ParserRuleContext): [number, number] {\n return [ctx.start.startIndex, ctx.stop?.stopIndex ?? ctx.start.startIndex]\n }\n\n private _addMeta(\n node: T,\n ctx: ParserRuleContext\n ): T & WithMeta {\n const nodeWithMeta: AST.BaseASTNode = {\n type: node.type,\n }\n\n if (this.options.loc === true) {\n node.loc = this._loc(ctx)\n }\n if (this.options.range === true) {\n node.range = this._range(ctx)\n }\n\n return {\n ...nodeWithMeta,\n ...node,\n } as T & WithMeta\n }\n\n private _mapCommasToNulls(children: ParseTree[]) {\n if (children.length === 0) {\n return []\n }\n\n const values: Array = []\n let comma = true\n\n for (const el of children) {\n if (comma) {\n if (this._toText(el) === ',') {\n values.push(null)\n } else {\n values.push(el)\n comma = false\n }\n } else {\n if (this._toText(el) !== ',') {\n throw new Error('expected comma')\n }\n comma = true\n }\n }\n\n if (comma) {\n values.push(null)\n }\n\n return values\n }\n}\n\nfunction isBinOp(op: string): op is AST.BinOp {\n return AST.binaryOpValues.includes(op as AST.BinOp)\n}\n", "import antlr4 from 'antlr4'\n\nclass ErrorListener extends antlr4.error.ErrorListener {\n private _errors: any[]\n\n constructor() {\n super()\n\n this._errors = []\n }\n\n syntaxError(\n recognizer: any,\n offendingSymbol: any,\n line: number,\n column: number,\n message: string\n ) {\n this._errors.push({ message, line, column })\n }\n\n getErrors(): any[] {\n return this._errors\n }\n\n hasErrors() {\n return this._errors.length > 0\n }\n}\n\nexport default ErrorListener\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 './utils/stringHashCode.js';\nimport './polyfills/codepointat.js';\nimport './polyfills/fromcodepoint.js';\nimport { default as atn } from './atn/index.js';\nimport { default as dfa } from './dfa/index.js';\nimport { default as tree } from './tree/index.js';\nimport { default as error } from './error/index.js';\nimport Token from './Token.js';\nimport CommonToken from './CommonToken.js';\nimport { default as CharStreams } from './CharStreams.js';\nimport InputStream from './InputStream.js';\nimport FileStream from './FileStream.js';\nimport CommonTokenStream from './CommonTokenStream.js';\nimport Lexer from './Lexer.js';\nimport Parser from './Parser.js';\nimport PredictionContextCache from './atn/PredictionContextCache.js';\nimport ParserRuleContext from './context/ParserRuleContext.js';\nimport Interval from './misc/Interval.js';\nimport IntervalSet from './misc/IntervalSet.js';\nimport LL1Analyzer from './atn/LL1Analyzer.js';\nimport { default as Utils } from './utils/index.js';\n\nconst antlr4 = {\n atn, dfa, tree, error, Token, CommonToken, CharStreams, InputStream, FileStream, CommonTokenStream, Lexer, Parser,\n PredictionContextCache, ParserRuleContext, Interval, IntervalSet, LL1Analyzer, Utils\n};\n\nexport default antlr4;\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\nString.prototype.seed = String.prototype.seed || Math.round(Math.random() * Math.pow(2, 32));\n\nString.prototype.hashCode = function () {\n const key = this.toString();\n let h1b, k1;\n\n const remainder = key.length & 3; // key.length % 4\n const bytes = key.length - remainder;\n let h1 = String.prototype.seed;\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 */\n/*! https://mths.be/codepointat v0.2.0 by @mathias */\nif (!String.prototype.codePointAt) {\n\t(function() {\n\t\t'use strict'; // needed to support `apply`/`call` with `undefined`/`null`\n\t\tvar defineProperty = (function() {\n\t\t\t// IE 8 only supports `Object.defineProperty` on DOM elements\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tconst object = {};\n\t\t\t\tconst $defineProperty = Object.defineProperty;\n\t\t\t\tresult = $defineProperty(object, object, object) && $defineProperty;\n\t\t\t} catch(error) {\n\t\t\t\t/* eslint no-empty: [ \"off\" ] */\n\t\t\t}\n\t\t\treturn result;\n\t\t}());\n\t\tconst codePointAt = function(position) {\n\t\t\tif (this == null) {\n\t\t\t\tthrow TypeError();\n\t\t\t}\n\t\t\tconst string = String(this);\n\t\t\tconst size = string.length;\n\t\t\t// `ToInteger`\n\t\t\tlet index = position ? Number(position) : 0;\n\t\t\tif (index !== index) { // better `isNaN`\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\t// Account for out-of-bounds indices:\n\t\t\tif (index < 0 || index >= size) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\t// Get the first code unit\n\t\t\tconst first = string.charCodeAt(index);\n\t\t\tlet second;\n\t\t\tif ( // check if it\u2019s the start of a surrogate pair\n\t\t\t\tfirst >= 0xD800 && first <= 0xDBFF && // high surrogate\n\t\t\t\tsize > index + 1 // there is a next code unit\n\t\t\t) {\n\t\t\t\tsecond = string.charCodeAt(index + 1);\n\t\t\t\tif (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate\n\t\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\t\treturn (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn first;\n\t\t};\n\t\tif (defineProperty) {\n\t\t\tdefineProperty(String.prototype, 'codePointAt', {\n\t\t\t\t'value': codePointAt,\n\t\t\t\t'configurable': true,\n\t\t\t\t'writable': true\n\t\t\t});\n\t\t} else {\n\t\t\tString.prototype.codePointAt = codePointAt;\n\t\t}\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/*! https://mths.be/fromcodepoint v0.2.1 by @mathias */\nif (!String.fromCodePoint) {\n\t(function() {\n\t\tconst defineProperty = (function() {\n\t\t\t// IE 8 only supports `Object.defineProperty` on DOM elements\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tconst object = {};\n\t\t\t\tconst $defineProperty = Object.defineProperty;\n\t\t\t\tresult = $defineProperty(object, object, object) && $defineProperty;\n\t\t\t} catch(error) {\n\t\t\t\t/* eslint no-empty: [ \"off\" ] */\n\t\t\t}\n\t\t\treturn result;\n\t\t}());\n\t\tconst stringFromCharCode = String.fromCharCode;\n\t\tconst floor = Math.floor;\n\t\tconst fromCodePoint = function(_) {\n\t\t\tconst MAX_SIZE = 0x4000;\n\t\t\tconst codeUnits = [];\n\t\t\tlet highSurrogate;\n\t\t\tlet lowSurrogate;\n\t\t\tlet index = -1;\n\t\t\tconst length = arguments.length;\n\t\t\tif (!length) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tlet result = '';\n\t\t\twhile (++index < length) {\n\t\t\t\tlet codePoint = Number(arguments[index]);\n\t\t\t\tif (\n\t\t\t\t\t!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n\t\t\t\t\tcodePoint < 0 || // not a valid Unicode code point\n\t\t\t\t\tcodePoint > 0x10FFFF || // not a valid Unicode code point\n\t\t\t\t\tfloor(codePoint) !== codePoint // not an integer\n\t\t\t\t) {\n\t\t\t\t\tthrow RangeError('Invalid code point: ' + codePoint);\n\t\t\t\t}\n\t\t\t\tif (codePoint <= 0xFFFF) { // BMP code point\n\t\t\t\t\tcodeUnits.push(codePoint);\n\t\t\t\t} else { // Astral code point; split in surrogate halves\n\t\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\t\tcodePoint -= 0x10000;\n\t\t\t\t\thighSurrogate = (codePoint >> 10) + 0xD800;\n\t\t\t\t\tlowSurrogate = (codePoint % 0x400) + 0xDC00;\n\t\t\t\t\tcodeUnits.push(highSurrogate, lowSurrogate);\n\t\t\t\t}\n\t\t\t\tif (index + 1 === length || codeUnits.length > MAX_SIZE) {\n\t\t\t\t\tresult += stringFromCharCode.apply(null, codeUnits);\n\t\t\t\t\tcodeUnits.length = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\tif (defineProperty) {\n\t\t\tdefineProperty(String, 'fromCodePoint', {\n\t\t\t\t'value': fromCodePoint,\n\t\t\t\t'configurable': true,\n\t\t\t\t'writable': true\n\t\t\t});\n\t\t} else {\n\t\t\tString.fromCodePoint = fromCodePoint;\n\t\t}\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 ATN from './ATN.js';\nimport ATNDeserializer from './ATNDeserializer.js';\nimport LexerATNSimulator from './LexerATNSimulator.js';\nimport ParserATNSimulator from './ParserATNSimulator.js';\nimport PredictionMode from './PredictionMode.js';\n\nexport default { ATN, ATNDeserializer, LexerATNSimulator, ParserATNSimulator, PredictionMode }\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 *

        If {@code context} is {@code null}, it is treated as\n * {@link ParserRuleContext//EMPTY}.

        \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. 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 * i leads to a semantic predicate before matching a symbol, the\n * element at index i 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 *

        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.

        \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 *

        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.

        \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} 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; j0 ?\n (\",up=\" + this.reachesIntoOuterContext)\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 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 *

        I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of\n * {@link SemanticContext} within the scope of this outer class.

        \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 *

        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.

        \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 *
          \n\t *
        • {@link //NONE}: if the predicate simplifies to {@code true} after\n\t * precedence predicates are evaluated.
        • \n\t *
        • {@code null}: if the predicate simplifies to {@code false} after\n\t * precedence predicates are evaluated.
        • \n\t *
        • {@code this}: if the semantic context is not changed as a result of\n\t * precedence predicate evaluation.
        • \n\t *
        • A non-{@code null} {@link SemanticContext}: the new simplified\n\t * semantic context after precedence predicates are evaluated.
        • \n\t *
        \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\n\t * The evaluation of predicates by this context is short-circuiting, but\n\t * unordered.

        \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 *

        \n\t * The evaluation of predicates by this context is short-circuiting, but\n\t * unordered.

        \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 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 */\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>> (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 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 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 standardHashCodeFunction(a) {\n return 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 */\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 */\nexport default function valueToString(v) {\n return v === null ? \"null\" : v;\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; nexisting.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\");\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(\"\");\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 \"\";\n\t\t} else if (token === Token.EPSILON) {\n\t\t\treturn \"\";\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 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 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 * The following images show the relation of states and\n * {@link ATNState//transitions} for various grammar constructs.\n *\n *
          \n *\n *
        • Solid edges marked with an &//0949; indicate a required\n * {@link EpsilonTransition}.
        • \n *\n *
        • Dashed edges indicate locations where any transition derived from\n * {@link Transition} might appear.
        • \n *\n *
        • 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.
        • \n *\n *
        • 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.
        • \n *\n *
        \n *\n *

        Basic Blocks

        \n *\n *

        Rule

        \n *\n * \n *\n *

        Block of 1 or more alternatives

        \n *\n * \n *\n *

        Greedy Loops

        \n *\n *

        Greedy Closure: {@code (...)*}

        \n *\n * \n *\n *

        Greedy Positive Closure: {@code (...)+}

        \n *\n * \n *\n *

        Greedy Optional: {@code (...)?}

        \n *\n * \n *\n *

        Non-Greedy Loops

        \n *\n *

        Non-Greedy Closure: {@code (...)*?}

        \n *\n * \n *\n *

        Non-Greedy Positive Closure: {@code (...)+?}

        \n *\n * \n *\n *

        Non-Greedy Optional: {@code (...)??}

        \n *\n * \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 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. 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 *

        This is a one way link. It emanates from a state (usually via a list of\n * transitions) and has a target state.

        \n *\n *

        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.

        \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\";\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 */\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\";\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 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 *

        Different tops, different parents.
        \n *

        \n *\n *

        Shared top, same parents.
        \n *

        \n *\n *

        Shared top, different parents.
        \n *

        \n *\n *

        Shared top, all shared parents.
        \n *

        \n *\n *

        Equal tops, merge parents and reduce top to\n * {@link SingletonPredictionContext}.
        \n *

        \n */\nfunction mergeArrays(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 // 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 = [];\n let mergedParents = [];\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 === a) {\n if (mergeCache !== null) {\n mergeCache.set(a, b, a);\n }\n return a;\n }\n if (M === b) {\n if (mergeCache !== null) {\n mergeCache.set(a, b, b);\n }\n return b;\n }\n combineCommonParents(mergedParents);\n\n if (mergeCache !== null) {\n mergeCache.set(a, b, M);\n }\n return M;\n}\n\n\n/**\n * Make pass over all M {@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 *

        Stack tops equal, parents merge is same; return left graph.
        \n *

        \n *\n *

        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.
        \n *

        \n *\n *

        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.
        \n *

        \n *\n *

        Different stack tops pointing to different parents. Make array node for\n * the root where each element points to the corresponding original\n * parent.
        \n *

        \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 *

        Local-Context Merges

        \n *\n *

        These local-context merge operations are used when {@code rootIsWildcard}\n * is true.

        \n *\n *

        {@link //EMPTY} is superset of any graph; return {@link //EMPTY}.
        \n *

        \n *\n *

        {@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is\n * {@code //EMPTY}; return left graph.
        \n *

        \n *\n *

        Special case of last merge if local context.
        \n *

        \n *\n *

        Full-Context Merges

        \n *\n *

        These full-context merge operations are used when {@code rootIsWildcard}\n * is false.

        \n *\n *

        \n *\n *

        Must keep all contexts; {@link //EMPTY} in array is a special value (and\n * null parent).
        \n *

        \n *\n *

        \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. 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 getRuleContext() {\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 *

        \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 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 getRuleContext(){\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 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. 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\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 < {@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 < {@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 * \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;\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 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 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 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 constructor(options) {\n\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 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= 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 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 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 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 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 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. 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 */\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 skip} lexer action by calling {@link Lexer//skip}.\n *\n *

        The {@code skip} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.

        \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 */\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 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 *

        This action is implemented by calling {@link Lexer//setChannel} with the\n * value provided by {@link //getChannel}.

        \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 *

        This class may represent embedded actions created with the {...}\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.

        \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 *

        Custom actions are implemented by calling {@link Lexer//action} with the\n * appropriate rule and action indexes.

        \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 *

        The {@code more} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.

        \n */\nexport default class LexerMoreAction extends LexerAction {\n constructor() {\n super(LexerActionType.MORE);\n }\n\n /**\n *

        This action is implemented by calling {@link Lexer//popMode}.

        \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 *

        This action is implemented by calling {@link Lexer//pushMode} with the\n * value provided by {@link //getMode}.

        \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 *

        The {@code popMode} command does not have any parameters, so this action is\n * implemented as a singleton instance exposed by {@link //INSTANCE}.

        \n */\nexport default class LexerPopModeAction extends LexerAction {\n constructor() {\n super(LexerActionType.POP_MODE);\n }\n\n /**\n *

        This action is implemented by calling {@link Lexer//popMode}.

        \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 *

        This action is implemented by calling {@link Lexer//mode} with the\n * value provided by {@link //getMode}.

        \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 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 *

        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.

        \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 *

        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}.

        \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. 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 \"\";\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 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.11.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; iUsed for XPath and tree pattern compilation.

        \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 \"\";\n }\n let s = t.text;\n if (s===null) {\n if (t.type===Token.EOF) {\n s = \"\";\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 state(){\n return this._stateNumber;\n }\n\n set state(state) {\n this._stateNumber = state;\n }\n}\n\nRecognizer.tokenTypeMapCache = {};\nRecognizer.ruleIndexMapCache = {};\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 *

        \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.

        \n *\n *
        \n * line line:charPositionInLine msg\n * 
        \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. 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\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 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 *

        \n * The default value is {@code false} to avoid the performance and memory\n * overhead of copying text for every token unless explicitly requested.

        \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 *

        \n * This token factory does not explicitly copy token text when constructing\n * tokens.

        \n */\nCommonTokenFactory.DEFAULT = new CommonTokenFactory();\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 *

        \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}.

        \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 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 = \"\";\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 \"\";\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\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 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 *

        If the set of expected tokens is not known and could not be computed,\n * this method returns {@code null}.

        \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 //

        If the state number is not known, this method returns -1.

        \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 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 *

        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.

        \n *\n *

        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.

        \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. 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→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 *

        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.

        \n *\n *

        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.

        \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 *

        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.

        \n\t\t *\n\t\t *

        This list is computed by {@link\n\t\t * ParserATNSimulator//predicateDFAState}.

        \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 *

        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.

        \n\t *\n\t *

        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.

        \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 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 *

        This method updates {@link //dipsIntoOuterContext} and\n\t * {@link //hasSemanticContext} when necessary.

        \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 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. 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 *

        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.

        \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 *

        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 end 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.

        \n\t *\n\t *

        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.

        \n\t *\n\t *

        If the current executor already has offsets assigned to all\n\t * position-dependent lexer actions, the method returns {@code this}.

        \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 *

        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.

        \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 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 *

        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}.

        \n *\n * Constructs a new indexed custom action by associating a character offset\n * with a {@link LexerAction}.\n *\n *

        Note: This class is only required for lexer actions for which\n * {@link LexerAction//isPositionDependent} returns {@code true}.

        \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 *

        This method calls {@link //execute} on the result of {@link //getAction}\n * using the provided {@code lexer}.

        \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 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 *

        \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).

        \n *\n *

        \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(*)).

        \n *\n *

        \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.)

        \n *\n *

        \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.

        \n *\n *

        \n * CACHING FULL CONTEXT PREDICTIONS

        \n *\n *

        \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.

        \n *\n *

        \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.

        \n *\n *

        \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.

        \n *\n *

        \n * AVOIDING FULL CONTEXT PREDICTION

        \n *\n *

        \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.

        \n *\n *

        \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:

        \n *\n *
        \n * ctorBody\n *   : '{' superCall? stat* '}'\n *   ;\n * 
        \n *\n *

        \n * Or, you might see something like

        \n *\n *
        \n * stat\n *   : superCall ';'\n *   | expression ';'\n *   | ...\n *   ;\n * 
        \n *\n *

        \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.

        \n *\n *

        \n * PREDICATES

        \n *\n *

        \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.

        \n *\n *

        \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.

        \n *\n *

        \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.

        \n *\n *

        \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.

        \n *\n *

        \n * SHARING DFA

        \n *\n *

        \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.

        \n *\n *

        \n * THREAD SAFETY

        \n *\n *

        \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.

        \n *\n *

        \n * Starting with SLL then failing to combined SLL/LL (Two-Stage\n * Parsing)

        \n *\n *

        \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}:

        \n *\n *
        \n * parser.{@link Parser//getInterpreter() getInterpreter()}.{@link //setPredictionMode setPredictionMode}{@code (}{@link PredictionMode//SLL}{@code )};\n * parser.{@link Parser//setErrorHandler setErrorHandler}(new {@link BailErrorStrategy}());\n * 
        \n *\n *

        \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.

        \n *\n *

        \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 > 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.

        \n *\n *

        \n * Let's say we have a set of SLL conflicting alternatives {@code {1, 2, 3}} and\n * a smaller LL set called s. If s is {@code {2, 3}}, then SLL\n * parsing will get an error because SLL will pursue alternative 1. If\n * s 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 s is {@code {2}} or {@code {3}} then SLL will get a syntax\n * error. If s is {@code {1}} then SLL will succeed.

        \n *\n *

        \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.

        \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)→c. We can avoid\n * the merge if we ever see a and b again. Note that (b,a)→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.debug_list_atn_decisions = 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.debug_list_atn_decisions) {\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 || this.debug_list_atn_decisions) {\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.debug_list_atn_decisions) {\n console.log(\"execATN decision \" + dfa.decision +\n \" exec 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.debug_list_atn_decisions) {\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; iWhen {@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.

        \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\n *
      • Evaluate the precedence predicates for each configuration using\n * {@link SemanticContext//evalPrecedence}.
      • \n *
      • 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 *
          \n *
        • 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.
        • \n *
        • 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.
        • \n *
        \n *
      • \n * \n *\n *

        \n * The prediction context must be considered by this filter to address\n * situations like the following.\n *

        \n * \n *
        \n     * grammar TA;\n     * prog: statement* EOF;\n     * statement: letterA | statement letterA 'b' ;\n     * letterA: 'a';\n     * 
        \n *
        \n *

        \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 *

        \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; i1\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\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.

        \n *\n *
          \n *
        • 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.
        • \n *
        • Else, if a semantically invalid but syntactically valid path exist\n * or paths exist, return the minimum associated alt.\n *
        • \n *
        • Otherwise, return {@link ATN//INVALID_ALT_NUMBER}.
        • \n *
        \n *\n *

        \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 only 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 *

        \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;i0 || ((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;i50) {\n throw \"problem\";\n }\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 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=0) {\n return this.parser.ruleNames[index];\n } else {\n return \"\";\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→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; i0) {\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;iIf {@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.

        \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 *

        If {@code D} is {@link //ERROR}, this method returns {@link //ERROR} and\n * does not change the DFA.

        \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 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 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 */\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. 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 *

        \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.

        \n *\n *

        \n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.

        \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 *

        \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 exactly which alternatives are\n * ambiguous.

        \n *\n *

        \n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.

        \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 *

        \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.

        \n *\n *

        \n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.

        \n */\n LL_EXACT_AMBIG_DETECTION: 2,\n\n /**\n *\n * Computes the SLL prediction termination condition.\n *\n *

        \n * This method computes the SLL prediction termination condition for both of\n * the following cases.

        \n *\n *
          \n *
        • The usual SLL+LL fallback upon SLL conflict
        • \n *
        • Pure SLL without LL fallback
        • \n *
        \n *\n *

        COMBINED SLL+LL PARSING

        \n *\n *

        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.

        \n *\n *

        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.

        \n *\n *

        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.

        \n *\n *

        HEURISTIC

        \n *\n *

        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):

        \n *\n *

        {@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ';' ;}

        \n *\n *

        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|[]]}.

        \n *\n *

        It also let's us continue for this rule:

        \n *\n *

        {@code [1|1|[], 1|2|[], 8|3|[]] 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 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.

        \n *\n *

        PURE SLL PARSING

        \n *\n *

        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.

        \n *\n *

        PREDICATES IN SLL+LL PARSING

        \n *\n *

        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.

        \n *\n *

        Implementation-wise, {@link ATNConfigSet} combines stack contexts but not\n * semantic predicate contexts so we might see two configurations like the\n * following.

        \n *\n *

        {@code (s, 1, x, {}), (s, 1, x', {p})}

        \n *\n *

        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.

        \n *\n *

        {@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x'', {})}

        \n *\n *

        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.

        \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;iCan 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.

        \n *\n *

        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}.

        \n *\n *

        Reduce these configuration subsets to the set of possible alternatives.\n * You can compute the alternative subsets in one pass as follows:

        \n *\n *

        {@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in\n * {@code C} holding {@code s} and {@code ctx} fixed.

        \n *\n *

        Or in pseudo-code, for each configuration {@code c} in {@code C}:

        \n *\n *
        \n     * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n     * alt and not pred\n     * 
        \n *\n *

        The values in {@code map} are the set of {@code A_s,ctx} sets.

        \n *\n *

        If {@code |A_s,ctx|=1} then there is no conflict associated with\n * {@code s} and {@code ctx}.

        \n *\n *

        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.

        \n *\n *

        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.

        \n *\n *

        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.

        \n *\n *

        CONFLICTING CONFIGS

        \n *\n *

        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.

        \n *\n *

        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.

        \n *\n *

        CONTINUE/STOP RULE

        \n *\n *

        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.

        \n *\n *

        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.

        \n *\n *

        CASES

        \n *\n *
          \n *\n *
        • no conflicts and more than 1 alternative in set => continue
        • \n *\n *
        • {@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}} => continue\n *
        • \n *\n *
        • {@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}} => stop and predict 1
        • \n *\n *
        • {@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}} => stop and predict 1, can announce\n * ambiguity {@code {1,2}}
        • \n *\n *
        • {@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}} => continue
        • \n *\n *
        • {@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}} => continue
        • \n *\n *
        \n *\n *

        EXACT AMBIGUITY DETECTION

        \n *\n *

        If all states report the same conflicting set of alternatives, then we\n * know we have the exact ambiguity set.

        \n *\n *

        |A_i|>1 and\n * A_i = A_j for all i, j.

        \n *\n *

        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...

        \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} > 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;i1) {\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\n * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n * alt and not pred\n * \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 *
        \n     * map[c.{@link ATNConfig//state state}] U= c.{@link ATNConfig//alt alt}\n     * 
        \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 key.startsWith(\"k-\")).map(key => this.data[key], 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 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 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 */\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 *
          \n\t *
        • The {@link //states} map is cleared
        • \n\t *
        • 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.
        • \n\t *
        • The {@link //precedenceDfa} field is updated
        • \n\t *
        \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\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\");\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 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 */\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.getRuleContext();\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.getRuleContext();\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 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 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 constructor(recognizer, predicate, message) {\n super({\n message: formatMessage(predicate, message || null), 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 *
          \n *
        • Ambiguities: These are cases where more than one path through the\n * grammar can match the input.
        • \n *
        • Weak context sensitivity: 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.
        • \n *
        • Strong (forced) context sensitivity: These are cases where the\n * full-context prediction resolved an SLL conflict to a unique alternative,\n * and 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.
        • \n *
        \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 */\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 *

        \n * This error strategy is useful in the following scenarios.

        \n *\n *
          \n *
        • Two-stage parsing: 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.
        • \n *
        • Silent validation: 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.
        • \n *
        \n *\n *

        \n * {@code myparser.setErrorHandler(new BailErrorStrategy());}

        \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 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 *

        The default implementation simply calls {@link //endErrorCondition} to\n * ensure that the handler is not in error recovery mode.

        \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 *

        The default implementation simply calls {@link //endErrorCondition}.

        \n */\n reportMatch(recognizer) {\n this.endErrorCondition(recognizer);\n }\n\n /**\n * {@inheritDoc}\n *\n *

        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.

        \n *\n *
          \n *
        • {@link NoViableAltException}: Dispatches the call to\n * {@link //reportNoViableAlternative}
        • \n *
        • {@link InputMismatchException}: Dispatches the call to\n * {@link //reportInputMismatch}
        • \n *
        • {@link FailedPredicateException}: Dispatches the call to\n * {@link //reportFailedPredicate}
        • \n *
        • All other types: calls {@link Parser//notifyErrorListeners} to report\n * the exception
        • \n *
        \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 *

        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.

        \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 *

        Implements Jim Idle's magic sync mechanism in closures and optional\n * subrules. E.g.,

        \n *\n *
        \n     * a : sync ( stuff sync )* ;\n     * sync : {consume to what can follow sync} ;\n     * 
        \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 *

        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.

        \n *\n *

        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.

        \n *\n *

        ORIGINS

        \n *\n *

        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

        \n *\n *
        \n     * classDef : 'class' ID '{' member* '}'\n     * 
        \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 *

        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 { }.

        \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 = \"\";\n } else {\n input = tokens.getText(new Interval(e.startToken.tokenIndex, e.offendingToken.tokenIndex));\n }\n } else {\n 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 *

        This method is called when {@link //singleTokenDeletion} identifies\n * single-token deletion as a viable recovery strategy for a mismatched\n * input error.

        \n *\n *

        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}.

        \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 *

        This method is called when {@link //singleTokenInsertion} identifies\n * single-token insertion as a viable recovery strategy for a mismatched\n * input error.

        \n *\n *

        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}.

        \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 *

        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}.

        \n *\n *

        EXTRA TOKEN (single token deletion)

        \n *\n *

        {@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.

        \n *\n *

        This recovery strategy is implemented by {@link\n * //singleTokenDeletion}.

        \n *\n *

        MISSING TOKEN (single token insertion)

        \n *\n *

        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.

        \n *\n *

        This recovery strategy is implemented by {@link\n * //singleTokenInsertion}.

        \n *\n *

        EXAMPLE

        \n *\n *

        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:

        \n *\n *
        \n     * stat → expr → atom\n     * 
        \n *\n * and it will be trying to match the {@code ')'} at this point in the\n * derivation:\n *\n *
        \n     * => ID '=' '(' INT ')' ('+' atom)* ';'\n     * ^\n     * 
        \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 *

        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.

        \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 not be in error recovery mode since the\n * returned token was a successful match.\n *\n *

        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.

        \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 = \"\";\n } else {\n tokenText = \"\";\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 \"\";\n }\n let s = t.text\n if (s === null) {\n if (t.type===Token.EOF) {\n s = \"\";\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 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. 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 fs from \"fs\";\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 InputStream(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 InputStream(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 InputStream(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 fs.readFile(path, encoding, function(err, data) {\n let is = null;\n if (data !== null) {\n is = new InputStream(data, true);\n }\n callback(err, is);\n });\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 const data = fs.readFileSync(path, encoding);\n return new InputStream(data, true);\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 './polyfills/codepointat.js';\nimport './polyfills/fromcodepoint.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 InputStream {\n\tconstructor(data, decodeToUnicodeCodePoints) {\n\t\tthis.name = \"\";\n\t\tthis.strdata = data;\n\t\tthis.decodeToUnicodeCodePoints = decodeToUnicodeCodePoints || false;\n\t\t// _loadString - Vacuum all input from a string and then treat it like a buffer.\n\t\tthis._index = 0;\n\t\tthis.data = [];\n\t\tif (this.decodeToUnicodeCodePoints) {\n\t\t\tfor (let i = 0; i < this.strdata.length; ) {\n\t\t\t\tconst codePoint = this.strdata.codePointAt(i);\n\t\t\t\tthis.data.push(codePoint);\n\t\t\t\ti += codePoint <= 0xFFFF ? 1 : 2;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.data = new Array(this.strdata.length);\n\t\t\tfor (let i = 0; i < this.strdata.length; i++) {\n\t\t\t\tconst codeUnit = this.strdata.charCodeAt(i);\n\t\t\t\tthis.data[i] = codeUnit;\n\t\t\t}\n\t\t}\n\t\tthis._size = this.data.length;\n\t}\n\n\t/**\n\t * Reset the stream so that it's in the same state it was\n\t * when the object was created *except* the data array is not\n\t * touched.\n\t */\n\treset() {\n\t\tthis._index = 0;\n\t}\n\n\tconsume() {\n\t\tif (this._index >= this._size) {\n\t\t\t// assert this.LA(1) == Token.EOF\n\t\t\tthrow (\"cannot consume EOF\");\n\t\t}\n\t\tthis._index += 1;\n\t}\n\n\tLA(offset) {\n\t\tif (offset === 0) {\n\t\t\treturn 0; // undefined\n\t\t}\n\t\tif (offset < 0) {\n\t\t\toffset += 1; // e.g., translate LA(-1) to use offset=0\n\t\t}\n\t\tconst pos = this._index + offset - 1;\n\t\tif (pos < 0 || pos >= this._size) { // invalid\n\t\t\treturn Token.EOF;\n\t\t}\n\t\treturn this.data[pos];\n\t}\n\n\tLT(offset) {\n\t\treturn this.LA(offset);\n\t}\n\n// mark/release do nothing; we have entire buffer\n\tmark() {\n\t\treturn -1;\n\t}\n\n\trelease(marker) {\n\t}\n\n\t/**\n\t * consume() ahead until p==_index; can't just set p=_index as we must\n\t * update line and column. If we seek backwards, just set p\n\t */\n\tseek(_index) {\n\t\tif (_index <= this._index) {\n\t\t\tthis._index = _index; // just jump; don't update stream state (line,\n\t\t\t\t\t\t\t\t\t// ...)\n\t\t\treturn;\n\t\t}\n\t\t// seek forward\n\t\tthis._index = Math.min(_index, this._size);\n\t}\n\n\tgetText(start, stop) {\n\t\tif (stop >= this._size) {\n\t\t\tstop = this._size - 1;\n\t\t}\n\t\tif (start >= this._size) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\tif (this.decodeToUnicodeCodePoints) {\n\t\t\t\tlet result = \"\";\n\t\t\t\tfor (let i = start; i <= stop; i++) {\n\t\t\t\t\tresult += String.fromCodePoint(this.data[i]);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t} else {\n\t\t\t\treturn this.strdata.slice(start, stop + 1);\n\t\t\t}\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn this.strdata;\n\t}\n\n\tget index(){\n\t\treturn this._index;\n\t}\n\n\tget size(){\n\t\treturn this._size;\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 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\tconstructor(fileName, decodeToUnicodeCodePoints) {\n\t\tconst data = fs.readFileSync(fileName, \"utf8\");\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\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 *

        \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}.

        \n *\n *

        \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 *

        \n *\n *

        \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.

        \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. 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 *

        \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}.

        \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 *

        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.

        \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 *
          \n\t\t *
        • {@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}.
        • \n\t\t *
        • {@link //fetch}: The check to prevent adding multiple EOF symbols\n\t\t * into\n\t\t * {@link //tokens} is trivial with this field.
        • \n\t\t *
            \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(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// 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 *

            For example, {@link CommonTokenStream} overrides this method to ensure\n\t * that\n\t * the seek target is always an on-channel token.

            \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// 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\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\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// Get the text of all tokens in this buffer.///\n\tgetText(interval) {\n\t\tthis.lazyInit();\n\t\tthis.fill();\n\t\tif (interval === undefined || interval === null) {\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// Get all tokens from lexer until EOF///\n\tfill() {\n\t\tthis.lazyInit();\n\t\twhile (this.fetch(1000) === 1000) {\n\t\t\tcontinue;\n\t\t}\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\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 *

            If the symbol type does not match,\n * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n * strategy to attempt recovery. If {@link //getBuildParseTree} 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}.

            \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 *

            If the symbol type does not match,\n * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n * strategy to attempt recovery. If {@link //getBuildParseTree} 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}.

            \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 *

            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.

            \n *\n *

            With the following specific exceptions, calls to listener events are\n * deterministic, i.e. for identical input the calls to listener\n * methods will be the same.

            \n *\n *
              \n *
            • Alterations to the grammar used to generate code may change the\n * behavior of the listener calls.
            • \n *
            • Alterations to the command line options passed to ANTLR 4 when\n * generating the parser may change the behavior of the listener calls.
            • \n *
            • Changing the version of the ANTLR Tool used to generate the parser\n * may change the behavior of the listener calls.
            • \n *
            \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 *

            If {@code listener} is {@code null} or has not been added as a parse\n * listener, this method does nothing.

            \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 * 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 *

            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}.

            \n *\n *
            \n     * A B\n     * ^\n     * 
            \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 is 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 *
            \n     * return getExpectedTokens().contains(symbol);\n     * 
            \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<String> 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 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 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 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\tconstructor(parent, invokingStateNumber) {\n\t\tparent = parent || null;\n\t\tinvokingStateNumber = invokingStateNumber || null;\n\t\tsuper(parent, invokingStateNumber);\n\t\tthis.ruleIndex = -1;\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) {\n\t\t\treturn null;\n\t\t}\n\t\tfor(let j=0; j\";\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 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 \"../utils/arrayToString.js\";\n\nexport default { arrayToString };\n", "// Generated from antlr/SolidityBlocks.g4 by ANTLR 4.9.0-SNAPSHOT\n\n\nimport { ATN } from \"antlr4ts/atn/ATN\";\nimport { ATNDeserializer } from \"antlr4ts/atn/ATNDeserializer\";\nimport { FailedPredicateException } from \"antlr4ts/FailedPredicateException\";\nimport { NotNull } from \"antlr4ts/Decorators\";\nimport { NoViableAltException } from \"antlr4ts/NoViableAltException\";\nimport { Override } from \"antlr4ts/Decorators\";\nimport { Parser } from \"antlr4ts/Parser\";\nimport { ParserRuleContext } from \"antlr4ts/ParserRuleContext\";\nimport { ParserATNSimulator } from \"antlr4ts/atn/ParserATNSimulator\";\nimport { ParseTreeListener } from \"antlr4ts/tree/ParseTreeListener\";\nimport { ParseTreeVisitor } from \"antlr4ts/tree/ParseTreeVisitor\";\nimport { RecognitionException } from \"antlr4ts/RecognitionException\";\nimport { RuleContext } from \"antlr4ts/RuleContext\";\n//import { RuleVersion } from \"antlr4ts/RuleVersion\";\nimport { TerminalNode } from \"antlr4ts/tree/TerminalNode\";\nimport { Token } from \"antlr4ts/Token\";\nimport { TokenStream } from \"antlr4ts/TokenStream\";\nimport { Vocabulary } from \"antlr4ts/Vocabulary\";\nimport { VocabularyImpl } from \"antlr4ts/VocabularyImpl\";\n\nimport * as Utils from \"antlr4ts/misc/Utils\";\n\nimport { SolidityBlocksListener } from \"./SolidityBlocksListener\";\n\nexport class SolidityBlocksParser extends Parser {\n\tpublic static readonly T__0 = 1;\n\tpublic static readonly T__1 = 2;\n\tpublic static readonly T__2 = 3;\n\tpublic static readonly T__3 = 4;\n\tpublic static readonly T__4 = 5;\n\tpublic static readonly Constructorkeyword = 6;\n\tpublic static readonly Identifier = 7;\n\tpublic static readonly WS = 8;\n\tpublic static readonly COMMENT = 9;\n\tpublic static readonly STRINGS = 10;\n\tpublic static readonly STRINGS_2 = 11;\n\tpublic static readonly PRAGMA = 12;\n\tpublic static readonly IMPORT = 13;\n\tpublic static readonly LINE_COMMENT = 14;\n\tpublic static readonly AMP = 15;\n\tpublic static readonly TILDE = 16;\n\tpublic static readonly PIPE = 17;\n\tpublic static readonly LT = 18;\n\tpublic static readonly GT = 19;\n\tpublic static readonly DOT = 20;\n\tpublic static readonly EQUAL = 21;\n\tpublic static readonly LPAREN = 22;\n\tpublic static readonly RBRACE = 23;\n\tpublic static readonly LBRACE = 24;\n\tpublic static readonly RPAREN = 25;\n\tpublic static readonly PLUS = 26;\n\tpublic static readonly MINUS = 27;\n\tpublic static readonly STAR = 28;\n\tpublic static readonly SLASH = 29;\n\tpublic static readonly BACKSLASH = 30;\n\tpublic static readonly PERCENT = 31;\n\tpublic static readonly CARET = 32;\n\tpublic static readonly BANG = 33;\n\tpublic static readonly QUESTION = 34;\n\tpublic static readonly COLON = 35;\n\tpublic static readonly SEMI = 36;\n\tpublic static readonly COMMA = 37;\n\tpublic static readonly OTHER = 38;\n\tpublic static readonly RULE_sol = 0;\n\tpublic static readonly RULE_contract = 1;\n\tpublic static readonly RULE_function = 2;\n\tpublic static readonly RULE_functionDescriptor = 3;\n\tpublic static readonly RULE_subrule = 4;\n\tpublic static readonly RULE_functionname = 5;\n\t// tslint:disable:no-trailing-whitespace\n\tpublic static readonly ruleNames: string[] = [\n\t\t\"sol\", \"contract\", \"function\", \"functionDescriptor\", \"subrule\", \"functionname\",\n\t];\n\n\tprivate static readonly _LITERAL_NAMES: Array = [\n\t\tundefined, \"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'function'\", \n\t\t\"'constructor'\", undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, \"'&'\", \"'~'\", \"'|'\", \"'<'\", \"'>'\", \"'.'\", \n\t\t\"'='\", \"'('\", \"'}'\", \"'{'\", \"')'\", \"'+'\", \"'-'\", \"'*'\", \"'/'\", \"'\\\\'\", \n\t\t\"'%'\", \"'^'\", \"'!'\", \"'?'\", \"':'\", \"';'\", \"','\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, \"Constructorkeyword\", \n\t\t\"Identifier\", \"WS\", \"COMMENT\", \"STRINGS\", \"STRINGS_2\", \"PRAGMA\", \"IMPORT\", \n\t\t\"LINE_COMMENT\", \"AMP\", \"TILDE\", \"PIPE\", \"LT\", \"GT\", \"DOT\", \"EQUAL\", \"LPAREN\", \n\t\t\"RBRACE\", \"LBRACE\", \"RPAREN\", \"PLUS\", \"MINUS\", \"STAR\", \"SLASH\", \"BACKSLASH\", \n\t\t\"PERCENT\", \"CARET\", \"BANG\", \"QUESTION\", \"COLON\", \"SEMI\", \"COMMA\", \"OTHER\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityBlocksParser._LITERAL_NAMES, SolidityBlocksParser._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityBlocksParser.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"SolidityBlocks.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityBlocksParser.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityBlocksParser._serializedATN; }\n\n\tprotected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {\n\t\treturn new FailedPredicateException(this, predicate, message);\n\t}\n\n\tconstructor(input: TokenStream) {\n\t\tsuper(input);\n\t\tthis._interp = new ParserATNSimulator(SolidityBlocksParser._ATN, this);\n\t}\n\t// @RuleVersion(0)\n\tpublic sol(): SolContext {\n\t\tlet _localctx: SolContext = new SolContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 0, SolidityBlocksParser.RULE_sol);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 15;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityBlocksParser.T__0) | (1 << SolidityBlocksParser.T__1) | (1 << SolidityBlocksParser.T__2) | (1 << SolidityBlocksParser.T__3))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 12;\n\t\t\t\tthis.contract();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 17;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 18;\n\t\t\tthis.match(SolidityBlocksParser.EOF);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic contract(): ContractContext {\n\t\tlet _localctx: ContractContext = new ContractContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 2, SolidityBlocksParser.RULE_contract);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 21;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (_la === SolidityBlocksParser.T__0) {\n\t\t\t\t{\n\t\t\t\tthis.state = 20;\n\t\t\t\tthis.match(SolidityBlocksParser.T__0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.state = 23;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << SolidityBlocksParser.T__1) | (1 << SolidityBlocksParser.T__2) | (1 << SolidityBlocksParser.T__3))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\tthis.state = 24;\n\t\t\tthis.functionname();\n\t\t\tthis.state = 25;\n\t\t\tthis.match(SolidityBlocksParser.LBRACE);\n\t\t\tthis.state = 30;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 3, this._ctx);\n\t\t\twhile (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1 + 1) {\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 28;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\tswitch (this._input.LA(1)) {\n\t\t\t\t\tcase SolidityBlocksParser.T__4:\n\t\t\t\t\tcase SolidityBlocksParser.Constructorkeyword:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 26;\n\t\t\t\t\t\tthis.function();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SolidityBlocksParser.Identifier:\n\t\t\t\t\tcase SolidityBlocksParser.AMP:\n\t\t\t\t\tcase SolidityBlocksParser.TILDE:\n\t\t\t\t\tcase SolidityBlocksParser.PIPE:\n\t\t\t\t\tcase SolidityBlocksParser.LT:\n\t\t\t\t\tcase SolidityBlocksParser.GT:\n\t\t\t\t\tcase SolidityBlocksParser.DOT:\n\t\t\t\t\tcase SolidityBlocksParser.EQUAL:\n\t\t\t\t\tcase SolidityBlocksParser.LPAREN:\n\t\t\t\t\tcase SolidityBlocksParser.RBRACE:\n\t\t\t\t\tcase SolidityBlocksParser.LBRACE:\n\t\t\t\t\tcase SolidityBlocksParser.RPAREN:\n\t\t\t\t\tcase SolidityBlocksParser.PLUS:\n\t\t\t\t\tcase SolidityBlocksParser.MINUS:\n\t\t\t\t\tcase SolidityBlocksParser.STAR:\n\t\t\t\t\tcase SolidityBlocksParser.SLASH:\n\t\t\t\t\tcase SolidityBlocksParser.BACKSLASH:\n\t\t\t\t\tcase SolidityBlocksParser.PERCENT:\n\t\t\t\t\tcase SolidityBlocksParser.CARET:\n\t\t\t\t\tcase SolidityBlocksParser.BANG:\n\t\t\t\t\tcase SolidityBlocksParser.QUESTION:\n\t\t\t\t\tcase SolidityBlocksParser.COLON:\n\t\t\t\t\tcase SolidityBlocksParser.SEMI:\n\t\t\t\t\tcase SolidityBlocksParser.COMMA:\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 27;\n\t\t\t\t\t\tthis.subrule();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 32;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 3, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 33;\n\t\t\tthis.match(SolidityBlocksParser.RBRACE);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic function(): FunctionContext {\n\t\tlet _localctx: FunctionContext = new FunctionContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 4, SolidityBlocksParser.RULE_function);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tlet _alt: number;\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 35;\n\t\t\tthis.functionDescriptor();\n\t\t\tthis.state = 36;\n\t\t\tthis.match(SolidityBlocksParser.LPAREN);\n\t\t\tthis.state = 40;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (_la === SolidityBlocksParser.Identifier) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 37;\n\t\t\t\tthis.match(SolidityBlocksParser.Identifier);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 42;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 51;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);\n\t\t\twhile (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1 + 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 43;\n\t\t\t\t\tthis.match(SolidityBlocksParser.COMMA);\n\t\t\t\t\tthis.state = 45;\n\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\tdo {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t{\n\t\t\t\t\t\tthis.state = 44;\n\t\t\t\t\t\tthis.match(SolidityBlocksParser.Identifier);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.state = 47;\n\t\t\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t\t\t_la = this._input.LA(1);\n\t\t\t\t\t} while (_la === SolidityBlocksParser.Identifier);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 53;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 54;\n\t\t\tthis.match(SolidityBlocksParser.RPAREN);\n\t\t\tthis.state = 58;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_la = this._input.LA(1);\n\t\t\twhile (((((_la - 7)) & ~0x1F) === 0 && ((1 << (_la - 7)) & ((1 << (SolidityBlocksParser.Identifier - 7)) | (1 << (SolidityBlocksParser.LPAREN - 7)) | (1 << (SolidityBlocksParser.RPAREN - 7)) | (1 << (SolidityBlocksParser.COMMA - 7)))) !== 0)) {\n\t\t\t\t{\n\t\t\t\t{\n\t\t\t\tthis.state = 55;\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t\tif (!(((((_la - 7)) & ~0x1F) === 0 && ((1 << (_la - 7)) & ((1 << (SolidityBlocksParser.Identifier - 7)) | (1 << (SolidityBlocksParser.LPAREN - 7)) | (1 << (SolidityBlocksParser.RPAREN - 7)) | (1 << (SolidityBlocksParser.COMMA - 7)))) !== 0))) {\n\t\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t\t} else {\n\t\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\t\tthis.consume();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 60;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_la = this._input.LA(1);\n\t\t\t}\n\t\t\tthis.state = 61;\n\t\t\tthis.match(SolidityBlocksParser.LBRACE);\n\t\t\tthis.state = 65;\n\t\t\tthis._errHandler.sync(this);\n\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);\n\t\t\twhile (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) {\n\t\t\t\tif (_alt === 1 + 1) {\n\t\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\tthis.state = 62;\n\t\t\t\t\tthis.subrule();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.state = 67;\n\t\t\t\tthis._errHandler.sync(this);\n\t\t\t\t_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);\n\t\t\t}\n\t\t\tthis.state = 68;\n\t\t\tthis.match(SolidityBlocksParser.RBRACE);\n\t\t\tthis.state = 70;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch ( this.interpreter.adaptivePredict(this._input, 9, this._ctx) ) {\n\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\tthis.state = 69;\n\t\t\t\tthis.match(SolidityBlocksParser.SEMI);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionDescriptor(): FunctionDescriptorContext {\n\t\tlet _localctx: FunctionDescriptorContext = new FunctionDescriptorContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 6, SolidityBlocksParser.RULE_functionDescriptor);\n\t\ttry {\n\t\t\tthis.state = 75;\n\t\t\tthis._errHandler.sync(this);\n\t\t\tswitch (this._input.LA(1)) {\n\t\t\tcase SolidityBlocksParser.T__4:\n\t\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t\t{\n\t\t\t\tthis.state = 72;\n\t\t\t\tthis.match(SolidityBlocksParser.T__4);\n\t\t\t\tthis.state = 73;\n\t\t\t\tthis.functionname();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SolidityBlocksParser.Constructorkeyword:\n\t\t\t\tthis.enterOuterAlt(_localctx, 2);\n\t\t\t\t{\n\t\t\t\tthis.state = 74;\n\t\t\t\tthis.match(SolidityBlocksParser.Constructorkeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new NoViableAltException(this);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic subrule(): SubruleContext {\n\t\tlet _localctx: SubruleContext = new SubruleContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 8, SolidityBlocksParser.RULE_subrule);\n\t\tlet _la: number;\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 77;\n\t\t\t_la = this._input.LA(1);\n\t\t\tif (!(((((_la - 7)) & ~0x1F) === 0 && ((1 << (_la - 7)) & ((1 << (SolidityBlocksParser.Identifier - 7)) | (1 << (SolidityBlocksParser.AMP - 7)) | (1 << (SolidityBlocksParser.TILDE - 7)) | (1 << (SolidityBlocksParser.PIPE - 7)) | (1 << (SolidityBlocksParser.LT - 7)) | (1 << (SolidityBlocksParser.GT - 7)) | (1 << (SolidityBlocksParser.DOT - 7)) | (1 << (SolidityBlocksParser.EQUAL - 7)) | (1 << (SolidityBlocksParser.LPAREN - 7)) | (1 << (SolidityBlocksParser.RBRACE - 7)) | (1 << (SolidityBlocksParser.LBRACE - 7)) | (1 << (SolidityBlocksParser.RPAREN - 7)) | (1 << (SolidityBlocksParser.PLUS - 7)) | (1 << (SolidityBlocksParser.MINUS - 7)) | (1 << (SolidityBlocksParser.STAR - 7)) | (1 << (SolidityBlocksParser.SLASH - 7)) | (1 << (SolidityBlocksParser.BACKSLASH - 7)) | (1 << (SolidityBlocksParser.PERCENT - 7)) | (1 << (SolidityBlocksParser.CARET - 7)) | (1 << (SolidityBlocksParser.BANG - 7)) | (1 << (SolidityBlocksParser.QUESTION - 7)) | (1 << (SolidityBlocksParser.COLON - 7)) | (1 << (SolidityBlocksParser.SEMI - 7)) | (1 << (SolidityBlocksParser.COMMA - 7)))) !== 0))) {\n\t\t\tthis._errHandler.recoverInline(this);\n\t\t\t} else {\n\t\t\t\tif (this._input.LA(1) === Token.EOF) {\n\t\t\t\t\tthis.matchedEOF = true;\n\t\t\t\t}\n\n\t\t\t\tthis._errHandler.reportMatch(this);\n\t\t\t\tthis.consume();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\t// @RuleVersion(0)\n\tpublic functionname(): FunctionnameContext {\n\t\tlet _localctx: FunctionnameContext = new FunctionnameContext(this._ctx, this.state);\n\t\tthis.enterRule(_localctx, 10, SolidityBlocksParser.RULE_functionname);\n\t\ttry {\n\t\t\tthis.enterOuterAlt(_localctx, 1);\n\t\t\t{\n\t\t\tthis.state = 79;\n\t\t\tthis.match(SolidityBlocksParser.Identifier);\n\t\t\t}\n\t\t}\n\t\tcatch (re) {\n\t\t\tif (re instanceof RecognitionException) {\n\t\t\t\t_localctx.exception = re;\n\t\t\t\tthis._errHandler.reportError(this, re);\n\t\t\t\tthis._errHandler.recover(this, re);\n\t\t\t} else {\n\t\t\t\tthrow re;\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\tthis.exitRule();\n\t\t}\n\t\treturn _localctx;\n\t}\n\n\tpublic static readonly _serializedATN: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x03(T\\x04\\x02\\t\\x02\" +\n\t\t\"\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\\x04\\x07\\t\\x07\" +\n\t\t\"\\x03\\x02\\x07\\x02\\x10\\n\\x02\\f\\x02\\x0E\\x02\\x13\\v\\x02\\x03\\x02\\x03\\x02\\x03\" +\n\t\t\"\\x03\\x05\\x03\\x18\\n\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x07\\x03\" +\n\t\t\"\\x1F\\n\\x03\\f\\x03\\x0E\\x03\\\"\\v\\x03\\x03\\x03\\x03\\x03\\x03\\x04\\x03\\x04\\x03\\x04\" +\n\t\t\"\\x07\\x04)\\n\\x04\\f\\x04\\x0E\\x04,\\v\\x04\\x03\\x04\\x03\\x04\\x06\\x040\\n\\x04\\r\" +\n\t\t\"\\x04\\x0E\\x041\\x07\\x044\\n\\x04\\f\\x04\\x0E\\x047\\v\\x04\\x03\\x04\\x03\\x04\\x07\" +\n\t\t\"\\x04;\\n\\x04\\f\\x04\\x0E\\x04>\\v\\x04\\x03\\x04\\x03\\x04\\x07\\x04B\\n\\x04\\f\\x04\" +\n\t\t\"\\x0E\\x04E\\v\\x04\\x03\\x04\\x03\\x04\\x05\\x04I\\n\\x04\\x03\\x05\\x03\\x05\\x03\\x05\" +\n\t\t\"\\x05\\x05N\\n\\x05\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\x07\\x05 5C\\x02\\x02\" +\n\t\t\"\\b\\x02\\x02\\x04\\x02\\x06\\x02\\b\\x02\\n\\x02\\f\\x02\\x02\\x05\\x03\\x02\\x04\\x06\\x06\" +\n\t\t\"\\x02\\t\\t\\x18\\x18\\x1B\\x1B\\'\\'\\x04\\x02\\t\\t\\x11\\'\\x02X\\x02\\x11\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x04\\x17\\x03\\x02\\x02\\x02\\x06%\\x03\\x02\\x02\\x02\\bM\\x03\\x02\\x02\\x02\\n\" +\n\t\t\"O\\x03\\x02\\x02\\x02\\fQ\\x03\\x02\\x02\\x02\\x0E\\x10\\x05\\x04\\x03\\x02\\x0F\\x0E\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x10\\x13\\x03\\x02\\x02\\x02\\x11\\x0F\\x03\\x02\\x02\\x02\\x11\\x12\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x12\\x14\\x03\\x02\\x02\\x02\\x13\\x11\\x03\\x02\\x02\\x02\\x14\\x15\\x07\" +\n\t\t\"\\x02\\x02\\x03\\x15\\x03\\x03\\x02\\x02\\x02\\x16\\x18\\x07\\x03\\x02\\x02\\x17\\x16\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x17\\x18\\x03\\x02\\x02\\x02\\x18\\x19\\x03\\x02\\x02\\x02\\x19\\x1A\\t\" +\n\t\t\"\\x02\\x02\\x02\\x1A\\x1B\\x05\\f\\x07\\x02\\x1B \\x07\\x1A\\x02\\x02\\x1C\\x1F\\x05\\x06\" +\n\t\t\"\\x04\\x02\\x1D\\x1F\\x05\\n\\x06\\x02\\x1E\\x1C\\x03\\x02\\x02\\x02\\x1E\\x1D\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x1F\\\"\\x03\\x02\\x02\\x02 !\\x03\\x02\\x02\\x02 \\x1E\\x03\\x02\\x02\\x02\" +\n\t\t\"!#\\x03\\x02\\x02\\x02\\\" \\x03\\x02\\x02\\x02#$\\x07\\x19\\x02\\x02$\\x05\\x03\\x02\\x02\" +\n\t\t\"\\x02%&\\x05\\b\\x05\\x02&*\\x07\\x18\\x02\\x02\\')\\x07\\t\\x02\\x02(\\'\\x03\\x02\\x02\" +\n\t\t\"\\x02),\\x03\\x02\\x02\\x02*(\\x03\\x02\\x02\\x02*+\\x03\\x02\\x02\\x02+5\\x03\\x02\\x02\" +\n\t\t\"\\x02,*\\x03\\x02\\x02\\x02-/\\x07\\'\\x02\\x02.0\\x07\\t\\x02\\x02/.\\x03\\x02\\x02\\x02\" +\n\t\t\"01\\x03\\x02\\x02\\x021/\\x03\\x02\\x02\\x0212\\x03\\x02\\x02\\x0224\\x03\\x02\\x02\\x02\" +\n\t\t\"3-\\x03\\x02\\x02\\x0247\\x03\\x02\\x02\\x0256\\x03\\x02\\x02\\x0253\\x03\\x02\\x02\\x02\" +\n\t\t\"68\\x03\\x02\\x02\\x0275\\x03\\x02\\x02\\x028<\\x07\\x1B\\x02\\x029;\\t\\x03\\x02\\x02\" +\n\t\t\":9\\x03\\x02\\x02\\x02;>\\x03\\x02\\x02\\x02<:\\x03\\x02\\x02\\x02<=\\x03\\x02\\x02\\x02\" +\n\t\t\"=?\\x03\\x02\\x02\\x02><\\x03\\x02\\x02\\x02?C\\x07\\x1A\\x02\\x02@B\\x05\\n\\x06\\x02\" +\n\t\t\"A@\\x03\\x02\\x02\\x02BE\\x03\\x02\\x02\\x02CD\\x03\\x02\\x02\\x02CA\\x03\\x02\\x02\\x02\" +\n\t\t\"DF\\x03\\x02\\x02\\x02EC\\x03\\x02\\x02\\x02FH\\x07\\x19\\x02\\x02GI\\x07&\\x02\\x02\" +\n\t\t\"HG\\x03\\x02\\x02\\x02HI\\x03\\x02\\x02\\x02I\\x07\\x03\\x02\\x02\\x02JK\\x07\\x07\\x02\" +\n\t\t\"\\x02KN\\x05\\f\\x07\\x02LN\\x07\\b\\x02\\x02MJ\\x03\\x02\\x02\\x02ML\\x03\\x02\\x02\\x02\" +\n\t\t\"N\\t\\x03\\x02\\x02\\x02OP\\t\\x04\\x02\\x02P\\v\\x03\\x02\\x02\\x02QR\\x07\\t\\x02\\x02\" +\n\t\t\"R\\r\\x03\\x02\\x02\\x02\\r\\x11\\x17\\x1E *15 = [\n\t\tundefined, \"'abstract'\", \"'contract'\", \"'interface'\", \"'library'\", \"'function'\", \n\t\t\"'constructor'\", undefined, undefined, undefined, undefined, undefined, \n\t\tundefined, undefined, undefined, \"'&'\", \"'~'\", \"'|'\", \"'<'\", \"'>'\", \"'.'\", \n\t\t\"'='\", \"'('\", \"'}'\", \"'{'\", \"')'\", \"'+'\", \"'-'\", \"'*'\", \"'/'\", \"'\\\\'\", \n\t\t\"'%'\", \"'^'\", \"'!'\", \"'?'\", \"':'\", \"';'\", \"','\",\n\t];\n\tprivate static readonly _SYMBOLIC_NAMES: Array = [\n\t\tundefined, undefined, undefined, undefined, undefined, undefined, \"Constructorkeyword\", \n\t\t\"Identifier\", \"WS\", \"COMMENT\", \"STRINGS\", \"STRINGS_2\", \"PRAGMA\", \"IMPORT\", \n\t\t\"LINE_COMMENT\", \"AMP\", \"TILDE\", \"PIPE\", \"LT\", \"GT\", \"DOT\", \"EQUAL\", \"LPAREN\", \n\t\t\"RBRACE\", \"LBRACE\", \"RPAREN\", \"PLUS\", \"MINUS\", \"STAR\", \"SLASH\", \"BACKSLASH\", \n\t\t\"PERCENT\", \"CARET\", \"BANG\", \"QUESTION\", \"COLON\", \"SEMI\", \"COMMA\", \"OTHER\",\n\t];\n\tpublic static readonly VOCABULARY: Vocabulary = new VocabularyImpl(SolidityBlocksLexer._LITERAL_NAMES, SolidityBlocksLexer._SYMBOLIC_NAMES, []);\n\n\t// @Override\n\t// @NotNull\n\tpublic get vocabulary(): Vocabulary {\n\t\treturn SolidityBlocksLexer.VOCABULARY;\n\t}\n\t// tslint:enable:no-trailing-whitespace\n\n\n\tconstructor(input: CharStream) {\n\t\tsuper(input);\n\t\tthis._interp = new LexerATNSimulator(SolidityBlocksLexer._ATN, this);\n\t}\n\n\t// @Override\n\tpublic get grammarFileName(): string { return \"SolidityBlocks.g4\"; }\n\n\t// @Override\n\tpublic get ruleNames(): string[] { return SolidityBlocksLexer.ruleNames; }\n\n\t// @Override\n\tpublic get serializedATN(): string { return SolidityBlocksLexer._serializedATN; }\n\n\t// @Override\n\tpublic get channelNames(): string[] { return SolidityBlocksLexer.channelNames; }\n\n\t// @Override\n\tpublic get modeNames(): string[] { return SolidityBlocksLexer.modeNames; }\n\n\tpublic static readonly _serializedATN: string =\n\t\t\"\\x03\\uC91D\\uCABA\\u058D\\uAFBA\\u4F53\\u0607\\uEA8B\\uC241\\x02(\\u0117\\b\\x01\" +\n\t\t\"\\x04\\x02\\t\\x02\\x04\\x03\\t\\x03\\x04\\x04\\t\\x04\\x04\\x05\\t\\x05\\x04\\x06\\t\\x06\" +\n\t\t\"\\x04\\x07\\t\\x07\\x04\\b\\t\\b\\x04\\t\\t\\t\\x04\\n\\t\\n\\x04\\v\\t\\v\\x04\\f\\t\\f\\x04\\r\" +\n\t\t\"\\t\\r\\x04\\x0E\\t\\x0E\\x04\\x0F\\t\\x0F\\x04\\x10\\t\\x10\\x04\\x11\\t\\x11\\x04\\x12\\t\" +\n\t\t\"\\x12\\x04\\x13\\t\\x13\\x04\\x14\\t\\x14\\x04\\x15\\t\\x15\\x04\\x16\\t\\x16\\x04\\x17\\t\" +\n\t\t\"\\x17\\x04\\x18\\t\\x18\\x04\\x19\\t\\x19\\x04\\x1A\\t\\x1A\\x04\\x1B\\t\\x1B\\x04\\x1C\\t\" +\n\t\t\"\\x1C\\x04\\x1D\\t\\x1D\\x04\\x1E\\t\\x1E\\x04\\x1F\\t\\x1F\\x04 \\t \\x04!\\t!\\x04\\\"\\t\" +\n\t\t\"\\\"\\x04#\\t#\\x04$\\t$\\x04%\\t%\\x04&\\t&\\x04\\'\\t\\'\\x03\\x02\\x03\\x02\\x03\\x02\\x03\" +\n\t\t\"\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x02\\x03\\x03\\x03\\x03\\x03\\x03\\x03\" +\n\t\t\"\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x03\\x04\\x03\\x04\\x03\\x04\\x03\" +\n\t\t\"\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x04\\x03\\x05\\x03\\x05\\x03\" +\n\t\t\"\\x05\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x05\\x03\\x06\\x03\\x06\\x03\\x06\\x03\" +\n\t\t\"\\x06\\x03\\x06\\x03\\x06\\x03\\x06\\x03\\x06\\x03\\x06\\x03\\x07\\x03\\x07\\x03\\x07\\x03\" +\n\t\t\"\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\\x07\\x03\" +\n\t\t\"\\b\\x06\\b\\x8A\\n\\b\\r\\b\\x0E\\b\\x8B\\x03\\t\\x06\\t\\x8F\\n\\t\\r\\t\\x0E\\t\\x90\\x03\\t\" +\n\t\t\"\\x03\\t\\x03\\n\\x03\\n\\x03\\n\\x03\\n\\x07\\n\\x99\\n\\n\\f\\n\\x0E\\n\\x9C\\v\\n\\x03\\n\\x03\" +\n\t\t\"\\n\\x03\\n\\x03\\n\\x03\\n\\x03\\v\\x03\\v\\x07\\v\\xA5\\n\\v\\f\\v\\x0E\\v\\xA8\\v\\v\\x03\\v\" +\n\t\t\"\\x03\\v\\x03\\v\\x03\\v\\x03\\f\\x03\\f\\x07\\f\\xB0\\n\\f\\f\\f\\x0E\\f\\xB3\\v\\f\\x03\\f\\x03\" +\n\t\t\"\\f\\x03\\f\\x03\\f\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x07\\r\\xC1\" +\n\t\t\"\\n\\r\\f\\r\\x0E\\r\\xC4\\v\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\r\\x03\\x0E\\x03\\x0E\\x03\\x0E\" +\n\t\t\"\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x07\\x0E\\xD2\\n\\x0E\\f\\x0E\\x0E\\x0E\" +\n\t\t\"\\xD5\\v\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0E\\x03\\x0F\\x03\\x0F\\x03\\x0F\\x03\" +\n\t\t\"\\x0F\\x07\\x0F\\xDF\\n\\x0F\\f\\x0F\\x0E\\x0F\\xE2\\v\\x0F\\x03\\x0F\\x03\\x0F\\x03\\x10\" +\n\t\t\"\\x03\\x10\\x03\\x11\\x03\\x11\\x03\\x12\\x03\\x12\\x03\\x13\\x03\\x13\\x03\\x14\\x03\\x14\" +\n\t\t\"\\x03\\x15\\x03\\x15\\x03\\x16\\x03\\x16\\x03\\x17\\x03\\x17\\x03\\x18\\x03\\x18\\x03\\x19\" +\n\t\t\"\\x03\\x19\\x03\\x1A\\x03\\x1A\\x03\\x1B\\x03\\x1B\\x03\\x1C\\x03\\x1C\\x03\\x1D\\x03\\x1D\" +\n\t\t\"\\x03\\x1E\\x03\\x1E\\x03\\x1F\\x03\\x1F\\x03 \\x03 \\x03!\\x03!\\x03\\\"\\x03\\\"\\x03#\" +\n\t\t\"\\x03#\\x03$\\x03$\\x03%\\x03%\\x03&\\x03&\\x03\\'\\x03\\'\\x03\\'\\x03\\'\\x07\\x9A\\xA6\" +\n\t\t\"\\xB1\\xC2\\xD3\\x02\\x02(\\x03\\x02\\x03\\x05\\x02\\x04\\x07\\x02\\x05\\t\\x02\\x06\\v\" +\n\t\t\"\\x02\\x07\\r\\x02\\b\\x0F\\x02\\t\\x11\\x02\\n\\x13\\x02\\v\\x15\\x02\\f\\x17\\x02\\r\\x19\" +\n\t\t\"\\x02\\x0E\\x1B\\x02\\x0F\\x1D\\x02\\x10\\x1F\\x02\\x11!\\x02\\x12#\\x02\\x13%\\x02\\x14\" +\n\t\t\"\\'\\x02\\x15)\\x02\\x16+\\x02\\x17-\\x02\\x18/\\x02\\x191\\x02\\x1A3\\x02\\x1B5\\x02\" +\n\t\t\"\\x1C7\\x02\\x1D9\\x02\\x1E;\\x02\\x1F=\\x02 ?\\x02!A\\x02\\\"C\\x02#E\\x02$G\\x02%I\" +\n\t\t\"\\x02&K\\x02\\'M\\x02(\\x03\\x02\\x05\\x06\\x022;C\\\\aac|\\x05\\x02\\v\\f\\x0F\\x0F\\\"\" +\n\t\t\"\\\"\\x04\\x02\\f\\f\\x0F\\x0F\\x02\\u011E\\x02\\x03\\x03\\x02\\x02\\x02\\x02\\x05\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x02\\x07\\x03\\x02\\x02\\x02\\x02\\t\\x03\\x02\\x02\\x02\\x02\\v\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\r\\x03\\x02\\x02\\x02\\x02\\x0F\\x03\\x02\\x02\\x02\\x02\\x11\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\x13\\x03\\x02\\x02\\x02\\x02\\x15\\x03\\x02\\x02\\x02\\x02\\x17\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\x19\\x03\\x02\\x02\\x02\\x02\\x1B\\x03\\x02\\x02\\x02\\x02\\x1D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02\\x1F\\x03\\x02\\x02\\x02\\x02!\\x03\\x02\\x02\\x02\\x02#\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x02%\\x03\\x02\\x02\\x02\\x02\\'\\x03\\x02\\x02\\x02\\x02)\\x03\\x02\\x02\\x02\\x02+\" +\n\t\t\"\\x03\\x02\\x02\\x02\\x02-\\x03\\x02\\x02\\x02\\x02/\\x03\\x02\\x02\\x02\\x021\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x023\\x03\\x02\\x02\\x02\\x025\\x03\\x02\\x02\\x02\\x027\\x03\\x02\\x02\\x02\" +\n\t\t\"\\x029\\x03\\x02\\x02\\x02\\x02;\\x03\\x02\\x02\\x02\\x02=\\x03\\x02\\x02\\x02\\x02?\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x02A\\x03\\x02\\x02\\x02\\x02C\\x03\\x02\\x02\\x02\\x02E\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x02G\\x03\\x02\\x02\\x02\\x02I\\x03\\x02\\x02\\x02\\x02K\\x03\\x02\\x02\\x02\\x02\" +\n\t\t\"M\\x03\\x02\\x02\\x02\\x03O\\x03\\x02\\x02\\x02\\x05X\\x03\\x02\\x02\\x02\\x07a\\x03\\x02\" +\n\t\t\"\\x02\\x02\\tk\\x03\\x02\\x02\\x02\\vs\\x03\\x02\\x02\\x02\\r|\\x03\\x02\\x02\\x02\\x0F\" +\n\t\t\"\\x89\\x03\\x02\\x02\\x02\\x11\\x8E\\x03\\x02\\x02\\x02\\x13\\x94\\x03\\x02\\x02\\x02\\x15\" +\n\t\t\"\\xA2\\x03\\x02\\x02\\x02\\x17\\xAD\\x03\\x02\\x02\\x02\\x19\\xB8\\x03\\x02\\x02\\x02\\x1B\" +\n\t\t\"\\xC9\\x03\\x02\\x02\\x02\\x1D\\xDA\\x03\\x02\\x02\\x02\\x1F\\xE5\\x03\\x02\\x02\\x02!\" +\n\t\t\"\\xE7\\x03\\x02\\x02\\x02#\\xE9\\x03\\x02\\x02\\x02%\\xEB\\x03\\x02\\x02\\x02\\'\\xED\\x03\" +\n\t\t\"\\x02\\x02\\x02)\\xEF\\x03\\x02\\x02\\x02+\\xF1\\x03\\x02\\x02\\x02-\\xF3\\x03\\x02\\x02\" +\n\t\t\"\\x02/\\xF5\\x03\\x02\\x02\\x021\\xF7\\x03\\x02\\x02\\x023\\xF9\\x03\\x02\\x02\\x025\\xFB\" +\n\t\t\"\\x03\\x02\\x02\\x027\\xFD\\x03\\x02\\x02\\x029\\xFF\\x03\\x02\\x02\\x02;\\u0101\\x03\" +\n\t\t\"\\x02\\x02\\x02=\\u0103\\x03\\x02\\x02\\x02?\\u0105\\x03\\x02\\x02\\x02A\\u0107\\x03\" +\n\t\t\"\\x02\\x02\\x02C\\u0109\\x03\\x02\\x02\\x02E\\u010B\\x03\\x02\\x02\\x02G\\u010D\\x03\" +\n\t\t\"\\x02\\x02\\x02I\\u010F\\x03\\x02\\x02\\x02K\\u0111\\x03\\x02\\x02\\x02M\\u0113\\x03\" +\n\t\t\"\\x02\\x02\\x02OP\\x07c\\x02\\x02PQ\\x07d\\x02\\x02QR\\x07u\\x02\\x02RS\\x07v\\x02\\x02\" +\n\t\t\"ST\\x07t\\x02\\x02TU\\x07c\\x02\\x02UV\\x07e\\x02\\x02VW\\x07v\\x02\\x02W\\x04\\x03\" +\n\t\t\"\\x02\\x02\\x02XY\\x07e\\x02\\x02YZ\\x07q\\x02\\x02Z[\\x07p\\x02\\x02[\\\\\\x07v\\x02\" +\n\t\t\"\\x02\\\\]\\x07t\\x02\\x02]^\\x07c\\x02\\x02^_\\x07e\\x02\\x02_`\\x07v\\x02\\x02`\\x06\" +\n\t\t\"\\x03\\x02\\x02\\x02ab\\x07k\\x02\\x02bc\\x07p\\x02\\x02cd\\x07v\\x02\\x02de\\x07g\\x02\" +\n\t\t\"\\x02ef\\x07t\\x02\\x02fg\\x07h\\x02\\x02gh\\x07c\\x02\\x02hi\\x07e\\x02\\x02ij\\x07\" +\n\t\t\"g\\x02\\x02j\\b\\x03\\x02\\x02\\x02kl\\x07n\\x02\\x02lm\\x07k\\x02\\x02mn\\x07d\\x02\" +\n\t\t\"\\x02no\\x07t\\x02\\x02op\\x07c\\x02\\x02pq\\x07t\\x02\\x02qr\\x07{\\x02\\x02r\\n\\x03\" +\n\t\t\"\\x02\\x02\\x02st\\x07h\\x02\\x02tu\\x07w\\x02\\x02uv\\x07p\\x02\\x02vw\\x07e\\x02\\x02\" +\n\t\t\"wx\\x07v\\x02\\x02xy\\x07k\\x02\\x02yz\\x07q\\x02\\x02z{\\x07p\\x02\\x02{\\f\\x03\\x02\" +\n\t\t\"\\x02\\x02|}\\x07e\\x02\\x02}~\\x07q\\x02\\x02~\\x7F\\x07p\\x02\\x02\\x7F\\x80\\x07u\" +\n\t\t\"\\x02\\x02\\x80\\x81\\x07v\\x02\\x02\\x81\\x82\\x07t\\x02\\x02\\x82\\x83\\x07w\\x02\\x02\" +\n\t\t\"\\x83\\x84\\x07e\\x02\\x02\\x84\\x85\\x07v\\x02\\x02\\x85\\x86\\x07q\\x02\\x02\\x86\\x87\" +\n\t\t\"\\x07t\\x02\\x02\\x87\\x0E\\x03\\x02\\x02\\x02\\x88\\x8A\\t\\x02\\x02\\x02\\x89\\x88\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x8A\\x8B\\x03\\x02\\x02\\x02\\x8B\\x89\\x03\\x02\\x02\\x02\\x8B\\x8C\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x8C\\x10\\x03\\x02\\x02\\x02\\x8D\\x8F\\t\\x03\\x02\\x02\\x8E\\x8D\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x8F\\x90\\x03\\x02\\x02\\x02\\x90\\x8E\\x03\\x02\\x02\\x02\\x90\\x91\\x03\" +\n\t\t\"\\x02\\x02\\x02\\x91\\x92\\x03\\x02\\x02\\x02\\x92\\x93\\b\\t\\x02\\x02\\x93\\x12\\x03\\x02\" +\n\t\t\"\\x02\\x02\\x94\\x95\\x071\\x02\\x02\\x95\\x96\\x07,\\x02\\x02\\x96\\x9A\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x97\\x99\\v\\x02\\x02\\x02\\x98\\x97\\x03\\x02\\x02\\x02\\x99\\x9C\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x9A\\x9B\\x03\\x02\\x02\\x02\\x9A\\x98\\x03\\x02\\x02\\x02\\x9B\\x9D\\x03\\x02\\x02\" +\n\t\t\"\\x02\\x9C\\x9A\\x03\\x02\\x02\\x02\\x9D\\x9E\\x07,\\x02\\x02\\x9E\\x9F\\x071\\x02\\x02\" +\n\t\t\"\\x9F\\xA0\\x03\\x02\\x02\\x02\\xA0\\xA1\\b\\n\\x02\\x02\\xA1\\x14\\x03\\x02\\x02\\x02\\xA2\" +\n\t\t\"\\xA6\\x07$\\x02\\x02\\xA3\\xA5\\v\\x02\\x02\\x02\\xA4\\xA3\\x03\\x02\\x02\\x02\\xA5\\xA8\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA6\\xA7\\x03\\x02\\x02\\x02\\xA6\\xA4\\x03\\x02\\x02\\x02\\xA7\\xA9\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xA8\\xA6\\x03\\x02\\x02\\x02\\xA9\\xAA\\x07$\\x02\\x02\\xAA\\xAB\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xAB\\xAC\\b\\v\\x02\\x02\\xAC\\x16\\x03\\x02\\x02\\x02\\xAD\\xB1\\x07\" +\n\t\t\")\\x02\\x02\\xAE\\xB0\\v\\x02\\x02\\x02\\xAF\\xAE\\x03\\x02\\x02\\x02\\xB0\\xB3\\x03\\x02\" +\n\t\t\"\\x02\\x02\\xB1\\xB2\\x03\\x02\\x02\\x02\\xB1\\xAF\\x03\\x02\\x02\\x02\\xB2\\xB4\\x03\\x02\" +\n\t\t\"\\x02\\x02\\xB3\\xB1\\x03\\x02\\x02\\x02\\xB4\\xB5\\x07)\\x02\\x02\\xB5\\xB6\\x03\\x02\" +\n\t\t\"\\x02\\x02\\xB6\\xB7\\b\\f\\x02\\x02\\xB7\\x18\\x03\\x02\\x02\\x02\\xB8\\xB9\\x07r\\x02\" +\n\t\t\"\\x02\\xB9\\xBA\\x07t\\x02\\x02\\xBA\\xBB\\x07c\\x02\\x02\\xBB\\xBC\\x07i\\x02\\x02\\xBC\" +\n\t\t\"\\xBD\\x07o\\x02\\x02\\xBD\\xBE\\x07c\\x02\\x02\\xBE\\xC2\\x03\\x02\\x02\\x02\\xBF\\xC1\" +\n\t\t\"\\v\\x02\\x02\\x02\\xC0\\xBF\\x03\\x02\\x02\\x02\\xC1\\xC4\\x03\\x02\\x02\\x02\\xC2\\xC3\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xC2\\xC0\\x03\\x02\\x02\\x02\\xC3\\xC5\\x03\\x02\\x02\\x02\\xC4\\xC2\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xC5\\xC6\\x07=\\x02\\x02\\xC6\\xC7\\x03\\x02\\x02\\x02\\xC7\\xC8\" +\n\t\t\"\\b\\r\\x02\\x02\\xC8\\x1A\\x03\\x02\\x02\\x02\\xC9\\xCA\\x07k\\x02\\x02\\xCA\\xCB\\x07\" +\n\t\t\"o\\x02\\x02\\xCB\\xCC\\x07r\\x02\\x02\\xCC\\xCD\\x07q\\x02\\x02\\xCD\\xCE\\x07t\\x02\\x02\" +\n\t\t\"\\xCE\\xCF\\x07v\\x02\\x02\\xCF\\xD3\\x03\\x02\\x02\\x02\\xD0\\xD2\\v\\x02\\x02\\x02\\xD1\" +\n\t\t\"\\xD0\\x03\\x02\\x02\\x02\\xD2\\xD5\\x03\\x02\\x02\\x02\\xD3\\xD4\\x03\\x02\\x02\\x02\\xD3\" +\n\t\t\"\\xD1\\x03\\x02\\x02\\x02\\xD4\\xD6\\x03\\x02\\x02\\x02\\xD5\\xD3\\x03\\x02\\x02\\x02\\xD6\" +\n\t\t\"\\xD7\\x07=\\x02\\x02\\xD7\\xD8\\x03\\x02\\x02\\x02\\xD8\\xD9\\b\\x0E\\x02\\x02\\xD9\\x1C\" +\n\t\t\"\\x03\\x02\\x02\\x02\\xDA\\xDB\\x071\\x02\\x02\\xDB\\xDC\\x071\\x02\\x02\\xDC\\xE0\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xDD\\xDF\\n\\x04\\x02\\x02\\xDE\\xDD\\x03\\x02\\x02\\x02\\xDF\\xE2\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xE0\\xDE\\x03\\x02\\x02\\x02\\xE0\\xE1\\x03\\x02\\x02\\x02\\xE1\\xE3\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xE2\\xE0\\x03\\x02\\x02\\x02\\xE3\\xE4\\b\\x0F\\x02\\x02\\xE4\\x1E\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xE5\\xE6\\x07(\\x02\\x02\\xE6 \\x03\\x02\\x02\\x02\\xE7\\xE8\\x07\\x80\" +\n\t\t\"\\x02\\x02\\xE8\\\"\\x03\\x02\\x02\\x02\\xE9\\xEA\\x07~\\x02\\x02\\xEA$\\x03\\x02\\x02\\x02\" +\n\t\t\"\\xEB\\xEC\\x07>\\x02\\x02\\xEC&\\x03\\x02\\x02\\x02\\xED\\xEE\\x07@\\x02\\x02\\xEE(\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xEF\\xF0\\x070\\x02\\x02\\xF0*\\x03\\x02\\x02\\x02\\xF1\\xF2\\x07?\\x02\" +\n\t\t\"\\x02\\xF2,\\x03\\x02\\x02\\x02\\xF3\\xF4\\x07*\\x02\\x02\\xF4.\\x03\\x02\\x02\\x02\\xF5\" +\n\t\t\"\\xF6\\x07\\x7F\\x02\\x02\\xF60\\x03\\x02\\x02\\x02\\xF7\\xF8\\x07}\\x02\\x02\\xF82\\x03\" +\n\t\t\"\\x02\\x02\\x02\\xF9\\xFA\\x07+\\x02\\x02\\xFA4\\x03\\x02\\x02\\x02\\xFB\\xFC\\x07-\\x02\" +\n\t\t\"\\x02\\xFC6\\x03\\x02\\x02\\x02\\xFD\\xFE\\x07/\\x02\\x02\\xFE8\\x03\\x02\\x02\\x02\\xFF\" +\n\t\t\"\\u0100\\x07,\\x02\\x02\\u0100:\\x03\\x02\\x02\\x02\\u0101\\u0102\\x071\\x02\\x02\\u0102\" +\n\t\t\"<\\x03\\x02\\x02\\x02\\u0103\\u0104\\x07^\\x02\\x02\\u0104>\\x03\\x02\\x02\\x02\\u0105\" +\n\t\t\"\\u0106\\x07\\'\\x02\\x02\\u0106@\\x03\\x02\\x02\\x02\\u0107\\u0108\\x07`\\x02\\x02\\u0108\" +\n\t\t\"B\\x03\\x02\\x02\\x02\\u0109\\u010A\\x07#\\x02\\x02\\u010AD\\x03\\x02\\x02\\x02\\u010B\" +\n\t\t\"\\u010C\\x07A\\x02\\x02\\u010CF\\x03\\x02\\x02\\x02\\u010D\\u010E\\x07<\\x02\\x02\\u010E\" +\n\t\t\"H\\x03\\x02\\x02\\x02\\u010F\\u0110\\x07=\\x02\\x02\\u0110J\\x03\\x02\\x02\\x02\\u0111\" +\n\t\t\"\\u0112\\x07.\\x02\\x02\\u0112L\\x03\\x02\\x02\\x02\\u0113\\u0114\\v\\x02\\x02\\x02\\u0114\" +\n\t\t\"\\u0115\\x03\\x02\\x02\\x02\\u0115\\u0116\\b\\'\\x02\\x02\\u0116N\\x03\\x02\\x02\\x02\" +\n\t\t\"\\v\\x02\\x8B\\x90\\x9A\\xA6\\xB1\\xC2\\xD3\\xE0\\x03\\b\\x02\\x02\";\n\tpublic static __ATN: ATN;\n\tpublic static get _ATN(): ATN {\n\t\tif (!SolidityBlocksLexer.__ATN) {\n\t\t\tSolidityBlocksLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(SolidityBlocksLexer._serializedATN));\n\t\t}\n\n\t\treturn SolidityBlocksLexer.__ATN;\n\t}\n\n}\n\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAW,SAKA;AALX;AAAA;AAAO,MAAI,UAAU;AAAA,QACnB,KAAK,MAAM;AAAA,QACX,KAAK,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--git a/apps/remix-ide/src/blockchain/blockchain.tsx b/apps/remix-ide/src/blockchain/blockchain.tsx index d3f667de1d..fe9b6598f1 100644 --- a/apps/remix-ide/src/blockchain/blockchain.tsx +++ b/apps/remix-ide/src/blockchain/blockchain.tsx @@ -526,7 +526,7 @@ export class Blockchain extends Plugin { } /** - * return the fork name applied to the current envionment + * return the fork name applied to the current environment * @return {String} - fork name */ getCurrentFork() { @@ -619,7 +619,7 @@ export class Blockchain extends Plugin { return this.executionContext.isVM() ? 'memory' : 'blockchain' } - // NOTE: the config is only needed because exectuionContext.init does + // NOTE: the config is only needed because executionContext.init does async resetAndInit(config: Config, transactionContextAPI: TransactionContextAPI) { this.transactionContextAPI = transactionContextAPI this.executionContext.init(config) diff --git a/apps/remix-ide/src/blockchain/providers/injected.ts b/apps/remix-ide/src/blockchain/providers/injected.ts index 76c211a0ff..32b4938f70 100644 --- a/apps/remix-ide/src/blockchain/providers/injected.ts +++ b/apps/remix-ide/src/blockchain/providers/injected.ts @@ -29,7 +29,8 @@ export class InjectedProvider { async getBalanceInEther (address) { const balance = await this.executionContext.web3().eth.getBalance(address) - return Web3.utils.fromWei(balance.toString(10), 'ether') + const balInString = balance.toString(10) + return balInString === '0' ? balInString : Web3.utils.fromWei(balInString, 'ether') } getGasPrice (cb) { diff --git a/apps/remix-ide/src/blockchain/providers/node.ts b/apps/remix-ide/src/blockchain/providers/node.ts index 1dcf1b6c40..c77421e045 100644 --- a/apps/remix-ide/src/blockchain/providers/node.ts +++ b/apps/remix-ide/src/blockchain/providers/node.ts @@ -35,7 +35,8 @@ export class NodeProvider { async getBalanceInEther (address) { const balance = await this.executionContext.web3().eth.getBalance(address) - return Web3.utils.fromWei(balance.toString(10), 'ether') + const balInString = balance.toString(10) + return balInString === '0' ? balInString : Web3.utils.fromWei(balInString, 'ether') } getGasPrice (cb) { diff --git a/apps/remix-ide/src/blockchain/providers/vm.ts b/apps/remix-ide/src/blockchain/providers/vm.ts index 3ae7f6a154..67357b347e 100644 --- a/apps/remix-ide/src/blockchain/providers/vm.ts +++ b/apps/remix-ide/src/blockchain/providers/vm.ts @@ -97,7 +97,8 @@ export class VMProvider { async getBalanceInEther (address) { const balance = await this.web3.eth.getBalance(address, undefined, { number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX }) - return fromWei(toBigInt(balance).toString(10), 'ether') + const balInString = toBigInt(balance).toString(10) + return balInString === '0' ? balInString : fromWei(balInString, 'ether') } getGasPrice (cb) { diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 126cb1926a..e1780ceea3 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -89,7 +89,7 @@ let requiredModules = [ // services + layout views + system views // dependentModules shouldn't be manually activated (e.g hardhat is activated by remixd) const dependentModules = ['foundry', 'hardhat', 'truffle', 'slither'] -const loadLocalPlugins = ['doc-gen', 'doc-viewer', 'etherscan', 'vyper', 'solhint', 'walletconnect', 'circuit-compiler'] +const loadLocalPlugins = ['doc-gen', 'doc-viewer', 'etherscan', 'vyper', 'solhint', 'walletconnect', 'circuit-compiler', 'learneth'] const sensitiveCalls = { fileManager: ['writeFile', 'copyFile', 'rename', 'copyDir'], @@ -153,7 +153,7 @@ export class RemixAppManager extends PluginManager { if (Registry.getInstance().get('platform').api.isDesktop()) { requiredModules = [...requiredModules, 'fs', 'electronTemplates', 'isogit', 'remix-templates', 'electronconfig', 'xterm', 'compilerloader', 'ripgrep'] } - + } async canActivatePlugin(from, to) { @@ -332,6 +332,17 @@ export class RemixAppManager extends PluginManager { sticky: true, group: 7 }) + await this.call('filePanel', 'registerContextMenuItem', { + id: 'vyper', + name: 'vyperCompileCustomAction', + label: 'Compile for Vyper', + type: [], + extension: ['.vy'], + path: [], + pattern: [], + sticky: true, + group: 7 + }) if (Registry.getInstance().get('platform').api.isDesktop()) { await this.call('filePanel', 'registerContextMenuItem', { id: 'fs', diff --git a/apps/remix-ide/src/remixEngine.js b/apps/remix-ide/src/remixEngine.js index 5c0657ce22..6b96d44783 100644 --- a/apps/remix-ide/src/remixEngine.js +++ b/apps/remix-ide/src/remixEngine.js @@ -25,6 +25,7 @@ export class RemixEngine extends Engine { if (name === 'circuit-compiler') return { queueTimeout: 60000 * 4 } if (name === 'compilerloader') return { queueTimeout: 60000 * 4 } if (name === 'filePanel') return { queueTimeout: 60000 * 20 } + if (name === 'fileManager') return { queueTimeout: 60000 * 20 } if (name === 'openaigpt') return { queueTimeout: 60000 * 2 } if (name === 'cookbookdev') return { queueTimeout: 60000 * 2 } return { queueTimeout: 10000 } diff --git a/apps/remixdesktop/package.json b/apps/remixdesktop/package.json index 31734e09f6..855777b5c4 100644 --- a/apps/remixdesktop/package.json +++ b/apps/remixdesktop/package.json @@ -104,7 +104,8 @@ "target": [ "nsis" ], - "icon": "assets/icon.png" + "icon": "assets/icon.png", + "artifactName": "${productName}.${ext}" }, "linux": { "target": [ diff --git a/apps/remixdesktop/src/menus/darwin.ts b/apps/remixdesktop/src/menus/darwin.ts index 410691fbde..a586dd3d16 100644 --- a/apps/remixdesktop/src/menus/darwin.ts +++ b/apps/remixdesktop/src/menus/darwin.ts @@ -1,4 +1,4 @@ -// This menu label is overrided by OSX to be the appName +// This menu label is overridden by OSX to be the appName // The label is set to appName here so it matches actual behavior import {app, BrowserWindow, MenuItemConstructorOptions} from 'electron'; diff --git a/apps/remixdesktop/yarn.lock b/apps/remixdesktop/yarn.lock index b8634536b2..fc9e558ee8 100644 --- a/apps/remixdesktop/yarn.lock +++ b/apps/remixdesktop/yarn.lock @@ -3083,9 +3083,9 @@ internal-slot@^1.0.5: side-channel "^1.0.4" ip@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== ipaddr.js@1.9.1: version "1.9.1" diff --git a/apps/solidity-compiler/src/app/compiler.ts b/apps/solidity-compiler/src/app/compiler.ts index c7f09e2312..9915d473b4 100644 --- a/apps/solidity-compiler/src/app/compiler.ts +++ b/apps/solidity-compiler/src/app/compiler.ts @@ -9,7 +9,7 @@ import { CompileTabLogic } from '@remix-ui/solidity-compiler' const defaultCompilerParameters = { runs: '200', optimize: false, - version: 'soljson-v0.8.22+commit.4fc1097e', + version: 'soljson-v0.8.24+commit.e11b9ed9', evmVersion: null, // compiler default language: 'Solidity', useFileConfiguration: false, diff --git a/apps/vyper/src/app/app.css b/apps/vyper/src/app/app.css index 7e4107ba67..f299c4d37a 100644 --- a/apps/vyper/src/app/app.css +++ b/apps/vyper/src/app/app.css @@ -113,3 +113,112 @@ html, body, #root, main { height: 100%; width: 100%; } + + + +.remixui_copyButton { + padding: 6px; + font-weight: bold; + font-size: 11px; + line-height: 15px; +} + +.remixui_contractHelperButtons { + margin-top: 6px; + display: flex; + align-items: center; + justify-content: space-between; + float: right; +} +.remixui_copyToClipboard { + font-size: 1rem; +} +.remixui_copyIcon { + margin-right: 5px; +} +.remixui_log { + display: flex; + flex-direction: column; + margin-bottom: 0.5rem; + overflow: visible; +} +.remixui_key { + margin-right: 5px; + text-transform: uppercase; + width: 100%; +} +.remixui_value { + display: flex; + width: 100%; + margin-top: 1.5%; +} +.remixui_questionMark { + margin-left: 2%; + cursor: pointer; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} +@-webkit-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} +@-moz-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} +@-o-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} +@-ms-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +.remixui_bouncingIcon { + display: inline-block; + position: relative; + -moz-animation: bounce 2s infinite linear; + -o-animation: bounce 2s infinite linear; + -webkit-animation: bounce 2s infinite linear; + animation: bounce 2s infinite linear; +} + +@-webkit-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } +} +@-moz-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } +} +@-o-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } +} +@-ms-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } +} +@keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } +} + +#compileDetails { + margin: 15px; + padding: 15px; +} diff --git a/apps/vyper/src/app/app.tsx b/apps/vyper/src/app/app.tsx index ebcfdd3aac..f09dc06cda 100644 --- a/apps/vyper/src/app/app.tsx +++ b/apps/vyper/src/app/app.tsx @@ -13,7 +13,9 @@ import ToggleButton from 'react-bootstrap/ToggleButton' import Button from 'react-bootstrap/Button' import './app.css' -import { CustomTooltip } from '@remix-ui/helper' +import {CustomTooltip} from '@remix-ui/helper' +import {Form} from 'react-bootstrap' +import {CompileErrorCard} from './components/CompileErrorCard' interface AppState { status: 'idle' | 'inProgress' @@ -28,14 +30,13 @@ interface OutputMap { const App = () => { const [contract, setContract] = useState() - const [output, setOutput] = useState({}) + const [output, setOutput] = useState(remixClient.compilerOutput) const [state, setState] = useState({ status: 'idle', environment: 'remote', - localUrl: 'http://localhost:8000/' + localUrl: 'http://localhost:8000/', }) - useEffect(() => { async function start() { try { @@ -53,6 +54,33 @@ const App = () => { start() }, []) + useEffect(() => { + remixClient.eventEmitter.on('resetCompilerState', () => { + resetCompilerResultState() + }) + + return () => { + remixClient.eventEmitter.off('resetCompilerState', () => { + resetCompilerResultState() + }) + } + }, []) + + useEffect(() => { + remixClient.eventEmitter.on('setOutput', (payload) => { + if (payload.status === 'failed') { + console.error('Error in the compiler', payload) + } + setOutput(payload) + }) + + return () => { + remixClient.eventEmitter.off('setOutput', (payload) => { + setOutput(payload) + }) + } + }, []) + /** Update the environment state value */ function setEnvironment(environment: 'local' | 'remote') { setState({...state, environment}) @@ -67,48 +95,48 @@ const App = () => { } function resetCompilerResultState() { - setOutput({}) + setOutput(remixClient.compilerOutput) } return (
            +
            +
            + Vyper logo +

            yper Compiler

            +
            + + + +
            - -
            - - - Remote Compiler - - - Local Compiler - - +
            +
            + setEnvironment('remote')} label="Remote Compiler" style={{cursor: state.environment === 'remote' ? 'default' : 'pointer'}} className="d-flex mr-4" /> + setEnvironment('local')} label="Local Compiler" style={{cursor: state.environment === 'local' ? 'default' : 'pointer'}} /> +
            +
            + Specify the compiler version & EVM version in the .vy file
            - setOutput({...output, [name]: update})} - resetCompilerState={resetCompilerResultState} - /> + setOutput({...output, [name]: update})} resetCompilerState={resetCompilerResultState} />
            - { - output && Object.keys(output).length > 0 && output.status !== 'failed' ? ( - <> - - - ) : null - } + {output && Object.keys(output).length > 0 && output.status !== 'failed' ? ( + <> + + + ) : output.status === 'failed' ? ( + + ) : null}
            diff --git a/apps/vyper/src/app/components/CompileErrorCard.tsx b/apps/vyper/src/app/components/CompileErrorCard.tsx new file mode 100644 index 0000000000..4c8d1128b8 --- /dev/null +++ b/apps/vyper/src/app/components/CompileErrorCard.tsx @@ -0,0 +1,19 @@ +import Reaact from 'react' + +export function CompileErrorCard(props: any) { + return ( +
            + + + {props.output.message.trim()} + +
            + ) +} diff --git a/apps/vyper/src/app/components/CompilerButton.tsx b/apps/vyper/src/app/components/CompilerButton.tsx index ad04d0ba04..f7d2331348 100644 --- a/apps/vyper/src/app/components/CompilerButton.tsx +++ b/apps/vyper/src/app/components/CompilerButton.tsx @@ -1,7 +1,6 @@ import React, { Fragment, useState } from 'react' -import {isVyper, compile, toStandardOutput, isCompilationError, remixClient, normalizeContractPath} from '../utils' +import {isVyper, compile, toStandardOutput, isCompilationError, remixClient, normalizeContractPath, compileContract} from '../utils' import Button from 'react-bootstrap/Button' -import _ from 'lodash' interface Props { compilerUrl: string @@ -21,112 +20,14 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}: } /** Compile a Contract */ - async function compileContract() { - resetCompilerState() - setLoadingSpinnerState(true) - try { - // await remixClient.discardHighlight() - let _contract: any - try { - _contract = await remixClient.getContract() - } catch (e: any) { - setOutput('', {status: 'failed', message: e.message}) - return - } - remixClient.changeStatus({ - key: 'loading', - type: 'info', - title: 'Compiling' - }) - let output - try { - output = await compile(compilerUrl, _contract) - } catch (e: any) { - remixClient.changeStatus({ - key: 'failed', - type: 'error', - title: e.message - }) - return - } - const compileReturnType = () => { - const t: any = toStandardOutput(contract, output) - const temp = _.merge(t['contracts'][contract]) - const normal = normalizeContractPath(contract)[2] - const abi = temp[normal]['abi'] - const evm = _.merge(temp[normal]['evm']) - const dpb = evm.deployedBytecode - const runtimeBytecode = evm.bytecode - const methodIdentifiers = evm.methodIdentifiers - - const result = { - contractName: normal, - abi: abi, - bytecode: dpb, - runtimeBytecode: runtimeBytecode, - ir: '', - methodIdentifiers: methodIdentifiers - } - return result - } - - // ERROR - if (isCompilationError(output)) { - const line = output.line - if (line) { - const lineColumnPos = { - start: {line: line - 1, column: 10}, - end: {line: line - 1, column: 10} - } - // remixClient.highlight(lineColumnPos as any, _contract.name, '#e0b4b4') - } else { - const regex = output?.message?.match(/line ((\d+):(\d+))+/g) - const errors = output?.message?.split(/line ((\d+):(\d+))+/g) // extract error message - if (regex) { - let errorIndex = 0 - regex.map((errorLocation) => { - const location = errorLocation?.replace('line ', '').split(':') - let message = errors[errorIndex] - errorIndex = errorIndex + 4 - if (message && message?.split('\n\n').length > 0) { - try { - message = message?.split('\n\n')[message.split('\n\n').length - 1] - } catch (e) {} - } - if (location?.length > 0) { - const lineColumnPos = { - start: {line: parseInt(location[0]) - 1, column: 10}, - end: {line: parseInt(location[0]) - 1, column: 10} - } - // remixClient.highlight(lineColumnPos as any, _contract.name, message) - } - }) - } - } - throw new Error(output.message) - } - // SUCCESS - // remixClient.discardHighlight() - remixClient.changeStatus({ - key: 'succeed', - type: 'success', - title: 'success' - }) - const data = toStandardOutput(_contract.name, output) - remixClient.compilationFinish(_contract.name, _contract.content, data) - setOutput(_contract.name, compileReturnType()) - } catch (err: any) { - remixClient.changeStatus({ - key: 'failed', - type: 'error', - title: err.message - }) - } - } return ( - +
            +
            +
            + (Object.values(output)[0] as OutputType).abi} direction="bottom" icon="far fa-copy"> + + + (Object.values(output)[0] as OutputType).bytecode.object} direction="bottom" icon="far fa-copy"> + + +
            +
            +
    ) diff --git a/apps/vyper/src/app/utils/compiler.tsx b/apps/vyper/src/app/utils/compiler.tsx index ed1cc80b50..fcb32a5b7a 100644 --- a/apps/vyper/src/app/utils/compiler.tsx +++ b/apps/vyper/src/app/utils/compiler.tsx @@ -1,5 +1,8 @@ import { ABIDescription} from '@remixproject/plugin-api' import axios from 'axios' +import { remixClient } from './remix-client' +import _ from 'lodash' + export interface Contract { name: string @@ -167,6 +170,134 @@ export function toStandardOutput(fileName: string, compilationResult: any): any } } } + + +export async function compileContract(contract: string, compilerUrl: string, setOutput?: any) { + remixClient.eventEmitter.emit('resetCompilerState', {}) + + try { + // await remixClient.discardHighlight() + let _contract: any + try { + _contract = await remixClient.getContract() + } catch (e: any) { + // if (setOutput === null || setOutput === undefined) { + const compileResult = { + status: 'failed', + message: e.message + } + remixClient.eventEmitter.emit('setOutput', compileResult) + // } else { + // setOutput('', {status: 'failed', message: e.message}) + // } + return + } + remixClient.changeStatus({ + key: 'loading', + type: 'info', + title: 'Compiling' + }) + let output + try { + output = await compile(compilerUrl, _contract) + console.log('checking compile result', output) + remixClient.eventEmitter.emit('setOutput', output) + } catch (e: any) { + remixClient.changeStatus({ + key: 'failed', + type: 'error', + title: `${e.message} debugging` + }) + // setOutput !== null || setOutput !== undefined && setOutput('', {status: 'failed', message: e.message}) + remixClient.eventEmitter.emit('setOutput', {status: 'failed', message: e.message}) + return + } + const compileReturnType = () => { + const t: any = toStandardOutput(contract, output) + const temp = _.merge(t['contracts'][contract]) + const normal = normalizeContractPath(contract)[2] + const abi = temp[normal]['abi'] + const evm = _.merge(temp[normal]['evm']) + const dpb = evm.deployedBytecode + const runtimeBytecode = evm.bytecode + const methodIdentifiers = evm.methodIdentifiers + + const result = { + contractName: normal, + abi: abi, + bytecode: dpb, + runtimeBytecode: runtimeBytecode, + ir: '', + methodIdentifiers: methodIdentifiers + } + return result + } + + // ERROR + if (isCompilationError(output)) { + const line = output.line + if (line) { + const lineColumnPos = { + start: {line: line - 1, column: 10}, + end: {line: line - 1, column: 10} + } + // remixClient.highlight(lineColumnPos as any, _contract.name, '#e0b4b4') + } else { + const regex = output?.message?.match(/line ((\d+):(\d+))+/g) + const errors = output?.message?.split(/line ((\d+):(\d+))+/g) // extract error message + if (regex) { + let errorIndex = 0 + regex.map((errorLocation) => { + const location = errorLocation?.replace('line ', '').split(':') + let message = errors[errorIndex] + errorIndex = errorIndex + 4 + if (message && message?.split('\n\n').length > 0) { + try { + message = message?.split('\n\n')[message.split('\n\n').length - 1] + } catch (e) {} + } + if (location?.length > 0) { + const lineColumnPos = { + start: {line: parseInt(location[0]) - 1, column: 10}, + end: {line: parseInt(location[0]) - 1, column: 10} + } + // remixClient.highlight(lineColumnPos as any, _contract.name, message) + } + }) + } + } + throw new Error(output.message) + } + // SUCCESS + // remixClient.discardHighlight() + remixClient.changeStatus({ + key: 'succeed', + type: 'success', + title: 'success' + }) + + const data = toStandardOutput(_contract.name, output) + remixClient.compilationFinish(_contract.name, _contract.content, data) + if (setOutput === null || setOutput === undefined) { + const contractName = _contract['name'] + const compileResult = compileReturnType() + remixClient.eventEmitter.emit('setOutput', { contractName, compileResult }) + } else { + setOutput(_contract.name, compileReturnType()) + } + } catch (err: any) { + remixClient.changeStatus({ + key: 'failed', + type: 'error', + title: err.message + }) + remixClient.eventEmitter.emit('setOutput', {status: 'failed', message: err.message}) + } +} + + + + export type StandardOutput = { sources: { [fileName: string]: { diff --git a/apps/vyper/src/app/utils/remix-client.tsx b/apps/vyper/src/app/utils/remix-client.tsx index a4fda680cf..7e4a1952a6 100644 --- a/apps/vyper/src/app/utils/remix-client.tsx +++ b/apps/vyper/src/app/utils/remix-client.tsx @@ -1,12 +1,23 @@ -import {HighlightPosition, CompilationResult, RemixApi} from '@remixproject/plugin-api' +import {HighlightPosition, CompilationResult, RemixApi, customAction} from '@remixproject/plugin-api' import {Api, Status} from '@remixproject/plugin-utils' import {createClient} from '@remixproject/plugin-webview' import {PluginClient} from '@remixproject/plugin' -import {Contract} from './compiler' +import {Contract, compileContract} from './compiler' import {ExampleContract} from '../components/VyperResult' +import EventEmitter from 'events' + +export type VyperComplierAddress = 'https://vyper2.remixproject.org/' | 'http://localhost:8000/' export class RemixClient extends PluginClient { private client = createClient>(this) + compilerUrl: VyperComplierAddress = 'https://vyper2.remixproject.org/' + compilerOutput: any + eventEmitter = new EventEmitter() + + constructor() { + super() + this.compilerOutput = {} + } loaded() { return this.client.onload() @@ -26,6 +37,18 @@ export class RemixClient extends PluginClient { }) } + resetCompilerState() { + this.compilerOutput = {} + this.eventEmitter.emit('resetCompilerState', {}) + } + + async vyperCompileCustomAction(action?: customAction) { + //read selected contract from file explorer and create contract type + const contract = await this.getContract() + //compile contract + await compileContract(contract.name, this.compilerUrl) + } + /** Load Ballot contract example into the file manager */ async loadContract({name, address}: ExampleContract) { try { @@ -91,7 +114,7 @@ export class RemixClient extends PluginClient { await this.client.call('editor', 'addAnnotation', annotation, name) } - /** Remove current Hightlight */ + /** Remove current Highlight */ async discardHighlight() { await this.client.call('editor', 'discardHighlight') await this.client.call('editor', 'clearAnnotations') diff --git a/apps/vyper/src/assets/vyperLogo_v2.webp b/apps/vyper/src/assets/vyperLogo_v2.webp new file mode 100644 index 0000000000..fc85993627 Binary files /dev/null and b/apps/vyper/src/assets/vyperLogo_v2.webp differ diff --git a/apps/vyper/src/profile.json b/apps/vyper/src/profile.json index 4567720716..8ed04d3cb3 100644 --- a/apps/vyper/src/profile.json +++ b/apps/vyper/src/profile.json @@ -1,7 +1,7 @@ { "name": "vyper", - "displayName": "Vyper Plugin", - "methods": ["getCompilationResult", "compile"], + "displayName": "Vyper", + "methods": ["getCompilationResult", "compile", "vyperCompileCustomAction"], "url": "https://ipfs-cluster.ethdevops.io/ipfs/QmbmPzUg7ghTKcF2eo64zm1k1LKdibYfqYmiqXkHKXks8r", "documentation": "https://remix-ide.readthedocs.io/en/latest/plugin_list.html", "description": "Compile vyper contracts", diff --git a/apps/walletconnect/src/app/app.tsx b/apps/walletconnect/src/app/app.tsx index 3aef77cf81..dd9626956a 100644 --- a/apps/walletconnect/src/app/app.tsx +++ b/apps/walletconnect/src/app/app.tsx @@ -1,33 +1,16 @@ -import React, {useEffect, useState} from 'react' import '../css/app.css' import '@fortawesome/fontawesome-free/css/all.css' -import type {EthereumClient} from '@web3modal/ethereum' import {WalletConnectRemixClient} from '../services/WalletConnectRemixClient' import {WalletConnectUI} from './walletConnectUI' const remix = new WalletConnectRemixClient() +remix.initClient() function App() { - const [ethereumClient, setEthereumClient] = useState(null) - const [wagmiConfig, setWagmiConfig] = useState(null) - const [theme, setTheme] = useState('dark') - - useEffect(() => { - ;(async () => { - await remix.initClient() - remix.internalEvents.on('themeChanged', (theme: string) => { - setTheme(theme) - }) - - setWagmiConfig(remix.wagmiConfig) - setEthereumClient(remix.ethereumClient) - })() - }, []) - return (

    WalletConnect

    - {ethereumClient && wagmiConfig && } +
    ) } diff --git a/apps/walletconnect/src/app/walletConnectUI.tsx b/apps/walletconnect/src/app/walletConnectUI.tsx index 38c205000f..655faa4d71 100644 --- a/apps/walletconnect/src/app/walletConnectUI.tsx +++ b/apps/walletconnect/src/app/walletConnectUI.tsx @@ -1,16 +1,7 @@ -import {Web3Button, Web3Modal} from '@web3modal/react' -import {WagmiConfig} from 'wagmi' -import {PROJECT_ID} from '../services/constant' - -export function WalletConnectUI({ethereumClient, wagmiConfig, theme}) { +export function WalletConnectUI() { return ( -
    -
    - - - -
    - +
    +
    ) } diff --git a/apps/walletconnect/src/services/WalletConnectRemixClient.ts b/apps/walletconnect/src/services/WalletConnectRemixClient.ts index 0a4ccc0046..d8e8656cc0 100644 --- a/apps/walletconnect/src/services/WalletConnectRemixClient.ts +++ b/apps/walletconnect/src/services/WalletConnectRemixClient.ts @@ -1,30 +1,18 @@ import {PluginClient} from '@remixproject/plugin' import {createClient} from '@remixproject/plugin-webview' -import {w3mConnectors, w3mProvider} from '@web3modal/ethereum' -import {createConfig, configureChains} from 'wagmi' -import { - arbitrum, - arbitrumGoerli, - mainnet, - polygon, - polygonMumbai, - optimism, - optimismGoerli, - Chain, - goerli, - sepolia -} from 'viem/chains' -import {EthereumClient} from '@web3modal/ethereum' +import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react' +import { constants } from '../utils/constants' import EventManager from 'events' -import {PROJECT_ID} from './constant' +import {PROJECT_ID as projectId, METADATA as metadata} from './constant' +import { Chain, RequestArguments } from '../types' export class WalletConnectRemixClient extends PluginClient { - wagmiConfig - ethereumClient: EthereumClient + web3modal: ReturnType + ethersConfig: ReturnType chains: Chain[] currentChain: number internalEvents: EventManager - currentAcount: string + currentAccount: string constructor() { super() @@ -45,74 +33,59 @@ export class WalletConnectRemixClient extends PluginClient { console.log('initializing walletconnect plugin...') } - async initClient() { + initClient() { try { - this.chains = [ - mainnet, - arbitrum, - arbitrumGoerli, - polygon, - polygonMumbai, - optimism, - optimismGoerli, - goerli, - sepolia - ] - const {publicClient} = configureChains(this.chains, [ - w3mProvider({projectId: PROJECT_ID}) - ], { - pollingInterval: 5000 + const ethersConfig = defaultConfig({ + metadata, + rpcUrl: 'https://cloudflare-eth.com' }) - - this.wagmiConfig = createConfig({ - autoConnect: false, - connectors: w3mConnectors({projectId: PROJECT_ID, chains: this.chains}), - publicClient - }) - this.ethereumClient = new EthereumClient(this.wagmiConfig, this.chains) + + this.web3modal = createWeb3Modal({ projectId, chains: constants.chains, metadata, ethersConfig }) + this.ethersConfig = ethersConfig + this.chains = constants.chains } catch (e) { return console.error('Could not get a wallet connection', e) } } subscribeToEvents() { - this.wagmiConfig.subscribe((event) => { - if (event.status === 'connected') { - if (event.data.account !== this.currentAcount) { - this.currentAcount = event.data.account - this.emit('accountsChanged', [event.data.account]) + this.web3modal.subscribeProvider(({ address, isConnected, chainId })=>{ + if(isConnected){ + if (address !== this.currentAccount) { + this.currentAccount = address + this.emit('accountsChanged', [address]) } - if (this.currentChain !== event.data.chain.id) { - this.currentChain = event.data.chain.id - this.emit('chainChanged', event.data.chain.id) + if (this.currentChain !== chainId) { + this.currentChain = chainId + this.emit('chainChanged', chainId) } - } else if (event.status === 'disconnected') { + }else{ this.emit('accountsChanged', []) - this.currentAcount = '' + this.currentAccount = '' this.emit('chainChanged', 0) this.currentChain = 0 } - }) + },) this.on('theme', 'themeChanged', (theme: any) => { - this.internalEvents.emit('themeChanged', theme.quality) + this.web3modal.setThemeMode(theme.quality) }) } - async sendAsync(data: {method: string; params: string; id: string}) { - if (this.wagmiConfig.status === 'connected') { + async sendAsync(data: RequestArguments) { + const address = this.web3modal.getAddress() + const provider = this.web3modal.getWalletProvider() + if (address && provider) { if (data.method === 'eth_accounts') { return { jsonrpc: '2.0', - result: [this.wagmiConfig.data.account], + result: [address], id: data.id } } else { - const provider = await this.wagmiConfig.connector.getProvider({ - chainId: this.wagmiConfig.data.chain.id - }) - - if (provider.isMetaMask) { + //@ts-expect-error this flag does not correspond to EIP-1193 but was introduced by MetaMask + if (provider.isMetamask && provider.sendAsync) { return new Promise((resolve) => { + //@ts-expect-error sendAsync is a legacy function we know MetaMask supports it provider.sendAsync(data, (error, response) => { if (error) { if (error.data && error.data.originalError && error.data.originalError.data) { @@ -156,6 +129,6 @@ export class WalletConnectRemixClient extends PluginClient { async deactivate() { console.log('deactivating walletconnect plugin...') - await this.ethereumClient.disconnect() + await this.web3modal.disconnect() } } diff --git a/apps/walletconnect/src/services/constant.ts b/apps/walletconnect/src/services/constant.ts index 497ddc5357..5ffe343405 100644 --- a/apps/walletconnect/src/services/constant.ts +++ b/apps/walletconnect/src/services/constant.ts @@ -1,2 +1,8 @@ // @ts-ignore -export const PROJECT_ID = WALLET_CONNECT_PROJECT_ID \ No newline at end of file +export const PROJECT_ID = WALLET_CONNECT_PROJECT_ID +export const METADATA = { + name: 'Remix IDE', + description: 'The Native IDE for Web3 Development.', + url: 'https://remix.ethereum.org/', + icons: ['https://remix.ethereum.org/favicon.ico'], +} \ No newline at end of file diff --git a/apps/walletconnect/src/types.ts b/apps/walletconnect/src/types.ts new file mode 100644 index 0000000000..0ae3233f7e --- /dev/null +++ b/apps/walletconnect/src/types.ts @@ -0,0 +1,13 @@ +export interface RequestArguments { + readonly method: string + readonly params?: readonly unknown[] | object + readonly id?: string +} + +export type Chain = { + chainId: number + name: string + currency: string + explorerUrl: string + rpcUrl: string +} \ No newline at end of file diff --git a/apps/walletconnect/src/utils/chains.ts b/apps/walletconnect/src/utils/chains.ts new file mode 100644 index 0000000000..783fed7032 --- /dev/null +++ b/apps/walletconnect/src/utils/chains.ts @@ -0,0 +1,151 @@ +export const mainnet = { + chainId: 1, + name: 'Ethereum', + currency: 'ETH', + explorerUrl: 'https://etherscan.io', + rpcUrl: 'https://cloudflare-eth.com' +} + +export const sepolia = { + chainId: 11155111, + name: 'Sepolia', + currency: 'ETH', + explorerUrl: 'https://sepolia.etherscan.io', + rpcUrl: 'https://rpc.sepolia.org' +} + +export const goerli = { + chainId: 5, + name: 'Goerli', + currency: 'ETH', + explorerUrl: 'https://goerli.etherscan.io', + rpcUrl: 'https://rpc.ankr.com/eth_goerli' +} + +export const arbitrum = { + chainId: 42161, + name: 'Arbitrum', + currency: 'ETH', + explorerUrl: 'https://arbiscan.io', + rpcUrl: 'https://arb1.arbitrum.io/rpc' +} + +export const arbitrumGoerli = { + chainId: 421613, + name: 'Arbitrum Goerli', + currency: 'ETH', + explorerUrl: 'https://goerli.arbiscan.io', + rpcUrl: 'https://goerli-rollup.arbitrum.io/rpc' +} + +export const avalanche = { + chainId: 43114, + name: 'Avalanche', + currency: 'AVAX', + explorerUrl: 'https://snowtrace.io', + rpcUrl: 'https://api.avax.network/ext/bc/C/rpc' +} + +export const bsc = { + chainId: 56, + name: 'Binance Smart Chain', + currency: 'BNB', + explorerUrl: 'https://bscscan.com', + rpcUrl: 'https://rpc.ankr.com/bsc' +} + +export const optimism = { + chainId: 10, + name: 'Optimism', + currency: 'ETH', + explorerUrl: 'https://optimistic.etherscan.io', + rpcUrl: 'https://mainnet.optimism.io' +} + +export const optimismGoerli = { + chainId: 420, + name: 'Optimism Goerli', + currency: 'ETH', + explorerUrl: 'https://goerli-optimism.etherscan.io', + rpcUrl: 'https://goerli.optimism.io' +} + +export const polygon = { + chainId: 137, + name: 'Polygon', + currency: 'MATIC', + explorerUrl: 'https://polygonscan.com', + rpcUrl: 'https://polygon-rpc.com' +} + +export const polygonMumbai = { + chainId: 80001, + name: 'Polygon Mumbai', + currency: 'MATIC', + explorerUrl: 'https://mumbai.polygonscan.com', + rpcUrl: 'https://rpc.ankr.com/polygon_mumbai' +} + +export const gnosis = { + chainId: 100, + name: 'Gnosis', + currency: 'xDAI', + explorerUrl: 'https://gnosis.blockscout.com', + rpcUrl: 'https://rpc.gnosischain.com' +} + +export const zkSync = { + chainId: 324, + name: 'ZkSync', + currency: 'ETH', + explorerUrl: 'https://explorer.zksync.io', + rpcUrl: 'https://mainnet.era.zksync.io' +} + +export const zora = { + chainId: 7777777, + name: 'Zora', + currency: 'ETH', + explorerUrl: 'https://explorer.zora.energy', + rpcUrl: 'https://rpc.zora.energy' +} + +export const celo = { + chainId: 42220, + name: 'Celo', + currency: 'CELO', + explorerUrl: 'https://explorer.celo.org/mainnet', + rpcUrl: 'https://forno.celo.org' +} + +export const base = { + chainId: 8453, + name: 'Base', + currency: 'BASE', + explorerUrl: 'https://basescan.org', + rpcUrl: 'https://mainnet.base.org' +} + +export const aurora = { + chainId: 1313161554, + name: 'Aurora', + currency: 'ETH', + explorerUrl: 'https://explorer.aurora.dev', + rpcUrl: 'https://mainnet.aurora.dev' +} + +export const ronin = { + chainId: 2020, + name: 'Ronin', + currency: 'RON', + explorerUrl: 'https://app.roninchain.com', + rpcUrl: 'https://api.roninchain.com/rpc' +} + +export const saigon = { + chainId: 2021, + name: 'Saigon Testnet', + currency: 'RON', + explorerUrl: 'https://saigon-explorer.roninchain.com', + rpcUrl: 'https://saigon-testnet.roninchain.com/rpc' +} \ No newline at end of file diff --git a/apps/walletconnect/src/utils/constants.ts b/apps/walletconnect/src/utils/constants.ts new file mode 100644 index 0000000000..84e806591d --- /dev/null +++ b/apps/walletconnect/src/utils/constants.ts @@ -0,0 +1,45 @@ +import { + arbitrum, + arbitrumGoerli, + mainnet, + polygon, + polygonMumbai, + optimism, + optimismGoerli, + goerli, + sepolia, + ronin, + saigon, + aurora, + avalanche, + base, + bsc, + celo, + gnosis, + zkSync, + zora, +} from './chains' + +export const constants = { + chains: [ + arbitrum, + arbitrumGoerli, + mainnet, + polygon, + polygonMumbai, + optimism, + optimismGoerli, + goerli, + sepolia, + ronin, + saigon, + aurora, + avalanche, + base, + bsc, + celo, + gnosis, + zkSync, + zora, + ] +} \ No newline at end of file diff --git a/libs/ghaction-helper/package.json b/libs/ghaction-helper/package.json index 99ca2ddf93..2678c622e5 100644 --- a/libs/ghaction-helper/package.json +++ b/libs/ghaction-helper/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/ghaction-helper", - "version": "0.1.20", + "version": "0.1.22", "description": "Solidity Tests GitHub Action Helper", "main": "src/index.js", "scripts": { @@ -19,17 +19,17 @@ }, "homepage": "https://github.com/ethereum/remix-project#readme", "devDependencies": { - "@remix-project/remix-solidity": "^0.5.26", + "@remix-project/remix-solidity": "^0.5.28", "@types/chai": "^4.3.4", "typescript": "^4.9.3" }, "dependencies": { "@ethereum-waffle/chai": "^3.4.4", - "@remix-project/remix-simulator": "^0.2.40", + "@remix-project/remix-simulator": "^0.2.42", "chai": "^4.3.7", "ethers": "^5.7.2", "web3": "^4.1.1" }, "types": "./src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844" + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901" } \ No newline at end of file diff --git a/libs/remix-analyzer/package.json b/libs/remix-analyzer/package.json index 09aa697e87..0e0c3930b0 100644 --- a/libs/remix-analyzer/package.json +++ b/libs/remix-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-analyzer", - "version": "0.5.49", + "version": "0.5.51", "description": "Tool to perform static analysis on Solidity smart contracts", "scripts": { "test": "./../../node_modules/.bin/ts-node --project ../../tsconfig.base.json --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts" @@ -25,8 +25,8 @@ "@ethereumjs/tx": "^4.1.1", "@ethereumjs/util": "^8.0.5", "@ethereumjs/vm": "^6.4.1", - "@remix-project/remix-astwalker": "^0.0.70", - "@remix-project/remix-lib": "^0.5.47", + "@remix-project/remix-astwalker": "^0.0.72", + "@remix-project/remix-lib": "^0.5.49", "async": "^2.6.2", "ethers": "^5.4.2", "ethjs-util": "^0.1.6", @@ -50,6 +50,6 @@ "typescript": "^3.7.5" }, "typings": "src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844", + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901", "main": "./src/index.js" } \ No newline at end of file diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/abstractAstView.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/abstractAstView.ts index 0febc41dc1..8af8cf7994 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/abstractAstView.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/abstractAstView.ts @@ -22,7 +22,7 @@ export default class abstractAstView { file2: import "file1" as x; contract c{} therefore we have two contracts with the same name c. At the moment this is not handled because alias name "x" is not available in the current AST implementation thus can not be resolved. - Additionally the fullQuallified function names e.g. [contractName].[functionName](param1Type, param2Type, ... ) must be prefixed to + Additionally the fullQualified function names e.g. [contractName].[functionName](param1Type, param2Type, ... ) must be prefixed to fully support this and when inheritance is resolved it must include alias resolving e.g x.c = file1.c */ multipleContractsWithSameName = false @@ -36,14 +36,14 @@ export default class abstractAstView { * "functions": [ * { * "node": {}, // actual AST Node of the function - * "relevantNodes": [], // AST nodes in the function that are relevant for the anlysis of this function + * "relevantNodes": [], // AST nodes in the function that are relevant for the analysis of this function * "modifierInvocations": [], // Modifier invocation AST nodes that are applied on this function * "localVariables": [], // Local variable declaration nodes * "parameters": [] // Parameter types of the function in order of definition * "returns": [] // list of return vars as { type: ... , name: ... } * } * ], - * "modifiers": [], // Modifiers definded by the contract, format similar to functions + * "modifiers": [], // Modifiers defined by the contract, format similar to functions * "inheritsFrom": [], // Names of contract this one inherits from in order of definition * "stateVariables": [] // AST nodes of all State variables * } @@ -130,7 +130,7 @@ export default class abstractAstView { if (inheritsFrom) { currentContract.stateVariables = currentContract.stateVariables.concat(inheritsFrom.stateVariables) } else { - console.log('abstractAstView.js: could not find contract defintion inherited from ' + inheritsFromName) + console.log('abstractAstView.js: could not find contract definition inherited from ' + inheritsFromName) } }) } @@ -138,7 +138,7 @@ export default class abstractAstView { private setCurrentContract (contract: ContractHLAst): void { const name: string = getContractName(contract.node) if (this.contracts.map((c: ContractHLAst) => getContractName(c.node)).filter((n) => n === name).length > 0) { - console.log('abstractAstView.js: two or more contracts with the same name dectected, import aliases not supported at the moment') + console.log('abstractAstView.js: two or more contracts with the same name detected, import aliases not supported at the moment') this.multipleContractsWithSameName = true } this.currentContractIndex = (this.contracts.push(contract) - 1) diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts index e0cf9adac6..92eeeb639c 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts @@ -1,6 +1,6 @@ import category from './categories' import { - isInteraction, isEffect, isLocalCallGraphRelevantNode, getFullQuallyfiedFuncDefinitionIdent, + isInteraction, isEffect, isLocalCallGraphRelevantNode, getFullQualifiedFuncDefinitionIdent, isWriteOnStateVariable, isStorageVariableDeclaration, getFullQualifiedFunctionCallIdent, getCompilerVersion } from './staticAnalysisCommon' import algorithm from './algorithmCategories' @@ -36,7 +36,7 @@ export default class checksEffectsInteraction implements AnalyzerModule { contracts.forEach((contract) => { contract.functions.forEach((func) => { func['changesState'] = this.checkIfChangesState( - getFullQuallyfiedFuncDefinitionIdent( + getFullQualifiedFuncDefinitionIdent( contract.node, func.node, func.parameters @@ -49,7 +49,7 @@ export default class checksEffectsInteraction implements AnalyzerModule { }) contract.functions.forEach((func: FunctionHLAst) => { if (this.isPotentialVulnerableFunction(func, this.getContext(callGraph, contract, func))) { - const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) + const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters) let comments: string = (hasModifiers) ? 'Note: Modifiers are currently not considered by this static analysis.' : '' comments += (multipleContractsWithSameName) ? 'Note: Import aliases are currently not supported by this static analysis.' : '' warnings.push({ diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts index abbdb91807..430b4e0e14 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts @@ -1,7 +1,7 @@ import category from './categories' import { isLowLevelCall, isTransfer, isExternalDirectCall, isEffect, isLocalCallGraphRelevantNode, isSelfdestructCall, - isDeleteUnaryOperation, isPayableFunction, isConstructor, getFullQuallyfiedFuncDefinitionIdent, hasFunctionBody, + isDeleteUnaryOperation, isPayableFunction, isConstructor, getFullQualifiedFuncDefinitionIdent, hasFunctionBody, isConstantFunction, isWriteOnStateVariable, isStorageVariableDeclaration, isCallToNonConstLocalFunction, getFullQualifiedFunctionCallIdent } from './staticAnalysisCommon' @@ -50,7 +50,7 @@ export default class constantFunctions implements AnalyzerModule { func['potentiallyshouldBeConst'] = false } else { func['potentiallyshouldBeConst'] = this.checkIfShouldBeConstant( - getFullQuallyfiedFuncDefinitionIdent( + getFullQualifiedFuncDefinitionIdent( contract.node, func.node, func.parameters @@ -65,7 +65,7 @@ export default class constantFunctions implements AnalyzerModule { }) contract.functions.filter((func: FunctionHLAst) => hasFunctionBody(func.node)).forEach((func: FunctionHLAst) => { if (isConstantFunction(func.node) !== func['potentiallyshouldBeConst']) { - const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) + const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters) let comments: string = (hasModifiers) ? 'Note: Modifiers are currently not considered by this static analysis.' : '' comments += (multipleContractsWithSameName) ? 'Note: Import aliases are currently not supported by this static analysis.' : '' if (func['potentiallyshouldBeConst']) { diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts index a83666d68b..017f50e9fa 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts @@ -3,7 +3,7 @@ import { FunctionHLAst, ContractHLAst, FunctionCallGraph, ContractCallGraph, Context, FunctionCallAstNode } from '../../types' import { isLocalCallGraphRelevantNode, isExternalDirectCall, getFullQualifiedFunctionCallIdent, - getFullQuallyfiedFuncDefinitionIdent, getContractName + getFullQualifiedFuncDefinitionIdent as getFullQualifiedFuncDefinitionIdent, getContractName } from './staticAnalysisCommon' type filterNodesFunction = (node: FunctionCallAstNode) => boolean @@ -39,7 +39,7 @@ function buildLocalFuncCallGraphInternal (functions: FunctionHLAst[], nodeFilter * } * }, * "foo": { - * "contract": {...}, // Contract node as definded in abstractAstView.js + * "contract": {...}, // Contract node as defined in abstractAstView.js * "functions": {} // map from full qualified function name to func node * } * } @@ -52,7 +52,7 @@ export function buildGlobalFuncCallGraph (contracts: ContractHLAst[]): Record { const filterNodes: filterNodesFunction = (node: FunctionCallAstNode) => { return isLocalCallGraphRelevantNode(node) || isExternalDirectCall(node) } const getNodeIdent: NodeIdentFunction = (node: FunctionCallAstNode) => { return getFullQualifiedFunctionCallIdent(contract.node, node) } - const getFunDefIdent: FunDefIdentFunction = (funcDef: FunctionHLAst) => { return getFullQuallyfiedFuncDefinitionIdent(contract.node, funcDef.node, funcDef.parameters) } + const getFunDefIdent: FunDefIdentFunction = (funcDef: FunctionHLAst) => { return getFullQualifiedFuncDefinitionIdent(contract.node, funcDef.node, funcDef.parameters) } callGraph[getContractName(contract.node)] = { contract: contract, functions: buildLocalFuncCallGraphInternal(contract.functions, filterNodes, getNodeIdent, getFunDefIdent) } }) diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts index 70588169d3..067a0743fe 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts @@ -1,5 +1,5 @@ import category from './categories' -import { hasFunctionBody, getFullQuallyfiedFuncDefinitionIdent, getEffectedVariableName } from './staticAnalysisCommon' +import { hasFunctionBody, getFullQualifiedFuncDefinitionIdent, getEffectedVariableName } from './staticAnalysisCommon' import algorithm from './algorithmCategories' import AbstractAst from './abstractAstView' import { @@ -28,7 +28,7 @@ export default class noReturn implements AnalyzerModule { contracts.forEach((contract: ContractHLAst) => { contract.functions.filter((func: FunctionHLAst) => hasFunctionBody(func.node)).forEach((func: FunctionHLAst) => { - const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) + const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters) if (this.hasNamedAndUnnamedReturns(func)) { warnings.push({ warning: `${funcName}: Mixing of named and unnamed return parameters is not advised.`, diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts index 35591dc8b1..19a9893b10 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts @@ -1,5 +1,5 @@ import category from './categories' -import { getDeclaredVariableName, getFullQuallyfiedFuncDefinitionIdent } from './staticAnalysisCommon' +import { getDeclaredVariableName, getFullQualifiedFuncDefinitionIdent } from './staticAnalysisCommon' import algorithm from './algorithmCategories' import AbstractAst from './abstractAstView' import { get } from 'fast-levenshtein' @@ -35,7 +35,7 @@ export default class similarVariableNames implements AnalyzerModule { contracts.forEach((contract) => { contract.functions.forEach((func) => { - const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) + const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters) let hasModifiersComments = '' if (hasModifiers) { hasModifiersComments = 'Note: Modifiers are currently not considered by this static analysis.' diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts index 9818c4a925..10a4a1761a 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts @@ -181,7 +181,7 @@ function getFunctionCallType (func: FunctionCallAstNode): string { /** * Get the variable name written to by a effect node, except for inline assembly because there is no information to find out where we write to. Trows if not a effect node or is inlineassmbly. * Example: x = 10; => x - * @effectNode {ASTNode} Assignmnet node + * @effectNode {ASTNode} Assignment node * @return {string} variable name written to */ function getEffectedVariableName (effectNode: AssignmentAstNode | UnaryOperationAstNode): string { @@ -439,8 +439,8 @@ function getFullQualifiedFunctionCallIdent (contract: ContractDefinitionAstNode, else throw new Error('staticAnalysisCommon.js: Can not get function name from non function call node') } -function getFullQuallyfiedFuncDefinitionIdent (contract: ContractDefinitionAstNode, func: FunctionDefinitionAstNode, paramTypes: any[]): string { - return getContractName(contract) + '.' + getFunctionDefinitionName(func) + '(' + util.concatWithSeperator(paramTypes, ',') + ')' +function getFullQualifiedFuncDefinitionIdent (contract: ContractDefinitionAstNode, func: FunctionDefinitionAstNode, paramTypes: any[]): string { + return getContractName(contract) + '.' + getFunctionDefinitionName(func) + '(' + util.concatWithSeparator(paramTypes, ',') + ')' } function getUnAssignedTopLevelBinOps (subScope: BlockAstNode | IfStatementAstNode | WhileStatementAstNode | ForStatementAstNode): ExpressionStatementAstNode[] { @@ -630,7 +630,7 @@ function isStateVariable (name: string, stateVariables: VariableDeclarationAstNo } /** - * True if is function definition that is flaged as constant + * True if is function definition that is flagged as constant * @node {ASTNode} some AstNode * @return {bool} */ @@ -639,7 +639,7 @@ function isConstantFunction (node: FunctionDefinitionAstNode): boolean { } /** -* True if variable decalaration is converted into a getter method +* True if variable declaration is converted into a getter method * @node {ASTNode} variable declaration AstNode * @return {bool} */ @@ -1059,11 +1059,11 @@ function findFirstSubNodeLTR (node: any, type: string): any { */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function buildFunctionSignature (paramTypes: any[], returnTypes: any[], isPayable: boolean, additionalMods?: any): string { - return 'function (' + util.concatWithSeperator(paramTypes, ',') + ')' + ((isPayable) ? ' payable' : '') + ((additionalMods) ? ' ' + additionalMods : '') + ((returnTypes.length) ? ' returns (' + util.concatWithSeperator(returnTypes, ',') + ')' : '') + return 'function (' + util.concatWithSeparator(paramTypes, ',') + ')' + ((isPayable) ? ' payable' : '') + ((additionalMods) ? ' ' + additionalMods : '') + ((returnTypes.length) ? ' returns (' + util.concatWithSeparator(returnTypes, ',') + ')' : '') } function buildAbiSignature (funName: string, paramTypes: any[]): string { - return funName + '(' + util.concatWithSeperator(paramTypes, ',') + ')' + return funName + '(' + util.concatWithSeparator(paramTypes, ',') + ')' } // To create the method signature similar to contract.evm.gasEstimates.external object @@ -1157,7 +1157,7 @@ export { getLibraryCallContractName, getLibraryCallMemberName, getFullQualifiedFunctionCallIdent, - getFullQuallyfiedFuncDefinitionIdent, + getFullQualifiedFuncDefinitionIdent as getFullQualifiedFuncDefinitionIdent, getStateVariableDeclarationsFromContractNode, getFunctionOrModifierDefinitionParameterPart, getFunctionDefinitionReturnParameterPart, diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts index 57c02b84dd..27afa2baaa 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts @@ -25,7 +25,7 @@ export default class stringBytesLength implements AnalyzerModule { const version = getCompilerVersion(compilationResults.contracts) if (this.stringToBytesConversions.length > 0 && this.bytesLengthChecks.length > 0) { return [{ - warning: '"bytes" and "string" lengths are not the same since strings are assumed to be UTF-8 encoded (according to the ABI defintion) therefore one character is not nessesarily encoded in one byte of data.', + warning: '"bytes" and "string" lengths are not the same since strings are assumed to be UTF-8 encoded (according to the ABI definition) therefore one character is not necessarily encoded in one byte of data.', location: this.bytesLengthChecks[0].src, more: `https://solidity.readthedocs.io/en/${version}/abi-spec.html#argument-encoding` }] diff --git a/libs/remix-analyzer/src/types.ts b/libs/remix-analyzer/src/types.ts index c15352eb2e..36d795e605 100644 --- a/libs/remix-analyzer/src/types.ts +++ b/libs/remix-analyzer/src/types.ts @@ -122,7 +122,7 @@ export interface ContractCallGraph { } /// ////////////////////////////////////////////////////////// -/// ////////// Specfic AST Nodes ///////////////////////////// +/// ////////// Specific AST Nodes //////////////////////////// /// ////////////////////////////////////////////////////////// interface TypeDescription { diff --git a/libs/remix-analyzer/test/analysis/staticAnalysisCommon-test.ts b/libs/remix-analyzer/test/analysis/staticAnalysisCommon-test.ts index 859dfe9758..4dd79d9689 100644 --- a/libs/remix-analyzer/test/analysis/staticAnalysisCommon-test.ts +++ b/libs/remix-analyzer/test/analysis/staticAnalysisCommon-test.ts @@ -286,11 +286,11 @@ test('staticAnalysisCommon.getFullQualifiedFunctionCallIdent', function (t) { t.throws(() => common.getFullQualifiedFunctionCallIdent(contractDefinition, assignment), new RegExp('staticAnalysisCommon.js: Can not get function name from non function call node'), 'throws on wrong type') }) -test('staticAnalysisCommon.getFullQuallyfiedFuncDefinitionIdent', function (t) { +test('staticAnalysisCommon.getFullQualifiedFuncDefinitionIdent', function (t) { t.plan(3) - t.ok(common.getFullQuallyfiedFuncDefinitionIdent(contractDefinition, functionDefinition, ['uint256', 'bool']) === 'C.f(uint256,bool)', 'creates right signature') - t.throws(() => common.getFullQuallyfiedFuncDefinitionIdent(contractDefinition, parameterFunctionCall, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a FunctionDefinition Node'), 'throws on wrong nodes') - t.throws(() => common.getFullQuallyfiedFuncDefinitionIdent(parameterFunctionCall, functionDefinition, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a ContractDefinition Node'), 'throws on wrong nodes') + t.ok(common.getFullQualifiedFuncDefinitionIdent(contractDefinition, functionDefinition, ['uint256', 'bool']) === 'C.f(uint256,bool)', 'creates right signature') + t.throws(() => common.getFullQualifiedFuncDefinitionIdent(contractDefinition, parameterFunctionCall, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a FunctionDefinition Node'), 'throws on wrong nodes') + t.throws(() => common.getFullQualifiedFuncDefinitionIdent(parameterFunctionCall, functionDefinition, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a ContractDefinition Node'), 'throws on wrong nodes') }) test('staticAnalysisCommon.getSplittedTypeDesc', function (t) { diff --git a/libs/remix-astwalker/package.json b/libs/remix-astwalker/package.json index d60d44cce3..ff25025c3b 100644 --- a/libs/remix-astwalker/package.json +++ b/libs/remix-astwalker/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-astwalker", - "version": "0.0.70", + "version": "0.0.72", "description": "Tool to walk through Solidity AST", "main": "src/index.js", "scripts": { @@ -37,7 +37,7 @@ "@ethereumjs/tx": "^4.1.1", "@ethereumjs/util": "^8.0.5", "@ethereumjs/vm": "^6.4.1", - "@remix-project/remix-lib": "^0.5.47", + "@remix-project/remix-lib": "^0.5.49", "@types/tape": "^4.2.33", "async": "^2.6.2", "ethers": "^5.4.2", @@ -53,6 +53,6 @@ "tap-spec": "^5.0.0" }, "typings": "src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844", + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts index 50b9b08bb2..649044250e 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -142,7 +142,7 @@ export class CompilerImports extends Plugin { /** * import the content of @arg url. - * first look in the browser localstorage (browser explorer) or locahost explorer. if the url start with `browser/*` or `localhost/*` + * first look in the browser localstorage (browser explorer) or localhost explorer. if the url start with `browser/*` or `localhost/*` * then check if the @arg url is located in the localhost, in the node_modules or installed_contracts folder * then check if the @arg url match any external url * @@ -185,14 +185,14 @@ export class CompilerImports extends Plugin { } else { const localhostProvider = await this.call('fileManager', 'getProviderByName', 'localhost') if (localhostProvider.isConnected()) { - const splitted = /([^/]+)\/(.*)$/g.exec(url) + const split = /([^/]+)\/(.*)$/g.exec(url) const possiblePaths = ['localhost/installed_contracts/' + url] // pick remix-tests library contracts from '.deps' if (url.startsWith('remix_')) possiblePaths.push('localhost/.deps/remix-tests/' + url) - if (splitted) possiblePaths.push('localhost/installed_contracts/' + splitted[1] + '/contracts/' + splitted[2]) + if (split) possiblePaths.push('localhost/installed_contracts/' + split[1] + '/contracts/' + split[2]) possiblePaths.push('localhost/node_modules/' + url) - if (splitted) possiblePaths.push('localhost/node_modules/' + splitted[1] + '/contracts/' + splitted[2]) + if (split) possiblePaths.push('localhost/node_modules/' + split[1] + '/contracts/' + split[2]) for (const path of possiblePaths) { try { diff --git a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts index d004888a58..5303ec0f3f 100644 --- a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts +++ b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts @@ -30,12 +30,12 @@ export class FetchAndCompile extends Plugin { } /** - * Fetch compiliation metadata from source-Verify from a given @arg contractAddress - https://github.com/ethereum/source-verify + * Fetch compilation metadata from source-Verify from a given @arg contractAddress - https://github.com/ethereum/source-verify * Put the artifacts in the file explorer * Compile the code using Solidity compiler * Returns compilation data * - * @param {string} contractAddress - Address of the contrac to resolve + * @param {string} contractAddress - Address of the contract to resolve * @param {string} deployedBytecode - deployedBytecode of the contract * @param {string} targetPath - Folder where to save the compilation arfefacts * @return {CompilerAbstract} - compilation data targeting the given @arg contractAddress @@ -72,7 +72,7 @@ export class FetchAndCompile extends Plugin { compilationTargets, settings, async (url, cb) => { - // we first try to resolve the content from the compilation target using a more appropiate path + // we first try to resolve the content from the compilation target using a more appropriate path const path = `${targetPath}/${url}` if (compilationTargets[path] && compilationTargets[path].content) { return cb(null, compilationTargets[path].content) @@ -100,7 +100,7 @@ export class FetchAndCompile extends Plugin { compilationTargets, settings, async (url, cb) => { - // we first try to resolve the content from the compilation target using a more appropiate path + // we first try to resolve the content from the compilation target using a more appropriate path const path = `${targetPath}/${url}` if (compilationTargets[path] && compilationTargets[path].content) { return cb(null, compilationTargets[path].content) @@ -183,7 +183,7 @@ export class FetchAndCompile extends Plugin { compilationTargets, settings, async (url, cb) => { - // we first try to resolve the content from the compilation target using a more appropiate path + // we first try to resolve the content from the compilation target using a more appropriate path const path = `${targetPath}/${url}` if (compilationTargets[path] && compilationTargets[path].content) { return cb(null, compilationTargets[path].content) diff --git a/libs/remix-core-plugin/src/lib/gist-handler.ts b/libs/remix-core-plugin/src/lib/gist-handler.ts index 5a1e04d98e..c3a53a75f1 100644 --- a/libs/remix-core-plugin/src/lib/gist-handler.ts +++ b/libs/remix-core-plugin/src/lib/gist-handler.ts @@ -114,10 +114,20 @@ export class GistHandler extends Plugin { return } + const gistIdWorkspace = 'gist ' + gistId + const workspaces = await this.call('filePanel', 'getWorkspaces') + const found = workspaces.find((workspace) => workspace.name === gistIdWorkspace) + if (found) { + await this.call('notification', 'alert', `workspace "${gistIdWorkspace}" already exist`) + return + } + await this.call('filePanel', 'createWorkspace', 'gist ' + gistId, '', true) + await this.call('filePanel', 'switchToWorkspace', { name: 'gist ' + gistId, isLocalHost: false }) + const obj: StringByString = {} Object.keys(data.files).forEach((element) => { const path = element.replace(/\.\.\./g, '/') - obj['/gist-' + gistId + '/' + path] = data.files[element] + obj['/' + path] = data.files[element] }) this.call('fileManager', 'setBatchFiles', obj, isElectron()? 'electron':'workspace', true, async (errorSavingFiles: any) => { if (errorSavingFiles) { diff --git a/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts b/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts index 0c416b2953..0c3946d51d 100644 --- a/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts +++ b/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts @@ -13,11 +13,11 @@ const profile = { export class OffsetToLineColumnConverter extends Plugin { lineBreakPositionsByContent: Record> sourceMappingDecoder: any - offsetConvertion: any + offsetConversion: any constructor () { super(profile) this.lineBreakPositionsByContent = {} - this.offsetConvertion = {} + this.offsetConversion = {} this.sourceMappingDecoder = sourceMappingDecoder } @@ -49,12 +49,12 @@ export class OffsetToLineColumnConverter extends Plugin { } const token = `${rawLocation.start}:${rawLocation.length}:${file}` - if (this.offsetConvertion[token]) { - return this.offsetConvertion[token] + if (this.offsetConversion[token]) { + return this.offsetConversion[token] } else { - const convertion = this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) - this.offsetConvertion[token] = convertion - return convertion + const conversion = this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) + this.offsetConversion[token] = conversion + return conversion } } @@ -74,7 +74,7 @@ export class OffsetToLineColumnConverter extends Plugin { */ clear () { this.lineBreakPositionsByContent = {} - this.offsetConvertion = {} + this.offsetConversion = {} } /** diff --git a/libs/remix-debug/package.json b/libs/remix-debug/package.json index 9d59b82013..fd0d5544a7 100644 --- a/libs/remix-debug/package.json +++ b/libs/remix-debug/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-debug", - "version": "0.5.40", + "version": "0.5.42", "description": "Tool to debug Ethereum transactions", "contributors": [ { @@ -26,10 +26,10 @@ "@ethereumjs/tx": "^4.1.1", "@ethereumjs/util": "^8.0.5", "@ethereumjs/vm": "^6.4.1", - "@remix-project/remix-astwalker": "^0.0.70", - "@remix-project/remix-lib": "^0.5.47", - "@remix-project/remix-simulator": "^0.2.40", - "@remix-project/remix-solidity": "^0.5.26", + "@remix-project/remix-astwalker": "^0.0.72", + "@remix-project/remix-lib": "^0.5.49", + "@remix-project/remix-simulator": "^0.2.42", + "@remix-project/remix-solidity": "^0.5.28", "ansi-gray": "^0.1.1", "async": "^2.6.2", "color-support": "^1.1.3", @@ -69,6 +69,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug#readme", "typings": "src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844", + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-debug/src/code/codeResolver.ts b/libs/remix-debug/src/code/codeResolver.ts index 94be135a5c..bdc5c9ecaa 100644 --- a/libs/remix-debug/src/code/codeResolver.ts +++ b/libs/remix-debug/src/code/codeResolver.ts @@ -10,8 +10,8 @@ export class CodeResolver { constructor ({ getCode, fork }) { this.getCode = getCode - this.bytecodeByAddress = {} // bytes code by contract addesses - this.instructionsByAddress = {} // assembly items instructions list by contract addesses + this.bytecodeByAddress = {} // bytes code by contract addresses + this.instructionsByAddress = {} // assembly items instructions list by contract addresses this.instructionsIndexByBytesOffset = {} // mapping between bytes offset and instructions index. this.fork = fork } diff --git a/libs/remix-debug/src/solidity-decoder/decodeInfo.ts b/libs/remix-debug/src/solidity-decoder/decodeInfo.ts index 23945164b4..e137311a34 100644 --- a/libs/remix-debug/src/solidity-decoder/decodeInfo.ts +++ b/libs/remix-debug/src/solidity-decoder/decodeInfo.ts @@ -229,7 +229,7 @@ function getEnum (type, stateDefinitions, contractName) { } /** - * retrieve memebers declared in the given @arg tye + * retrieve members declared in the given @arg tye * * @param {String} typeName - name of the struct type (e.g struct ) * @param {Object} stateDefinitions - all state definition given by the AST (including struct and enum type declaration) for all contracts @@ -264,7 +264,7 @@ function getStructMembers (type, stateDefinitions, contractName, location) { * parse the full type * * @param {String} fullType - type given by the AST (ex: uint[2] storage ref[2]) - * @return {String} returns the token type (used to instanciate the right decoder) (uint[2] storage ref[2] will return 'array', uint256 will return uintX) + * @return {String} returns the token type (used to instantiate the right decoder) (uint[2] storage ref[2] will return 'array', uint256 will return uintX) */ function typeClass (fullType) { fullType = removeLocation(fullType) diff --git a/libs/remix-debug/src/solidity-decoder/solidityProxy.ts b/libs/remix-debug/src/solidity-decoder/solidityProxy.ts index 462dad4d05..fd91e23195 100644 --- a/libs/remix-debug/src/solidity-decoder/solidityProxy.ts +++ b/libs/remix-debug/src/solidity-decoder/solidityProxy.ts @@ -122,7 +122,7 @@ export class SolidityProxy { } /** - * get the filename refering to the index from the compilation result + * get the filename referring to the index from the compilation result * * @param {Int} index - index of the filename * @param {Object} compilationResult - current compilation result diff --git a/libs/remix-debug/src/source/offsetToLineColumnConverter.ts b/libs/remix-debug/src/source/offsetToLineColumnConverter.ts index a1f296c76f..7e3fa38607 100644 --- a/libs/remix-debug/src/source/offsetToLineColumnConverter.ts +++ b/libs/remix-debug/src/source/offsetToLineColumnConverter.ts @@ -4,11 +4,11 @@ import { getLinebreakPositions, convertOffsetToLineColumn } from './sourceMappin export class OffsetToColumnConverter { lineBreakPositionsByContent sourceMappingDecoder - offsetConvertion + offsetConversion constructor (compilerEvent) { this.lineBreakPositionsByContent = {} - this.offsetConvertion = {} + this.offsetConversion = {} if (compilerEvent) { compilerEvent.register('compilationFinished', (success, data, source, input, version) => { this.clear() @@ -29,17 +29,17 @@ export class OffsetToColumnConverter { } } const token = `${rawLocation.start}:${rawLocation.length}:${file}` - if (this.offsetConvertion[token]) { - return this.offsetConvertion[token] + if (this.offsetConversion[token]) { + return this.offsetConversion[token] } else { - const convertion = convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) - this.offsetConvertion[token] = convertion - return convertion + const conversion = convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) + this.offsetConversion[token] = conversion + return conversion } } clear () { this.lineBreakPositionsByContent = {} - this.offsetConvertion = {} + this.offsetConversion = {} } } diff --git a/libs/remix-debug/src/storage/mappingPreimages.ts b/libs/remix-debug/src/storage/mappingPreimages.ts index f8ff563d46..e8ea6fcafb 100644 --- a/libs/remix-debug/src/storage/mappingPreimages.ts +++ b/libs/remix-debug/src/storage/mappingPreimages.ts @@ -5,7 +5,7 @@ import { sub } from '../solidity-decoder/types/util' * like { "" : { "": preimageOf1 }, { "": preimageOf2 }, ... } * * @param {Object} storage - storage given by storage Viewer (basically a mapping hashedkey : {key, value}) - * @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping). + * @param {Array} corrections - used in case the calculated sha3 has been modified before SSTORE (notably used for struct in mapping). * @param {Function} callback - callback * @return {Map} - solidity mapping location (e.g { "" : { "": preimageOf1 }, { "": preimageOf2 }, ... }) */ diff --git a/libs/remix-debug/src/storage/storageResolver.ts b/libs/remix-debug/src/storage/storageResolver.ts index c5522f37f9..f6606b86a0 100644 --- a/libs/remix-debug/src/storage/storageResolver.ts +++ b/libs/remix-debug/src/storage/storageResolver.ts @@ -35,13 +35,13 @@ export class StorageResolver { } /** - * compute the mappgings type locations for the current address (cached for a debugging session) + * compute the mappings type locations for the current address (cached for a debugging session) * note: that only retrieve the first 100 items. * * @param {Object} tx * @param {Int} stepIndex * @param {Object} address - storage - * @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping). + * @param {Array} corrections - used in case the calculated sha3 has been modified before SSTORE (notably used for struct in mapping). * @return {Function} - callback */ async initialPreimagesMappings (tx, stepIndex, address, corrections) { diff --git a/libs/remix-debug/src/trace/traceCache.ts b/libs/remix-debug/src/trace/traceCache.ts index af578c2568..d43d48cc70 100644 --- a/libs/remix-debug/src/trace/traceCache.ts +++ b/libs/remix-debug/src/trace/traceCache.ts @@ -40,7 +40,7 @@ export class TraceCache { this.memoryChanges = [] this.formattedMemory = {} this.storageChanges = [] - this.sstore = {} // all sstore occurence in the trace + this.sstore = {} // all sstore occurrences in the trace } pushSteps (index, currentCallIndex) { diff --git a/libs/remix-debug/test.ts b/libs/remix-debug/test.ts index 7ccb8bcc0f..e1e5b12946 100644 --- a/libs/remix-debug/test.ts +++ b/libs/remix-debug/test.ts @@ -1,4 +1,4 @@ -// TODO: this file shoudl be removed at some point +// TODO: this file should be removed at some point const CmdLine = require('./src/cmdline/index') // var compilation = require('./compilation.json') diff --git a/libs/remix-lib/package.json b/libs/remix-lib/package.json index 6ef8f9fb7a..72a2808445 100644 --- a/libs/remix-lib/package.json +++ b/libs/remix-lib/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-lib", - "version": "0.5.47", + "version": "0.5.49", "description": "Library to various Remix tools", "contributors": [ { @@ -55,6 +55,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme", "typings": "src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844", + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-lib/src/execution/txExecution.ts b/libs/remix-lib/src/execution/txExecution.ts index 3682d6c1db..b424093980 100644 --- a/libs/remix-lib/src/execution/txExecution.ts +++ b/libs/remix-lib/src/execution/txExecution.ts @@ -80,7 +80,7 @@ export function checkError (execResult, compiledContracts) { return ret } const exceptionError = execResult.errorMessage || '' - const error = `Error occured: ${execResult.errorMessage}.\n` + const error = `Error occurred: ${execResult.errorMessage}.\n` let msg = '' if (exceptionError.includes(errorCode.INVALID_OPCODE)) { msg = '\t\n\tThe execution might have thrown OR the EVM version used by the selected environment is not compatible with the compiler EVM version.\n' @@ -113,7 +113,7 @@ export function checkError (execResult, compiledContracts) { const decodedCustomErrorInputs = fn.decodeFunctionData(functionDesc, returnData) decodedCustomErrorInputsClean = {} let devdoc = {} - // "contract" reprensents the compilation result containing the NATSPEC documentation + // "contract" represents the compilation result containing the NATSPEC documentation if (contract && fn.functions && Object.keys(fn.functions).length) { const functionSignature = Object.keys(fn.functions)[0] // we check in the 'devdoc' if there's a developer documentation for this error diff --git a/libs/remix-lib/src/execution/txFormat.ts b/libs/remix-lib/src/execution/txFormat.ts index de6ec91357..5763406c57 100644 --- a/libs/remix-lib/src/execution/txFormat.ts +++ b/libs/remix-lib/src/execution/txFormat.ts @@ -32,7 +32,7 @@ export function encodeData (funABI, values, contractbyteCode) { /** * encode function / constructor parameters * -* @param {Object} params - input paramater of the function to call +* @param {Object} params - input parameter of the function to call * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Function} callback - callback */ @@ -94,7 +94,7 @@ export function encodeParams (params, funAbi, callback?) { /** * encode function call (function id + encoded parameters) * -* @param {Object} params - input paramater of the function to call +* @param {Object} params - input parameter of the function to call * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Function} callback - callback */ @@ -108,8 +108,8 @@ export function encodeFunctionCall (params, funAbi, callback) { /** * encode constructor creation and link with provided libraries if needed * -* @param {Object} contract - input paramater of the function to call -* @param {Object} params - input paramater of the function to call +* @param {Object} contract - input parameter of the function to call +* @param {Object} params - input parameter of the function to call * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Object} linkLibraries - contains {linkReferences} object which list all the addresses to be linked * @param {Object} linkReferences - given by the compiler, contains the proper linkReferences @@ -127,7 +127,7 @@ export function encodeConstructorCallAndLinkLibraries (contract, params, funAbi, /** * link with provided libraries if needed * -* @param {Object} contract - input paramater of the function to call +* @param {Object} contract - input parameter of the function to call * @param {Object} linkLibraries - contains {linkReferences} object which list all the addresses to be linked * @param {Object} linkReferences - given by the compiler, contains the proper linkReferences * @param {Function} callback - callback @@ -152,12 +152,12 @@ export function linkLibraries (contract, linkLibraries, linkReferences, callback } /** -* encode constructor creation and deploy librairies if needed +* encode constructor creation and deploy libraries if needed * * @param {String} contractName - current contract name -* @param {Object} contract - input paramater of the function to call +* @param {Object} contract - input parameter of the function to call * @param {Object} contracts - map of all compiled contracts. -* @param {Object} params - input paramater of the function to call +* @param {Object} params - input parameter of the function to call * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Function} callback - callback * @param {Function} callbackStep - callbackStep @@ -195,7 +195,7 @@ export function encodeConstructorCallAndDeployLibraries (contractName, contract, * @param {Object} contracts - map of all compiled contracts. * @param {Bool} isConstructor - isConstructor. * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. -* @param {Object} params - input paramater of the function to call +* @param {Object} params - input parameter of the function to call * @param {Function} callback - callback * @param {Function} callbackStep - callbackStep * @param {Function} callbackDeployLibrary - callbackDeployLibrary @@ -399,7 +399,7 @@ export function decodeResponse (response, fnabi) { const type = fnabi.outputs[i].type outputTypes.push(type.indexOf('tuple') === 0 ? makeFullTypeDefinition(fnabi.outputs[i]) : type) } - if (!response || !response.length) response = new Uint8Array(32 * fnabi.outputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not engouh data + if (!response || !response.length) response = new Uint8Array(32 * fnabi.outputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not enough data // decode data const abiCoder = new ethers.utils.AbiCoder() const decodedObj = abiCoder.decode(outputTypes, response) diff --git a/libs/remix-lib/src/execution/txListener.ts b/libs/remix-lib/src/execution/txListener.ts index 203a0b9b66..32f5427ebe 100644 --- a/libs/remix-lib/src/execution/txListener.ts +++ b/libs/remix-lib/src/execution/txListener.ts @@ -375,7 +375,7 @@ export class TxListener { _decodeInputParams (data, abi) { data = toBuffer(addHexPrefix(data)) - if (!data.length) data = new Uint8Array(32 * abi.inputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not engouh data + if (!data.length) data = new Uint8Array(32 * abi.inputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not enough data const inputTypes = [] for (let i = 0; i < abi.inputs.length; i++) { diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index c25eba2519..721ee7fc6c 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -181,7 +181,7 @@ async function tryTillReceiptAvailable (txhash: string, web3: Web3) { if (receipt) { if (!receipt.to && !receipt.contractAddress) { // this is a contract creation and the receipt doesn't contain a contract address. we have to keep polling... - console.log('this is a contract creation and the receipt does nott contain a contract address. we have to keep polling...') + console.log('this is a contract creation and the receipt does not contain a contract address. we have to keep polling...') } else return receipt } diff --git a/libs/remix-lib/src/hash.ts b/libs/remix-lib/src/hash.ts index 47334c1ce6..a12cc75d88 100644 --- a/libs/remix-lib/src/hash.ts +++ b/libs/remix-lib/src/hash.ts @@ -24,7 +24,7 @@ export const keccak = function(a: Buffer, bits: number = 256): Buffer { return toBuffer(keccak512(a)) } default: { - throw new Error(`Invald algorithm: keccak${bits}`) + throw new Error(`Invalid algorithm: keccak${bits}`) } } } diff --git a/libs/remix-lib/src/helpers/uiHelper.ts b/libs/remix-lib/src/helpers/uiHelper.ts index cab35f54a5..73e6df4053 100644 --- a/libs/remix-lib/src/helpers/uiHelper.ts +++ b/libs/remix-lib/src/helpers/uiHelper.ts @@ -40,8 +40,8 @@ export function tryConvertAsciiFormat (memorySlot) { * @param {Object} css3 - css inline declaration * @param {Object} ... * @return {String} css inline style - * if the key start with * the value is direcly appended to the inline style (which should be already inline style formatted) - * used if multiple occurences of the same key is needed + * if the key start with * the value is directly appended to the inline style (which should be already inline style formatted) + * used if multiple occurrences of the same key is needed */ export function formatCss (css1, css2) { let ret = '' diff --git a/libs/remix-lib/src/util.ts b/libs/remix-lib/src/util.ts index 894fed7649..3cefab792e 100644 --- a/libs/remix-lib/src/util.ts +++ b/libs/remix-lib/src/util.ts @@ -4,7 +4,7 @@ import { bufferToHex, setLengthLeft, toBuffer, addHexPrefix } from '@ethereumjs/ import stringSimilarity from 'string-similarity' /* - contains misc util: @TODO should be splitted + contains misc util: @TODO should be split - hex conversion - binary search - CALL related look up @@ -233,7 +233,7 @@ export function getinputParameters (value) { * Compare bytecode. return true if the code is equal (handle swarm hash and library references) * @param {String} code1 - the bytecode that is actually deployed (contains resolved library reference and a potentially different swarmhash) * @param {String} code2 - the bytecode generated by the compiler (contains unresolved library reference and a potentially different swarmhash) - this will return false if the generated bytecode is empty (asbtract contract cannot be deployed) + this will return false if the generated bytecode is empty (abstract contract cannot be deployed) * * @return {bool} */ @@ -286,8 +286,8 @@ export function groupBy (arr, key) { }, {}) } -export function concatWithSeperator (list, seperator) { - return list.reduce((sum, item) => sum + item + seperator, '').slice(0, -seperator.length) +export function concatWithSeparator (list, separator) { + return list.reduce((sum, item) => sum + item + separator, '').slice(0, -separator.length) } export function escapeRegExp (str) { @@ -305,10 +305,10 @@ function removeByIndex (code, index, length, emptyRef) { function removeImmutableReference (code1, code2) { try { - const refOccurence = code2.match(/7f0000000000000000000000000000000000000000000000000000000000000000/g) - if (!refOccurence) return code1 + const refOccurrence = code2.match(/7f0000000000000000000000000000000000000000000000000000000000000000/g) + if (!refOccurrence) return code1 let offset = 0 - refOccurence.map((value) => { + refOccurrence.map((value) => { offset = code2.indexOf(value, offset) code1 = removeByIndex(code1, offset, value.length, '7f0000000000000000000000000000000000000000000000000000000000000000') offset = offset + 1 diff --git a/libs/remix-lib/test/eventManager.ts b/libs/remix-lib/test/eventManager.ts index 3caa7a2e0f..3a3bfc07ff 100644 --- a/libs/remix-lib/test/eventManager.ts +++ b/libs/remix-lib/test/eventManager.ts @@ -4,26 +4,26 @@ import { EventManager } from '../src/eventManager' tape('eventManager', function (t) { t.test('eventManager', function (st) { const events = new EventManager() - const listenner = {} + const listener = {} let trace = '' - listenner['listen'] = function (data1) { + listener['listen'] = function (data1) { trace += data1 } const registeredFunction = function (data) { trace += data } - events.register('event1', listenner, listenner['listen']) + events.register('event1', listener, listener['listen']) events.register('event2', registeredFunction, null) events.trigger('event1', ['event1']) events.trigger('event2', ['event2']) st.equal(trace, 'event1event2') - events.unregister('event1', listenner['listen'], null) + events.unregister('event1', listener['listen'], null) st.equal(events.registered['event1'].length, 1) st.equal(events.registered['event2'].length, 1) - events.unregister('event1', listenner, listenner['listen']) + events.unregister('event1', listener, listener['listen']) st.equal(events.registered['event1'].length, 0) st.equal(events.registered['event2'].length, 1) diff --git a/libs/remix-lib/test/util.ts b/libs/remix-lib/test/util.ts index 61f31e0a9d..8e5ed75d3a 100644 --- a/libs/remix-lib/test/util.ts +++ b/libs/remix-lib/test/util.ts @@ -55,12 +55,12 @@ tape('util.groupBy on valid input', function (t) { t.deepEqual(result, expectedResult) }) -tape('util.concatWithSeperator valid output', function (t) { +tape('util.concatWithSeparator valid output', function (t) { t.plan(4) - t.notEqual(util.concatWithSeperator(['a', 'b', 'c'], ','), 'a, b, c', 'Concat with comma should not produce spaces') - t.equal(util.concatWithSeperator(['a', 'b', 'c'], ','), 'a,b,c', 'Concat with comma should not produce spaces') - t.equal(util.concatWithSeperator(['a', 'b', 'c'], ', '), 'a, b, c', 'Concat with comma space should not produce trailing comma') - t.equal(util.concatWithSeperator(['a', 'b', 'c'], '+'), 'a+b+c', 'Concat with plus') + t.notEqual(util.concatWithSeparator(['a', 'b', 'c'], ','), 'a, b, c', 'Concat with comma should not produce spaces') + t.equal(util.concatWithSeparator(['a', 'b', 'c'], ','), 'a,b,c', 'Concat with comma should not produce spaces') + t.equal(util.concatWithSeparator(['a', 'b', 'c'], ', '), 'a, b, c', 'Concat with comma space should not produce trailing comma') + t.equal(util.concatWithSeparator(['a', 'b', 'c'], '+'), 'a+b+c', 'Concat with plus') }) tape('util.escapeRegExp', function (t) { diff --git a/libs/remix-simulator/package.json b/libs/remix-simulator/package.json index eb75ec0a44..4a2f5299bc 100644 --- a/libs/remix-simulator/package.json +++ b/libs/remix-simulator/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-simulator", - "version": "0.2.40", + "version": "0.2.42", "description": "Ethereum IDE and tools for the web", "contributors": [ { @@ -22,7 +22,7 @@ "@ethereumjs/tx": "^4.1.1", "@ethereumjs/util": "^8.0.5", "@ethereumjs/vm": "^6.4.1", - "@remix-project/remix-lib": "^0.5.47", + "@remix-project/remix-lib": "^0.5.49", "ansi-gray": "^0.1.1", "async": "^3.1.0", "body-parser": "^1.18.2", @@ -70,6 +70,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme", "typings": "src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844", + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-simulator/src/methods/accounts.ts b/libs/remix-simulator/src/methods/accounts.ts index 00b8701da3..62a8411a0d 100644 --- a/libs/remix-simulator/src/methods/accounts.ts +++ b/libs/remix-simulator/src/methods/accounts.ts @@ -71,7 +71,8 @@ export class Web3Accounts { return { eth_accounts: this.eth_accounts.bind(this), eth_getBalance: this.eth_getBalance.bind(this), - eth_sign: this.eth_sign.bind(this) + eth_sign: this.eth_sign.bind(this), + eth_chainId: this.eth_chainId.bind(this) } } @@ -103,4 +104,8 @@ export class Web3Accounts { cb(null, data.signature) } + + eth_chainId (_payload, cb) { + return cb(null, '0x539') // 0x539 is hex of 1337 + } } diff --git a/libs/remix-solidity/package.json b/libs/remix-solidity/package.json index 4cc9dde35d..e2192d252a 100644 --- a/libs/remix-solidity/package.json +++ b/libs/remix-solidity/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-solidity", - "version": "0.5.26", + "version": "0.5.28", "description": "Tool to load and run Solidity compiler", "main": "src/index.js", "types": "src/index.d.ts", @@ -19,7 +19,7 @@ "@ethereumjs/tx": "^4.1.1", "@ethereumjs/util": "^8.0.5", "@ethereumjs/vm": "^6.4.1", - "@remix-project/remix-lib": "^0.5.47", + "@remix-project/remix-lib": "^0.5.49", "async": "^2.6.2", "eslint-scope": "^5.0.0", "ethers": "^5.4.2", @@ -57,5 +57,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity#readme", "typings": "src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844" + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901" } \ No newline at end of file diff --git a/libs/remix-solidity/src/compiler/types.ts b/libs/remix-solidity/src/compiler/types.ts index 6a6a74e7ce..89058af0cc 100644 --- a/libs/remix-solidity/src/compiler/types.ts +++ b/libs/remix-solidity/src/compiler/types.ts @@ -151,7 +151,7 @@ export interface CompilerInputOptions { remappings?: string[] } -export type EVMVersion = 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople' | 'petersburg' | 'istanbul' | 'berlin' | 'london' | 'paris' | null +export type EVMVersion = 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople' | 'petersburg' | 'istanbul' | 'berlin' | 'london' | 'paris' | 'shanghai' | 'cancun' | null export type Language = 'Solidity' | 'Yul' diff --git a/libs/remix-solidity/src/index.ts b/libs/remix-solidity/src/index.ts index b9db8be3be..eba07bb04e 100644 --- a/libs/remix-solidity/src/index.ts +++ b/libs/remix-solidity/src/index.ts @@ -1,6 +1,6 @@ export { Compiler } from './compiler/compiler' export { compile } from './compiler/compiler-helpers' -export { default as CompilerInput, getValidLanguage } from './compiler/compiler-input' +export { default as compilerInputFactory, getValidLanguage } from './compiler/compiler-input' export { CompilerAbstract } from './compiler/compiler-abstract' export * from './compiler/types' export { pathToURL, baseURLBin, baseURLWasm, canUseWorker, urlFromVersion } from './compiler/compiler-utils' diff --git a/libs/remix-tests/package.json b/libs/remix-tests/package.json index 1d20c5af16..98d1e1c9e8 100644 --- a/libs/remix-tests/package.json +++ b/libs/remix-tests/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-tests", - "version": "0.2.40", + "version": "0.2.42", "description": "Tool to test Solidity smart contracts", "main": "src/index.js", "types": "./src/index.d.ts", @@ -41,9 +41,9 @@ "@ethereumjs/tx": "^4.1.1", "@ethereumjs/util": "^8.0.5", "@ethereumjs/vm": "^6.4.1", - "@remix-project/remix-lib": "^0.5.47", - "@remix-project/remix-simulator": "^0.2.40", - "@remix-project/remix-solidity": "^0.5.26", + "@remix-project/remix-lib": "^0.5.49", + "@remix-project/remix-simulator": "^0.2.42", + "@remix-project/remix-solidity": "^0.5.28", "@remix-project/remix-url-resolver": "^0.0.42", "ansi-gray": "^0.1.1", "async": "^2.6.0", @@ -78,5 +78,5 @@ "typescript": "^3.3.1" }, "typings": "src/index.d.ts", - "gitHead": "157dfed16b362e8c8a729d541a3b5b0cbf147844" + "gitHead": "817089ab1f206f5e195756a4051afb812ec26901" } \ No newline at end of file diff --git a/libs/remix-tests/src/testRunner.ts b/libs/remix-tests/src/testRunner.ts index a7db1ebf9a..6dcdf239b0 100644 --- a/libs/remix-tests/src/testRunner.ts +++ b/libs/remix-tests/src/testRunner.ts @@ -71,13 +71,13 @@ function isNodeTypeIn (node: AstNode, typesList: string[]): boolean { } /** - * @dev Get overrided sender provided using natspec + * @dev Get overridden sender provided using natspec * @param userdoc method user documentation * @param signature signature * @param methodIdentifiers Object containing all methods identifier */ -function getOverridedSender (userdoc: UserDocumentation, signature: string, methodIdentifiers: Record ): string | null { +function getOverriddenSender (userdoc: UserDocumentation, signature: string, methodIdentifiers: Record ): string | null { const fullName: string | null = getFunctionFullName(signature, methodIdentifiers) const senderRegex = /#sender: account-+(\d)/g const accountIndex: RegExpExecArray | null = fullName && userdoc.methods[fullName] ? senderRegex.exec(userdoc.methods[fullName].notice) : null @@ -236,7 +236,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com let sender: string | null = null let hhLogs if (func.signature) { - sender = getOverridedSender(contractDetails.userdoc, func.signature, contractDetails.evm.methodIdentifiers) + sender = getOverriddenSender(contractDetails.userdoc, func.signature, contractDetails.evm.methodIdentifiers) if (opts.accounts && sender) { sender = opts.accounts[sender] } diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx index bff24b9072..4b95fa1cfc 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx @@ -1,4 +1,5 @@ import React, {useContext, useEffect, useState} from 'react' +import {FormattedMessage} from 'react-intl' import {AppContext} from '../../context/context' import {UsageTypes} from '../../types' import { type } from 'os' @@ -30,19 +31,19 @@ const EnterDialog = (props: EnterDialogProps) => { }} >
    -

    Welcome to Remix IDE

    +

    - In order to understand your needs better, we would like to know how you typically use Remix +
    - - - - + + + +
    diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx index 8580eadeb7..daad75b4b2 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx @@ -1,4 +1,5 @@ import React, {useContext, useEffect, useState} from 'react' +import {FormattedMessage} from 'react-intl' import {AppContext} from '../../context/context' import {useDialogDispatchers} from '../../context/provider' declare global { @@ -9,7 +10,7 @@ declare global { const _paq = (window._paq = window._paq || []) interface MatomoDialogProps { - okFn: () => void, + okFn: () => void hide: boolean } @@ -22,25 +23,41 @@ const MatomoDialog = (props: MatomoDialogProps) => { return ( <>

    - An Opt-in version of{' '} - - Matomo - - , an open source data analytics platform is being used to improve Remix IDE. + ( + + {chunks} + + ), + }} + />

    -

    We realize that our users have sensitive information in their code and that their privacy - your privacy - must be protected.

    - All data collected through Matomo is stored on our own server - no data is ever given to third parties. +

    -

    We do not collect nor store any personally identifiable information (PII).

    - For more info, see:{' '} - - Matomo Analytics on Remix iDE - - . + +

    +

    + +

    +

    + ( + + {chunks} + + ), + }} + /> +

    +

    +

    -

    You can change your choice in the Settings panel anytime.

    ) } @@ -49,12 +66,12 @@ const MatomoDialog = (props: MatomoDialogProps) => { if (visible && showMatamo) { modal({ id: 'matomoModal', - title: 'Help us to improve Remix IDE', + title: , message: message(), - okLabel: 'Accept', + okLabel: , okFn: handleModalOkClick, - cancelLabel: 'Decline', - cancelFn: declineModal + cancelLabel: , + cancelFn: declineModal, }) } }, [visible]) @@ -62,13 +79,13 @@ const MatomoDialog = (props: MatomoDialogProps) => { const declineModal = async () => { settings.updateMatomoAnalyticsChoice(false) // revoke tracking consent - _paq.push(['forgetConsentGiven']); + _paq.push(['forgetConsentGiven']) setVisible(false) } const handleModalOkClick = async () => { // user has given consent to process their data - _paq.push(['setConsentGiven']); + _paq.push(['setConsentGiven']) settings.updateMatomoAnalyticsChoice(true) setVisible(false) props.okFn() diff --git a/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx b/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx index 0732e2cb40..54a3c1d1b4 100644 --- a/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx @@ -1,4 +1,5 @@ import React, {useReducer} from 'react' +import {useIntl, IntlShape} from 'react-intl' import {modalActionTypes} from '../actions/modals' import {AlertModal, AppModal} from '../interface' import {modalReducer} from '../reducer/modals' @@ -6,6 +7,12 @@ import {ModalInitialState} from '../state/modals' import {ModalTypes} from '../types' import {AppContext, dispatchModalContext, modalContext, platformContext, onLineContext} from './context' +declare global { + interface Window { + _intl: IntlShape + } +} + export const ModalProvider = ({children = [], reducer = modalReducer, initialState = ModalInitialState} = {}) => { const [{modals, toasters, focusModal, focusToaster}, dispatch] = useReducer(reducer, initialState) @@ -43,9 +50,9 @@ export const ModalProvider = ({children = [], reducer = modalReducer, initialSta const alert = (modalData: AlertModal) => { return modal({ id: modalData.id, - title: modalData.title || 'Alert', + title: modalData.title || window._intl.formatMessage({id: 'remixApp.alert'}), message: modalData.message || modalData.title, - okLabel: 'OK', + okLabel: window._intl.formatMessage({id: 'remixApp.ok'}), okFn: (value?: any) => {}, cancelLabel: '', cancelFn: () => {} @@ -81,6 +88,7 @@ export const ModalProvider = ({children = [], reducer = modalReducer, initialSta } export const AppProvider = ({children = [], value = {}} = null) => { + window._intl = useIntl() return ( diff --git a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx index dd301671b6..c8a857c9f1 100644 --- a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx +++ b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx @@ -44,6 +44,7 @@ export const CopyToClipboard = (props: ICopyToClipboard) => { content = getContent && getContent() copyData() } + e.stopPropagation() e.preventDefault() } diff --git a/libs/remix-ui/drag-n-drop/src/lib/types/index.ts b/libs/remix-ui/drag-n-drop/src/lib/types/index.ts index 8bd4b0066a..c81cad0b5b 100644 --- a/libs/remix-ui/drag-n-drop/src/lib/types/index.ts +++ b/libs/remix-ui/drag-n-drop/src/lib/types/index.ts @@ -4,7 +4,7 @@ export interface FileType { path: string, name: string, isDirectory: boolean, - type: 'folder' | 'file' | 'gist', + type: 'folder' | 'file', child?: File[] } diff --git a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts index 2d58e9c84b..1b89b72af7 100644 --- a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts +++ b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts @@ -58,7 +58,7 @@ export function getBlockCompletionItems(range: monacoTypes.IRange, monaco): mona range, }, { - detail: '(bytes32): DEPRICATED In 0.4.22 use blockhash(uint) instead. Hash of the given block - only works for 256 most recent blocks excluding current', + detail: '(bytes32): DEPRECATED In 0.4.22 use blockhash(uint) instead. Hash of the given block - only works for 256 most recent blocks excluding current', insertText: 'blockhash(${1:blockNumber});', kind: monaco.languages.CompletionItemKind.Method, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, @@ -257,8 +257,8 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco { label: 'erc173', kind: monaco.languages.CompletionItemKind.Snippet, - insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control whitch\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}', - documentation: 'Draft: EIP-173: Implementation example, Contract Ownership Standard, A standard interface for ownership of contracts.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control whitch\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}', + insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control which\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}', + documentation: 'Draft: EIP-173: Implementation example, Contract Ownership Standard, A standard interface for ownership of contracts.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control which\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}', detail: 'generate ERC173-draft', insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, range @@ -359,7 +359,7 @@ export function getMsgCompletionItems(range: monacoTypes.IRange, monaco): monaco range }, { - detail: '(uint): remaining gas DEPRICATED in 0.4.21 use gasleft()', + detail: '(uint): remaining gas DEPRECATED in 0.4.21 use gasleft()', kind: monaco.languages.CompletionItemKind.Property, insertText: 'gas', label: 'gas', @@ -392,7 +392,7 @@ export function getMsgCompletionItems(range: monacoTypes.IRange, monaco): monaco export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { return [ { - detail: 'encode(..) returs (bytes): ABI-encodes the given arguments', + detail: 'encode(..) returns (bytes): ABI-encodes the given arguments', insertText: 'encode(${1:arg});', kind: monaco.languages.CompletionItemKind.Method, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, @@ -408,7 +408,7 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco range }, { - detail: 'encodePacked(..) returns (bytes): Performes packed encoding of the given arguments', + detail: 'encodePacked(..) returns (bytes): Performs packed encoding of the given arguments', insertText: 'encodePacked(${1:arg});', kind: monaco.languages.CompletionItemKind.Method, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, diff --git a/libs/remix-ui/editor/src/lib/remix-plugin-types.ts b/libs/remix-ui/editor/src/lib/remix-plugin-types.ts index 5ffa6696cf..9e55e5b55d 100644 --- a/libs/remix-ui/editor/src/lib/remix-plugin-types.ts +++ b/libs/remix-ui/editor/src/lib/remix-plugin-types.ts @@ -226,7 +226,7 @@ declare interface CondensedCompilationInput { optimize: boolean /** e.g: 0.6.8+commit.0bbfe453 */ version: string - evmVersion?: 'paris' | 'berlin' | 'istanbul' | 'petersburg' | 'constantinople' | 'byzantium' | 'spuriousDragon' | 'tangerineWhistle' | 'homestead' + evmVersion?: 'cancun' | 'shanghai' | 'paris' | 'berlin' | 'istanbul' | 'petersburg' | 'constantinople' | 'byzantium' | 'spuriousDragon' | 'tangerineWhistle' | 'homestead' } declare interface ContentImport { diff --git a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx index a93d1bb73b..300d418360 100644 --- a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx +++ b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx @@ -1,7 +1,9 @@ import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint-disable-line +import { FormattedMessage, useIntl } from 'react-intl' import { isArray } from 'lodash' import Editor, { loader, Monaco } from '@monaco-editor/react' import { AlertModal } from '@remix-ui/app' +import { QueryParams } from '@remix-project/remix-lib' import { reducerActions, reducerListener, initialState } from './actions/editor' import { solidityTokensProvider, solidityLanguageConfig } from './syntaxes/solidity' import { cairoTokensProvider, cairoLanguageConfig } from './syntaxes/cairo' @@ -90,6 +92,18 @@ type errorMarker = { loader.config({ paths: { vs: 'assets/js/monaco-editor/min/vs' } }) +const queryParams = new QueryParams() +// @ts-ignore +const queryLocale = queryParams.get().lang +const locales = { + zh: 'zh-cn', + en: '', + fr: 'fr', + it: 'it', + es: 'es' +} +loader.config({ "vs/nls": { availableLanguages: { "*": locales[queryLocale] || '' } } }) + export type DecorationsReturn = { currentDecorations: Array registeredDecorations?: Array @@ -130,6 +144,7 @@ export interface EditorUIProps { editorAPI: EditorAPIType } export const EditorUI = (props: EditorUIProps) => { + const intl = useIntl() const [, setCurrentBreakpoints] = useState({}) const defaultEditorValue = ` \t\t\t\t\t\t\t ____ _____ __ __ ___ __ __ ___ ____ _____ @@ -137,16 +152,16 @@ export const EditorUI = (props: EditorUIProps) => { \t\t\t\t\t\t\t| |_) | | _| | |\\/| | | | \\ / | | | | | | | _| \t\t\t\t\t\t\t| _ < | |___ | | | | | | / \\ | | | |_| | | |___ \t\t\t\t\t\t\t|_| \\_\\ |_____| |_| |_| |___| /_/\\_\\ |___| |____/ |_____|\n\n - \t\t\t\t\t\t\tKeyboard Shortcuts:\n - \t\t\t\t\t\t\t\tCTRL + S: Compile the current contract\n - \t\t\t\t\t\t\t\tCTRL + Shift + F : Open the File Explorer\n - \t\t\t\t\t\t\t\tCTRL + Shift + A : Open the Plugin Manager\n - \t\t\t\t\t\t\t\tCTRL + SHIFT + S: Compile the current contract & Run an associated script\n - \t\t\t\t\t\t\tEditor Keyboard Shortcuts:\n - \t\t\t\t\t\t\t\tCTRL + Alt + F : Format the code in the current file\n - \t\t\t\t\t\t\tImportant Links:\n - \t\t\t\t\t\t\t\tOfficial website about the Remix Project: https://remix-project.org/\n - \t\t\t\t\t\t\t\tOfficial documentation: https://remix-ide.readthedocs.io/en/latest/\n + \t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.keyboardShortcuts'})}:\n + \t\t\t\t\t\t\t\tCTRL + S: ${intl.formatMessage({id: 'editor.keyboardShortcuts.text1'})}\n + \t\t\t\t\t\t\t\tCTRL + Shift + F : ${intl.formatMessage({id: 'editor.keyboardShortcuts.text2'})}\n + \t\t\t\t\t\t\t\tCTRL + Shift + A : ${intl.formatMessage({id: 'editor.keyboardShortcuts.text3'})}\n + \t\t\t\t\t\t\t\tCTRL + SHIFT + S: ${intl.formatMessage({id: 'editor.keyboardShortcuts.text4'})}\n + \t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.editorKeyboardShortcuts'})}:\n + \t\t\t\t\t\t\t\tCTRL + Alt + F : ${intl.formatMessage({id: 'editor.editorKeyboardShortcuts.text1'})}\n + \t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.importantLinks'})}:\n + \t\t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.importantLinks.text1'})}: https://remix-project.org/\n + \t\t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.importantLinks.text2'})}: https://remix-ide.readthedocs.io/en/latest/\n \t\t\t\t\t\t\t\tGithub: https://github.com/ethereum/remix-project\n \t\t\t\t\t\t\t\tGitter: https://gitter.im/ethereum/remix\n \t\t\t\t\t\t\t\tMedium: https://medium.com/remix-ide\n @@ -614,27 +629,34 @@ export const EditorUI = (props: EditorUIProps) => { if (!pasteCodeRef.current && e && e.range && e.range.startLineNumber >= 0 && e.range.endLineNumber >= 0 && e.range.endLineNumber - e.range.startLineNumber > 10) { const modalContent: AlertModal = { id: 'newCodePasted', - title: 'Pasted Code Alert', + title: intl.formatMessage({id: 'editor.title1'}), message: (
    {' '} - You have just pasted a code snippet or contract in the editor. +
    - Make sure you fully understand this code before deploying or interacting with it. Don't get scammed! + +
    + {chunks}}} /> +
    +
    + +
    - Running untrusted code can put your wallet at risk . In a worst-case scenario, you could{' '} - lose all your money. +
    -
    If you don't fully understand it, please don't run this code.
    -
    If you are not a smart contract developer, ask someone you trust who has the skills to determine if this code is safe to use.
    - See{' '} - - {' '} - these recommendations{' '} - {' '} - for more information. + ( + + {chunks} + + ), + }} + />
    @@ -648,7 +670,7 @@ export const EditorUI = (props: EditorUIProps) => { // add context menu items const zoominAction = { id: 'zoomIn', - label: 'Zoom In', + label: intl.formatMessage({id: 'editor.zoomIn'}), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'zooming', // create a new grouping keybindings: [ @@ -661,7 +683,7 @@ export const EditorUI = (props: EditorUIProps) => { } const zoomOutAction = { id: 'zoomOut', - label: 'Zoom Out', + label: intl.formatMessage({id: 'editor.zoomOut'}), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'zooming', // create a new grouping keybindings: [ @@ -674,7 +696,7 @@ export const EditorUI = (props: EditorUIProps) => { } const formatAction = { id: 'autoFormat', - label: 'Format Code', + label: intl.formatMessage({id: 'editor.formatCode'}), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'formatting', // create a new grouping keybindings: [ @@ -690,17 +712,14 @@ export const EditorUI = (props: EditorUIProps) => { let gptGenerateDocumentationAction const executeGptGenerateDocumentationAction = { id: 'generateDocumentation', - label: 'Generate documentation for this function', + label: intl.formatMessage({id: 'editor.generateDocumentation'}), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'gtp', // create a new grouping keybindings: [], run: async () => { const file = await props.plugin.call('fileManager', 'getCurrentFile') const content = await props.plugin.call('fileManager', 'readFile', file) - const message = ` - solidity code: ${content} - Generate the documentation for the function ${currentFunction.current} using the Doxygen style syntax - ` + const message = intl.formatMessage({id: 'editor.generateDocumentationByAI'}, {content, currentFunction: currentFunction.current}) await props.plugin.call('openaigpt', 'message', message) _paq.push(['trackEvent', 'ai', 'openai', 'generateDocumentation']) }, @@ -709,17 +728,14 @@ export const EditorUI = (props: EditorUIProps) => { let gptExplainFunctionAction const executegptExplainFunctionAction = { id: 'explainFunction', - label: 'Explain this function', + label: intl.formatMessage({id: 'editor.explainFunction'}), contextMenuOrder: 1, // choose the order contextMenuGroupId: 'gtp', // create a new grouping keybindings: [], run: async () => { const file = await props.plugin.call('fileManager', 'getCurrentFile') const content = await props.plugin.call('fileManager', 'readFile', file) - const message = ` - solidity code: ${content} - Explain the function ${currentFunction.current} - ` + const message = intl.formatMessage({id: 'editor.explainFunctionByAI'}, {content, currentFunction: currentFunction.current}) await props.plugin.call('openaigpt', 'message', message) _paq.push(['trackEvent', 'ai', 'openai', 'explainFunction']) }, @@ -729,7 +745,7 @@ export const EditorUI = (props: EditorUIProps) => { let freeFunctionAction const executeFreeFunctionAction = { id: 'executeFreeFunction', - label: 'Run a free function', + label: intl.formatMessage({id: 'editor.executeFreeFunction'}), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'execute', // create a new grouping precondition: 'freeFunctionCondition', @@ -746,10 +762,10 @@ export const EditorUI = (props: EditorUIProps) => { const file = await props.plugin.call('fileManager', 'getCurrentFile') props.plugin.call('solidity-script', 'execute', file, freeFunctionNode.name) } else { - props.plugin.call('notification', 'toast', 'This can only execute free function') + props.plugin.call('notification', 'toast', intl.formatMessage({id: 'editor.toastText1'})) } } else { - props.plugin.call('notification', 'toast', 'Please go to Remix settings and activate the code editor features or wait that the current editor context is loaded.') + props.plugin.call('notification', 'toast', intl.formatMessage({id: 'editor.toastText2'})) } }, } @@ -787,15 +803,15 @@ export const EditorUI = (props: EditorUIProps) => { const { nodesAtPosition } = await retrieveNodesAtPosition(props.editorAPI, props.plugin) const freeFunctionNode = nodesAtPosition.find((node) => node.kind === 'freeFunction') if (freeFunctionNode) { - executeFreeFunctionAction.label = `Run the free function "${freeFunctionNode.name}"` + executeFreeFunctionAction.label = intl.formatMessage({id: 'editor.executeFreeFunction2'}, {name: freeFunctionNode.name}) freeFunctionAction = editor.addAction(executeFreeFunctionAction) } const functionImpl = nodesAtPosition.find((node) => node.kind === 'function') if (functionImpl) { currentFunction.current = functionImpl.name - executeGptGenerateDocumentationAction.label = `Generate documentation for the function "${functionImpl.name}"` + executeGptGenerateDocumentationAction.label = intl.formatMessage({id: 'editor.generateDocumentation2'}, {name: functionImpl.name}) gptGenerateDocumentationAction = editor.addAction(executeGptGenerateDocumentationAction) - executegptExplainFunctionAction.label = `Explain the function "${functionImpl.name}"` + executegptExplainFunctionAction.label = intl.formatMessage({id: 'editor.explainFunction2'}, {name: functionImpl.name}) gptExplainFunctionAction = editor.addAction(executegptExplainFunctionAction) } freeFunctionCondition.set(!!freeFunctionNode) @@ -889,7 +905,12 @@ export const EditorUI = (props: EditorUIProps) => { {editorModelsState[props.currentFile]?.readOnly && ( - The file is opened in read-only mode. + {chunks}, + }} + /> )} diff --git a/libs/remix-ui/editor/src/types/monaco.ts b/libs/remix-ui/editor/src/types/monaco.ts index e12fb2c859..8b5b78f350 100644 --- a/libs/remix-ui/editor/src/types/monaco.ts +++ b/libs/remix-ui/editor/src/types/monaco.ts @@ -9828,7 +9828,7 @@ declare namespace monaco.languages.typescript { */ getFormattingEditsAfterKeystroke( fileName: string, - postion: number, + position: number, ch: string, options: any ): Promise @@ -9838,7 +9838,7 @@ declare namespace monaco.languages.typescript { */ findRenameLocations( fileName: string, - positon: number, + position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean @@ -9848,7 +9848,7 @@ declare namespace monaco.languages.typescript { * @param options `typescript.RenameInfoOptions` * @returns `Promise` */ - getRenameInfo(fileName: string, positon: number, options: any): Promise + getRenameInfo(fileName: string, position: number, options: any): Promise /** * Get transpiled output for the given file. * @returns `typescript.EmitOutput` diff --git a/libs/remix-ui/file-decorators/src/lib/types/index.ts b/libs/remix-ui/file-decorators/src/lib/types/index.ts index bb84b6d26c..e78a1a4136 100644 --- a/libs/remix-ui/file-decorators/src/lib/types/index.ts +++ b/libs/remix-ui/file-decorators/src/lib/types/index.ts @@ -24,6 +24,6 @@ export interface FileType { path: string, name?: string, isDirectory?: boolean, - type?: 'folder' | 'file' | 'gist', + type?: 'folder' | 'file', child?: File[] } \ No newline at end of file diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index bb2e70b4b4..502f35579f 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -181,7 +181,7 @@ function HomeTabTitle() { className="border form-control border-right-0" id="homeTabSearchInput" placeholder={intl.formatMessage({id: 'home.searchDocumentation'})} - data-id="terminalInputSearch" + data-id="terminalInputSearchHome" /> {l2 && } - {remixMaintained && ( + {remixMaintained ? ( }> - - )} + ) + : (}> + + ) + } ) } diff --git a/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts b/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts index 672f2f45b4..11b656db0b 100644 --- a/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts +++ b/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts @@ -30,8 +30,8 @@ export interface CarouselProps { customButtonGroup?: React.ReactElement | null; infinite?: boolean; minimumTouchDrag?: number; // default 50px. The amount of distance to drag / swipe in order to move to the next slide. - afterChange?: (previousSlide: number, state: StateCallBack) => void; // Change callback after sliding everytime. `(previousSlide, currentState) => ...` - beforeChange?: (nextSlide: number, state: StateCallBack) => void; // Change callback before sliding everytime. `(previousSlide, currentState) => ...` + afterChange?: (previousSlide: number, state: StateCallBack) => void; // Change callback after sliding every time. `(previousSlide, currentState) => ...` + beforeChange?: (nextSlide: number, state: StateCallBack) => void; // Change callback before sliding every time. `(previousSlide, currentState) => ...` sliderClass?: string; // Use this to style your own track list. itemClass?: string; // Use this to style your own Carousel item. For example add padding-left and padding-right itemAriaLabel?: string; // Use this to add your own Carousel item aria-label.if it is not defined the child aria label will be applied if the child dont have one than a default empty string will be applied diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css index a7fa9b4da4..4ceded21fc 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css @@ -102,7 +102,7 @@ right: 180px; } .remixui_home_maintainedLabel { - top: 120px; + top: 118px; right: 180px; } diff --git a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx index d3a531b414..b94ad7db1c 100644 --- a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx +++ b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx @@ -26,24 +26,25 @@ export const ModalDialog = (props: ModalDialogProps) => { useEffect(() => { calledHideFunctionOnce.current = props.hide modal.current.focus() - }, [props.hide]) - useEffect(() => { - function handleBlur(e) { - if (!e.currentTarget.contains(e.relatedTarget)) { - e.stopPropagation() - if (document.activeElement !== this) { - !window.testmode && handleHide() - } - } - } if (modal.current) { + modal.current.removeEventListener('blur', handleBlur) modal.current.addEventListener('blur', handleBlur) } return () => { modal.current && modal.current.removeEventListener('blur', handleBlur) } - }, [modal.current]) + }, [props.hide]) + + function handleBlur(e) { + if (!e.currentTarget.contains(e.relatedTarget)) { + e.stopPropagation() + if (document.activeElement !== this) { + !window.testmode && handleHide() + !window.testmode && props.cancelFn && props.cancelFn() + } + } + } const modalKeyEvent = (keyCode) => { if (keyCode === 27) { diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 4f9c358010..6037ef5838 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -35,11 +35,14 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
    - {plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' && ( + {plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? ( }> - - )} + ) + : (}> + + ) + }
    } tooltipId="pluginInfoTooltip" tooltipClasses="text-nowrap"> diff --git a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx index a8fb287d01..2c0b61c9a8 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx @@ -17,7 +17,7 @@ function ActivePluginCard({profile, buttonText, deactivatePlugin}: PluginCardPro
    {profile.displayName || profile.name} - {profile?.maintainedBy?.toLowerCase() == 'remix' && ( + {profile?.maintainedBy?.toLowerCase() == 'remix' ? ( } > - - )} + ) + : (} + > + + ) + } {profile.documentation && (
    {profile.displayName || profile.name} - {profile?.maintainedBy?.toLowerCase() == 'remix' && ( + {profile?.maintainedBy?.toLowerCase() == 'remix' ? ( } > - - )} + ) + : (} + > + + ) + } {profile.documentation && ( { + const intl = useIntl() const {api, storage, contract, resetStorage} = props const [modalShown, setModalShown] = useState(false) const [state, setState] = useState({ @@ -23,41 +25,47 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { const storageService = async () => { if (contract.metadata === undefined || contract.metadata.length === 0) { modal( - 'Publish To Storage', - "This contract may be abstract, it may not implement an abstract parent's methods completely or it may not invoke an inherited contract's constructor correctly." + intl.formatMessage({id: 'publishToStorage.title1'}), + intl.formatMessage({id: 'publishToStorage.message1'}) ) } else { if (storage === 'swarm') { try { const result = await publishToSwarm(contract, api) - modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded)) + modal(intl.formatMessage({id: 'publishToStorage.title2'}, {name: contract.name}), publishMessage(result.uploaded)) } catch (err) { - modal('Swarm Publish Failed', publishMessageFailed(storage, err.message)) + modal(intl.formatMessage({id: 'publishToStorage.title3'}), publishMessageFailed(storage, err.message)) } } else { if (!api.config.get('settings/ipfs-url') && !modalShown) { modal( - 'IPFS Settings', + intl.formatMessage({id: 'publishToStorage.title4'}),
    - You have not set your own custom IPFS settings.

    +



    - We won’t be providing a public endpoint anymore for publishing your contracts to IPFS.

    Instead of that, 4 options are now available:

    +





      -
    • DEFAULT OPTION: Use the public INFURA node. This will not guarantee your data will persist.
    • +
    • - Use your own INFURA IPFS node. This requires a subscription.{' '} - - Learn more - + ( + + {chunks} + + ) + }} + />
    • -
    • Use any external IPFS which doesn’t require any authentification.
    • -
    • Use your own local ipfs node (which usually runs under http://localhost:5001)
    • +
    • +
    - You can update your IPFS settings in the SETTINGS tab. +

    - Now the default option will be used. +
    , async () => await ipfs(contract, api) ) @@ -76,9 +84,9 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { const ipfs = async (contract, api) => { try { const result = await publishToIPFS(contract, api) - modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded)) + modal(intl.formatMessage({id: 'publishToStorage.title2'}, {name: contract.name}), publishMessage(result.uploaded)) } catch (err) { - modal('IPFS Publish Failed', publishMessageFailed(storage, err.message)) + modal(intl.formatMessage({id: 'publishToStorage.title5'}), publishMessageFailed(storage, err.message)) } setModalShown(true) } @@ -86,7 +94,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { const publishMessage = (uploaded) => ( {' '} - Metadata and sources of "{contract.name.toLowerCase()}" were published successfully.
    +
             
    {uploaded.map((value, index) => ( @@ -101,7 +109,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { const publishMessageFailed = (storage, err) => ( - Failed to publish metadata file and sources to {storage}, please check the {storage} gateways is available.
    +
    {err}
    ) diff --git a/libs/remix-ui/renderer/src/lib/renderer.tsx b/libs/remix-ui/renderer/src/lib/renderer.tsx index f79cec142f..433c91f7ae 100644 --- a/libs/remix-ui/renderer/src/lib/renderer.tsx +++ b/libs/remix-ui/renderer/src/lib/renderer.tsx @@ -1,4 +1,5 @@ import React, {useEffect, useState} from 'react' //eslint-disable-line +import {useIntl} from 'react-intl' import {CopyToClipboard} from '@remix-ui/clipboard' import {helper} from '@remix-project/remix-solidity' import './renderer.css' @@ -11,6 +12,7 @@ interface RendererProps { } export const Renderer = ({message, opt = {}, plugin}: RendererProps) => { + const intl = useIntl() const [messageText, setMessageText] = useState(null) const [editorOptions, setEditorOptions] = useState({ useSpan: false, @@ -72,11 +74,7 @@ export const Renderer = ({message, opt = {}, plugin}: RendererProps) => { const askGtp = async () => { try { const content = await plugin.call('fileManager', 'readFile', editorOptions.errFile) - const message = ` - solidity code: ${content} - error message: ${messageText} - explain why the error occurred and how to fix it. - ` + const message = intl.formatMessage({id: 'solidity.openaigptMessage'}, {content, messageText}) await plugin.call('openaigpt', 'message', message) _paq.push(['trackEvent', 'ai', 'openai', 'explainSolidityError']) } catch (err) { diff --git a/libs/remix-ui/run-tab/src/lib/actions/account.ts b/libs/remix-ui/run-tab/src/lib/actions/account.ts index d2b7c52ebb..e210cfe48c 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/account.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/account.ts @@ -2,7 +2,7 @@ import { shortenAddress } from "@remix-ui/helper" import { RunTab } from "../types/run-tab" import { clearInstances, setAccount, setExecEnv } from "./actions" import { displayNotification, displayPopUp, fetchAccountsListFailed, fetchAccountsListRequest, fetchAccountsListSuccess, setMatchPassphrase, setPassphrase } from "./payload" -import { RunTabState } from "../types" +import { toChecksumAddress } from '@ethereumjs/util' export const updateAccountBalances = async (plugin: RunTab, dispatch: React.Dispatch) => { const accounts = plugin.REACT_API.accounts.loadedAccounts @@ -18,17 +18,12 @@ export const updateAccountBalances = async (plugin: RunTab, dispatch: React.Disp export const fillAccountsList = async (plugin: RunTab, dispatch: React.Dispatch) => { try { dispatch(fetchAccountsListRequest()) - const promise = plugin.blockchain.getAccounts() + try { + let accounts = await plugin.blockchain.getAccounts() + if (!accounts) accounts = [] - promise.then(async (accounts: string[]) => { const loadedAccounts = {} - - if (!accounts) accounts = [] - // allSettled is undefined.. - // so the current promise (all) will finish when: - // - all the promises resolve - // - at least one reject - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all + for (const account of accounts) { const balance = await plugin.blockchain.getBalanceInEther(account) loadedAccounts[account] = shortenAddress(account, balance) @@ -37,13 +32,12 @@ export const fillAccountsList = async (plugin: RunTab, dispatch: React.Dispatch< if (provider === 'injected') { const selectedAddress = plugin.blockchain.getInjectedWeb3Address() - - if (!(Object.keys(loadedAccounts).includes(selectedAddress))) setAccount(dispatch, null) + if (!(Object.keys(loadedAccounts).includes(toChecksumAddress(selectedAddress)))) setAccount(dispatch, null) } dispatch(fetchAccountsListSuccess(loadedAccounts)) - }).catch((e) => { + } catch (e) { dispatch(fetchAccountsListFailed(e.message)) - }) + } } catch (e) { dispatch(displayPopUp(`Cannot get account list: ${e}`)) } diff --git a/libs/remix-ui/run-tab/src/lib/actions/events.ts b/libs/remix-ui/run-tab/src/lib/actions/events.ts index bc8833172a..fddd679885 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -33,7 +33,6 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch) => { } setFinalContext(plugin, dispatch) fillAccountsList(plugin, dispatch) - updateAccountBalances(plugin, dispatch) }) plugin.blockchain.event.register('networkStatus', ({ error, network }) => { diff --git a/libs/remix-ui/run-tab/src/lib/actions/index.ts b/libs/remix-ui/run-tab/src/lib/actions/index.ts index 411180b34a..a2b44f9897 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/index.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/index.ts @@ -20,7 +20,7 @@ declare global { } const _paq = window._paq = window._paq || [] //eslint-disable-line -let plugin: RunTab, dispatch: React.Dispatch +let plugin: RunTab, dispatch: React.Dispatch = () => {} export const initRunTab = (udapp: RunTab) => async (reducerDispatch: React.Dispatch) => { plugin = udapp diff --git a/libs/remix-ui/run-tab/src/lib/components/account.tsx b/libs/remix-ui/run-tab/src/lib/components/account.tsx index 86e6132ca7..1ea87b2d12 100644 --- a/libs/remix-ui/run-tab/src/lib/components/account.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/account.tsx @@ -8,6 +8,7 @@ import {CustomTooltip} from '@remix-ui/helper' export function AccountUI(props: AccountProps) { const {selectedAccount, loadedAccounts} = props.accounts + const {selectExEnv, personalMode} = props const accounts = Object.keys(loadedAccounts) const [plusOpt, setPlusOpt] = useState({ classList: '', @@ -18,11 +19,14 @@ export function AccountUI(props: AccountProps) { const intl = useIntl() useEffect(() => { - if (!selectedAccount && accounts.length > 0) props.setAccount(accounts[0]) + if (accounts.length > 0 && !accounts.includes(selectedAccount)) { + props.setAccount(accounts[0]) + } }, [accounts, selectedAccount]) useEffect(() => { - switch (props.selectExEnv) { + props.setAccount('') + switch (selectExEnv) { case 'injected': setPlusOpt({ classList: 'udapp_disableMouseEvents', @@ -59,7 +63,7 @@ export function AccountUI(props: AccountProps) { break case 'web3': - if (!props.personalMode) { + if (!personalMode) { setPlusOpt({ classList: 'disableMouseEvents', title: intl.formatMessage({id: 'udapp.web3Title'}) @@ -75,11 +79,10 @@ export function AccountUI(props: AccountProps) { default: setPlusOpt({ classList: 'disableMouseEvents', - title: intl.formatMessage({id: 'udapp.defaultTitle'}, {selectExEnv: props.selectExEnv}) + title: intl.formatMessage({id: 'udapp.defaultTitle'}, {selectExEnv}) }) } - // this._deps.config.get('settings/personal-mode') - }, [props.selectExEnv, props.personalMode]) + }, [selectExEnv, personalMode]) const newAccount = () => { props.createNewBlockchainAccount(passphraseCreationPrompt()) @@ -90,7 +93,7 @@ export function AccountUI(props: AccountProps) { return props.tooltip(intl.formatMessage({id: 'udapp.tooltipText1'})) } - if (props.selectExEnv === 'web3') { + if (selectExEnv === 'web3') { return props.modal( intl.formatMessage({id: 'udapp.modalTitle1'}), , diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index c1a3e65c0d..afd6b7122a 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -49,7 +49,7 @@ export function ContractGUI(props: ContractGUIProps) { setTitle(props.funcABI.type === 'receive' ? '(receive)' : '(fallback)') } setBasicInput('') - // we have the reset the fields before reseting the previous references. + // we have the reset the fields before resetting the previous references. basicInputRef.current.value = '' multiFields.current.filter((el) => el !== null && el !== undefined).forEach((el) => (el.value = '')) multiFields.current = [] @@ -296,13 +296,12 @@ export function ContractGUI(props: ContractGUIProps) { : buttonOptions.title } > -
    +
    diff --git a/libs/remix-ui/run-tab/src/lib/types/blockchain.d.ts b/libs/remix-ui/run-tab/src/lib/types/blockchain.d.ts index b164468de8..a0b6bd0636 100644 --- a/libs/remix-ui/run-tab/src/lib/types/blockchain.d.ts +++ b/libs/remix-ui/run-tab/src/lib/types/blockchain.d.ts @@ -43,7 +43,7 @@ export class Blockchain extends Plugin { getProvider(): any; getInjectedWeb3Address(): any; /** - * return the fork name applied to the current envionment + * return the fork name applied to the current environment * @return {String} - fork name */ getCurrentFork(): string; diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index 5d73b628a7..0898fc76b3 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -61,7 +61,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { downloaded: [], compilerLicense: null, selectedVersion: null, - defaultVersion: 'soljson-v0.8.22+commit.4fc1097e.js', // this default version is defined: in makeMockCompiler (for browser test) + defaultVersion: 'soljson-v0.8.24+commit.e11b9ed9.js', // this default version is defined: in makeMockCompiler (for browser test) runs: '', compiledFileName: '', includeNightlies: false, @@ -411,8 +411,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => { const isSolFileSelected = (currentFile = '') => { if (!currentFile) currentFile = api.currentFile if (!currentFile) return false - const extention = currentFile.substr(currentFile.length - 3, currentFile.length) - return extention.toLowerCase() === 'sol' || extention.toLowerCase() === 'yul' + const extension = currentFile.substr(currentFile.length - 3, currentFile.length) + return extension.toLowerCase() === 'sol' || extension.toLowerCase() === 'yul' } const sessionSwitched = () => { diff --git a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx index 4410ab2155..adc4017986 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx @@ -176,7 +176,7 @@ export const ContractSelection = (props: ContractSelectionProps) => { 'compilerInput': 'Input to the Solidity compiler', 'functionHashes': 'List of declared function and their corresponding hash', 'gasEstimates': 'Gas estimation for each function call', - 'metadata': 'Contains all informations related to the compilation', + 'metadata': 'Contains all information related to the compilation', 'metadataHash': 'Hash representing all metadata information', 'abi': 'ABI: describing all the functions (input/output params, scope, ...)', 'name': 'Name of the compiled contract', diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index 0369ca930c..3a2c80dceb 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -28,7 +28,7 @@ export class CompileTabLogic { this.contentImport = contentImport this.event = new EventEmitter() this.compiler = new Compiler((url, cb) => api.resolveContentAndSave(url).then((result) => cb(null, result)).catch((error) => cb(error.message))) - this.evmVersions = ['default', 'shanghai', 'paris', 'london', 'berlin', 'istanbul', 'petersburg', 'constantinople', 'byzantium', 'spuriousDragon', 'tangerineWhistle', 'homestead'] + this.evmVersions = ['default', 'cancun', 'shanghai', 'paris', 'london', 'berlin', 'istanbul', 'petersburg', 'constantinople', 'byzantium', 'spuriousDragon', 'tangerineWhistle', 'homestead'] } init () { diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts index b4b0824ebb..7dadf6fa54 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts @@ -1,11 +1,14 @@ +import type {CompilationSource, AstNode} from '@remix-project/remix-solidity' + const IMPORT_SOLIDITY_REGEX = /^\s*import(\s+).*$/gm; const SPDX_SOLIDITY_REGEX = /^\s*\/\/ SPDX-License-Identifier:.*$/gm; -export function getDependencyGraph(ast, target) { +type Visited = { [key: string]: number } +export function getDependencyGraph(ast: { [name: string]: CompilationSource }, target: string, remappings: string[]) { const graph = tsort(); const visited = {}; visited[target] = 1; - _traverse(graph, visited, ast, target); + _traverse(graph, visited, ast, target, remappings); return graph; } @@ -21,32 +24,31 @@ export function concatSourceFiles(files: any[], sources: any) { return concat; } -function _traverse(graph, visited, ast, name) { +function _traverse(graph: Graph, visited: Visited, ast: { [name: string]: CompilationSource }, name: string, remappings: string[]) { let currentAst = null currentAst = ast[name].ast const dependencies = _getDependencies(currentAst); for (const dependency of dependencies) { - const path = resolve(name, dependency); + const path = resolve(name, dependency, remappings); if (path in visited) { // continue; // fixes wrong ordering of source in flattened file } visited[path] = 1; graph.add(name, path); - _traverse(graph, visited, ast, path); + _traverse(graph, visited, ast, path, remappings); } } -function _getDependencies(ast) { +function _getDependencies(ast: AstNode) { const dependencies = ast?.nodes .filter(node => node?.nodeType === 'ImportDirective') .map(node => node?.file); return dependencies; } - // TSORT -function tsort(initial?: any) { +function tsort(initial?: any): Graph { const graph = new Graph(); if (initial) { @@ -58,78 +60,88 @@ function tsort(initial?: any) { return graph; } +class Graph { + nodes: { [key: string]: any} + constructor() { + this.nodes = {} + } -function Graph() { - this.nodes = {}; -} - -// Add sorted items to the graph -Graph.prototype.add = function () { - const self = this; - // eslint-disable-next-line prefer-rest-params - let items = [].slice.call(arguments); - - if (items.length === 1 && Array.isArray(items[0])) - items = items[0]; - - items.forEach(function (item) { - if (!self.nodes[item]) { - self.nodes[item] = []; + // Add sorted items to the graph + add (name, path) { + const self = this; + // eslint-disable-next-line prefer-rest-params + let items = [].slice.call(arguments); + + if (items.length === 1 && Array.isArray(items[0])) + items = items[0]; + + items.forEach(function (item) { + if (!self.nodes[item]) { + self.nodes[item] = []; + } + }); + + for (let i = 1; i < items.length; i++) { + const from = items[i]; + const to = items[i - 1]; + + self.nodes[from].push(to); } - }); - - for (let i = 1; i < items.length; i++) { - const from = items[i]; - const to = items[i - 1]; - - self.nodes[from].push(to); + + return self; } - return self; -}; - -// Depth first search -// As given in http://en.wikipedia.org/wiki/Topological_sorting -Graph.prototype.sort = function () { - const self = this; - const nodes = Object.keys(this.nodes); - - const sorted = []; - const marks = {}; - - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - - if (!marks[node]) { - visit(node); + // Depth first search + // As given in http://en.wikipedia.org/wiki/Topological_sorting + sort () { + const self = this; + const nodes = Object.keys(this.nodes); + + const sorted = []; + const marks = {}; + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + + if (!marks[node]) { + visit(node); + } + } + + return sorted; + + function visit(node) { + if (marks[node] === 'temp') + throw new Error("There is a cycle in the graph. It is not possible to derive a topological sort."); + else if (marks[node]) + return; + + marks[node] = 'temp'; + self.nodes[node].forEach(visit); + marks[node] = 'perm'; + + sorted.push(node); } } - return sorted; - - function visit(node) { - if (marks[node] === 'temp') - throw new Error("There is a cycle in the graph. It is not possible to derive a topological sort."); - else if (marks[node]) - return; - - marks[node] = 'temp'; - self.nodes[node].forEach(visit); - marks[node] = 'perm'; - - sorted.push(node); + isEmpty () { + const nodes = Object.keys(this.nodes); + return nodes.length === 0; } -}; - -Graph.prototype.isEmpty = function () { - const nodes = Object.keys(this.nodes); - return nodes.length === 0; } - // PATH -function resolve(parentPath, childPath) { +function resolve(parentPath, childPath, remappings: string[]) { + if (remappings && remappings.length) { + for (const mapping of remappings) { + if (mapping.indexOf('=') !== -1) { + const split = mapping.split('=') + childPath = childPath.replace(split[0].trim(), split[1].trim()) + } + } + } + if (_isAbsolute(childPath)) { return childPath; } diff --git a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx index 2251fa1247..c3c48217e1 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx @@ -39,7 +39,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => { handleHide: null }, solJsonBinData: null, - defaultVersion: 'soljson-v0.8.22+commit.4fc1097e.js', // this default version is defined: in makeMockCompiler (for browser test) + defaultVersion: 'soljson-v0.8.24+commit.e11b9ed9.js', // this default version is defined: in makeMockCompiler (for browser test) }) const [currentVersion, setCurrentVersion] = useState('') const [hideWarnings, setHideWarnings] = useState(false) diff --git a/libs/remix-ui/solidity-uml-gen/src/types/index.ts b/libs/remix-ui/solidity-uml-gen/src/types/index.ts index 4359302642..a90b9340d6 100644 --- a/libs/remix-ui/solidity-uml-gen/src/types/index.ts +++ b/libs/remix-ui/solidity-uml-gen/src/types/index.ts @@ -1,5 +1,6 @@ import { ViewPlugin } from '@remixproject/engine-web' import { customAction } from '@remixproject/plugin-api' +import type {CompilerInput} from '@remix-project/remix-solidity' import React from 'react' export interface ISolidityUmlGen extends ViewPlugin { @@ -17,7 +18,7 @@ export interface ISolidityUmlGen extends ViewPlugin { updateComponent(state: any): JSX.Element setDispatch(dispatch: React.Dispatch): void generateCustomAction(action: customAction): Promise - flattenContract (source: any, filePath: string, data: any): Promise + flattenContract (source: any, filePath: string, data: any, input: CompilerInput): Promise hideSpinner(): void renderComponent (): void triggerGenerateUml: boolean diff --git a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx index 6ea63767d3..b11d1306ae 100644 --- a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx +++ b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx @@ -169,7 +169,7 @@ export const TabsUI = (props: TabsUIProps) => {
    @@ -666,7 +683,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { ) } else if (x.name === UNKNOWN_TRANSACTION) { return x.message - .filter((x) => x.tx.hash.includes(searchInput) || x.tx.from.includes(searchInput) || x.tx.to.includes(searchInput)) + .filter((x) => includeSearch(x, searchInput)) .map((trans) => { return (
    @@ -687,38 +704,41 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { ) }) } else if (x.name === KNOWN_TRANSACTION) { - return x.message.map((trans) => { - return ( -
    - {trans.tx.isCall ? ( - - ) : ( - - )} -
    - ) - }) + return x.message + .filter((x) => includeSearch(x, searchInput)) + .map((trans) => { + return ( +
    + {trans.tx.isCall ? ( + + ) : ( + + )} +
    + ) + }) } else if (Array.isArray(x.message)) { + if (searchInput !== '') return [] return x.message.map((msg, i) => { // strictly check condition on 0, false, except undefined, NaN. // if you type `undefined`, terminal automatically throws error, it's error message: "undefined" is not valid JSON diff --git a/libs/remix-ui/theme-module/types/theme-module.ts b/libs/remix-ui/theme-module/types/theme-module.ts index ac0b5db7cb..ed8a84cdab 100644 --- a/libs/remix-ui/theme-module/types/theme-module.ts +++ b/libs/remix-ui/theme-module/types/theme-module.ts @@ -36,7 +36,7 @@ export interface ThemeModule extends Plugin { */ switchTheme(themeName?: string): void; /** - * fixes the invertion for images since this should be adjusted when we switch between dark/light qualified themes + * fixes the inversion for images since this should be adjusted when we switch between dark/light qualified themes * @param {element} [image] - the dom element which invert should be fixed to increase visibility */ // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx index d548247d99..38514d149d 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx @@ -1,5 +1,6 @@ import {CustomTooltip} from '@remix-ui/helper' import React from 'react' +import { FormattedMessage } from 'react-intl' import BasicLogo from './BasicLogo' interface HomeProps { verticalIconPlugin: any @@ -7,7 +8,7 @@ interface HomeProps { function Home({verticalIconPlugin}: HomeProps) { return ( - + }>
    await verticalIconPlugin.activateHome()} diff --git a/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx b/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx index 63da76b412..cbb7353fb0 100644 --- a/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx +++ b/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx @@ -10,12 +10,13 @@ interface RemixUiVyperCompileDetailsProps { } export function RemixUiVyperCompileDetails({ payload, theme, themeStyle }: RemixUiVyperCompileDetailsProps) { - const dpayload = Object.values(payload) as any ?? {} - const bcode = dpayload[0].bytecode ? dpayload[0].bytecode.object : '' - const runtimeBcode = dpayload[0].runtimeBytecode ? dpayload[0].runtimeBytecode.object : '' - const ir = dpayload[0].ir - const methodIdentifiers= dpayload[0].methodIdentifiers - const abi= dpayload[0].abi + const compileResult = payload['compileResult'] ?? {} + console.log('compileResult', compileResult, payload) + const bcode = compileResult.bytecode ? compileResult.bytecode.object : '' + const runtimeBcode = compileResult.runtimeBytecode ? compileResult.runtimeBytecode.object : '' + const ir = compileResult.ir + const methodIdentifiers= compileResult.methodIdentifiers + const abi= compileResult.abi return ( <> ('abi') const tabContent = [ { diff --git a/libs/remix-ui/workspace/src/lib/actions/events.ts b/libs/remix-ui/workspace/src/lib/actions/events.ts index 932285bddf..b6e7200cc8 100644 --- a/libs/remix-ui/workspace/src/lib/actions/events.ts +++ b/libs/remix-ui/workspace/src/lib/actions/events.ts @@ -54,7 +54,6 @@ export const listenOnPluginEvents = (filePanelPlugin) => { }) plugin.on('fileManager', 'rootFolderChanged', async (path: string) => { - console.log('rootFolderChanged', path) rootFolderChanged(path) }) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 1395ae06d4..c8c754f241 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -5,11 +5,11 @@ import { customAction } from '@remixproject/plugin-api' import { displayNotification, displayPopUp, fetchDirectoryError, fetchDirectoryRequest, fetchDirectorySuccess, focusElement, fsInitializationCompleted, hidePopUp, removeInputFieldSuccess, setCurrentLocalFilePath, setCurrentWorkspace, setExpandPath, setMode, setWorkspaces } from './payload' import { listenOnPluginEvents, listenOnProviderEvents } from './events' import { createWorkspaceTemplate, getWorkspaces, loadWorkspacePreset, setPlugin, workspaceExists } from './workspace' -import { QueryParams } from '@remix-project/remix-lib' +import { QueryParams, Registry } from '@remix-project/remix-lib' import { fetchContractFromEtherscan } from '@remix-project/core-plugin' // eslint-disable-line import JSZip from 'jszip' import { Actions, FileTree } from '../types' -import {Registry} from '@remix-project/remix-lib' +import IpfsHttpClient from 'ipfs-http-client' export * from './events' export * from './workspace' @@ -22,6 +22,7 @@ let plugin, dispatch: React.Dispatch export type UrlParametersType = { gist: string, code: string, + shareCode: string, url: string, address: string opendir: string, @@ -71,11 +72,12 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. dispatch(setWorkspaces(workspaces)) } if (params.gist) { - await createWorkspaceTemplate('code-sample', 'gist-template') - plugin.setWorkspace({ name: 'code-sample', isLocalhost: false }) - dispatch(setCurrentWorkspace({ name: 'code-sample', isGitRepo: false })) + const name = 'gist ' + params.gist + await createWorkspaceTemplate(name, 'gist-template') + plugin.setWorkspace({ name, isLocalhost: false }) + dispatch(setCurrentWorkspace({ name, isGitRepo: false })) await loadWorkspacePreset('gist-template') - } else if (params.code || params.url) { + } else if (params.code || params.url || params.shareCode) { await createWorkspaceTemplate('code-sample', 'code-template') plugin.setWorkspace({ name: 'code-sample', isLocalhost: false }) dispatch(setCurrentWorkspace({ name: 'code-sample', isGitRepo: false })) @@ -223,11 +225,19 @@ export type SolidityConfiguration = { runs: string } -export const publishToGist = async (path?: string, type?: string) => { +export const publishToGist = async (path?: string) => { // If 'id' is not defined, it is not a gist update but a creation so we have to take the files from the browser explorer. const folder = path || '/' - const id = type === 'gist' ? extractNameFromKey(path).split('-')[1] : null + try { + let id + if (path) { + // check if the current folder is a gist folder + id = await plugin.call('filePanel', 'isGist', extractNameFromKey(path)) + } else { + // check if the current workspace is a gist workspace + id = await plugin.call('filePanel', 'isGist') + } const packaged = await packageGistFiles(folder) // check for token const config = plugin.registry.get('config').api @@ -310,7 +320,7 @@ export const createNewFile = async (path: string, rootDir: string) => { } } -export const setFocusElement = async (elements: { key: string, type: 'file' | 'folder' | 'gist' }[]) => { +export const setFocusElement = async (elements: { key: string, type: 'file' | 'folder' }[]) => { dispatch(focusElement(elements)) } @@ -359,7 +369,7 @@ export const downloadPath = async (path: string) => { try { await fileManager.download(path) } catch (error) { - dispatch(displayPopUp('Oops! An error ocurred while downloading.' + error)) + dispatch(displayPopUp('Oops! An error occurred while downloading.' + error)) } } @@ -369,7 +379,34 @@ export const copyFile = async (src: string, dest: string) => { try { await fileManager.copyFile(src, dest) } catch (error) { - dispatch(displayPopUp('Oops! An error ocurred while performing copyFile operation.' + error)) + dispatch(displayPopUp('Oops! An error occurred while performing copyFile operation.' + error)) + } +} + +export const copyShareURL = async (path: string) => { + const fileManager = plugin.fileManager + + try { + const host = '127.0.0.1' + const port = 5001 + const protocol = 'http' + // const projectId = '' + // const projectSecret = '' + // const auth = 'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64') + + const ipfs = IpfsHttpClient({ port, host, protocol + , headers: { + // authorization: auth + } + }) + + const fileContent = await fileManager.readFile(path) + const result = await ipfs.add(fileContent) + const hash = result.cid.string + const shareUrl = `${window.location.origin}/#shareCode=${hash}` + navigator.clipboard.writeText(shareUrl) + } catch (error) { + dispatch(displayPopUp('Oops! An error occurred while performing copyShareURL operation.' + error)) } } @@ -379,7 +416,7 @@ export const copyFolder = async (src: string, dest: string) => { try { await fileManager.copyDir(src, dest) } catch (error) { - dispatch(displayPopUp('Oops! An error ocurred while performing copyDir operation.' + error)) + dispatch(displayPopUp('Oops! An error occurred while performing copyDir operation.' + error)) } } @@ -398,10 +435,11 @@ export const emitContextMenuEvent = async (cmd: customAction) => { await plugin.call(cmd.id, cmd.name, cmd) } -export const handleClickFile = async (path: string, type: 'file' | 'folder' | 'gist') => { +export const handleClickFile = async (path: string, type: 'file' | 'folder' ) => { if (type === 'file' && path.endsWith('.md')) { // just opening the preview await plugin.call('doc-viewer' as any, 'viewDocs', [path]) + plugin.call('tabs' as any, 'focus', 'doc-viewer') } else { await plugin.fileManager.open(path) dispatch(focusElement([{ key: path, type }])) @@ -470,7 +508,7 @@ const packageGistFiles = async (directory) => { if (isFile) { try { workspaceProvider.get(directory, (error, content) => { - if (error) throw new Error('An error ocurred while getting file content. ' + directory) + if (error) throw new Error('An error occurred while getting file content. ' + directory) if (/^\s+$/.test(content) || !content.length) { content = '// this line is added to create a gist. Empty file is not allowed.' } @@ -488,11 +526,6 @@ const packageGistFiles = async (directory) => { if (/^\s+$/.test(content) || !content.length) { content = '// this line is added to create a gist. Empty file is not allowed.' } - if (path.indexOf('gist-') === 0) { - path = path.split('/') - path.shift() - path = path.join('/') - } path = path.replace(/\//g, '...') ret[path] = { content } }) @@ -563,7 +596,7 @@ export const moveFile = async (src: string, dest: string) => { try { await fileManager.moveFile(src, dest) } catch (error) { - dispatch(displayPopUp('Oops! An error ocurred while performing moveFile operation.' + error)) + dispatch(displayPopUp('Oops! An error occurred while performing moveFile operation.' + error)) } } @@ -573,7 +606,7 @@ export const moveFolder = async (src: string, dest: string) => { try { await fileManager.moveDir(src, dest) } catch (error) { - dispatch(displayPopUp('Oops! An error ocurred while performing moveDir operation.' + error)) + dispatch(displayPopUp('Oops! An error occurred while performing moveDir operation.' + error)) } } diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index 4bc4220107..b3f03a53ed 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -2,7 +2,8 @@ import React from 'react' import { bufferToHex } from '@ethereumjs/util' import { hash } from '@remix-project/remix-lib' import { TEMPLATE_METADATA, TEMPLATE_NAMES } from '../utils/constants' -import { TemplateType } from '../utils/types' +import { TemplateType } from '../types' +import IpfsHttpClient from 'ipfs-http-client' import axios, { AxiosResponse } from 'axios' import { addInputFieldSuccess, @@ -235,6 +236,7 @@ export const createWorkspaceTemplate = async (workspaceName: string, template: W export type UrlParametersType = { gist: string code: string + shareCode: string url: string language: string } @@ -258,6 +260,30 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe content = atob(decodeURIComponent(params.code)) await workspaceProvider.set(path, content) } + if (params.shareCode) { + const host = '127.0.0.1' + const port = 5001 + const protocol = 'http' + // const projectId = '' + // const projectSecret = '' + // const auth = 'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64') + + const ipfs = IpfsHttpClient({ port, host, protocol + , headers: { + // authorization: auth + } + }) + const hashed = bufferToHex(hash.keccakFromString(params.shareCode)) + + path = 'contract-' + hashed.replace('0x', '').substring(0, 10) + (params.language && params.language.toLowerCase() === 'yul' ? '.yul' : '.sol') + const fileData = ipfs.get(params.shareCode) + for await (const file of fileData) { + const fileContent = [] + for await (const chunk of file.content) fileContent.push(chunk) + content = Buffer.concat(fileContent).toString() + } + await workspaceProvider.set(path, content) + } if (params.url) { const data = await plugin.call('contentImport', 'resolve', params.url) @@ -273,7 +299,9 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe } return Object.keys(standardInput.sources)[0] } else { - await workspaceProvider.set(path, JSON.stringify(content)) + // preserve JSON whitepsace if this isn't a Solidity compiler JSON-input-output file + content = data.content + await workspaceProvider.set(path, content) } } catch (e) { console.log(e) @@ -309,11 +337,21 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe } const obj = {} - Object.keys(data.files).forEach((element) => { + for (const [element] of Object.entries(data.files)) { const path = element.replace(/\.\.\./g, '/') + let value + if (data.files[element].truncated) { + const response: AxiosResponse = await axios.get(data.files[element].raw_url) + value = { content: response.data } + } else { + value = { content: data.files[element].content } + } - obj['/' + 'gist-' + gistId + '/' + path] = data.files[element] - }) + if (data.files[element].type === 'application/json') { + obj['/' + path] = { content: JSON.stringify(value.content, null, '\t') } + } else + obj['/' + path] = value + } plugin.fileManager.setBatchFiles(obj, 'workspace', true, (errorLoadingFile) => { if (errorLoadingFile) { dispatch(displayNotification('', errorLoadingFile.message || errorLoadingFile, 'OK', null, () => {}, null)) @@ -574,6 +612,7 @@ export const getWorkspaces = async (): Promise<{ name: string; isGitRepo: boolea Object.keys(items) .filter((item) => items[item].isDirectory) .map(async (folder) => { + const name = folder.replace(workspacesPath + '/', '') const isGitRepo: boolean = await plugin.fileProviders.browser.exists('/' + folder + '/.git') const hasGitSubmodules: boolean = await plugin.fileProviders.browser.exists('/' + folder + '/.gitmodules') if (isGitRepo) { @@ -583,17 +622,19 @@ export const getWorkspaces = async (): Promise<{ name: string; isGitRepo: boolea branches = await getGitRepoBranches(folder) currentBranch = await getGitRepoCurrentBranch(folder) return { - name: folder.replace(workspacesPath + '/', ''), + name, isGitRepo, branches, currentBranch, - hasGitSubmodules + hasGitSubmodules, + isGist: null } } else { return { - name: folder.replace(workspacesPath + '/', ''), + name, isGitRepo, - hasGitSubmodules + hasGitSubmodules, + isGist: plugin.isGist(name) // plugin is filePanel } } }) @@ -662,7 +703,7 @@ export const cloneRepository = async (url: string) => { plugin.call('notification', 'modal', cloneModal) }) } catch (e) { - dispatch(displayPopUp('An error occured: ' + e)) + dispatch(displayPopUp('An error occurred: ' + e)) } } } diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx index 4fe50450ca..08659f64e8 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx @@ -28,6 +28,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => publishFolderToGist, copy, copyFileName, + copyShareURL, copyPath, paste, runScript, @@ -186,15 +187,15 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => break case 'Push changes to gist': _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'pushToChangesoGist']) - pushChangesToGist(path, type) + pushChangesToGist(path) break case 'Publish folder to gist': _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'publishFolderToGist']) - publishFolderToGist(path, type) + publishFolderToGist(path) break case 'Publish file to gist': _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'publishFileToGist']) - publishFileToGist(path, type) + publishFileToGist(path) break case 'Run': _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'runScript']) @@ -206,11 +207,15 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => break case 'Copy name': copyFileName(path, type) - _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'copy']) + _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'copyName']) break case 'Copy path': copyPath(path, type) - _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'copy']) + _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'copyPath']) + break + case 'Copy share URL': + copyShareURL(path, type) + _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'copyShareURL']) break case 'Paste': paste(path, type) @@ -222,7 +227,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => break case 'Publish Workspace to Gist': _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'publishWorkspace']) - publishFolderToGist(path, type) + publishFolderToGist(path) break default: _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', `${item.id}/${item.name}`]) diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer-hovericons.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer-hovericons.tsx new file mode 100644 index 0000000000..c6b299f66f --- /dev/null +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer-hovericons.tsx @@ -0,0 +1,100 @@ +import React, { useState } from 'react' +import { CustomTooltip } from '@remix-ui/helper' +import { FormattedMessage } from 'react-intl' + +export type FileHoverIconsProps = { + file: any + handleNewFolderOp?: any + handleNewFileOp?: any + renamePathOp?: (path: string, type: string, isNew?: boolean) => void + deletePathOp?: (path: string | string[]) => void | Promise +} + +export function FileHoverIcons(props: FileHoverIconsProps) { + const [mouseOver, setMouseOver] = useState(false) + return ( + <> + {
    + { + props.file.isDirectory ? ( + <> + } + tooltipId={`filePanel.createNewFolder.${props.file.path}`} + tooltipClasses="text-nowrap" + > + { + e.stopPropagation() + await props.handleNewFolderOp(props.file.path) + }} + style={{ cursor: mouseOver ? 'pointer' : 'default' }} + onMouseEnter={(e) => setMouseOver(true)} + onMouseLeave={(e) => setMouseOver(false)} + > + + } + tooltipId={`fileExplorer.createNewFile.${props.file.path}`} + tooltipClasses="text-nowrap" + > + { + e.stopPropagation() + await props.handleNewFileOp(props.file.path) + }} + style={{ cursor: mouseOver ? 'pointer' : 'default' }} + onMouseEnter={(e) => setMouseOver(true)} + onMouseLeave={(e) => setMouseOver(false)} + > + + + ) : null + } + } + tooltipId={`filePanel.rename.${props.file.path}`} + tooltipClasses="text-nowrap" + > + { + e.stopPropagation() + props.renamePathOp(props.file.path, props.file.type) + }} + style={{ cursor: mouseOver ? 'pointer' : 'default' }} + onMouseEnter={(e) => setMouseOver(true)} + onMouseLeave={(e) => setMouseOver(false)} + > + + } + tooltipId={`filePanel.deleteItem.${props.file.path}`} + tooltipClasses="text-nowrap" + > + { + e.stopPropagation() + await props.deletePathOp(props.file.path) + }} + style={{ cursor: mouseOver ? 'pointer' : 'default' }} + onMouseEnter={(e) => setMouseOver(true)} + onMouseLeave={(e) => setMouseOver(false)} + > + +
    + } + + ) +} diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx index 243f68e1a9..1ae9e7a9ad 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx @@ -26,13 +26,6 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => { placement: 'top', platforms:[appPlatformTypes.web, appPlatformTypes.desktop] }, - { - action: 'publishToGist', - title: 'Publish current workspace to GitHub gist', - icon: 'fab fa-github', - placement: 'top', - platforms:[appPlatformTypes.web] - }, { action: 'uploadFile', title: 'Upload files into current workspace', @@ -46,13 +39,6 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => { icon: 'far fa-folder-upload', placement: 'top', platforms:[appPlatformTypes.web] - }, - { - action: 'updateGist', - title: 'Update the current [gist] explorer', - icon: 'fab fa-github', - placement: 'bottom-start', - platforms:[appPlatformTypes.web] } ].filter( (item) => @@ -65,16 +51,6 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => { }) const enableDirUpload = {directory: '', webkitdirectory: ''} - useEffect(() => { - const actions = { - updateGist: () => {} - } - - setState((prevState) => { - return {...prevState, actions} - }) - }, []) - return ( (!global.fs.browser.isSuccessfulWorkspace ? null : <> @@ -165,7 +141,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => { props.createNewFile() } else if (action === 'createNewFolder') { props.createNewFolder() - } else if (action === 'publishToGist') { + } else if (action === 'publishToGist' || action == 'updateGist') { props.publishToGist() } else { state.actions[action]() diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx index 39e20428d4..c1ffe28bd5 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useRef, SyntheticEvent, useTransition } from 'react' // eslint-disable-line +import React, { useEffect, useState, useRef, SyntheticEvent } from 'react' // eslint-disable-line import { useIntl } from 'react-intl' import { TreeView } from '@remix-ui/tree-view' // eslint-disable-line import { FileExplorerMenu } from './file-explorer-menu' // eslint-disable-line @@ -27,12 +27,13 @@ export const FileExplorer = (props: FileExplorerProps) => { handleContextMenu, handleNewFileInput, handleNewFolderInput, + deletePath, uploadFile, uploadFolder, fileState } = props const [state, setState] = useState(workspaceState) - const [isPending, startTransition] = useTransition(); + // const [isPending, startTransition] = useTransition(); const treeRef = useRef(null) useEffect(() => { @@ -130,6 +131,7 @@ export const FileExplorer = (props: FileExplorerProps) => { const renamePath = async (oldPath: string, newPath: string) => { try { + if (oldPath === newPath) return props.dispatchRenamePath(oldPath, newPath) } catch (error) { props.modal( @@ -141,12 +143,12 @@ export const FileExplorer = (props: FileExplorerProps) => { } } - const publishToGist = (path?: string, type?: string) => { + const publishToGist = (path?: string) => { props.modal( intl.formatMessage({ id: 'filePanel.createPublicGist' }), intl.formatMessage({ id: 'filePanel.createPublicGistMsg4' }, { name }), intl.formatMessage({ id: 'filePanel.ok' }), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({ id: 'filePanel.cancel' }), () => { } ) @@ -171,7 +173,7 @@ export const FileExplorer = (props: FileExplorerProps) => { } } - const handleClickFolder = async (path: string, type: 'folder' | 'file' | 'gist') => { + const handleClickFolder = async (path: string, type: 'folder' | 'file' ) => { if (state.ctrlKey) { if (props.focusElement.findIndex((item) => item.key === path) !== -1) { const focusElement = props.focusElement.filter((item) => item.key !== path) @@ -404,6 +406,10 @@ export const FileExplorer = (props: FileExplorerProps) => { moveFile={handleFileMove} moveFolder={handleFolderMove} handleClickFolder={handleClickFolder} + createNewFile={props.createNewFile} + createNewFolder={props.createNewFolder} + deletePath={deletePath} + editPath={props.editModeOn} />
    diff --git a/libs/remix-ui/workspace/src/lib/components/flat-tree-drop.tsx b/libs/remix-ui/workspace/src/lib/components/flat-tree-drop.tsx index e1d7fc72c5..de274562f7 100644 --- a/libs/remix-ui/workspace/src/lib/components/flat-tree-drop.tsx +++ b/libs/remix-ui/workspace/src/lib/components/flat-tree-drop.tsx @@ -1,4 +1,4 @@ -import React, { SyntheticEvent, startTransition, useEffect, useRef, useState } from 'react' +import React, { SyntheticEvent, useEffect, useRef, useState } from 'react' import { FileType } from '../types' import { getEventTarget } from '../utils/getEventTarget' import { extractParentFromKey } from '@remix-ui/helper' @@ -23,7 +23,6 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => { const onDragOver = async (e: SyntheticEvent) => { e.preventDefault() const target = await getEventTarget(e) - if (!target || !target.path) { clearTimeout(timer) setFolderToOpen(null) @@ -36,7 +35,7 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => { setFolderToOpen(null) } if (dragDestination && dragDestination.isDirectory && !expandPath.includes(dragDestination.path) && folderToOpen !== dragDestination.path && props.handleClickFolder) { - + setFolderToOpen(dragDestination.path) timer && clearTimeout(timer) setTimer( @@ -61,7 +60,6 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => { } else { dragDestination = getFlatTreeItem(target.path) } - if (dragDestination.isDirectory) { if (dragSource.isDirectory) { moveFolder(dragDestination.path, dragSource.path) @@ -84,4 +82,4 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => { onDrop={onDrop} onDragOver={onDragOver} className="d-flex h-100" >{props.children}
    ) -} \ No newline at end of file +} diff --git a/libs/remix-ui/workspace/src/lib/components/flat-tree.tsx b/libs/remix-ui/workspace/src/lib/components/flat-tree.tsx index f86cd2873c..4bdddffe5b 100644 --- a/libs/remix-ui/workspace/src/lib/components/flat-tree.tsx +++ b/libs/remix-ui/workspace/src/lib/components/flat-tree.tsx @@ -7,6 +7,8 @@ import { FlatTreeItemInput } from './flat-tree-item-input'; import { FlatTreeDrop } from './flat-tree-drop'; import { getEventTarget } from '../utils/getEventTarget'; import { fileDecoration, FileDecorationIcons } from '@remix-ui/file-decorators'; +import { FileHoverIcons } from './file-explorer-hovericons'; +import { deletePath } from '../actions'; export default function useOnScreen(ref: RefObject) { @@ -36,6 +38,10 @@ interface FlatTreeProps { moveFile: (dest: string, src: string) => void moveFolder: (dest: string, src: string) => void fileState: fileDecoration[] + createNewFile?: any + createNewFolder?: any + deletePath?: (path: string | string[]) => void | Promise + editPath?: (path: string, type: string, isNew?: boolean) => void } let mouseTimer: any = { @@ -44,7 +50,7 @@ let mouseTimer: any = { } export const FlatTree = (props: FlatTreeProps) => { - const { files, flatTree, expandPath, focusEdit, editModeOff, handleTreeClick, moveFile, moveFolder, fileState, focusElement, handleClickFolder } = props + const { files, flatTree, expandPath, focusEdit, editModeOff, handleTreeClick, moveFile, moveFolder, fileState, focusElement, handleClickFolder, deletePath, editPath } = props const [hover, setHover] = useState('') const [mouseOverTarget, setMouseOverTarget] = useState<{ path: string, @@ -178,42 +184,62 @@ export const FlatTree = (props: FlatTreeProps) => { } }, [focusEdit]) + const showIcons = (file: FileType) => + file.path === hover && !isDragging ? ( +
    + +
    + ) : null const Row = (index: number) => { const node = Object.keys(flatTree)[index] const file = flatTree[node] - return (
  • setHover(file.path)} - onMouseOut={() => setHover(file.path)} - data-type={file.isDirectory ? 'folder' : 'file'} - data-path={`${file.path}`} - data-id={`treeViewLitreeViewItem${file.path}`} - > -
    - {getIndentLevelDiv(file.path)} - -
    - {focusEdit && file.path && focusEdit.element === file.path ? - : - <>
    - {file.name} + return ( +
  • { + setHover(file.path) + }} + onMouseOut={() => { + setHover('') + }} + data-type={file.isDirectory ? 'folder' : 'file'} + data-path={`${file.path}`} + data-id={`treeViewLitreeViewItem${file.path}`} + > +
    + {getIndentLevelDiv(file.path)} -
    - {getFileStateIcons(file)} - - } -
  • - ) +
    + {focusEdit && file.path && focusEdit.element === file.path ? + : + <>
    + {file.name} +
    +
    + {showIcons(file)} + {getFileStateIcons(file)} +
    + + } +
    + ) } return (<> diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index 00ee0db432..8960ad22c6 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -2,13 +2,16 @@ import { appPlatformTypes } from '@remix-ui/app' import React from 'react' import {Dropdown} from 'react-bootstrap' import {HamburgerMenuItem, HamburgerSubMenuItem} from './workspace-hamburger-item' +import { WorkspaceMetadata } from '../types' export interface HamburgerMenuProps { + selectedWorkspace: WorkspaceMetadata createWorkspace: () => void renameCurrentWorkspace: () => void downloadCurrentWorkspace: () => void deleteCurrentWorkspace: () => void deleteAllWorkspaces: () => void + pushChangesToGist: () => void cloneGitRepository: () => void downloadWorkspaces: () => void restoreBackup: () => void @@ -24,7 +27,7 @@ export interface HamburgerMenuProps { } export function HamburgerMenu(props: HamburgerMenuProps) { - const {showIconsMenu, hideWorkspaceOptions, hideLocalhostOptions, hideFileOperations} = props + const {showIconsMenu, hideWorkspaceOptions, hideLocalhostOptions, hideFileOperations, selectedWorkspace} = props return ( <> + { + props.pushChangesToGist() + props.hideIconsMenu(!showIconsMenu) + }} + platforms={[appPlatformTypes.web]} + > + Promise, dispatchUploadFolder: (target?: SyntheticEvent, targetFolder?: string) => Promise, dispatchCreateNewFile: (path: string, rootDir: string) => Promise, - dispatchSetFocusElement: (elements: { key: string, type: 'file' | 'folder' | 'gist' }[]) => Promise, + dispatchSetFocusElement: (elements: { key: string, type: 'file' | 'folder' }[]) => Promise, dispatchCreateNewFolder: (path: string, rootDir: string) => Promise, dispatchDeletePath: (path: string[]) => Promise, dispatchRenamePath: (oldPath: string, newPath: string) => Promise, dispatchDownloadPath: (path:string) => Promise, dispatchCopyFile: (src: string, dest: string) => Promise, + dispatchCopyShareURL: (path: string) => Promise, dispatchCopyFolder: (src: string, dest: string) => Promise, dispatchRunScript: (path: string) => Promise, dispatchEmitContextMenuEvent: (cmd: customAction) => Promise, - dispatchHandleClickFile: (path: string, type: 'file' | 'folder' | 'gist') => Promise + dispatchHandleClickFile: (path: string, type: 'file' | 'folder' ) => Promise dispatchHandleExpandPath: (paths: string[]) => Promise, dispatchHandleDownloadFiles: () => Promise, dispatchHandleDownloadWorkspace: () => Promise, diff --git a/libs/remix-ui/workspace/src/lib/css/file-explorer.css b/libs/remix-ui/workspace/src/lib/css/file-explorer.css index c49a0a54a7..16f0ffca51 100644 --- a/libs/remix-ui/workspace/src/lib/css/file-explorer.css +++ b/libs/remix-ui/workspace/src/lib/css/file-explorer.css @@ -60,4 +60,12 @@ ul { [contenteditable] { -webkit-user-select: text; user-select: text; -} \ No newline at end of file +} + +.remixui_icons { + +} + +.remixui_icons:hover { + color: var(--text); +} diff --git a/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx b/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx index 66f55d997d..e4bbd25cec 100644 --- a/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx +++ b/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx @@ -20,6 +20,7 @@ import { renamePath, downloadPath, copyFile, + copyShareURL, copyFolder, runScript, emitContextMenuEvent, @@ -116,8 +117,8 @@ export const FileSystemProvider = (props: WorkspaceProps) => { await deleteAllWorkspaces() } - const dispatchPublishToGist = async (path?: string, type?: string) => { - await publishToGist(path, type) + const dispatchPublishToGist = async (path?: string) => { + await publishToGist(path) } const dispatchUploadFile = async (target?: SyntheticEvent, targetFolder?: string) => { @@ -132,7 +133,7 @@ export const FileSystemProvider = (props: WorkspaceProps) => { await createNewFile(path, rootDir) } - const dispatchSetFocusElement = async (elements: {key: string; type: 'file' | 'folder' | 'gist'}[]) => { + const dispatchSetFocusElement = async (elements: {key: string; type: 'file' | 'folder' }[]) => { await setFocusElement(elements) } @@ -156,6 +157,10 @@ export const FileSystemProvider = (props: WorkspaceProps) => { await copyFile(src, dest) } + const dispatchCopyShareURL = async (path: string) => { + await copyShareURL(path) + } + const dispatchCopyFolder = async (src: string, dest: string) => { await copyFolder(src, dest) } @@ -168,7 +173,7 @@ export const FileSystemProvider = (props: WorkspaceProps) => { await emitContextMenuEvent(cmd) } - const dispatchHandleClickFile = async (path: string, type: 'file' | 'folder' | 'gist') => { + const dispatchHandleClickFile = async (path: string, type: 'file' | 'folder' ) => { await handleClickFile(path, type) } @@ -352,6 +357,7 @@ export const FileSystemProvider = (props: WorkspaceProps) => { dispatchRenamePath, dispatchDownloadPath, dispatchCopyFile, + dispatchCopyShareURL, dispatchCopyFolder, dispatchRunScript, dispatchEmitContextMenuEvent, diff --git a/libs/remix-ui/workspace/src/lib/reducers/workspace.ts b/libs/remix-ui/workspace/src/lib/reducers/workspace.ts index 2d6b15a26c..d2f923ceb8 100644 --- a/libs/remix-ui/workspace/src/lib/reducers/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/reducers/workspace.ts @@ -17,6 +17,7 @@ export interface BrowserState { name: string }[] currentBranch?: string + isGist: string }[] files: {[x: string]: Record} flatTree: FileType[] @@ -150,7 +151,6 @@ export const browserReducer = (state = browserInitialState, action: Actions) => case 'SET_WORKSPACES': { const payload = action.payload - return { ...state, browser: { @@ -986,8 +986,7 @@ const removeInputField = ( isDirectory: true, path, name: extractNameFromKey(path), - type: - extractNameFromKey(path).indexOf('gist-') === 0 ? 'gist' : 'folder', + type: 'folder', child: prevFiles ? prevFiles.child : {} }, Object @@ -1117,8 +1116,7 @@ const normalize = ( path, name: extractNameFromKey(path), isDirectory: filesList[key].isDirectory, - type: - extractNameFromKey(path).indexOf('gist-') === 0 ? 'gist' : 'folder' + type: 'folder' } } else { files[extractNameFromKey(key)] = { diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index a71d5b897e..68cd0b7608 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -2,13 +2,14 @@ import React, {useState, useEffect, useRef, useContext, ChangeEvent} from 'react import {FormattedMessage, useIntl} from 'react-intl' import {Dropdown} from 'react-bootstrap' import {CustomIconsToggle, CustomMenu, CustomToggle, CustomTooltip, extractNameFromKey, extractParentFromKey} from '@remix-ui/helper' +import {CopyToClipboard} from '@remix-ui/clipboard' import {FileExplorer} from './components/file-explorer' // eslint-disable-line import {FileSystemContext} from './contexts' import './css/remix-ui-workspace.css' import {ROOT_PATH, TEMPLATE_NAMES} from './utils/constants' import {HamburgerMenu} from './components/workspace-hamburger' -import {MenuItems, WorkSpaceState} from './types' +import {MenuItems, WorkSpaceState, WorkspaceMetadata} from './types' import {contextMenuActions} from './utils' import FileExplorerContextMenu from './components/file-explorer-context-menu' import { customAction } from '@remixproject/plugin-api' @@ -26,13 +27,7 @@ export function Workspace() { const LOCALHOST = ' - connect to localhost - ' const NO_WORKSPACE = ' - none - ' const [currentWorkspace, setCurrentWorkspace] = useState(NO_WORKSPACE) - const [selectedWorkspace, setSelectedWorkspace] = useState<{ - name: string - isGitRepo: boolean - hasGitSubmodules?: boolean - branches?: {remote: any; name: string}[] - currentBranch?: string - }>(null) + const [selectedWorkspace, setSelectedWorkspace] = useState(null) const [showDropdown, setShowDropdown] = useState(false) const [showIconsMenu, hideIconsMenu] = useState(false) const [showBranches, setShowBranches] = useState(false) @@ -73,7 +68,7 @@ export function Workspace() { }, mouseOverElement: null, showContextMenu: false, - reservedKeywords: [ROOT_PATH, 'gist-'], + reservedKeywords: [ROOT_PATH], copyElement: [], dragStatus: false }) @@ -437,7 +432,7 @@ export function Workspace() { } } - const handleCopyClick = (path: string, type: 'folder' | 'gist' | 'file' | 'workspace') => { + const handleCopyClick = (path: string, type: 'folder' | 'file' | 'workspace') => { setState((prevState) => { return {...prevState, copyElement: [{key: path, type}]} }) @@ -506,7 +501,6 @@ export function Workspace() { const focusElement = global.fs.focusElement if (focusElement[0]) { if (focusElement[0].type === 'folder' && focusElement[0].key) return focusElement[0].key - else if (focusElement[0].type === 'gist' && focusElement[0].key) return focusElement[0].key else if (focusElement[0].type === 'file' && focusElement[0].key) return extractParentFromKey(focusElement[0].key) ? extractParentFromKey(focusElement[0].key) : ROOT_PATH else return ROOT_PATH } @@ -534,6 +528,11 @@ export function Workspace() { navigator.clipboard.writeText(fileName) } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const handleCopyShareURLClick = (path: string, _type: string) => { + global.dispatchCopyShareURL(path) + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars const handleCopyFilePathClick = (path: string, _type: string) => { navigator.clipboard.writeText(path) @@ -565,34 +564,34 @@ export function Workspace() { } } - const pushChangesToGist = (path?: string, type?: string) => { + const pushChangesToGist = (path?: string) => { global.modal( intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGistMsg1'}), intl.formatMessage({id: 'filePanel.ok'}), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({id: 'filePanel.cancel'}), () => {} ) } - const publishFolderToGist = (path?: string, type?: string) => { + const publishFolderToGist = (path?: string) => { global.modal( intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGistMsg2'}, {path}), intl.formatMessage({id: 'filePanel.ok'}), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({id: 'filePanel.cancel'}), () => {} ) } - const publishFileToGist = (path?: string, type?: string) => { + const publishFileToGist = (path?: string) => { global.modal( intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGistMsg3'}, {path}), intl.formatMessage({id: 'filePanel.ok'}), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({id: 'filePanel.cancel'}), () => {} ) @@ -627,8 +626,8 @@ export function Workspace() { ) } - const toGist = (path?: string, type?: string) => { - global.dispatchPublishToGist(path, type) + const toGist = (path?: string) => { + global.dispatchPublishToGist(path) } const editModeOn = (path: string, type: string, isNew = false) => { @@ -786,12 +785,12 @@ export function Workspace() { - +