diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0f8d0..80b2dac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,11 @@ Would like to implement tests and other sustainability features before bumping v ## 0.1.2 - Added tx to completion provider and syntax highlighting - added byte alias for bytes1 + +## 0.2.0 +- Compatible with ```cashscript@0.7.0``` + - Updated to new Native Introspection functionality + - Added tuple destructuring + - Added new ```constant``` keyword + - Added ```*``` operator + \ No newline at end of file diff --git a/README.md b/README.md index 27949a7..c24802d 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,9 @@ None available yet. Check the [changelog](/CHANGELOG.md) for past releases. Latest stable version: -### 0.1.2 -- Added tx to completion provider and syntax highlighting -- added byte alias for bytes1 +## 0.2.0 +- Compatible with ```cashscript@0.7.0``` + - Updated to new Native Introspection functionality + - Added tuple destructuring + - Added new ```constant``` keyword + - Added ```'*'``` operator diff --git a/examples/next.cash b/examples/next.cash new file mode 100644 index 0000000..73ccedf --- /dev/null +++ b/examples/next.cash @@ -0,0 +1,11 @@ +pragma cashscript ^0.7.0; + +contract P2PKH() { + function spend() { + bytes2 left, bytes2 right = 0x123456.split(2); + int constant c = 5; + require(left == right); + require(c*2 == 2); + require(tx.outputs[0].value == tx.inputs[this.activeInputIndex].value - 10*10); + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7252bf2..759c396 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "cashscript", - "version": "0.1.2", + "version": "0.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@bitauth/libauth": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@bitauth/libauth/-/libauth-1.18.1.tgz", - "integrity": "sha512-s7evdGbdGAnGkv7xt6mCbcWTTNvburc1Z9EX/8JKwcRLqofjDs7VAEz+RP3a8OGEo4MWFV6Ydqu/BeJjIA7Kdg==" + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@bitauth/libauth/-/libauth-1.19.1.tgz", + "integrity": "sha512-R524tD5VwOt3QRHr7N518nqTVR/HKgfWL4LypekcGuNQN8R4PWScvuRcRzrY39A28kLztMv+TJdiKuMNbkU1ug==" }, "@cashscript/utils": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@cashscript/utils/-/utils-0.6.4.tgz", - "integrity": "sha512-3r726iOEACfcGvD96LIS8CiSKuE2Ecup+TZB1ZfpQOBqguvJZ/pkhsuUn9mwIv6gBCOvb3Bwo29MXXGLlsPNbg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cashscript/utils/-/utils-0.7.0.tgz", + "integrity": "sha512-XFRlpeJ6aGcGoD3rIC8Pb04+h/AXkUljnvyJ8rF7T6mXw1doxoOxrYa+f/4xPe7F9dDGvLTSTEXW3yQGH+6ZCg==", "requires": { "@bitauth/libauth": "^1.18.1", "hash.js": "^1.1.7" @@ -25,14 +25,14 @@ "dev": true }, "@types/node": { - "version": "16.4.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.13.tgz", - "integrity": "sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg==" + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.35.tgz", + "integrity": "sha512-vu1SrqBjbbZ3J6vwY17jBs8Sr/BKA+/a/WtjRG+whKg1iuLFOosq872EXS0eXWILdO36DHQQeku/ZcL6hz2fpg==" }, "@types/vscode": { - "version": "1.56.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.56.0.tgz", - "integrity": "sha512-Q5VmQxOx+L1Y6lIJiGcJzwcyV3pQo/eiW8P+7sNLhFI16tJCwtua2DLjHRcpjbCLNVYpQM73kzfFo1Z0HyP9eQ==", + "version": "1.63.1", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.63.1.tgz", + "integrity": "sha512-Z+ZqjRcnGfHP86dvx/BtSwWyZPKQ/LBdmAVImY82TphyjOw2KgTKcp7Nx92oNwCTsHzlshwexAG/WiY2JuUm3g==", "dev": true }, "@types/ws": { @@ -58,11 +58,11 @@ "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==" }, "async-mutex": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.1.tgz", - "integrity": "sha512-vRfQwcqBnJTLzVQo72Sf7KIUbcSUP5hNchx6udI1U6LuPQpfePgdjJzlCe76yFZ8pxlLjn9lwcl/Ya0TSOv0Tw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", + "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", "requires": { - "tslib": "^2.1.0" + "tslib": "^2.3.1" } }, "balanced-match": { @@ -71,9 +71,9 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==", + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", "dev": true }, "binary": { @@ -144,26 +144,35 @@ "dev": true }, "cashc": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/cashc/-/cashc-0.6.4.tgz", - "integrity": "sha512-C42Uz9U4/Bl4pxLvMOtu1+p4drbeN3+NjOHXDzfKoMdXO6pZkUIruzr5JkUwinu5m/sK5yGkeBXXenliYuaoVw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/cashc/-/cashc-0.7.0.tgz", + "integrity": "sha512-WtK9yh/c648pzXE74CpSYR8+m2C5q01OT4B09IMTb5aInpkK1hI4jfKxXYSgXg6Wb3THebMckNJg/3eJrfK1LQ==", "requires": { "@bitauth/libauth": "^1.18.1", - "@cashscript/utils": "^0.6.3", + "@cashscript/utils": "^0.7.0", "antlr4ts": "^0.5.0-alpha.4", "commander": "^7.1.0", "semver": "^7.3.4" }, "dependencies": { + "@cashscript/utils": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cashscript/utils/-/utils-0.7.0.tgz", + "integrity": "sha512-XFRlpeJ6aGcGoD3rIC8Pb04+h/AXkUljnvyJ8rF7T6mXw1doxoOxrYa+f/4xPe7F9dDGvLTSTEXW3yQGH+6ZCg==", + "requires": { + "@bitauth/libauth": "^1.18.1", + "hash.js": "^1.1.7" + } + }, "commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "requires": { "lru-cache": "^6.0.0" } @@ -171,16 +180,16 @@ } }, "cashscript": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/cashscript/-/cashscript-0.6.4.tgz", - "integrity": "sha512-ba5QqAdFVCyw6dzkfl4SyFLY0nTl5GO3CmKqaUStliMf6hV8ngfHdR9jKM4f0MaTX/LqlDmWQP6RLoADsOtWrg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/cashscript/-/cashscript-0.7.0.tgz", + "integrity": "sha512-c80NgimuZEJibC/nkZDBeWNgbvottY3KV2qjGm+6mcn/viKUI1+hmDxb5jyLTm3EhaY8G5ItS3OVLSpRf8P3Ag==", "requires": { "@bitauth/libauth": "^1.18.1", - "@cashscript/utils": "^0.6.3", + "@cashscript/utils": "^0.7.0", "bip68": "^1.0.4", "bitcoin-rpc-promise-retry": "^1.3.0", "delay": "^5.0.0", - "electrum-cash": "^2.0.6" + "electrum-cash": "^2.0.10" } }, "chainsaw": { @@ -204,9 +213,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, "debug": { @@ -239,9 +248,9 @@ } }, "electrum-cash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/electrum-cash/-/electrum-cash-2.0.8.tgz", - "integrity": "sha512-rUBzeDVJ2LA9DzUEzBSuZsu01w1WHCNIbbMq7713uaEXwvhemuMWAZMMc79+JPXW/+UjOLn+Pu/24POTZGXsoA==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/electrum-cash/-/electrum-cash-2.0.10.tgz", + "integrity": "sha512-xxKXWyDsnUR2pkqzb7r7ANf6yzlHO8+Rkq8HOFkKiH1tF1BJwyh6sDhGAy4lkTv2sU8Uv1em/itYZ5n2Cr6zaA==", "requires": { "@types/ws": "^7.4.6", "async-mutex": "^0.3.1", @@ -251,9 +260,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" } @@ -276,9 +285,9 @@ } }, "esbuild": { - "version": "0.12.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.8.tgz", - "integrity": "sha512-sx/LwlP/SWTGsd9G4RlOPrXnIihAJ2xwBUmzoqe2nWwbXORMQWtAGNJNYLBJJqa3e9PWvVzxdrtyFZJcr7D87g==", + "version": "0.12.29", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz", + "integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==", "dev": true }, "escape-string-regexp": { @@ -331,9 +340,9 @@ } }, "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, "growl": { @@ -438,9 +447,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "mkdirp": { @@ -626,14 +635,14 @@ "dev": true }, "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "typescript": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", - "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true }, "unzipper": { @@ -776,9 +785,9 @@ } }, "vscode-languageserver-textdocument": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz", - "integrity": "sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.4.tgz", + "integrity": "sha512-/xhqXP/2A2RSs+J8JNXpiiNVvvNM0oTosNVmQnunlKvq9o4mupHOBAnnzH0lwIPKazXKvAKsVp1kr+H/K4lgoQ==" }, "vscode-languageserver-types": { "version": "3.16.0", @@ -786,9 +795,9 @@ "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==" }, "vscode-test": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.5.2.tgz", - "integrity": "sha512-x9PVfKxF6EInH9iSFGQi0V8H5zIW1fC7RAer6yNQR6sy3WyOwlWkuT3I+wf75xW/cO53hxMi1aj/EvqQfDFOAg==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.6.1.tgz", + "integrity": "sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA==", "dev": true, "requires": { "http-proxy-agent": "^4.0.1", @@ -804,9 +813,9 @@ "dev": true }, "ws": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==" + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==" }, "yallist": { "version": "4.0.0", diff --git a/package.json b/package.json index 737253c..5f92939 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publisher": "NathanielCherian", "displayName": "cashscript", "description": "Cashscript language support for Visual Studio Code", - "version": "0.1.2", + "version": "0.2.0", "icon": "media/icon.png", "repository": { "type": "git", @@ -96,17 +96,17 @@ }, "dependencies": { "antlr4ts": "^0.5.0-alpha.4", - "cashc": "0.6.4", - "cashscript": "^0.6.4", + "cashc": "^0.7.0", + "cashscript": "^0.7.0", "vscode-languageclient": "^7.0.0", "vscode-languageserver": "^7.0.0", - "vscode-languageserver-textdocument": "^1.0.1" + "vscode-languageserver-textdocument": "^1.0.4" }, "devDependencies": { - "@types/vscode": "^1.56.0", - "esbuild": "^0.12.8", - "typescript": "^4.3.2", + "@types/vscode": "^1.63.1", + "esbuild": "^0.12.29", + "typescript": "^4.5.5", "vscode": "^1.1.37", - "vscode-test": "^1.5.2" + "vscode-test": "^1.6.1" } } diff --git a/src/CashscriptCompletionProvider.ts b/src/CashscriptCompletionProvider.ts index b3d4259..af60f61 100644 --- a/src/CashscriptCompletionProvider.ts +++ b/src/CashscriptCompletionProvider.ts @@ -53,12 +53,13 @@ export default class CashscriptCompletionProvider implements vscode.CompletionIt protected getDotCompletions():CompletionItem[]{ - const re = /(\w+).$/ // EX: "tx." + const re = /(\w+)(\[.+\])?.$/ // EX: "tx." const range:Range = new Range(new vscode.Position(this.pos.line, 0), this.pos) const text = this.doc.getText(range); var arr, keyword; if((arr=text?.match(re))){ keyword = arr[1]; + if(arr[2]) keyword+="_indexed"; // ex. inputs[0]. console.log("keyword: ", keyword); return DOT_COMPLETIONS[keyword]; diff --git a/src/CashscriptHoverProvider.ts b/src/CashscriptHoverProvider.ts index 45cedd1..ca0b2a0 100644 --- a/src/CashscriptHoverProvider.ts +++ b/src/CashscriptHoverProvider.ts @@ -25,8 +25,8 @@ class CashscriptHoverProvider implements vscode.HoverProvider{ const miscel = this.getMiscellaneousHovers(document, position); if(miscel) return new vscode.Hover(miscel, range) - const dotHovers = this.getTxDotHovers(document, position); - if(dotHovers) return new vscode.Hover(dotHovers, range) + // const dotHovers = this.getTxDotHovers(document, position); + // if(dotHovers) return new vscode.Hover(dotHovers, range) return null; @@ -83,12 +83,12 @@ class CashscriptHoverProvider implements vscode.HoverProvider{ return matches[1]; } + // NEED TO UPDATE THIS AFTER NEW DOCS COME OUT getTxDotHovers(document:vscode.TextDocument, position:vscode.Position):vscode.MarkdownString[]{ const reg = /tx.[a-zA-Z0-9]+/; let range = document.getWordRangeAtPosition(position, reg); let word = document.getText(range).substring(3); - // /### tx.(\w+)\n+```solidity\n(.+)\n```/ const TX_HOVERS = { time:{ code:'require(tx.time >= );' diff --git a/src/CashscriptLinter/grammar/CashScript.g4 b/src/CashscriptLinter/grammar/CashScript.g4 index a2ae449..25ce445 100644 --- a/src/CashscriptLinter/grammar/CashScript.g4 +++ b/src/CashscriptLinter/grammar/CashScript.g4 @@ -1,198 +1,202 @@ -grammar CashScript; - -sourceFile - : pragmaDirective* contractDefinition EOF - ; - -pragmaDirective - : 'pragma' pragmaName pragmaValue ';' - ; - -pragmaName - : 'cashscript' - ; - -pragmaValue - : versionConstraint versionConstraint? - ; - -versionConstraint - : versionOperator? VersionLiteral - ; - -versionOperator - : '^' | '~' | '>=' | '>' | '<' | '<=' | '=' - ; - -contractDefinition - : 'contract' Identifier parameterList '{' functionDefinition* '}' - ; - -functionDefinition - : 'function' Identifier parameterList '{' statement* '}' - ; - -parameterList - : '(' (parameter (',' parameter)* ','?)? ')' - ; - -parameter - : typeName Identifier - ; - -block - : '{' statement* '}' - | statement - ; - -statement - : variableDefinition - | assignStatement - | timeOpStatement - | requireStatement - | ifStatement - ; - -variableDefinition - : typeName Identifier '=' expression ';' - ; - -assignStatement - : Identifier '=' expression ';' - ; - -timeOpStatement - : 'require' '(' TxVar '>=' expression ')' ';' - ; - -requireStatement - : 'require' '(' expression ')' ';' - ; - -ifStatement - : 'if' '(' expression ')' ifBlock=block ('else' elseBlock=block)? - ; - -functionCall - : Identifier expressionList // Only built-in functions are accepted - ; - -expressionList - : '(' (expression (',' expression)* ','?)? ')' - ; - -expression - : '(' expression ')' # Parenthesised - | typeName '(' castable=expression (',' size=expression)? ','? ')' # Cast - | functionCall # FunctionCallExpression - | 'new' Identifier expressionList #Instantiation - | expression '[' index=NumberLiteral ']' # TupleIndexOp - | expression op=('.reverse()' | '.length') # UnaryOp - | op=('!' | '-') expression # UnaryOp - // | expression '**' expression --- OP_POW does not exist in BCH Script - // | expression ('*' | '/' | '%') expression --- OP_MUL is disabled in BCH Script - | left=expression op='.split' '(' right=expression ')' # BinaryOp - | left=expression op=('/' | '%') right=expression # BinaryOp - | left=expression op=('+' | '-') right=expression # BinaryOp - // | expression ('>>' | '<<') expression --- OP_LSHIFT & RSHIFT are disabled in BCH Script - | left=expression op=('<' | '<=' | '>' | '>=') right=expression # BinaryOp - | left=expression op=('==' | '!=') right=expression # BinaryOp - | left=expression op='&' right=expression # BinaryOp - | left=expression op='^' right=expression # BinaryOp - | left=expression op='|' right=expression # BinaryOp - | left=expression op='&&' right=expression # BinaryOp - | left=expression op='||' right=expression # BinaryOp - | '[' (expression (',' expression)* ','?)? ']' # Array - | PreimageField # PreimageField - | Identifier # Identifier - | literal # LiteralExpression - ; - -literal - : BooleanLiteral - | numberLiteral - | StringLiteral - | DateLiteral - | HexLiteral - ; - -numberLiteral - : NumberLiteral NumberUnit? - ; - -typeName - : 'int' | 'bool' | 'string' | 'pubkey' | 'sig' | 'datasig' | Bytes - ; - -VersionLiteral - : [0-9]+ '.' [0-9]+ '.' [0-9]+ - ; - -BooleanLiteral - : 'true' | 'false' - ; - -NumberUnit - : 'satoshis' | 'sats' | 'finney' | 'bits' | 'bitcoin' - | 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' - ; - -NumberLiteral - : [-]?[0-9]+ ([eE] [0-9]+)? - ; - -Bytes - : 'bytes' Bound? | 'byte' - ; - -Bound - : [1-9] [0-9]* - ; - -StringLiteral - : '"' ('\\"' | ~["\r\n])*? '"' - | '\'' ('\\\'' | ~['\r\n])*? '\'' - ; - -DateLiteral - : 'date(' StringLiteral ')' - ; - -HexLiteral - : '0' [xX] [0-9A-Fa-f]* - ; - -TxVar - : 'tx.age' - | 'tx.time' - ; - -PreimageField - : 'tx.version' - | 'tx.hashPrevouts' - | 'tx.hashSequence' - | 'tx.outpoint' - | 'tx.bytecode' - | 'tx.value' - | 'tx.sequence' - | 'tx.hashOutputs' - | 'tx.locktime' - | 'tx.hashtype' - | 'tx.preimage' - ; - -Identifier - : [a-zA-Z] [a-zA-Z0-9_]* - ; - -WHITESPACE - : [ \t\r\n\u000C]+ -> skip - ; - -COMMENT - : '/*' .*? '*/' -> channel(HIDDEN) - ; - -LINE_COMMENT - : '//' ~[\r\n]* -> channel(HIDDEN) - ; +grammar CashScript; + +sourceFile + : pragmaDirective* contractDefinition EOF + ; + +pragmaDirective + : 'pragma' pragmaName pragmaValue ';' + ; + +pragmaName + : 'cashscript' + ; + +pragmaValue + : versionConstraint versionConstraint? + ; + +versionConstraint + : versionOperator? VersionLiteral + ; + +versionOperator + : '^' | '~' | '>=' | '>' | '<' | '<=' | '=' + ; + +contractDefinition + : 'contract' Identifier parameterList '{' functionDefinition* '}' + ; + +functionDefinition + : 'function' Identifier parameterList '{' statement* '}' + ; + +parameterList + : '(' (parameter (',' parameter)* ','?)? ')' + ; + +parameter + : typeName Identifier + ; + +block + : '{' statement* '}' + | statement + ; + +statement + : variableDefinition + | tupleAssignment + | assignStatement + | timeOpStatement + | requireStatement + | ifStatement + ; + +variableDefinition + : typeName modifier? Identifier '=' expression ';' + ; + +tupleAssignment + : typeName Identifier ',' typeName Identifier '=' expression ';' + ; + +assignStatement + : Identifier '=' expression ';' + ; + +timeOpStatement + : 'require' '(' TxVar '>=' expression ')' ';' + ; + +requireStatement + : 'require' '(' expression ')' ';' + ; + +ifStatement + : 'if' '(' expression ')' ifBlock=block ('else' elseBlock=block)? + ; + +functionCall + : Identifier expressionList // Only built-in functions are accepted + ; + +expressionList + : '(' (expression (',' expression)* ','?)? ')' + ; + +expression + : '(' expression ')' # Parenthesised + | typeName '(' castable=expression (',' size=expression)? ','? ')' # Cast + | functionCall # FunctionCallExpression + | 'new' Identifier expressionList #Instantiation + | expression '[' index=NumberLiteral ']' # TupleIndexOp + | scope='tx.outputs' '[' expression ']' op=('.value' | '.lockingBytecode') # UnaryIntrospectionOp + | scope='tx.inputs' '[' expression ']' op=('.value' | '.lockingBytecode' | '.outpointTransactionHash' | '.outpointIndex' | '.unlockingBytecode' | '.sequenceNumber') # UnaryIntrospectionOp + | expression op=('.reverse()' | '.length') # UnaryOp + | left=expression op='.split' '(' right=expression ')' # BinaryOp + | op=('!' | '-') expression # UnaryOp + | left=expression op=('*' | '/' | '%') right=expression # BinaryOp + | left=expression op=('+' | '-') right=expression # BinaryOp + // | expression ('>>' | '<<') expression --- OP_LSHIFT & RSHIFT are disabled in BCH Script + | left=expression op=('<' | '<=' | '>' | '>=') right=expression # BinaryOp + | left=expression op=('==' | '!=') right=expression # BinaryOp + | left=expression op='&' right=expression # BinaryOp + | left=expression op='^' right=expression # BinaryOp + | left=expression op='|' right=expression # BinaryOp + | left=expression op='&&' right=expression # BinaryOp + | left=expression op='||' right=expression # BinaryOp + | '[' (expression (',' expression)* ','?)? ']' # Array + | NullaryOp # NullaryOp + | Identifier # Identifier + | literal # LiteralExpression + ; + +modifier + : 'constant' + ; + +literal + : BooleanLiteral + | numberLiteral + | StringLiteral + | DateLiteral + | HexLiteral + ; + +numberLiteral + : NumberLiteral NumberUnit? + ; + +typeName + : 'int' | 'bool' | 'string' | 'pubkey' | 'sig' | 'datasig' | Bytes + ; + +VersionLiteral + : [0-9]+ '.' [0-9]+ '.' [0-9]+ + ; + +BooleanLiteral + : 'true' | 'false' + ; + +NumberUnit + : 'satoshis' | 'sats' | 'finney' | 'bits' | 'bitcoin' + | 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' + ; + +NumberLiteral + : [-]?[0-9]+ ([eE] [0-9]+)? + ; + +Bytes + : 'bytes' Bound? | 'byte' + ; + +Bound + : [1-9] [0-9]* + ; + +StringLiteral + : '"' ('\\"' | ~["\r\n])*? '"' + | '\'' ('\\\'' | ~['\r\n])*? '\'' + ; + +DateLiteral + : 'date(' StringLiteral ')' + ; + +HexLiteral + : '0' [xX] [0-9A-Fa-f]* + ; + +TxVar + : 'tx.age' + | 'tx.time' + ; + +NullaryOp + : 'this.activeInputIndex' + | 'this.activeBytecode' + | 'tx.inputs.length' + | 'tx.outputs.length' + | 'tx.version' + | 'tx.locktime' + ; + +Identifier + : [a-zA-Z] [a-zA-Z0-9_]* + ; + +WHITESPACE + : [ \t\r\n\u000C]+ -> skip + ; + +COMMENT + : '/*' .*? '*/' -> channel(HIDDEN) + ; + +LINE_COMMENT + : '//' ~[\r\n]* -> channel(HIDDEN) + ; diff --git a/src/CashscriptLinter/grammar/CashScript.interp b/src/CashscriptLinter/grammar/CashScript.interp index e1a1717..8033457 100644 --- a/src/CashscriptLinter/grammar/CashScript.interp +++ b/src/CashscriptLinter/grammar/CashScript.interp @@ -1,150 +1,172 @@ -token literal names: -null -'pragma' -';' -'cashscript' -'^' -'~' -'>=' -'>' -'<' -'<=' -'=' -'contract' -'{' -'}' -'function' -'(' -',' -')' -'require' -'if' -'else' -'new' -'[' -']' -'.reverse()' -'.length' -'!' -'-' -'.split' -'/' -'%' -'+' -'==' -'!=' -'&' -'|' -'&&' -'||' -'int' -'bool' -'string' -'pubkey' -'sig' -'datasig' -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null - -token symbolic names: -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -VersionLiteral -BooleanLiteral -NumberUnit -NumberLiteral -Bytes -Bound -StringLiteral -DateLiteral -HexLiteral -TxVar -PreimageField -Identifier -WHITESPACE -COMMENT -LINE_COMMENT - -rule names: -sourceFile -pragmaDirective -pragmaName -pragmaValue -versionConstraint -versionOperator -contractDefinition -functionDefinition -parameterList -parameter -block -statement -variableDefinition -assignStatement -timeOpStatement -requireStatement -ifStatement -functionCall -expressionList -expression -literal -numberLiteral -typeName - - -atn: -[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 60, 290, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 3, 2, 7, 2, 50, 10, 2, 12, 2, 14, 2, 53, 11, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 5, 5, 67, 10, 5, 3, 6, 5, 6, 70, 10, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 81, 10, 8, 12, 8, 14, 8, 84, 11, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 7, 9, 93, 10, 9, 12, 9, 14, 9, 96, 11, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 7, 10, 104, 10, 10, 12, 10, 14, 10, 107, 11, 10, 3, 10, 5, 10, 110, 10, 10, 5, 10, 112, 10, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 7, 12, 121, 10, 12, 12, 12, 14, 12, 124, 11, 12, 3, 12, 3, 12, 5, 12, 128, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 135, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 169, 10, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 178, 10, 20, 12, 20, 14, 20, 181, 11, 20, 3, 20, 5, 20, 184, 10, 20, 5, 20, 186, 10, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 200, 10, 21, 3, 21, 5, 21, 203, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 217, 10, 21, 12, 21, 14, 21, 220, 11, 21, 3, 21, 5, 21, 223, 10, 21, 5, 21, 225, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 231, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 272, 10, 21, 12, 21, 14, 21, 275, 11, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 282, 10, 22, 3, 23, 3, 23, 5, 23, 286, 10, 23, 3, 24, 3, 24, 3, 24, 2, 2, 3, 40, 25, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 2, 10, 3, 2, 6, 12, 3, 2, 28, 29, 3, 2, 31, 32, 4, 2, 29, 29, 33, 33, 3, 2, 8, 11, 3, 2, 34, 35, 3, 2, 26, 27, 4, 2, 40, 45, 50, 50, 2, 314, 2, 51, 3, 2, 2, 2, 4, 57, 3, 2, 2, 2, 6, 62, 3, 2, 2, 2, 8, 64, 3, 2, 2, 2, 10, 69, 3, 2, 2, 2, 12, 73, 3, 2, 2, 2, 14, 75, 3, 2, 2, 2, 16, 87, 3, 2, 2, 2, 18, 99, 3, 2, 2, 2, 20, 115, 3, 2, 2, 2, 22, 127, 3, 2, 2, 2, 24, 134, 3, 2, 2, 2, 26, 136, 3, 2, 2, 2, 28, 142, 3, 2, 2, 2, 30, 147, 3, 2, 2, 2, 32, 155, 3, 2, 2, 2, 34, 161, 3, 2, 2, 2, 36, 170, 3, 2, 2, 2, 38, 173, 3, 2, 2, 2, 40, 230, 3, 2, 2, 2, 42, 281, 3, 2, 2, 2, 44, 283, 3, 2, 2, 2, 46, 287, 3, 2, 2, 2, 48, 50, 5, 4, 3, 2, 49, 48, 3, 2, 2, 2, 50, 53, 3, 2, 2, 2, 51, 49, 3, 2, 2, 2, 51, 52, 3, 2, 2, 2, 52, 54, 3, 2, 2, 2, 53, 51, 3, 2, 2, 2, 54, 55, 5, 14, 8, 2, 55, 56, 7, 2, 2, 3, 56, 3, 3, 2, 2, 2, 57, 58, 7, 3, 2, 2, 58, 59, 5, 6, 4, 2, 59, 60, 5, 8, 5, 2, 60, 61, 7, 4, 2, 2, 61, 5, 3, 2, 2, 2, 62, 63, 7, 5, 2, 2, 63, 7, 3, 2, 2, 2, 64, 66, 5, 10, 6, 2, 65, 67, 5, 10, 6, 2, 66, 65, 3, 2, 2, 2, 66, 67, 3, 2, 2, 2, 67, 9, 3, 2, 2, 2, 68, 70, 5, 12, 7, 2, 69, 68, 3, 2, 2, 2, 69, 70, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 72, 7, 46, 2, 2, 72, 11, 3, 2, 2, 2, 73, 74, 9, 2, 2, 2, 74, 13, 3, 2, 2, 2, 75, 76, 7, 13, 2, 2, 76, 77, 7, 57, 2, 2, 77, 78, 5, 18, 10, 2, 78, 82, 7, 14, 2, 2, 79, 81, 5, 16, 9, 2, 80, 79, 3, 2, 2, 2, 81, 84, 3, 2, 2, 2, 82, 80, 3, 2, 2, 2, 82, 83, 3, 2, 2, 2, 83, 85, 3, 2, 2, 2, 84, 82, 3, 2, 2, 2, 85, 86, 7, 15, 2, 2, 86, 15, 3, 2, 2, 2, 87, 88, 7, 16, 2, 2, 88, 89, 7, 57, 2, 2, 89, 90, 5, 18, 10, 2, 90, 94, 7, 14, 2, 2, 91, 93, 5, 24, 13, 2, 92, 91, 3, 2, 2, 2, 93, 96, 3, 2, 2, 2, 94, 92, 3, 2, 2, 2, 94, 95, 3, 2, 2, 2, 95, 97, 3, 2, 2, 2, 96, 94, 3, 2, 2, 2, 97, 98, 7, 15, 2, 2, 98, 17, 3, 2, 2, 2, 99, 111, 7, 17, 2, 2, 100, 105, 5, 20, 11, 2, 101, 102, 7, 18, 2, 2, 102, 104, 5, 20, 11, 2, 103, 101, 3, 2, 2, 2, 104, 107, 3, 2, 2, 2, 105, 103, 3, 2, 2, 2, 105, 106, 3, 2, 2, 2, 106, 109, 3, 2, 2, 2, 107, 105, 3, 2, 2, 2, 108, 110, 7, 18, 2, 2, 109, 108, 3, 2, 2, 2, 109, 110, 3, 2, 2, 2, 110, 112, 3, 2, 2, 2, 111, 100, 3, 2, 2, 2, 111, 112, 3, 2, 2, 2, 112, 113, 3, 2, 2, 2, 113, 114, 7, 19, 2, 2, 114, 19, 3, 2, 2, 2, 115, 116, 5, 46, 24, 2, 116, 117, 7, 57, 2, 2, 117, 21, 3, 2, 2, 2, 118, 122, 7, 14, 2, 2, 119, 121, 5, 24, 13, 2, 120, 119, 3, 2, 2, 2, 121, 124, 3, 2, 2, 2, 122, 120, 3, 2, 2, 2, 122, 123, 3, 2, 2, 2, 123, 125, 3, 2, 2, 2, 124, 122, 3, 2, 2, 2, 125, 128, 7, 15, 2, 2, 126, 128, 5, 24, 13, 2, 127, 118, 3, 2, 2, 2, 127, 126, 3, 2, 2, 2, 128, 23, 3, 2, 2, 2, 129, 135, 5, 26, 14, 2, 130, 135, 5, 28, 15, 2, 131, 135, 5, 30, 16, 2, 132, 135, 5, 32, 17, 2, 133, 135, 5, 34, 18, 2, 134, 129, 3, 2, 2, 2, 134, 130, 3, 2, 2, 2, 134, 131, 3, 2, 2, 2, 134, 132, 3, 2, 2, 2, 134, 133, 3, 2, 2, 2, 135, 25, 3, 2, 2, 2, 136, 137, 5, 46, 24, 2, 137, 138, 7, 57, 2, 2, 138, 139, 7, 12, 2, 2, 139, 140, 5, 40, 21, 2, 140, 141, 7, 4, 2, 2, 141, 27, 3, 2, 2, 2, 142, 143, 7, 57, 2, 2, 143, 144, 7, 12, 2, 2, 144, 145, 5, 40, 21, 2, 145, 146, 7, 4, 2, 2, 146, 29, 3, 2, 2, 2, 147, 148, 7, 20, 2, 2, 148, 149, 7, 17, 2, 2, 149, 150, 7, 55, 2, 2, 150, 151, 7, 8, 2, 2, 151, 152, 5, 40, 21, 2, 152, 153, 7, 19, 2, 2, 153, 154, 7, 4, 2, 2, 154, 31, 3, 2, 2, 2, 155, 156, 7, 20, 2, 2, 156, 157, 7, 17, 2, 2, 157, 158, 5, 40, 21, 2, 158, 159, 7, 19, 2, 2, 159, 160, 7, 4, 2, 2, 160, 33, 3, 2, 2, 2, 161, 162, 7, 21, 2, 2, 162, 163, 7, 17, 2, 2, 163, 164, 5, 40, 21, 2, 164, 165, 7, 19, 2, 2, 165, 168, 5, 22, 12, 2, 166, 167, 7, 22, 2, 2, 167, 169, 5, 22, 12, 2, 168, 166, 3, 2, 2, 2, 168, 169, 3, 2, 2, 2, 169, 35, 3, 2, 2, 2, 170, 171, 7, 57, 2, 2, 171, 172, 5, 38, 20, 2, 172, 37, 3, 2, 2, 2, 173, 185, 7, 17, 2, 2, 174, 179, 5, 40, 21, 2, 175, 176, 7, 18, 2, 2, 176, 178, 5, 40, 21, 2, 177, 175, 3, 2, 2, 2, 178, 181, 3, 2, 2, 2, 179, 177, 3, 2, 2, 2, 179, 180, 3, 2, 2, 2, 180, 183, 3, 2, 2, 2, 181, 179, 3, 2, 2, 2, 182, 184, 7, 18, 2, 2, 183, 182, 3, 2, 2, 2, 183, 184, 3, 2, 2, 2, 184, 186, 3, 2, 2, 2, 185, 174, 3, 2, 2, 2, 185, 186, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 188, 7, 19, 2, 2, 188, 39, 3, 2, 2, 2, 189, 190, 8, 21, 1, 2, 190, 191, 7, 17, 2, 2, 191, 192, 5, 40, 21, 2, 192, 193, 7, 19, 2, 2, 193, 231, 3, 2, 2, 2, 194, 195, 5, 46, 24, 2, 195, 196, 7, 17, 2, 2, 196, 199, 5, 40, 21, 2, 197, 198, 7, 18, 2, 2, 198, 200, 5, 40, 21, 2, 199, 197, 3, 2, 2, 2, 199, 200, 3, 2, 2, 2, 200, 202, 3, 2, 2, 2, 201, 203, 7, 18, 2, 2, 202, 201, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 204, 3, 2, 2, 2, 204, 205, 7, 19, 2, 2, 205, 231, 3, 2, 2, 2, 206, 231, 5, 36, 19, 2, 207, 208, 7, 23, 2, 2, 208, 209, 7, 57, 2, 2, 209, 231, 5, 38, 20, 2, 210, 211, 9, 3, 2, 2, 211, 231, 5, 40, 21, 17, 212, 224, 7, 24, 2, 2, 213, 218, 5, 40, 21, 2, 214, 215, 7, 18, 2, 2, 215, 217, 5, 40, 21, 2, 216, 214, 3, 2, 2, 2, 217, 220, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 218, 219, 3, 2, 2, 2, 219, 222, 3, 2, 2, 2, 220, 218, 3, 2, 2, 2, 221, 223, 7, 18, 2, 2, 222, 221, 3, 2, 2, 2, 222, 223, 3, 2, 2, 2, 223, 225, 3, 2, 2, 2, 224, 213, 3, 2, 2, 2, 224, 225, 3, 2, 2, 2, 225, 226, 3, 2, 2, 2, 226, 231, 7, 25, 2, 2, 227, 231, 7, 56, 2, 2, 228, 231, 7, 57, 2, 2, 229, 231, 5, 42, 22, 2, 230, 189, 3, 2, 2, 2, 230, 194, 3, 2, 2, 2, 230, 206, 3, 2, 2, 2, 230, 207, 3, 2, 2, 2, 230, 210, 3, 2, 2, 2, 230, 212, 3, 2, 2, 2, 230, 227, 3, 2, 2, 2, 230, 228, 3, 2, 2, 2, 230, 229, 3, 2, 2, 2, 231, 273, 3, 2, 2, 2, 232, 233, 12, 15, 2, 2, 233, 234, 9, 4, 2, 2, 234, 272, 5, 40, 21, 16, 235, 236, 12, 14, 2, 2, 236, 237, 9, 5, 2, 2, 237, 272, 5, 40, 21, 15, 238, 239, 12, 13, 2, 2, 239, 240, 9, 6, 2, 2, 240, 272, 5, 40, 21, 14, 241, 242, 12, 12, 2, 2, 242, 243, 9, 7, 2, 2, 243, 272, 5, 40, 21, 13, 244, 245, 12, 11, 2, 2, 245, 246, 7, 36, 2, 2, 246, 272, 5, 40, 21, 12, 247, 248, 12, 10, 2, 2, 248, 249, 7, 6, 2, 2, 249, 272, 5, 40, 21, 11, 250, 251, 12, 9, 2, 2, 251, 252, 7, 37, 2, 2, 252, 272, 5, 40, 21, 10, 253, 254, 12, 8, 2, 2, 254, 255, 7, 38, 2, 2, 255, 272, 5, 40, 21, 9, 256, 257, 12, 7, 2, 2, 257, 258, 7, 39, 2, 2, 258, 272, 5, 40, 21, 8, 259, 260, 12, 19, 2, 2, 260, 261, 7, 24, 2, 2, 261, 262, 7, 49, 2, 2, 262, 272, 7, 25, 2, 2, 263, 264, 12, 18, 2, 2, 264, 272, 9, 8, 2, 2, 265, 266, 12, 16, 2, 2, 266, 267, 7, 30, 2, 2, 267, 268, 7, 17, 2, 2, 268, 269, 5, 40, 21, 2, 269, 270, 7, 19, 2, 2, 270, 272, 3, 2, 2, 2, 271, 232, 3, 2, 2, 2, 271, 235, 3, 2, 2, 2, 271, 238, 3, 2, 2, 2, 271, 241, 3, 2, 2, 2, 271, 244, 3, 2, 2, 2, 271, 247, 3, 2, 2, 2, 271, 250, 3, 2, 2, 2, 271, 253, 3, 2, 2, 2, 271, 256, 3, 2, 2, 2, 271, 259, 3, 2, 2, 2, 271, 263, 3, 2, 2, 2, 271, 265, 3, 2, 2, 2, 272, 275, 3, 2, 2, 2, 273, 271, 3, 2, 2, 2, 273, 274, 3, 2, 2, 2, 274, 41, 3, 2, 2, 2, 275, 273, 3, 2, 2, 2, 276, 282, 7, 47, 2, 2, 277, 282, 5, 44, 23, 2, 278, 282, 7, 52, 2, 2, 279, 282, 7, 53, 2, 2, 280, 282, 7, 54, 2, 2, 281, 276, 3, 2, 2, 2, 281, 277, 3, 2, 2, 2, 281, 278, 3, 2, 2, 2, 281, 279, 3, 2, 2, 2, 281, 280, 3, 2, 2, 2, 282, 43, 3, 2, 2, 2, 283, 285, 7, 49, 2, 2, 284, 286, 7, 48, 2, 2, 285, 284, 3, 2, 2, 2, 285, 286, 3, 2, 2, 2, 286, 45, 3, 2, 2, 2, 287, 288, 9, 9, 2, 2, 288, 47, 3, 2, 2, 2, 27, 51, 66, 69, 82, 94, 105, 109, 111, 122, 127, 134, 168, 179, 183, 185, 199, 202, 218, 222, 224, 230, 271, 273, 281, 285] \ No newline at end of file +token literal names: +null +'pragma' +';' +'cashscript' +'^' +'~' +'>=' +'>' +'<' +'<=' +'=' +'contract' +'{' +'}' +'function' +'(' +',' +')' +'require' +'if' +'else' +'new' +'[' +']' +'tx.outputs' +'.value' +'.lockingBytecode' +'tx.inputs' +'.outpointTransactionHash' +'.outpointIndex' +'.unlockingBytecode' +'.sequenceNumber' +'.reverse()' +'.length' +'.split' +'!' +'-' +'*' +'/' +'%' +'+' +'==' +'!=' +'&' +'|' +'&&' +'||' +'constant' +'int' +'bool' +'string' +'pubkey' +'sig' +'datasig' +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +VersionLiteral +BooleanLiteral +NumberUnit +NumberLiteral +Bytes +Bound +StringLiteral +DateLiteral +HexLiteral +TxVar +NullaryOp +Identifier +WHITESPACE +COMMENT +LINE_COMMENT + +rule names: +sourceFile +pragmaDirective +pragmaName +pragmaValue +versionConstraint +versionOperator +contractDefinition +functionDefinition +parameterList +parameter +block +statement +variableDefinition +tupleAssignment +assignStatement +timeOpStatement +requireStatement +ifStatement +functionCall +expressionList +expression +modifier +literal +numberLiteral +typeName + + +atn: +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 70, 321, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 3, 2, 7, 2, 54, 10, 2, 12, 2, 14, 2, 57, 11, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 5, 5, 71, 10, 5, 3, 6, 5, 6, 74, 10, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 85, 10, 8, 12, 8, 14, 8, 88, 11, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 7, 9, 97, 10, 9, 12, 9, 14, 9, 100, 11, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 7, 10, 108, 10, 10, 12, 10, 14, 10, 111, 11, 10, 3, 10, 5, 10, 114, 10, 10, 5, 10, 116, 10, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 7, 12, 125, 10, 12, 12, 12, 14, 12, 128, 11, 12, 3, 12, 3, 12, 5, 12, 132, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 140, 10, 13, 3, 14, 3, 14, 5, 14, 144, 10, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 186, 10, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 195, 10, 21, 12, 21, 14, 21, 198, 11, 21, 3, 21, 5, 21, 201, 10, 21, 5, 21, 203, 10, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 217, 10, 22, 3, 22, 5, 22, 220, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 246, 10, 22, 12, 22, 14, 22, 249, 11, 22, 3, 22, 5, 22, 252, 10, 22, 5, 22, 254, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 260, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 301, 10, 22, 12, 22, 14, 22, 304, 11, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 313, 10, 24, 3, 25, 3, 25, 5, 25, 317, 10, 25, 3, 26, 3, 26, 3, 26, 2, 2, 3, 42, 27, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 2, 12, 3, 2, 6, 12, 3, 2, 27, 28, 4, 2, 27, 28, 30, 33, 3, 2, 37, 38, 3, 2, 39, 41, 4, 2, 38, 38, 42, 42, 3, 2, 8, 11, 3, 2, 43, 44, 3, 2, 34, 35, 4, 2, 50, 55, 60, 60, 2, 347, 2, 55, 3, 2, 2, 2, 4, 61, 3, 2, 2, 2, 6, 66, 3, 2, 2, 2, 8, 68, 3, 2, 2, 2, 10, 73, 3, 2, 2, 2, 12, 77, 3, 2, 2, 2, 14, 79, 3, 2, 2, 2, 16, 91, 3, 2, 2, 2, 18, 103, 3, 2, 2, 2, 20, 119, 3, 2, 2, 2, 22, 131, 3, 2, 2, 2, 24, 139, 3, 2, 2, 2, 26, 141, 3, 2, 2, 2, 28, 150, 3, 2, 2, 2, 30, 159, 3, 2, 2, 2, 32, 164, 3, 2, 2, 2, 34, 172, 3, 2, 2, 2, 36, 178, 3, 2, 2, 2, 38, 187, 3, 2, 2, 2, 40, 190, 3, 2, 2, 2, 42, 259, 3, 2, 2, 2, 44, 305, 3, 2, 2, 2, 46, 312, 3, 2, 2, 2, 48, 314, 3, 2, 2, 2, 50, 318, 3, 2, 2, 2, 52, 54, 5, 4, 3, 2, 53, 52, 3, 2, 2, 2, 54, 57, 3, 2, 2, 2, 55, 53, 3, 2, 2, 2, 55, 56, 3, 2, 2, 2, 56, 58, 3, 2, 2, 2, 57, 55, 3, 2, 2, 2, 58, 59, 5, 14, 8, 2, 59, 60, 7, 2, 2, 3, 60, 3, 3, 2, 2, 2, 61, 62, 7, 3, 2, 2, 62, 63, 5, 6, 4, 2, 63, 64, 5, 8, 5, 2, 64, 65, 7, 4, 2, 2, 65, 5, 3, 2, 2, 2, 66, 67, 7, 5, 2, 2, 67, 7, 3, 2, 2, 2, 68, 70, 5, 10, 6, 2, 69, 71, 5, 10, 6, 2, 70, 69, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 9, 3, 2, 2, 2, 72, 74, 5, 12, 7, 2, 73, 72, 3, 2, 2, 2, 73, 74, 3, 2, 2, 2, 74, 75, 3, 2, 2, 2, 75, 76, 7, 56, 2, 2, 76, 11, 3, 2, 2, 2, 77, 78, 9, 2, 2, 2, 78, 13, 3, 2, 2, 2, 79, 80, 7, 13, 2, 2, 80, 81, 7, 67, 2, 2, 81, 82, 5, 18, 10, 2, 82, 86, 7, 14, 2, 2, 83, 85, 5, 16, 9, 2, 84, 83, 3, 2, 2, 2, 85, 88, 3, 2, 2, 2, 86, 84, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 89, 3, 2, 2, 2, 88, 86, 3, 2, 2, 2, 89, 90, 7, 15, 2, 2, 90, 15, 3, 2, 2, 2, 91, 92, 7, 16, 2, 2, 92, 93, 7, 67, 2, 2, 93, 94, 5, 18, 10, 2, 94, 98, 7, 14, 2, 2, 95, 97, 5, 24, 13, 2, 96, 95, 3, 2, 2, 2, 97, 100, 3, 2, 2, 2, 98, 96, 3, 2, 2, 2, 98, 99, 3, 2, 2, 2, 99, 101, 3, 2, 2, 2, 100, 98, 3, 2, 2, 2, 101, 102, 7, 15, 2, 2, 102, 17, 3, 2, 2, 2, 103, 115, 7, 17, 2, 2, 104, 109, 5, 20, 11, 2, 105, 106, 7, 18, 2, 2, 106, 108, 5, 20, 11, 2, 107, 105, 3, 2, 2, 2, 108, 111, 3, 2, 2, 2, 109, 107, 3, 2, 2, 2, 109, 110, 3, 2, 2, 2, 110, 113, 3, 2, 2, 2, 111, 109, 3, 2, 2, 2, 112, 114, 7, 18, 2, 2, 113, 112, 3, 2, 2, 2, 113, 114, 3, 2, 2, 2, 114, 116, 3, 2, 2, 2, 115, 104, 3, 2, 2, 2, 115, 116, 3, 2, 2, 2, 116, 117, 3, 2, 2, 2, 117, 118, 7, 19, 2, 2, 118, 19, 3, 2, 2, 2, 119, 120, 5, 50, 26, 2, 120, 121, 7, 67, 2, 2, 121, 21, 3, 2, 2, 2, 122, 126, 7, 14, 2, 2, 123, 125, 5, 24, 13, 2, 124, 123, 3, 2, 2, 2, 125, 128, 3, 2, 2, 2, 126, 124, 3, 2, 2, 2, 126, 127, 3, 2, 2, 2, 127, 129, 3, 2, 2, 2, 128, 126, 3, 2, 2, 2, 129, 132, 7, 15, 2, 2, 130, 132, 5, 24, 13, 2, 131, 122, 3, 2, 2, 2, 131, 130, 3, 2, 2, 2, 132, 23, 3, 2, 2, 2, 133, 140, 5, 26, 14, 2, 134, 140, 5, 28, 15, 2, 135, 140, 5, 30, 16, 2, 136, 140, 5, 32, 17, 2, 137, 140, 5, 34, 18, 2, 138, 140, 5, 36, 19, 2, 139, 133, 3, 2, 2, 2, 139, 134, 3, 2, 2, 2, 139, 135, 3, 2, 2, 2, 139, 136, 3, 2, 2, 2, 139, 137, 3, 2, 2, 2, 139, 138, 3, 2, 2, 2, 140, 25, 3, 2, 2, 2, 141, 143, 5, 50, 26, 2, 142, 144, 5, 44, 23, 2, 143, 142, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 146, 7, 67, 2, 2, 146, 147, 7, 12, 2, 2, 147, 148, 5, 42, 22, 2, 148, 149, 7, 4, 2, 2, 149, 27, 3, 2, 2, 2, 150, 151, 5, 50, 26, 2, 151, 152, 7, 67, 2, 2, 152, 153, 7, 18, 2, 2, 153, 154, 5, 50, 26, 2, 154, 155, 7, 67, 2, 2, 155, 156, 7, 12, 2, 2, 156, 157, 5, 42, 22, 2, 157, 158, 7, 4, 2, 2, 158, 29, 3, 2, 2, 2, 159, 160, 7, 67, 2, 2, 160, 161, 7, 12, 2, 2, 161, 162, 5, 42, 22, 2, 162, 163, 7, 4, 2, 2, 163, 31, 3, 2, 2, 2, 164, 165, 7, 20, 2, 2, 165, 166, 7, 17, 2, 2, 166, 167, 7, 65, 2, 2, 167, 168, 7, 8, 2, 2, 168, 169, 5, 42, 22, 2, 169, 170, 7, 19, 2, 2, 170, 171, 7, 4, 2, 2, 171, 33, 3, 2, 2, 2, 172, 173, 7, 20, 2, 2, 173, 174, 7, 17, 2, 2, 174, 175, 5, 42, 22, 2, 175, 176, 7, 19, 2, 2, 176, 177, 7, 4, 2, 2, 177, 35, 3, 2, 2, 2, 178, 179, 7, 21, 2, 2, 179, 180, 7, 17, 2, 2, 180, 181, 5, 42, 22, 2, 181, 182, 7, 19, 2, 2, 182, 185, 5, 22, 12, 2, 183, 184, 7, 22, 2, 2, 184, 186, 5, 22, 12, 2, 185, 183, 3, 2, 2, 2, 185, 186, 3, 2, 2, 2, 186, 37, 3, 2, 2, 2, 187, 188, 7, 67, 2, 2, 188, 189, 5, 40, 21, 2, 189, 39, 3, 2, 2, 2, 190, 202, 7, 17, 2, 2, 191, 196, 5, 42, 22, 2, 192, 193, 7, 18, 2, 2, 193, 195, 5, 42, 22, 2, 194, 192, 3, 2, 2, 2, 195, 198, 3, 2, 2, 2, 196, 194, 3, 2, 2, 2, 196, 197, 3, 2, 2, 2, 197, 200, 3, 2, 2, 2, 198, 196, 3, 2, 2, 2, 199, 201, 7, 18, 2, 2, 200, 199, 3, 2, 2, 2, 200, 201, 3, 2, 2, 2, 201, 203, 3, 2, 2, 2, 202, 191, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 204, 3, 2, 2, 2, 204, 205, 7, 19, 2, 2, 205, 41, 3, 2, 2, 2, 206, 207, 8, 22, 1, 2, 207, 208, 7, 17, 2, 2, 208, 209, 5, 42, 22, 2, 209, 210, 7, 19, 2, 2, 210, 260, 3, 2, 2, 2, 211, 212, 5, 50, 26, 2, 212, 213, 7, 17, 2, 2, 213, 216, 5, 42, 22, 2, 214, 215, 7, 18, 2, 2, 215, 217, 5, 42, 22, 2, 216, 214, 3, 2, 2, 2, 216, 217, 3, 2, 2, 2, 217, 219, 3, 2, 2, 2, 218, 220, 7, 18, 2, 2, 219, 218, 3, 2, 2, 2, 219, 220, 3, 2, 2, 2, 220, 221, 3, 2, 2, 2, 221, 222, 7, 19, 2, 2, 222, 260, 3, 2, 2, 2, 223, 260, 5, 38, 20, 2, 224, 225, 7, 23, 2, 2, 225, 226, 7, 67, 2, 2, 226, 260, 5, 40, 21, 2, 227, 228, 7, 26, 2, 2, 228, 229, 7, 24, 2, 2, 229, 230, 5, 42, 22, 2, 230, 231, 7, 25, 2, 2, 231, 232, 9, 3, 2, 2, 232, 260, 3, 2, 2, 2, 233, 234, 7, 29, 2, 2, 234, 235, 7, 24, 2, 2, 235, 236, 5, 42, 22, 2, 236, 237, 7, 25, 2, 2, 237, 238, 9, 4, 2, 2, 238, 260, 3, 2, 2, 2, 239, 240, 9, 5, 2, 2, 240, 260, 5, 42, 22, 16, 241, 253, 7, 24, 2, 2, 242, 247, 5, 42, 22, 2, 243, 244, 7, 18, 2, 2, 244, 246, 5, 42, 22, 2, 245, 243, 3, 2, 2, 2, 246, 249, 3, 2, 2, 2, 247, 245, 3, 2, 2, 2, 247, 248, 3, 2, 2, 2, 248, 251, 3, 2, 2, 2, 249, 247, 3, 2, 2, 2, 250, 252, 7, 18, 2, 2, 251, 250, 3, 2, 2, 2, 251, 252, 3, 2, 2, 2, 252, 254, 3, 2, 2, 2, 253, 242, 3, 2, 2, 2, 253, 254, 3, 2, 2, 2, 254, 255, 3, 2, 2, 2, 255, 260, 7, 25, 2, 2, 256, 260, 7, 66, 2, 2, 257, 260, 7, 67, 2, 2, 258, 260, 5, 46, 24, 2, 259, 206, 3, 2, 2, 2, 259, 211, 3, 2, 2, 2, 259, 223, 3, 2, 2, 2, 259, 224, 3, 2, 2, 2, 259, 227, 3, 2, 2, 2, 259, 233, 3, 2, 2, 2, 259, 239, 3, 2, 2, 2, 259, 241, 3, 2, 2, 2, 259, 256, 3, 2, 2, 2, 259, 257, 3, 2, 2, 2, 259, 258, 3, 2, 2, 2, 260, 302, 3, 2, 2, 2, 261, 262, 12, 15, 2, 2, 262, 263, 9, 6, 2, 2, 263, 301, 5, 42, 22, 16, 264, 265, 12, 14, 2, 2, 265, 266, 9, 7, 2, 2, 266, 301, 5, 42, 22, 15, 267, 268, 12, 13, 2, 2, 268, 269, 9, 8, 2, 2, 269, 301, 5, 42, 22, 14, 270, 271, 12, 12, 2, 2, 271, 272, 9, 9, 2, 2, 272, 301, 5, 42, 22, 13, 273, 274, 12, 11, 2, 2, 274, 275, 7, 45, 2, 2, 275, 301, 5, 42, 22, 12, 276, 277, 12, 10, 2, 2, 277, 278, 7, 6, 2, 2, 278, 301, 5, 42, 22, 11, 279, 280, 12, 9, 2, 2, 280, 281, 7, 46, 2, 2, 281, 301, 5, 42, 22, 10, 282, 283, 12, 8, 2, 2, 283, 284, 7, 47, 2, 2, 284, 301, 5, 42, 22, 9, 285, 286, 12, 7, 2, 2, 286, 287, 7, 48, 2, 2, 287, 301, 5, 42, 22, 8, 288, 289, 12, 21, 2, 2, 289, 290, 7, 24, 2, 2, 290, 291, 7, 59, 2, 2, 291, 301, 7, 25, 2, 2, 292, 293, 12, 18, 2, 2, 293, 301, 9, 10, 2, 2, 294, 295, 12, 17, 2, 2, 295, 296, 7, 36, 2, 2, 296, 297, 7, 17, 2, 2, 297, 298, 5, 42, 22, 2, 298, 299, 7, 19, 2, 2, 299, 301, 3, 2, 2, 2, 300, 261, 3, 2, 2, 2, 300, 264, 3, 2, 2, 2, 300, 267, 3, 2, 2, 2, 300, 270, 3, 2, 2, 2, 300, 273, 3, 2, 2, 2, 300, 276, 3, 2, 2, 2, 300, 279, 3, 2, 2, 2, 300, 282, 3, 2, 2, 2, 300, 285, 3, 2, 2, 2, 300, 288, 3, 2, 2, 2, 300, 292, 3, 2, 2, 2, 300, 294, 3, 2, 2, 2, 301, 304, 3, 2, 2, 2, 302, 300, 3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 303, 43, 3, 2, 2, 2, 304, 302, 3, 2, 2, 2, 305, 306, 7, 49, 2, 2, 306, 45, 3, 2, 2, 2, 307, 313, 7, 57, 2, 2, 308, 313, 5, 48, 25, 2, 309, 313, 7, 62, 2, 2, 310, 313, 7, 63, 2, 2, 311, 313, 7, 64, 2, 2, 312, 307, 3, 2, 2, 2, 312, 308, 3, 2, 2, 2, 312, 309, 3, 2, 2, 2, 312, 310, 3, 2, 2, 2, 312, 311, 3, 2, 2, 2, 313, 47, 3, 2, 2, 2, 314, 316, 7, 59, 2, 2, 315, 317, 7, 58, 2, 2, 316, 315, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 49, 3, 2, 2, 2, 318, 319, 9, 11, 2, 2, 319, 51, 3, 2, 2, 2, 28, 55, 70, 73, 86, 98, 109, 113, 115, 126, 131, 139, 143, 185, 196, 200, 202, 216, 219, 247, 251, 253, 259, 300, 302, 312, 316] \ No newline at end of file diff --git a/src/CashscriptLinter/grammar/CashScript.tokens b/src/CashscriptLinter/grammar/CashScript.tokens index 4e7b5bb..117bf6e 100644 --- a/src/CashscriptLinter/grammar/CashScript.tokens +++ b/src/CashscriptLinter/grammar/CashScript.tokens @@ -1,101 +1,121 @@ -T__0=1 -T__1=2 -T__2=3 -T__3=4 -T__4=5 -T__5=6 -T__6=7 -T__7=8 -T__8=9 -T__9=10 -T__10=11 -T__11=12 -T__12=13 -T__13=14 -T__14=15 -T__15=16 -T__16=17 -T__17=18 -T__18=19 -T__19=20 -T__20=21 -T__21=22 -T__22=23 -T__23=24 -T__24=25 -T__25=26 -T__26=27 -T__27=28 -T__28=29 -T__29=30 -T__30=31 -T__31=32 -T__32=33 -T__33=34 -T__34=35 -T__35=36 -T__36=37 -T__37=38 -T__38=39 -T__39=40 -T__40=41 -T__41=42 -T__42=43 -VersionLiteral=44 -BooleanLiteral=45 -NumberUnit=46 -NumberLiteral=47 -Bytes=48 -Bound=49 -StringLiteral=50 -DateLiteral=51 -HexLiteral=52 -TxVar=53 -PreimageField=54 -Identifier=55 -WHITESPACE=56 -COMMENT=57 -LINE_COMMENT=58 -'pragma'=1 -';'=2 -'cashscript'=3 -'^'=4 -'~'=5 -'>='=6 -'>'=7 -'<'=8 -'<='=9 -'='=10 -'contract'=11 -'{'=12 -'}'=13 -'function'=14 -'('=15 -','=16 -')'=17 -'require'=18 -'if'=19 -'else'=20 -'new'=21 -'['=22 -']'=23 -'.reverse()'=24 -'.length'=25 -'!'=26 -'-'=27 -'.split'=28 -'/'=29 -'%'=30 -'+'=31 -'=='=32 -'!='=33 -'&'=34 -'|'=35 -'&&'=36 -'||'=37 -'int'=38 -'bool'=39 -'string'=40 -'pubkey'=41 -'sig'=42 -'datasig'=43 +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +T__10=11 +T__11=12 +T__12=13 +T__13=14 +T__14=15 +T__15=16 +T__16=17 +T__17=18 +T__18=19 +T__19=20 +T__20=21 +T__21=22 +T__22=23 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +VersionLiteral=54 +BooleanLiteral=55 +NumberUnit=56 +NumberLiteral=57 +Bytes=58 +Bound=59 +StringLiteral=60 +DateLiteral=61 +HexLiteral=62 +TxVar=63 +NullaryOp=64 +Identifier=65 +WHITESPACE=66 +COMMENT=67 +LINE_COMMENT=68 +'pragma'=1 +';'=2 +'cashscript'=3 +'^'=4 +'~'=5 +'>='=6 +'>'=7 +'<'=8 +'<='=9 +'='=10 +'contract'=11 +'{'=12 +'}'=13 +'function'=14 +'('=15 +','=16 +')'=17 +'require'=18 +'if'=19 +'else'=20 +'new'=21 +'['=22 +']'=23 +'tx.outputs'=24 +'.value'=25 +'.lockingBytecode'=26 +'tx.inputs'=27 +'.outpointTransactionHash'=28 +'.outpointIndex'=29 +'.unlockingBytecode'=30 +'.sequenceNumber'=31 +'.reverse()'=32 +'.length'=33 +'.split'=34 +'!'=35 +'-'=36 +'*'=37 +'/'=38 +'%'=39 +'+'=40 +'=='=41 +'!='=42 +'&'=43 +'|'=44 +'&&'=45 +'||'=46 +'constant'=47 +'int'=48 +'bool'=49 +'string'=50 +'pubkey'=51 +'sig'=52 +'datasig'=53 diff --git a/src/CashscriptLinter/grammar/CashScriptLexer.interp b/src/CashscriptLinter/grammar/CashScriptLexer.interp index 1edbe57..30c404b 100644 --- a/src/CashscriptLinter/grammar/CashScriptLexer.interp +++ b/src/CashscriptLinter/grammar/CashScriptLexer.interp @@ -1,191 +1,221 @@ -token literal names: -null -'pragma' -';' -'cashscript' -'^' -'~' -'>=' -'>' -'<' -'<=' -'=' -'contract' -'{' -'}' -'function' -'(' -',' -')' -'require' -'if' -'else' -'new' -'[' -']' -'.reverse()' -'.length' -'!' -'-' -'.split' -'/' -'%' -'+' -'==' -'!=' -'&' -'|' -'&&' -'||' -'int' -'bool' -'string' -'pubkey' -'sig' -'datasig' -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null - -token symbolic names: -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -VersionLiteral -BooleanLiteral -NumberUnit -NumberLiteral -Bytes -Bound -StringLiteral -DateLiteral -HexLiteral -TxVar -PreimageField -Identifier -WHITESPACE -COMMENT -LINE_COMMENT - -rule names: -T__0 -T__1 -T__2 -T__3 -T__4 -T__5 -T__6 -T__7 -T__8 -T__9 -T__10 -T__11 -T__12 -T__13 -T__14 -T__15 -T__16 -T__17 -T__18 -T__19 -T__20 -T__21 -T__22 -T__23 -T__24 -T__25 -T__26 -T__27 -T__28 -T__29 -T__30 -T__31 -T__32 -T__33 -T__34 -T__35 -T__36 -T__37 -T__38 -T__39 -T__40 -T__41 -T__42 -VersionLiteral -BooleanLiteral -NumberUnit -NumberLiteral -Bytes -Bound -StringLiteral -DateLiteral -HexLiteral -TxVar -PreimageField -Identifier -WHITESPACE -COMMENT -LINE_COMMENT - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 60, 642, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 6, 45, 296, 10, 45, 13, 45, 14, 45, 297, 3, 45, 3, 45, 6, 45, 302, 10, 45, 13, 45, 14, 45, 303, 3, 45, 3, 45, 6, 45, 308, 10, 45, 13, 45, 14, 45, 309, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 5, 46, 321, 10, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 5, 47, 380, 10, 47, 3, 48, 5, 48, 383, 10, 48, 3, 48, 6, 48, 386, 10, 48, 13, 48, 14, 48, 387, 3, 48, 3, 48, 6, 48, 392, 10, 48, 13, 48, 14, 48, 393, 5, 48, 396, 10, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 405, 10, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 411, 10, 49, 3, 50, 3, 50, 7, 50, 415, 10, 50, 12, 50, 14, 50, 418, 11, 50, 3, 51, 3, 51, 3, 51, 3, 51, 7, 51, 424, 10, 51, 12, 51, 14, 51, 427, 11, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 7, 51, 434, 10, 51, 12, 51, 14, 51, 437, 11, 51, 3, 51, 5, 51, 440, 10, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 7, 53, 454, 10, 53, 12, 53, 14, 53, 457, 11, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 5, 54, 472, 10, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 602, 10, 55, 3, 56, 3, 56, 7, 56, 606, 10, 56, 12, 56, 14, 56, 609, 11, 56, 3, 57, 6, 57, 612, 10, 57, 13, 57, 14, 57, 613, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 7, 58, 622, 10, 58, 12, 58, 14, 58, 625, 11, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 7, 59, 636, 10, 59, 12, 59, 14, 59, 639, 11, 59, 3, 59, 3, 59, 5, 425, 435, 623, 2, 2, 60, 3, 2, 3, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 53, 2, 28, 55, 2, 29, 57, 2, 30, 59, 2, 31, 61, 2, 32, 63, 2, 33, 65, 2, 34, 67, 2, 35, 69, 2, 36, 71, 2, 37, 73, 2, 38, 75, 2, 39, 77, 2, 40, 79, 2, 41, 81, 2, 42, 83, 2, 43, 85, 2, 44, 87, 2, 45, 89, 2, 46, 91, 2, 47, 93, 2, 48, 95, 2, 49, 97, 2, 50, 99, 2, 51, 101, 2, 52, 103, 2, 53, 105, 2, 54, 107, 2, 55, 109, 2, 56, 111, 2, 57, 113, 2, 58, 115, 2, 59, 117, 2, 60, 3, 2, 14, 3, 2, 50, 59, 3, 2, 47, 47, 4, 2, 71, 71, 103, 103, 3, 2, 51, 59, 5, 2, 12, 12, 15, 15, 36, 36, 5, 2, 12, 12, 15, 15, 41, 41, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 5, 2, 11, 12, 14, 15, 34, 34, 4, 2, 12, 12, 15, 15, 2, 682, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 3, 119, 3, 2, 2, 2, 5, 126, 3, 2, 2, 2, 7, 128, 3, 2, 2, 2, 9, 139, 3, 2, 2, 2, 11, 141, 3, 2, 2, 2, 13, 143, 3, 2, 2, 2, 15, 146, 3, 2, 2, 2, 17, 148, 3, 2, 2, 2, 19, 150, 3, 2, 2, 2, 21, 153, 3, 2, 2, 2, 23, 155, 3, 2, 2, 2, 25, 164, 3, 2, 2, 2, 27, 166, 3, 2, 2, 2, 29, 168, 3, 2, 2, 2, 31, 177, 3, 2, 2, 2, 33, 179, 3, 2, 2, 2, 35, 181, 3, 2, 2, 2, 37, 183, 3, 2, 2, 2, 39, 191, 3, 2, 2, 2, 41, 194, 3, 2, 2, 2, 43, 199, 3, 2, 2, 2, 45, 203, 3, 2, 2, 2, 47, 205, 3, 2, 2, 2, 49, 207, 3, 2, 2, 2, 51, 218, 3, 2, 2, 2, 53, 226, 3, 2, 2, 2, 55, 228, 3, 2, 2, 2, 57, 230, 3, 2, 2, 2, 59, 237, 3, 2, 2, 2, 61, 239, 3, 2, 2, 2, 63, 241, 3, 2, 2, 2, 65, 243, 3, 2, 2, 2, 67, 246, 3, 2, 2, 2, 69, 249, 3, 2, 2, 2, 71, 251, 3, 2, 2, 2, 73, 253, 3, 2, 2, 2, 75, 256, 3, 2, 2, 2, 77, 259, 3, 2, 2, 2, 79, 263, 3, 2, 2, 2, 81, 268, 3, 2, 2, 2, 83, 275, 3, 2, 2, 2, 85, 282, 3, 2, 2, 2, 87, 286, 3, 2, 2, 2, 89, 295, 3, 2, 2, 2, 91, 320, 3, 2, 2, 2, 93, 379, 3, 2, 2, 2, 95, 382, 3, 2, 2, 2, 97, 410, 3, 2, 2, 2, 99, 412, 3, 2, 2, 2, 101, 439, 3, 2, 2, 2, 103, 441, 3, 2, 2, 2, 105, 450, 3, 2, 2, 2, 107, 471, 3, 2, 2, 2, 109, 601, 3, 2, 2, 2, 111, 603, 3, 2, 2, 2, 113, 611, 3, 2, 2, 2, 115, 617, 3, 2, 2, 2, 117, 631, 3, 2, 2, 2, 119, 120, 7, 114, 2, 2, 120, 121, 7, 116, 2, 2, 121, 122, 7, 99, 2, 2, 122, 123, 7, 105, 2, 2, 123, 124, 7, 111, 2, 2, 124, 125, 7, 99, 2, 2, 125, 4, 3, 2, 2, 2, 126, 127, 7, 61, 2, 2, 127, 6, 3, 2, 2, 2, 128, 129, 7, 101, 2, 2, 129, 130, 7, 99, 2, 2, 130, 131, 7, 117, 2, 2, 131, 132, 7, 106, 2, 2, 132, 133, 7, 117, 2, 2, 133, 134, 7, 101, 2, 2, 134, 135, 7, 116, 2, 2, 135, 136, 7, 107, 2, 2, 136, 137, 7, 114, 2, 2, 137, 138, 7, 118, 2, 2, 138, 8, 3, 2, 2, 2, 139, 140, 7, 96, 2, 2, 140, 10, 3, 2, 2, 2, 141, 142, 7, 128, 2, 2, 142, 12, 3, 2, 2, 2, 143, 144, 7, 64, 2, 2, 144, 145, 7, 63, 2, 2, 145, 14, 3, 2, 2, 2, 146, 147, 7, 64, 2, 2, 147, 16, 3, 2, 2, 2, 148, 149, 7, 62, 2, 2, 149, 18, 3, 2, 2, 2, 150, 151, 7, 62, 2, 2, 151, 152, 7, 63, 2, 2, 152, 20, 3, 2, 2, 2, 153, 154, 7, 63, 2, 2, 154, 22, 3, 2, 2, 2, 155, 156, 7, 101, 2, 2, 156, 157, 7, 113, 2, 2, 157, 158, 7, 112, 2, 2, 158, 159, 7, 118, 2, 2, 159, 160, 7, 116, 2, 2, 160, 161, 7, 99, 2, 2, 161, 162, 7, 101, 2, 2, 162, 163, 7, 118, 2, 2, 163, 24, 3, 2, 2, 2, 164, 165, 7, 125, 2, 2, 165, 26, 3, 2, 2, 2, 166, 167, 7, 127, 2, 2, 167, 28, 3, 2, 2, 2, 168, 169, 7, 104, 2, 2, 169, 170, 7, 119, 2, 2, 170, 171, 7, 112, 2, 2, 171, 172, 7, 101, 2, 2, 172, 173, 7, 118, 2, 2, 173, 174, 7, 107, 2, 2, 174, 175, 7, 113, 2, 2, 175, 176, 7, 112, 2, 2, 176, 30, 3, 2, 2, 2, 177, 178, 7, 42, 2, 2, 178, 32, 3, 2, 2, 2, 179, 180, 7, 46, 2, 2, 180, 34, 3, 2, 2, 2, 181, 182, 7, 43, 2, 2, 182, 36, 3, 2, 2, 2, 183, 184, 7, 116, 2, 2, 184, 185, 7, 103, 2, 2, 185, 186, 7, 115, 2, 2, 186, 187, 7, 119, 2, 2, 187, 188, 7, 107, 2, 2, 188, 189, 7, 116, 2, 2, 189, 190, 7, 103, 2, 2, 190, 38, 3, 2, 2, 2, 191, 192, 7, 107, 2, 2, 192, 193, 7, 104, 2, 2, 193, 40, 3, 2, 2, 2, 194, 195, 7, 103, 2, 2, 195, 196, 7, 110, 2, 2, 196, 197, 7, 117, 2, 2, 197, 198, 7, 103, 2, 2, 198, 42, 3, 2, 2, 2, 199, 200, 7, 112, 2, 2, 200, 201, 7, 103, 2, 2, 201, 202, 7, 121, 2, 2, 202, 44, 3, 2, 2, 2, 203, 204, 7, 93, 2, 2, 204, 46, 3, 2, 2, 2, 205, 206, 7, 95, 2, 2, 206, 48, 3, 2, 2, 2, 207, 208, 7, 48, 2, 2, 208, 209, 7, 116, 2, 2, 209, 210, 7, 103, 2, 2, 210, 211, 7, 120, 2, 2, 211, 212, 7, 103, 2, 2, 212, 213, 7, 116, 2, 2, 213, 214, 7, 117, 2, 2, 214, 215, 7, 103, 2, 2, 215, 216, 7, 42, 2, 2, 216, 217, 7, 43, 2, 2, 217, 50, 3, 2, 2, 2, 218, 219, 7, 48, 2, 2, 219, 220, 7, 110, 2, 2, 220, 221, 7, 103, 2, 2, 221, 222, 7, 112, 2, 2, 222, 223, 7, 105, 2, 2, 223, 224, 7, 118, 2, 2, 224, 225, 7, 106, 2, 2, 225, 52, 3, 2, 2, 2, 226, 227, 7, 35, 2, 2, 227, 54, 3, 2, 2, 2, 228, 229, 7, 47, 2, 2, 229, 56, 3, 2, 2, 2, 230, 231, 7, 48, 2, 2, 231, 232, 7, 117, 2, 2, 232, 233, 7, 114, 2, 2, 233, 234, 7, 110, 2, 2, 234, 235, 7, 107, 2, 2, 235, 236, 7, 118, 2, 2, 236, 58, 3, 2, 2, 2, 237, 238, 7, 49, 2, 2, 238, 60, 3, 2, 2, 2, 239, 240, 7, 39, 2, 2, 240, 62, 3, 2, 2, 2, 241, 242, 7, 45, 2, 2, 242, 64, 3, 2, 2, 2, 243, 244, 7, 63, 2, 2, 244, 245, 7, 63, 2, 2, 245, 66, 3, 2, 2, 2, 246, 247, 7, 35, 2, 2, 247, 248, 7, 63, 2, 2, 248, 68, 3, 2, 2, 2, 249, 250, 7, 40, 2, 2, 250, 70, 3, 2, 2, 2, 251, 252, 7, 126, 2, 2, 252, 72, 3, 2, 2, 2, 253, 254, 7, 40, 2, 2, 254, 255, 7, 40, 2, 2, 255, 74, 3, 2, 2, 2, 256, 257, 7, 126, 2, 2, 257, 258, 7, 126, 2, 2, 258, 76, 3, 2, 2, 2, 259, 260, 7, 107, 2, 2, 260, 261, 7, 112, 2, 2, 261, 262, 7, 118, 2, 2, 262, 78, 3, 2, 2, 2, 263, 264, 7, 100, 2, 2, 264, 265, 7, 113, 2, 2, 265, 266, 7, 113, 2, 2, 266, 267, 7, 110, 2, 2, 267, 80, 3, 2, 2, 2, 268, 269, 7, 117, 2, 2, 269, 270, 7, 118, 2, 2, 270, 271, 7, 116, 2, 2, 271, 272, 7, 107, 2, 2, 272, 273, 7, 112, 2, 2, 273, 274, 7, 105, 2, 2, 274, 82, 3, 2, 2, 2, 275, 276, 7, 114, 2, 2, 276, 277, 7, 119, 2, 2, 277, 278, 7, 100, 2, 2, 278, 279, 7, 109, 2, 2, 279, 280, 7, 103, 2, 2, 280, 281, 7, 123, 2, 2, 281, 84, 3, 2, 2, 2, 282, 283, 7, 117, 2, 2, 283, 284, 7, 107, 2, 2, 284, 285, 7, 105, 2, 2, 285, 86, 3, 2, 2, 2, 286, 287, 7, 102, 2, 2, 287, 288, 7, 99, 2, 2, 288, 289, 7, 118, 2, 2, 289, 290, 7, 99, 2, 2, 290, 291, 7, 117, 2, 2, 291, 292, 7, 107, 2, 2, 292, 293, 7, 105, 2, 2, 293, 88, 3, 2, 2, 2, 294, 296, 9, 2, 2, 2, 295, 294, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 295, 3, 2, 2, 2, 297, 298, 3, 2, 2, 2, 298, 299, 3, 2, 2, 2, 299, 301, 7, 48, 2, 2, 300, 302, 9, 2, 2, 2, 301, 300, 3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 303, 301, 3, 2, 2, 2, 303, 304, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, 305, 307, 7, 48, 2, 2, 306, 308, 9, 2, 2, 2, 307, 306, 3, 2, 2, 2, 308, 309, 3, 2, 2, 2, 309, 307, 3, 2, 2, 2, 309, 310, 3, 2, 2, 2, 310, 90, 3, 2, 2, 2, 311, 312, 7, 118, 2, 2, 312, 313, 7, 116, 2, 2, 313, 314, 7, 119, 2, 2, 314, 321, 7, 103, 2, 2, 315, 316, 7, 104, 2, 2, 316, 317, 7, 99, 2, 2, 317, 318, 7, 110, 2, 2, 318, 319, 7, 117, 2, 2, 319, 321, 7, 103, 2, 2, 320, 311, 3, 2, 2, 2, 320, 315, 3, 2, 2, 2, 321, 92, 3, 2, 2, 2, 322, 323, 7, 117, 2, 2, 323, 324, 7, 99, 2, 2, 324, 325, 7, 118, 2, 2, 325, 326, 7, 113, 2, 2, 326, 327, 7, 117, 2, 2, 327, 328, 7, 106, 2, 2, 328, 329, 7, 107, 2, 2, 329, 380, 7, 117, 2, 2, 330, 331, 7, 117, 2, 2, 331, 332, 7, 99, 2, 2, 332, 333, 7, 118, 2, 2, 333, 380, 7, 117, 2, 2, 334, 335, 7, 104, 2, 2, 335, 336, 7, 107, 2, 2, 336, 337, 7, 112, 2, 2, 337, 338, 7, 112, 2, 2, 338, 339, 7, 103, 2, 2, 339, 380, 7, 123, 2, 2, 340, 341, 7, 100, 2, 2, 341, 342, 7, 107, 2, 2, 342, 343, 7, 118, 2, 2, 343, 380, 7, 117, 2, 2, 344, 345, 7, 100, 2, 2, 345, 346, 7, 107, 2, 2, 346, 347, 7, 118, 2, 2, 347, 348, 7, 101, 2, 2, 348, 349, 7, 113, 2, 2, 349, 350, 7, 107, 2, 2, 350, 380, 7, 112, 2, 2, 351, 352, 7, 117, 2, 2, 352, 353, 7, 103, 2, 2, 353, 354, 7, 101, 2, 2, 354, 355, 7, 113, 2, 2, 355, 356, 7, 112, 2, 2, 356, 357, 7, 102, 2, 2, 357, 380, 7, 117, 2, 2, 358, 359, 7, 111, 2, 2, 359, 360, 7, 107, 2, 2, 360, 361, 7, 112, 2, 2, 361, 362, 7, 119, 2, 2, 362, 363, 7, 118, 2, 2, 363, 364, 7, 103, 2, 2, 364, 380, 7, 117, 2, 2, 365, 366, 7, 106, 2, 2, 366, 367, 7, 113, 2, 2, 367, 368, 7, 119, 2, 2, 368, 369, 7, 116, 2, 2, 369, 380, 7, 117, 2, 2, 370, 371, 7, 102, 2, 2, 371, 372, 7, 99, 2, 2, 372, 373, 7, 123, 2, 2, 373, 380, 7, 117, 2, 2, 374, 375, 7, 121, 2, 2, 375, 376, 7, 103, 2, 2, 376, 377, 7, 103, 2, 2, 377, 378, 7, 109, 2, 2, 378, 380, 7, 117, 2, 2, 379, 322, 3, 2, 2, 2, 379, 330, 3, 2, 2, 2, 379, 334, 3, 2, 2, 2, 379, 340, 3, 2, 2, 2, 379, 344, 3, 2, 2, 2, 379, 351, 3, 2, 2, 2, 379, 358, 3, 2, 2, 2, 379, 365, 3, 2, 2, 2, 379, 370, 3, 2, 2, 2, 379, 374, 3, 2, 2, 2, 380, 94, 3, 2, 2, 2, 381, 383, 9, 3, 2, 2, 382, 381, 3, 2, 2, 2, 382, 383, 3, 2, 2, 2, 383, 385, 3, 2, 2, 2, 384, 386, 9, 2, 2, 2, 385, 384, 3, 2, 2, 2, 386, 387, 3, 2, 2, 2, 387, 385, 3, 2, 2, 2, 387, 388, 3, 2, 2, 2, 388, 395, 3, 2, 2, 2, 389, 391, 9, 4, 2, 2, 390, 392, 9, 2, 2, 2, 391, 390, 3, 2, 2, 2, 392, 393, 3, 2, 2, 2, 393, 391, 3, 2, 2, 2, 393, 394, 3, 2, 2, 2, 394, 396, 3, 2, 2, 2, 395, 389, 3, 2, 2, 2, 395, 396, 3, 2, 2, 2, 396, 96, 3, 2, 2, 2, 397, 398, 7, 100, 2, 2, 398, 399, 7, 123, 2, 2, 399, 400, 7, 118, 2, 2, 400, 401, 7, 103, 2, 2, 401, 402, 7, 117, 2, 2, 402, 404, 3, 2, 2, 2, 403, 405, 5, 99, 50, 2, 404, 403, 3, 2, 2, 2, 404, 405, 3, 2, 2, 2, 405, 411, 3, 2, 2, 2, 406, 407, 7, 100, 2, 2, 407, 408, 7, 123, 2, 2, 408, 409, 7, 118, 2, 2, 409, 411, 7, 103, 2, 2, 410, 397, 3, 2, 2, 2, 410, 406, 3, 2, 2, 2, 411, 98, 3, 2, 2, 2, 412, 416, 9, 5, 2, 2, 413, 415, 9, 2, 2, 2, 414, 413, 3, 2, 2, 2, 415, 418, 3, 2, 2, 2, 416, 414, 3, 2, 2, 2, 416, 417, 3, 2, 2, 2, 417, 100, 3, 2, 2, 2, 418, 416, 3, 2, 2, 2, 419, 425, 7, 36, 2, 2, 420, 421, 7, 94, 2, 2, 421, 424, 7, 36, 2, 2, 422, 424, 10, 6, 2, 2, 423, 420, 3, 2, 2, 2, 423, 422, 3, 2, 2, 2, 424, 427, 3, 2, 2, 2, 425, 426, 3, 2, 2, 2, 425, 423, 3, 2, 2, 2, 426, 428, 3, 2, 2, 2, 427, 425, 3, 2, 2, 2, 428, 440, 7, 36, 2, 2, 429, 435, 7, 41, 2, 2, 430, 431, 7, 94, 2, 2, 431, 434, 7, 41, 2, 2, 432, 434, 10, 7, 2, 2, 433, 430, 3, 2, 2, 2, 433, 432, 3, 2, 2, 2, 434, 437, 3, 2, 2, 2, 435, 436, 3, 2, 2, 2, 435, 433, 3, 2, 2, 2, 436, 438, 3, 2, 2, 2, 437, 435, 3, 2, 2, 2, 438, 440, 7, 41, 2, 2, 439, 419, 3, 2, 2, 2, 439, 429, 3, 2, 2, 2, 440, 102, 3, 2, 2, 2, 441, 442, 7, 102, 2, 2, 442, 443, 7, 99, 2, 2, 443, 444, 7, 118, 2, 2, 444, 445, 7, 103, 2, 2, 445, 446, 7, 42, 2, 2, 446, 447, 3, 2, 2, 2, 447, 448, 5, 101, 51, 2, 448, 449, 7, 43, 2, 2, 449, 104, 3, 2, 2, 2, 450, 451, 7, 50, 2, 2, 451, 455, 9, 8, 2, 2, 452, 454, 9, 9, 2, 2, 453, 452, 3, 2, 2, 2, 454, 457, 3, 2, 2, 2, 455, 453, 3, 2, 2, 2, 455, 456, 3, 2, 2, 2, 456, 106, 3, 2, 2, 2, 457, 455, 3, 2, 2, 2, 458, 459, 7, 118, 2, 2, 459, 460, 7, 122, 2, 2, 460, 461, 7, 48, 2, 2, 461, 462, 7, 99, 2, 2, 462, 463, 7, 105, 2, 2, 463, 472, 7, 103, 2, 2, 464, 465, 7, 118, 2, 2, 465, 466, 7, 122, 2, 2, 466, 467, 7, 48, 2, 2, 467, 468, 7, 118, 2, 2, 468, 469, 7, 107, 2, 2, 469, 470, 7, 111, 2, 2, 470, 472, 7, 103, 2, 2, 471, 458, 3, 2, 2, 2, 471, 464, 3, 2, 2, 2, 472, 108, 3, 2, 2, 2, 473, 474, 7, 118, 2, 2, 474, 475, 7, 122, 2, 2, 475, 476, 7, 48, 2, 2, 476, 477, 7, 120, 2, 2, 477, 478, 7, 103, 2, 2, 478, 479, 7, 116, 2, 2, 479, 480, 7, 117, 2, 2, 480, 481, 7, 107, 2, 2, 481, 482, 7, 113, 2, 2, 482, 602, 7, 112, 2, 2, 483, 484, 7, 118, 2, 2, 484, 485, 7, 122, 2, 2, 485, 486, 7, 48, 2, 2, 486, 487, 7, 106, 2, 2, 487, 488, 7, 99, 2, 2, 488, 489, 7, 117, 2, 2, 489, 490, 7, 106, 2, 2, 490, 491, 7, 82, 2, 2, 491, 492, 7, 116, 2, 2, 492, 493, 7, 103, 2, 2, 493, 494, 7, 120, 2, 2, 494, 495, 7, 113, 2, 2, 495, 496, 7, 119, 2, 2, 496, 497, 7, 118, 2, 2, 497, 602, 7, 117, 2, 2, 498, 499, 7, 118, 2, 2, 499, 500, 7, 122, 2, 2, 500, 501, 7, 48, 2, 2, 501, 502, 7, 106, 2, 2, 502, 503, 7, 99, 2, 2, 503, 504, 7, 117, 2, 2, 504, 505, 7, 106, 2, 2, 505, 506, 7, 85, 2, 2, 506, 507, 7, 103, 2, 2, 507, 508, 7, 115, 2, 2, 508, 509, 7, 119, 2, 2, 509, 510, 7, 103, 2, 2, 510, 511, 7, 112, 2, 2, 511, 512, 7, 101, 2, 2, 512, 602, 7, 103, 2, 2, 513, 514, 7, 118, 2, 2, 514, 515, 7, 122, 2, 2, 515, 516, 7, 48, 2, 2, 516, 517, 7, 113, 2, 2, 517, 518, 7, 119, 2, 2, 518, 519, 7, 118, 2, 2, 519, 520, 7, 114, 2, 2, 520, 521, 7, 113, 2, 2, 521, 522, 7, 107, 2, 2, 522, 523, 7, 112, 2, 2, 523, 602, 7, 118, 2, 2, 524, 525, 7, 118, 2, 2, 525, 526, 7, 122, 2, 2, 526, 527, 7, 48, 2, 2, 527, 528, 7, 100, 2, 2, 528, 529, 7, 123, 2, 2, 529, 530, 7, 118, 2, 2, 530, 531, 7, 103, 2, 2, 531, 532, 7, 101, 2, 2, 532, 533, 7, 113, 2, 2, 533, 534, 7, 102, 2, 2, 534, 602, 7, 103, 2, 2, 535, 536, 7, 118, 2, 2, 536, 537, 7, 122, 2, 2, 537, 538, 7, 48, 2, 2, 538, 539, 7, 120, 2, 2, 539, 540, 7, 99, 2, 2, 540, 541, 7, 110, 2, 2, 541, 542, 7, 119, 2, 2, 542, 602, 7, 103, 2, 2, 543, 544, 7, 118, 2, 2, 544, 545, 7, 122, 2, 2, 545, 546, 7, 48, 2, 2, 546, 547, 7, 117, 2, 2, 547, 548, 7, 103, 2, 2, 548, 549, 7, 115, 2, 2, 549, 550, 7, 119, 2, 2, 550, 551, 7, 103, 2, 2, 551, 552, 7, 112, 2, 2, 552, 553, 7, 101, 2, 2, 553, 602, 7, 103, 2, 2, 554, 555, 7, 118, 2, 2, 555, 556, 7, 122, 2, 2, 556, 557, 7, 48, 2, 2, 557, 558, 7, 106, 2, 2, 558, 559, 7, 99, 2, 2, 559, 560, 7, 117, 2, 2, 560, 561, 7, 106, 2, 2, 561, 562, 7, 81, 2, 2, 562, 563, 7, 119, 2, 2, 563, 564, 7, 118, 2, 2, 564, 565, 7, 114, 2, 2, 565, 566, 7, 119, 2, 2, 566, 567, 7, 118, 2, 2, 567, 602, 7, 117, 2, 2, 568, 569, 7, 118, 2, 2, 569, 570, 7, 122, 2, 2, 570, 571, 7, 48, 2, 2, 571, 572, 7, 110, 2, 2, 572, 573, 7, 113, 2, 2, 573, 574, 7, 101, 2, 2, 574, 575, 7, 109, 2, 2, 575, 576, 7, 118, 2, 2, 576, 577, 7, 107, 2, 2, 577, 578, 7, 111, 2, 2, 578, 602, 7, 103, 2, 2, 579, 580, 7, 118, 2, 2, 580, 581, 7, 122, 2, 2, 581, 582, 7, 48, 2, 2, 582, 583, 7, 106, 2, 2, 583, 584, 7, 99, 2, 2, 584, 585, 7, 117, 2, 2, 585, 586, 7, 106, 2, 2, 586, 587, 7, 118, 2, 2, 587, 588, 7, 123, 2, 2, 588, 589, 7, 114, 2, 2, 589, 602, 7, 103, 2, 2, 590, 591, 7, 118, 2, 2, 591, 592, 7, 122, 2, 2, 592, 593, 7, 48, 2, 2, 593, 594, 7, 114, 2, 2, 594, 595, 7, 116, 2, 2, 595, 596, 7, 103, 2, 2, 596, 597, 7, 107, 2, 2, 597, 598, 7, 111, 2, 2, 598, 599, 7, 99, 2, 2, 599, 600, 7, 105, 2, 2, 600, 602, 7, 103, 2, 2, 601, 473, 3, 2, 2, 2, 601, 483, 3, 2, 2, 2, 601, 498, 3, 2, 2, 2, 601, 513, 3, 2, 2, 2, 601, 524, 3, 2, 2, 2, 601, 535, 3, 2, 2, 2, 601, 543, 3, 2, 2, 2, 601, 554, 3, 2, 2, 2, 601, 568, 3, 2, 2, 2, 601, 579, 3, 2, 2, 2, 601, 590, 3, 2, 2, 2, 602, 110, 3, 2, 2, 2, 603, 607, 9, 10, 2, 2, 604, 606, 9, 11, 2, 2, 605, 604, 3, 2, 2, 2, 606, 609, 3, 2, 2, 2, 607, 605, 3, 2, 2, 2, 607, 608, 3, 2, 2, 2, 608, 112, 3, 2, 2, 2, 609, 607, 3, 2, 2, 2, 610, 612, 9, 12, 2, 2, 611, 610, 3, 2, 2, 2, 612, 613, 3, 2, 2, 2, 613, 611, 3, 2, 2, 2, 613, 614, 3, 2, 2, 2, 614, 615, 3, 2, 2, 2, 615, 616, 8, 57, 2, 2, 616, 114, 3, 2, 2, 2, 617, 618, 7, 49, 2, 2, 618, 619, 7, 44, 2, 2, 619, 623, 3, 2, 2, 2, 620, 622, 11, 2, 2, 2, 621, 620, 3, 2, 2, 2, 622, 625, 3, 2, 2, 2, 623, 624, 3, 2, 2, 2, 623, 621, 3, 2, 2, 2, 624, 626, 3, 2, 2, 2, 625, 623, 3, 2, 2, 2, 626, 627, 7, 44, 2, 2, 627, 628, 7, 49, 2, 2, 628, 629, 3, 2, 2, 2, 629, 630, 8, 58, 3, 2, 630, 116, 3, 2, 2, 2, 631, 632, 7, 49, 2, 2, 632, 633, 7, 49, 2, 2, 633, 637, 3, 2, 2, 2, 634, 636, 10, 13, 2, 2, 635, 634, 3, 2, 2, 2, 636, 639, 3, 2, 2, 2, 637, 635, 3, 2, 2, 2, 637, 638, 3, 2, 2, 2, 638, 640, 3, 2, 2, 2, 639, 637, 3, 2, 2, 2, 640, 641, 8, 59, 3, 2, 641, 118, 3, 2, 2, 2, 27, 2, 297, 303, 309, 320, 379, 382, 387, 393, 395, 404, 410, 416, 423, 425, 433, 435, 439, 455, 471, 601, 607, 613, 623, 637, 4, 8, 2, 2, 2, 3, 2] \ No newline at end of file +token literal names: +null +'pragma' +';' +'cashscript' +'^' +'~' +'>=' +'>' +'<' +'<=' +'=' +'contract' +'{' +'}' +'function' +'(' +',' +')' +'require' +'if' +'else' +'new' +'[' +']' +'tx.outputs' +'.value' +'.lockingBytecode' +'tx.inputs' +'.outpointTransactionHash' +'.outpointIndex' +'.unlockingBytecode' +'.sequenceNumber' +'.reverse()' +'.length' +'.split' +'!' +'-' +'*' +'/' +'%' +'+' +'==' +'!=' +'&' +'|' +'&&' +'||' +'constant' +'int' +'bool' +'string' +'pubkey' +'sig' +'datasig' +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +VersionLiteral +BooleanLiteral +NumberUnit +NumberLiteral +Bytes +Bound +StringLiteral +DateLiteral +HexLiteral +TxVar +NullaryOp +Identifier +WHITESPACE +COMMENT +LINE_COMMENT + +rule names: +T__0 +T__1 +T__2 +T__3 +T__4 +T__5 +T__6 +T__7 +T__8 +T__9 +T__10 +T__11 +T__12 +T__13 +T__14 +T__15 +T__16 +T__17 +T__18 +T__19 +T__20 +T__21 +T__22 +T__23 +T__24 +T__25 +T__26 +T__27 +T__28 +T__29 +T__30 +T__31 +T__32 +T__33 +T__34 +T__35 +T__36 +T__37 +T__38 +T__39 +T__40 +T__41 +T__42 +T__43 +T__44 +T__45 +T__46 +T__47 +T__48 +T__49 +T__50 +T__51 +T__52 +VersionLiteral +BooleanLiteral +NumberUnit +NumberLiteral +Bytes +Bound +StringLiteral +DateLiteral +HexLiteral +TxVar +NullaryOp +Identifier +WHITESPACE +COMMENT +LINE_COMMENT + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 70, 759, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 6, 55, 447, 10, 55, 13, 55, 14, 55, 448, 3, 55, 3, 55, 6, 55, 453, 10, 55, 13, 55, 14, 55, 454, 3, 55, 3, 55, 6, 55, 459, 10, 55, 13, 55, 14, 55, 460, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 5, 56, 472, 10, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 5, 57, 531, 10, 57, 3, 58, 5, 58, 534, 10, 58, 3, 58, 6, 58, 537, 10, 58, 13, 58, 14, 58, 538, 3, 58, 3, 58, 6, 58, 543, 10, 58, 13, 58, 14, 58, 544, 5, 58, 547, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 556, 10, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 562, 10, 59, 3, 60, 3, 60, 7, 60, 566, 10, 60, 12, 60, 14, 60, 569, 11, 60, 3, 61, 3, 61, 3, 61, 3, 61, 7, 61, 575, 10, 61, 12, 61, 14, 61, 578, 11, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 7, 61, 585, 10, 61, 12, 61, 14, 61, 588, 11, 61, 3, 61, 5, 61, 591, 10, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 7, 63, 605, 10, 63, 12, 63, 14, 63, 608, 11, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 5, 64, 623, 10, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 5, 65, 719, 10, 65, 3, 66, 3, 66, 7, 66, 723, 10, 66, 12, 66, 14, 66, 726, 11, 66, 3, 67, 6, 67, 729, 10, 67, 13, 67, 14, 67, 730, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 7, 68, 739, 10, 68, 12, 68, 14, 68, 742, 11, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 7, 69, 753, 10, 69, 12, 69, 14, 69, 756, 11, 69, 3, 69, 3, 69, 5, 576, 586, 740, 2, 2, 70, 3, 2, 3, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 53, 2, 28, 55, 2, 29, 57, 2, 30, 59, 2, 31, 61, 2, 32, 63, 2, 33, 65, 2, 34, 67, 2, 35, 69, 2, 36, 71, 2, 37, 73, 2, 38, 75, 2, 39, 77, 2, 40, 79, 2, 41, 81, 2, 42, 83, 2, 43, 85, 2, 44, 87, 2, 45, 89, 2, 46, 91, 2, 47, 93, 2, 48, 95, 2, 49, 97, 2, 50, 99, 2, 51, 101, 2, 52, 103, 2, 53, 105, 2, 54, 107, 2, 55, 109, 2, 56, 111, 2, 57, 113, 2, 58, 115, 2, 59, 117, 2, 60, 119, 2, 61, 121, 2, 62, 123, 2, 63, 125, 2, 64, 127, 2, 65, 129, 2, 66, 131, 2, 67, 133, 2, 68, 135, 2, 69, 137, 2, 70, 3, 2, 14, 3, 2, 50, 59, 3, 2, 47, 47, 4, 2, 71, 71, 103, 103, 3, 2, 51, 59, 5, 2, 12, 12, 15, 15, 36, 36, 5, 2, 12, 12, 15, 15, 41, 41, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 5, 2, 11, 12, 14, 15, 34, 34, 4, 2, 12, 12, 15, 15, 2, 794, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 3, 139, 3, 2, 2, 2, 5, 146, 3, 2, 2, 2, 7, 148, 3, 2, 2, 2, 9, 159, 3, 2, 2, 2, 11, 161, 3, 2, 2, 2, 13, 163, 3, 2, 2, 2, 15, 166, 3, 2, 2, 2, 17, 168, 3, 2, 2, 2, 19, 170, 3, 2, 2, 2, 21, 173, 3, 2, 2, 2, 23, 175, 3, 2, 2, 2, 25, 184, 3, 2, 2, 2, 27, 186, 3, 2, 2, 2, 29, 188, 3, 2, 2, 2, 31, 197, 3, 2, 2, 2, 33, 199, 3, 2, 2, 2, 35, 201, 3, 2, 2, 2, 37, 203, 3, 2, 2, 2, 39, 211, 3, 2, 2, 2, 41, 214, 3, 2, 2, 2, 43, 219, 3, 2, 2, 2, 45, 223, 3, 2, 2, 2, 47, 225, 3, 2, 2, 2, 49, 227, 3, 2, 2, 2, 51, 238, 3, 2, 2, 2, 53, 245, 3, 2, 2, 2, 55, 262, 3, 2, 2, 2, 57, 272, 3, 2, 2, 2, 59, 297, 3, 2, 2, 2, 61, 312, 3, 2, 2, 2, 63, 331, 3, 2, 2, 2, 65, 347, 3, 2, 2, 2, 67, 358, 3, 2, 2, 2, 69, 366, 3, 2, 2, 2, 71, 373, 3, 2, 2, 2, 73, 375, 3, 2, 2, 2, 75, 377, 3, 2, 2, 2, 77, 379, 3, 2, 2, 2, 79, 381, 3, 2, 2, 2, 81, 383, 3, 2, 2, 2, 83, 385, 3, 2, 2, 2, 85, 388, 3, 2, 2, 2, 87, 391, 3, 2, 2, 2, 89, 393, 3, 2, 2, 2, 91, 395, 3, 2, 2, 2, 93, 398, 3, 2, 2, 2, 95, 401, 3, 2, 2, 2, 97, 410, 3, 2, 2, 2, 99, 414, 3, 2, 2, 2, 101, 419, 3, 2, 2, 2, 103, 426, 3, 2, 2, 2, 105, 433, 3, 2, 2, 2, 107, 437, 3, 2, 2, 2, 109, 446, 3, 2, 2, 2, 111, 471, 3, 2, 2, 2, 113, 530, 3, 2, 2, 2, 115, 533, 3, 2, 2, 2, 117, 561, 3, 2, 2, 2, 119, 563, 3, 2, 2, 2, 121, 590, 3, 2, 2, 2, 123, 592, 3, 2, 2, 2, 125, 601, 3, 2, 2, 2, 127, 622, 3, 2, 2, 2, 129, 718, 3, 2, 2, 2, 131, 720, 3, 2, 2, 2, 133, 728, 3, 2, 2, 2, 135, 734, 3, 2, 2, 2, 137, 748, 3, 2, 2, 2, 139, 140, 7, 114, 2, 2, 140, 141, 7, 116, 2, 2, 141, 142, 7, 99, 2, 2, 142, 143, 7, 105, 2, 2, 143, 144, 7, 111, 2, 2, 144, 145, 7, 99, 2, 2, 145, 4, 3, 2, 2, 2, 146, 147, 7, 61, 2, 2, 147, 6, 3, 2, 2, 2, 148, 149, 7, 101, 2, 2, 149, 150, 7, 99, 2, 2, 150, 151, 7, 117, 2, 2, 151, 152, 7, 106, 2, 2, 152, 153, 7, 117, 2, 2, 153, 154, 7, 101, 2, 2, 154, 155, 7, 116, 2, 2, 155, 156, 7, 107, 2, 2, 156, 157, 7, 114, 2, 2, 157, 158, 7, 118, 2, 2, 158, 8, 3, 2, 2, 2, 159, 160, 7, 96, 2, 2, 160, 10, 3, 2, 2, 2, 161, 162, 7, 128, 2, 2, 162, 12, 3, 2, 2, 2, 163, 164, 7, 64, 2, 2, 164, 165, 7, 63, 2, 2, 165, 14, 3, 2, 2, 2, 166, 167, 7, 64, 2, 2, 167, 16, 3, 2, 2, 2, 168, 169, 7, 62, 2, 2, 169, 18, 3, 2, 2, 2, 170, 171, 7, 62, 2, 2, 171, 172, 7, 63, 2, 2, 172, 20, 3, 2, 2, 2, 173, 174, 7, 63, 2, 2, 174, 22, 3, 2, 2, 2, 175, 176, 7, 101, 2, 2, 176, 177, 7, 113, 2, 2, 177, 178, 7, 112, 2, 2, 178, 179, 7, 118, 2, 2, 179, 180, 7, 116, 2, 2, 180, 181, 7, 99, 2, 2, 181, 182, 7, 101, 2, 2, 182, 183, 7, 118, 2, 2, 183, 24, 3, 2, 2, 2, 184, 185, 7, 125, 2, 2, 185, 26, 3, 2, 2, 2, 186, 187, 7, 127, 2, 2, 187, 28, 3, 2, 2, 2, 188, 189, 7, 104, 2, 2, 189, 190, 7, 119, 2, 2, 190, 191, 7, 112, 2, 2, 191, 192, 7, 101, 2, 2, 192, 193, 7, 118, 2, 2, 193, 194, 7, 107, 2, 2, 194, 195, 7, 113, 2, 2, 195, 196, 7, 112, 2, 2, 196, 30, 3, 2, 2, 2, 197, 198, 7, 42, 2, 2, 198, 32, 3, 2, 2, 2, 199, 200, 7, 46, 2, 2, 200, 34, 3, 2, 2, 2, 201, 202, 7, 43, 2, 2, 202, 36, 3, 2, 2, 2, 203, 204, 7, 116, 2, 2, 204, 205, 7, 103, 2, 2, 205, 206, 7, 115, 2, 2, 206, 207, 7, 119, 2, 2, 207, 208, 7, 107, 2, 2, 208, 209, 7, 116, 2, 2, 209, 210, 7, 103, 2, 2, 210, 38, 3, 2, 2, 2, 211, 212, 7, 107, 2, 2, 212, 213, 7, 104, 2, 2, 213, 40, 3, 2, 2, 2, 214, 215, 7, 103, 2, 2, 215, 216, 7, 110, 2, 2, 216, 217, 7, 117, 2, 2, 217, 218, 7, 103, 2, 2, 218, 42, 3, 2, 2, 2, 219, 220, 7, 112, 2, 2, 220, 221, 7, 103, 2, 2, 221, 222, 7, 121, 2, 2, 222, 44, 3, 2, 2, 2, 223, 224, 7, 93, 2, 2, 224, 46, 3, 2, 2, 2, 225, 226, 7, 95, 2, 2, 226, 48, 3, 2, 2, 2, 227, 228, 7, 118, 2, 2, 228, 229, 7, 122, 2, 2, 229, 230, 7, 48, 2, 2, 230, 231, 7, 113, 2, 2, 231, 232, 7, 119, 2, 2, 232, 233, 7, 118, 2, 2, 233, 234, 7, 114, 2, 2, 234, 235, 7, 119, 2, 2, 235, 236, 7, 118, 2, 2, 236, 237, 7, 117, 2, 2, 237, 50, 3, 2, 2, 2, 238, 239, 7, 48, 2, 2, 239, 240, 7, 120, 2, 2, 240, 241, 7, 99, 2, 2, 241, 242, 7, 110, 2, 2, 242, 243, 7, 119, 2, 2, 243, 244, 7, 103, 2, 2, 244, 52, 3, 2, 2, 2, 245, 246, 7, 48, 2, 2, 246, 247, 7, 110, 2, 2, 247, 248, 7, 113, 2, 2, 248, 249, 7, 101, 2, 2, 249, 250, 7, 109, 2, 2, 250, 251, 7, 107, 2, 2, 251, 252, 7, 112, 2, 2, 252, 253, 7, 105, 2, 2, 253, 254, 7, 68, 2, 2, 254, 255, 7, 123, 2, 2, 255, 256, 7, 118, 2, 2, 256, 257, 7, 103, 2, 2, 257, 258, 7, 101, 2, 2, 258, 259, 7, 113, 2, 2, 259, 260, 7, 102, 2, 2, 260, 261, 7, 103, 2, 2, 261, 54, 3, 2, 2, 2, 262, 263, 7, 118, 2, 2, 263, 264, 7, 122, 2, 2, 264, 265, 7, 48, 2, 2, 265, 266, 7, 107, 2, 2, 266, 267, 7, 112, 2, 2, 267, 268, 7, 114, 2, 2, 268, 269, 7, 119, 2, 2, 269, 270, 7, 118, 2, 2, 270, 271, 7, 117, 2, 2, 271, 56, 3, 2, 2, 2, 272, 273, 7, 48, 2, 2, 273, 274, 7, 113, 2, 2, 274, 275, 7, 119, 2, 2, 275, 276, 7, 118, 2, 2, 276, 277, 7, 114, 2, 2, 277, 278, 7, 113, 2, 2, 278, 279, 7, 107, 2, 2, 279, 280, 7, 112, 2, 2, 280, 281, 7, 118, 2, 2, 281, 282, 7, 86, 2, 2, 282, 283, 7, 116, 2, 2, 283, 284, 7, 99, 2, 2, 284, 285, 7, 112, 2, 2, 285, 286, 7, 117, 2, 2, 286, 287, 7, 99, 2, 2, 287, 288, 7, 101, 2, 2, 288, 289, 7, 118, 2, 2, 289, 290, 7, 107, 2, 2, 290, 291, 7, 113, 2, 2, 291, 292, 7, 112, 2, 2, 292, 293, 7, 74, 2, 2, 293, 294, 7, 99, 2, 2, 294, 295, 7, 117, 2, 2, 295, 296, 7, 106, 2, 2, 296, 58, 3, 2, 2, 2, 297, 298, 7, 48, 2, 2, 298, 299, 7, 113, 2, 2, 299, 300, 7, 119, 2, 2, 300, 301, 7, 118, 2, 2, 301, 302, 7, 114, 2, 2, 302, 303, 7, 113, 2, 2, 303, 304, 7, 107, 2, 2, 304, 305, 7, 112, 2, 2, 305, 306, 7, 118, 2, 2, 306, 307, 7, 75, 2, 2, 307, 308, 7, 112, 2, 2, 308, 309, 7, 102, 2, 2, 309, 310, 7, 103, 2, 2, 310, 311, 7, 122, 2, 2, 311, 60, 3, 2, 2, 2, 312, 313, 7, 48, 2, 2, 313, 314, 7, 119, 2, 2, 314, 315, 7, 112, 2, 2, 315, 316, 7, 110, 2, 2, 316, 317, 7, 113, 2, 2, 317, 318, 7, 101, 2, 2, 318, 319, 7, 109, 2, 2, 319, 320, 7, 107, 2, 2, 320, 321, 7, 112, 2, 2, 321, 322, 7, 105, 2, 2, 322, 323, 7, 68, 2, 2, 323, 324, 7, 123, 2, 2, 324, 325, 7, 118, 2, 2, 325, 326, 7, 103, 2, 2, 326, 327, 7, 101, 2, 2, 327, 328, 7, 113, 2, 2, 328, 329, 7, 102, 2, 2, 329, 330, 7, 103, 2, 2, 330, 62, 3, 2, 2, 2, 331, 332, 7, 48, 2, 2, 332, 333, 7, 117, 2, 2, 333, 334, 7, 103, 2, 2, 334, 335, 7, 115, 2, 2, 335, 336, 7, 119, 2, 2, 336, 337, 7, 103, 2, 2, 337, 338, 7, 112, 2, 2, 338, 339, 7, 101, 2, 2, 339, 340, 7, 103, 2, 2, 340, 341, 7, 80, 2, 2, 341, 342, 7, 119, 2, 2, 342, 343, 7, 111, 2, 2, 343, 344, 7, 100, 2, 2, 344, 345, 7, 103, 2, 2, 345, 346, 7, 116, 2, 2, 346, 64, 3, 2, 2, 2, 347, 348, 7, 48, 2, 2, 348, 349, 7, 116, 2, 2, 349, 350, 7, 103, 2, 2, 350, 351, 7, 120, 2, 2, 351, 352, 7, 103, 2, 2, 352, 353, 7, 116, 2, 2, 353, 354, 7, 117, 2, 2, 354, 355, 7, 103, 2, 2, 355, 356, 7, 42, 2, 2, 356, 357, 7, 43, 2, 2, 357, 66, 3, 2, 2, 2, 358, 359, 7, 48, 2, 2, 359, 360, 7, 110, 2, 2, 360, 361, 7, 103, 2, 2, 361, 362, 7, 112, 2, 2, 362, 363, 7, 105, 2, 2, 363, 364, 7, 118, 2, 2, 364, 365, 7, 106, 2, 2, 365, 68, 3, 2, 2, 2, 366, 367, 7, 48, 2, 2, 367, 368, 7, 117, 2, 2, 368, 369, 7, 114, 2, 2, 369, 370, 7, 110, 2, 2, 370, 371, 7, 107, 2, 2, 371, 372, 7, 118, 2, 2, 372, 70, 3, 2, 2, 2, 373, 374, 7, 35, 2, 2, 374, 72, 3, 2, 2, 2, 375, 376, 7, 47, 2, 2, 376, 74, 3, 2, 2, 2, 377, 378, 7, 44, 2, 2, 378, 76, 3, 2, 2, 2, 379, 380, 7, 49, 2, 2, 380, 78, 3, 2, 2, 2, 381, 382, 7, 39, 2, 2, 382, 80, 3, 2, 2, 2, 383, 384, 7, 45, 2, 2, 384, 82, 3, 2, 2, 2, 385, 386, 7, 63, 2, 2, 386, 387, 7, 63, 2, 2, 387, 84, 3, 2, 2, 2, 388, 389, 7, 35, 2, 2, 389, 390, 7, 63, 2, 2, 390, 86, 3, 2, 2, 2, 391, 392, 7, 40, 2, 2, 392, 88, 3, 2, 2, 2, 393, 394, 7, 126, 2, 2, 394, 90, 3, 2, 2, 2, 395, 396, 7, 40, 2, 2, 396, 397, 7, 40, 2, 2, 397, 92, 3, 2, 2, 2, 398, 399, 7, 126, 2, 2, 399, 400, 7, 126, 2, 2, 400, 94, 3, 2, 2, 2, 401, 402, 7, 101, 2, 2, 402, 403, 7, 113, 2, 2, 403, 404, 7, 112, 2, 2, 404, 405, 7, 117, 2, 2, 405, 406, 7, 118, 2, 2, 406, 407, 7, 99, 2, 2, 407, 408, 7, 112, 2, 2, 408, 409, 7, 118, 2, 2, 409, 96, 3, 2, 2, 2, 410, 411, 7, 107, 2, 2, 411, 412, 7, 112, 2, 2, 412, 413, 7, 118, 2, 2, 413, 98, 3, 2, 2, 2, 414, 415, 7, 100, 2, 2, 415, 416, 7, 113, 2, 2, 416, 417, 7, 113, 2, 2, 417, 418, 7, 110, 2, 2, 418, 100, 3, 2, 2, 2, 419, 420, 7, 117, 2, 2, 420, 421, 7, 118, 2, 2, 421, 422, 7, 116, 2, 2, 422, 423, 7, 107, 2, 2, 423, 424, 7, 112, 2, 2, 424, 425, 7, 105, 2, 2, 425, 102, 3, 2, 2, 2, 426, 427, 7, 114, 2, 2, 427, 428, 7, 119, 2, 2, 428, 429, 7, 100, 2, 2, 429, 430, 7, 109, 2, 2, 430, 431, 7, 103, 2, 2, 431, 432, 7, 123, 2, 2, 432, 104, 3, 2, 2, 2, 433, 434, 7, 117, 2, 2, 434, 435, 7, 107, 2, 2, 435, 436, 7, 105, 2, 2, 436, 106, 3, 2, 2, 2, 437, 438, 7, 102, 2, 2, 438, 439, 7, 99, 2, 2, 439, 440, 7, 118, 2, 2, 440, 441, 7, 99, 2, 2, 441, 442, 7, 117, 2, 2, 442, 443, 7, 107, 2, 2, 443, 444, 7, 105, 2, 2, 444, 108, 3, 2, 2, 2, 445, 447, 9, 2, 2, 2, 446, 445, 3, 2, 2, 2, 447, 448, 3, 2, 2, 2, 448, 446, 3, 2, 2, 2, 448, 449, 3, 2, 2, 2, 449, 450, 3, 2, 2, 2, 450, 452, 7, 48, 2, 2, 451, 453, 9, 2, 2, 2, 452, 451, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 452, 3, 2, 2, 2, 454, 455, 3, 2, 2, 2, 455, 456, 3, 2, 2, 2, 456, 458, 7, 48, 2, 2, 457, 459, 9, 2, 2, 2, 458, 457, 3, 2, 2, 2, 459, 460, 3, 2, 2, 2, 460, 458, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 110, 3, 2, 2, 2, 462, 463, 7, 118, 2, 2, 463, 464, 7, 116, 2, 2, 464, 465, 7, 119, 2, 2, 465, 472, 7, 103, 2, 2, 466, 467, 7, 104, 2, 2, 467, 468, 7, 99, 2, 2, 468, 469, 7, 110, 2, 2, 469, 470, 7, 117, 2, 2, 470, 472, 7, 103, 2, 2, 471, 462, 3, 2, 2, 2, 471, 466, 3, 2, 2, 2, 472, 112, 3, 2, 2, 2, 473, 474, 7, 117, 2, 2, 474, 475, 7, 99, 2, 2, 475, 476, 7, 118, 2, 2, 476, 477, 7, 113, 2, 2, 477, 478, 7, 117, 2, 2, 478, 479, 7, 106, 2, 2, 479, 480, 7, 107, 2, 2, 480, 531, 7, 117, 2, 2, 481, 482, 7, 117, 2, 2, 482, 483, 7, 99, 2, 2, 483, 484, 7, 118, 2, 2, 484, 531, 7, 117, 2, 2, 485, 486, 7, 104, 2, 2, 486, 487, 7, 107, 2, 2, 487, 488, 7, 112, 2, 2, 488, 489, 7, 112, 2, 2, 489, 490, 7, 103, 2, 2, 490, 531, 7, 123, 2, 2, 491, 492, 7, 100, 2, 2, 492, 493, 7, 107, 2, 2, 493, 494, 7, 118, 2, 2, 494, 531, 7, 117, 2, 2, 495, 496, 7, 100, 2, 2, 496, 497, 7, 107, 2, 2, 497, 498, 7, 118, 2, 2, 498, 499, 7, 101, 2, 2, 499, 500, 7, 113, 2, 2, 500, 501, 7, 107, 2, 2, 501, 531, 7, 112, 2, 2, 502, 503, 7, 117, 2, 2, 503, 504, 7, 103, 2, 2, 504, 505, 7, 101, 2, 2, 505, 506, 7, 113, 2, 2, 506, 507, 7, 112, 2, 2, 507, 508, 7, 102, 2, 2, 508, 531, 7, 117, 2, 2, 509, 510, 7, 111, 2, 2, 510, 511, 7, 107, 2, 2, 511, 512, 7, 112, 2, 2, 512, 513, 7, 119, 2, 2, 513, 514, 7, 118, 2, 2, 514, 515, 7, 103, 2, 2, 515, 531, 7, 117, 2, 2, 516, 517, 7, 106, 2, 2, 517, 518, 7, 113, 2, 2, 518, 519, 7, 119, 2, 2, 519, 520, 7, 116, 2, 2, 520, 531, 7, 117, 2, 2, 521, 522, 7, 102, 2, 2, 522, 523, 7, 99, 2, 2, 523, 524, 7, 123, 2, 2, 524, 531, 7, 117, 2, 2, 525, 526, 7, 121, 2, 2, 526, 527, 7, 103, 2, 2, 527, 528, 7, 103, 2, 2, 528, 529, 7, 109, 2, 2, 529, 531, 7, 117, 2, 2, 530, 473, 3, 2, 2, 2, 530, 481, 3, 2, 2, 2, 530, 485, 3, 2, 2, 2, 530, 491, 3, 2, 2, 2, 530, 495, 3, 2, 2, 2, 530, 502, 3, 2, 2, 2, 530, 509, 3, 2, 2, 2, 530, 516, 3, 2, 2, 2, 530, 521, 3, 2, 2, 2, 530, 525, 3, 2, 2, 2, 531, 114, 3, 2, 2, 2, 532, 534, 9, 3, 2, 2, 533, 532, 3, 2, 2, 2, 533, 534, 3, 2, 2, 2, 534, 536, 3, 2, 2, 2, 535, 537, 9, 2, 2, 2, 536, 535, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 536, 3, 2, 2, 2, 538, 539, 3, 2, 2, 2, 539, 546, 3, 2, 2, 2, 540, 542, 9, 4, 2, 2, 541, 543, 9, 2, 2, 2, 542, 541, 3, 2, 2, 2, 543, 544, 3, 2, 2, 2, 544, 542, 3, 2, 2, 2, 544, 545, 3, 2, 2, 2, 545, 547, 3, 2, 2, 2, 546, 540, 3, 2, 2, 2, 546, 547, 3, 2, 2, 2, 547, 116, 3, 2, 2, 2, 548, 549, 7, 100, 2, 2, 549, 550, 7, 123, 2, 2, 550, 551, 7, 118, 2, 2, 551, 552, 7, 103, 2, 2, 552, 553, 7, 117, 2, 2, 553, 555, 3, 2, 2, 2, 554, 556, 5, 119, 60, 2, 555, 554, 3, 2, 2, 2, 555, 556, 3, 2, 2, 2, 556, 562, 3, 2, 2, 2, 557, 558, 7, 100, 2, 2, 558, 559, 7, 123, 2, 2, 559, 560, 7, 118, 2, 2, 560, 562, 7, 103, 2, 2, 561, 548, 3, 2, 2, 2, 561, 557, 3, 2, 2, 2, 562, 118, 3, 2, 2, 2, 563, 567, 9, 5, 2, 2, 564, 566, 9, 2, 2, 2, 565, 564, 3, 2, 2, 2, 566, 569, 3, 2, 2, 2, 567, 565, 3, 2, 2, 2, 567, 568, 3, 2, 2, 2, 568, 120, 3, 2, 2, 2, 569, 567, 3, 2, 2, 2, 570, 576, 7, 36, 2, 2, 571, 572, 7, 94, 2, 2, 572, 575, 7, 36, 2, 2, 573, 575, 10, 6, 2, 2, 574, 571, 3, 2, 2, 2, 574, 573, 3, 2, 2, 2, 575, 578, 3, 2, 2, 2, 576, 577, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 577, 579, 3, 2, 2, 2, 578, 576, 3, 2, 2, 2, 579, 591, 7, 36, 2, 2, 580, 586, 7, 41, 2, 2, 581, 582, 7, 94, 2, 2, 582, 585, 7, 41, 2, 2, 583, 585, 10, 7, 2, 2, 584, 581, 3, 2, 2, 2, 584, 583, 3, 2, 2, 2, 585, 588, 3, 2, 2, 2, 586, 587, 3, 2, 2, 2, 586, 584, 3, 2, 2, 2, 587, 589, 3, 2, 2, 2, 588, 586, 3, 2, 2, 2, 589, 591, 7, 41, 2, 2, 590, 570, 3, 2, 2, 2, 590, 580, 3, 2, 2, 2, 591, 122, 3, 2, 2, 2, 592, 593, 7, 102, 2, 2, 593, 594, 7, 99, 2, 2, 594, 595, 7, 118, 2, 2, 595, 596, 7, 103, 2, 2, 596, 597, 7, 42, 2, 2, 597, 598, 3, 2, 2, 2, 598, 599, 5, 121, 61, 2, 599, 600, 7, 43, 2, 2, 600, 124, 3, 2, 2, 2, 601, 602, 7, 50, 2, 2, 602, 606, 9, 8, 2, 2, 603, 605, 9, 9, 2, 2, 604, 603, 3, 2, 2, 2, 605, 608, 3, 2, 2, 2, 606, 604, 3, 2, 2, 2, 606, 607, 3, 2, 2, 2, 607, 126, 3, 2, 2, 2, 608, 606, 3, 2, 2, 2, 609, 610, 7, 118, 2, 2, 610, 611, 7, 122, 2, 2, 611, 612, 7, 48, 2, 2, 612, 613, 7, 99, 2, 2, 613, 614, 7, 105, 2, 2, 614, 623, 7, 103, 2, 2, 615, 616, 7, 118, 2, 2, 616, 617, 7, 122, 2, 2, 617, 618, 7, 48, 2, 2, 618, 619, 7, 118, 2, 2, 619, 620, 7, 107, 2, 2, 620, 621, 7, 111, 2, 2, 621, 623, 7, 103, 2, 2, 622, 609, 3, 2, 2, 2, 622, 615, 3, 2, 2, 2, 623, 128, 3, 2, 2, 2, 624, 625, 7, 118, 2, 2, 625, 626, 7, 106, 2, 2, 626, 627, 7, 107, 2, 2, 627, 628, 7, 117, 2, 2, 628, 629, 7, 48, 2, 2, 629, 630, 7, 99, 2, 2, 630, 631, 7, 101, 2, 2, 631, 632, 7, 118, 2, 2, 632, 633, 7, 107, 2, 2, 633, 634, 7, 120, 2, 2, 634, 635, 7, 103, 2, 2, 635, 636, 7, 75, 2, 2, 636, 637, 7, 112, 2, 2, 637, 638, 7, 114, 2, 2, 638, 639, 7, 119, 2, 2, 639, 640, 7, 118, 2, 2, 640, 641, 7, 75, 2, 2, 641, 642, 7, 112, 2, 2, 642, 643, 7, 102, 2, 2, 643, 644, 7, 103, 2, 2, 644, 719, 7, 122, 2, 2, 645, 646, 7, 118, 2, 2, 646, 647, 7, 106, 2, 2, 647, 648, 7, 107, 2, 2, 648, 649, 7, 117, 2, 2, 649, 650, 7, 48, 2, 2, 650, 651, 7, 99, 2, 2, 651, 652, 7, 101, 2, 2, 652, 653, 7, 118, 2, 2, 653, 654, 7, 107, 2, 2, 654, 655, 7, 120, 2, 2, 655, 656, 7, 103, 2, 2, 656, 657, 7, 68, 2, 2, 657, 658, 7, 123, 2, 2, 658, 659, 7, 118, 2, 2, 659, 660, 7, 103, 2, 2, 660, 661, 7, 101, 2, 2, 661, 662, 7, 113, 2, 2, 662, 663, 7, 102, 2, 2, 663, 719, 7, 103, 2, 2, 664, 665, 7, 118, 2, 2, 665, 666, 7, 122, 2, 2, 666, 667, 7, 48, 2, 2, 667, 668, 7, 107, 2, 2, 668, 669, 7, 112, 2, 2, 669, 670, 7, 114, 2, 2, 670, 671, 7, 119, 2, 2, 671, 672, 7, 118, 2, 2, 672, 673, 7, 117, 2, 2, 673, 674, 7, 48, 2, 2, 674, 675, 7, 110, 2, 2, 675, 676, 7, 103, 2, 2, 676, 677, 7, 112, 2, 2, 677, 678, 7, 105, 2, 2, 678, 679, 7, 118, 2, 2, 679, 719, 7, 106, 2, 2, 680, 681, 7, 118, 2, 2, 681, 682, 7, 122, 2, 2, 682, 683, 7, 48, 2, 2, 683, 684, 7, 113, 2, 2, 684, 685, 7, 119, 2, 2, 685, 686, 7, 118, 2, 2, 686, 687, 7, 114, 2, 2, 687, 688, 7, 119, 2, 2, 688, 689, 7, 118, 2, 2, 689, 690, 7, 117, 2, 2, 690, 691, 7, 48, 2, 2, 691, 692, 7, 110, 2, 2, 692, 693, 7, 103, 2, 2, 693, 694, 7, 112, 2, 2, 694, 695, 7, 105, 2, 2, 695, 696, 7, 118, 2, 2, 696, 719, 7, 106, 2, 2, 697, 698, 7, 118, 2, 2, 698, 699, 7, 122, 2, 2, 699, 700, 7, 48, 2, 2, 700, 701, 7, 120, 2, 2, 701, 702, 7, 103, 2, 2, 702, 703, 7, 116, 2, 2, 703, 704, 7, 117, 2, 2, 704, 705, 7, 107, 2, 2, 705, 706, 7, 113, 2, 2, 706, 719, 7, 112, 2, 2, 707, 708, 7, 118, 2, 2, 708, 709, 7, 122, 2, 2, 709, 710, 7, 48, 2, 2, 710, 711, 7, 110, 2, 2, 711, 712, 7, 113, 2, 2, 712, 713, 7, 101, 2, 2, 713, 714, 7, 109, 2, 2, 714, 715, 7, 118, 2, 2, 715, 716, 7, 107, 2, 2, 716, 717, 7, 111, 2, 2, 717, 719, 7, 103, 2, 2, 718, 624, 3, 2, 2, 2, 718, 645, 3, 2, 2, 2, 718, 664, 3, 2, 2, 2, 718, 680, 3, 2, 2, 2, 718, 697, 3, 2, 2, 2, 718, 707, 3, 2, 2, 2, 719, 130, 3, 2, 2, 2, 720, 724, 9, 10, 2, 2, 721, 723, 9, 11, 2, 2, 722, 721, 3, 2, 2, 2, 723, 726, 3, 2, 2, 2, 724, 722, 3, 2, 2, 2, 724, 725, 3, 2, 2, 2, 725, 132, 3, 2, 2, 2, 726, 724, 3, 2, 2, 2, 727, 729, 9, 12, 2, 2, 728, 727, 3, 2, 2, 2, 729, 730, 3, 2, 2, 2, 730, 728, 3, 2, 2, 2, 730, 731, 3, 2, 2, 2, 731, 732, 3, 2, 2, 2, 732, 733, 8, 67, 2, 2, 733, 134, 3, 2, 2, 2, 734, 735, 7, 49, 2, 2, 735, 736, 7, 44, 2, 2, 736, 740, 3, 2, 2, 2, 737, 739, 11, 2, 2, 2, 738, 737, 3, 2, 2, 2, 739, 742, 3, 2, 2, 2, 740, 741, 3, 2, 2, 2, 740, 738, 3, 2, 2, 2, 741, 743, 3, 2, 2, 2, 742, 740, 3, 2, 2, 2, 743, 744, 7, 44, 2, 2, 744, 745, 7, 49, 2, 2, 745, 746, 3, 2, 2, 2, 746, 747, 8, 68, 3, 2, 747, 136, 3, 2, 2, 2, 748, 749, 7, 49, 2, 2, 749, 750, 7, 49, 2, 2, 750, 754, 3, 2, 2, 2, 751, 753, 10, 13, 2, 2, 752, 751, 3, 2, 2, 2, 753, 756, 3, 2, 2, 2, 754, 752, 3, 2, 2, 2, 754, 755, 3, 2, 2, 2, 755, 757, 3, 2, 2, 2, 756, 754, 3, 2, 2, 2, 757, 758, 8, 69, 3, 2, 758, 138, 3, 2, 2, 2, 27, 2, 448, 454, 460, 471, 530, 533, 538, 544, 546, 555, 561, 567, 574, 576, 584, 586, 590, 606, 622, 718, 724, 730, 740, 754, 4, 8, 2, 2, 2, 3, 2] \ No newline at end of file diff --git a/src/CashscriptLinter/grammar/CashScriptLexer.tokens b/src/CashscriptLinter/grammar/CashScriptLexer.tokens index 4e7b5bb..117bf6e 100644 --- a/src/CashscriptLinter/grammar/CashScriptLexer.tokens +++ b/src/CashscriptLinter/grammar/CashScriptLexer.tokens @@ -1,101 +1,121 @@ -T__0=1 -T__1=2 -T__2=3 -T__3=4 -T__4=5 -T__5=6 -T__6=7 -T__7=8 -T__8=9 -T__9=10 -T__10=11 -T__11=12 -T__12=13 -T__13=14 -T__14=15 -T__15=16 -T__16=17 -T__17=18 -T__18=19 -T__19=20 -T__20=21 -T__21=22 -T__22=23 -T__23=24 -T__24=25 -T__25=26 -T__26=27 -T__27=28 -T__28=29 -T__29=30 -T__30=31 -T__31=32 -T__32=33 -T__33=34 -T__34=35 -T__35=36 -T__36=37 -T__37=38 -T__38=39 -T__39=40 -T__40=41 -T__41=42 -T__42=43 -VersionLiteral=44 -BooleanLiteral=45 -NumberUnit=46 -NumberLiteral=47 -Bytes=48 -Bound=49 -StringLiteral=50 -DateLiteral=51 -HexLiteral=52 -TxVar=53 -PreimageField=54 -Identifier=55 -WHITESPACE=56 -COMMENT=57 -LINE_COMMENT=58 -'pragma'=1 -';'=2 -'cashscript'=3 -'^'=4 -'~'=5 -'>='=6 -'>'=7 -'<'=8 -'<='=9 -'='=10 -'contract'=11 -'{'=12 -'}'=13 -'function'=14 -'('=15 -','=16 -')'=17 -'require'=18 -'if'=19 -'else'=20 -'new'=21 -'['=22 -']'=23 -'.reverse()'=24 -'.length'=25 -'!'=26 -'-'=27 -'.split'=28 -'/'=29 -'%'=30 -'+'=31 -'=='=32 -'!='=33 -'&'=34 -'|'=35 -'&&'=36 -'||'=37 -'int'=38 -'bool'=39 -'string'=40 -'pubkey'=41 -'sig'=42 -'datasig'=43 +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +T__10=11 +T__11=12 +T__12=13 +T__13=14 +T__14=15 +T__15=16 +T__16=17 +T__17=18 +T__18=19 +T__19=20 +T__20=21 +T__21=22 +T__22=23 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +VersionLiteral=54 +BooleanLiteral=55 +NumberUnit=56 +NumberLiteral=57 +Bytes=58 +Bound=59 +StringLiteral=60 +DateLiteral=61 +HexLiteral=62 +TxVar=63 +NullaryOp=64 +Identifier=65 +WHITESPACE=66 +COMMENT=67 +LINE_COMMENT=68 +'pragma'=1 +';'=2 +'cashscript'=3 +'^'=4 +'~'=5 +'>='=6 +'>'=7 +'<'=8 +'<='=9 +'='=10 +'contract'=11 +'{'=12 +'}'=13 +'function'=14 +'('=15 +','=16 +')'=17 +'require'=18 +'if'=19 +'else'=20 +'new'=21 +'['=22 +']'=23 +'tx.outputs'=24 +'.value'=25 +'.lockingBytecode'=26 +'tx.inputs'=27 +'.outpointTransactionHash'=28 +'.outpointIndex'=29 +'.unlockingBytecode'=30 +'.sequenceNumber'=31 +'.reverse()'=32 +'.length'=33 +'.split'=34 +'!'=35 +'-'=36 +'*'=37 +'/'=38 +'%'=39 +'+'=40 +'=='=41 +'!='=42 +'&'=43 +'|'=44 +'&&'=45 +'||'=46 +'constant'=47 +'int'=48 +'bool'=49 +'string'=50 +'pubkey'=51 +'sig'=52 +'datasig'=53 diff --git a/src/CashscriptLinter/grammar/CashScriptLexer.ts b/src/CashscriptLinter/grammar/CashScriptLexer.ts index af37226..f15b699 100644 --- a/src/CashscriptLinter/grammar/CashScriptLexer.ts +++ b/src/CashscriptLinter/grammar/CashScriptLexer.ts @@ -1,468 +1,536 @@ -// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT - - -import { ATN } from "antlr4ts/atn/ATN"; -import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; -import { CharStream } from "antlr4ts/CharStream"; -import { Lexer } from "antlr4ts/Lexer"; -import { LexerATNSimulator } from "antlr4ts/atn/LexerATNSimulator"; -import { NotNull } from "antlr4ts/Decorators"; -import { Override } from "antlr4ts/Decorators"; -import { RuleContext } from "antlr4ts/RuleContext"; -import { Vocabulary } from "antlr4ts/Vocabulary"; -import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; - -import * as Utils from "antlr4ts/misc/Utils"; - - -export class CashScriptLexer extends Lexer { - public static readonly T__0 = 1; - public static readonly T__1 = 2; - public static readonly T__2 = 3; - public static readonly T__3 = 4; - public static readonly T__4 = 5; - public static readonly T__5 = 6; - public static readonly T__6 = 7; - public static readonly T__7 = 8; - public static readonly T__8 = 9; - public static readonly T__9 = 10; - public static readonly T__10 = 11; - public static readonly T__11 = 12; - public static readonly T__12 = 13; - public static readonly T__13 = 14; - public static readonly T__14 = 15; - public static readonly T__15 = 16; - public static readonly T__16 = 17; - public static readonly T__17 = 18; - public static readonly T__18 = 19; - public static readonly T__19 = 20; - public static readonly T__20 = 21; - public static readonly T__21 = 22; - public static readonly T__22 = 23; - public static readonly T__23 = 24; - public static readonly T__24 = 25; - public static readonly T__25 = 26; - public static readonly T__26 = 27; - public static readonly T__27 = 28; - public static readonly T__28 = 29; - public static readonly T__29 = 30; - public static readonly T__30 = 31; - public static readonly T__31 = 32; - public static readonly T__32 = 33; - public static readonly T__33 = 34; - public static readonly T__34 = 35; - public static readonly T__35 = 36; - public static readonly T__36 = 37; - public static readonly T__37 = 38; - public static readonly T__38 = 39; - public static readonly T__39 = 40; - public static readonly T__40 = 41; - public static readonly T__41 = 42; - public static readonly T__42 = 43; - public static readonly VersionLiteral = 44; - public static readonly BooleanLiteral = 45; - public static readonly NumberUnit = 46; - public static readonly NumberLiteral = 47; - public static readonly Bytes = 48; - public static readonly Bound = 49; - public static readonly StringLiteral = 50; - public static readonly DateLiteral = 51; - public static readonly HexLiteral = 52; - public static readonly TxVar = 53; - public static readonly PreimageField = 54; - public static readonly Identifier = 55; - public static readonly WHITESPACE = 56; - public static readonly COMMENT = 57; - public static readonly LINE_COMMENT = 58; - - // tslint:disable:no-trailing-whitespace - public static readonly channelNames: string[] = [ - "DEFAULT_TOKEN_CHANNEL", "HIDDEN", - ]; - - // tslint:disable:no-trailing-whitespace - public static readonly modeNames: string[] = [ - "DEFAULT_MODE", - ]; - - public static readonly ruleNames: string[] = [ - "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", - "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", - "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", - "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", - "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", - "T__41", "T__42", "VersionLiteral", "BooleanLiteral", "NumberUnit", "NumberLiteral", - "Bytes", "Bound", "StringLiteral", "DateLiteral", "HexLiteral", "TxVar", - "PreimageField", "Identifier", "WHITESPACE", "COMMENT", "LINE_COMMENT", - ]; - - private static readonly _LITERAL_NAMES: Array = [ - undefined, "'pragma'", "';'", "'cashscript'", "'^'", "'~'", "'>='", "'>'", - "'<'", "'<='", "'='", "'contract'", "'{'", "'}'", "'function'", "'('", - "','", "')'", "'require'", "'if'", "'else'", "'new'", "'['", "']'", "'.reverse()'", - "'.length'", "'!'", "'-'", "'.split'", "'/'", "'%'", "'+'", "'=='", "'!='", - "'&'", "'|'", "'&&'", "'||'", "'int'", "'bool'", "'string'", "'pubkey'", - "'sig'", "'datasig'", - ]; - private static readonly _SYMBOLIC_NAMES: Array = [ - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, "VersionLiteral", "BooleanLiteral", "NumberUnit", - "NumberLiteral", "Bytes", "Bound", "StringLiteral", "DateLiteral", "HexLiteral", - "TxVar", "PreimageField", "Identifier", "WHITESPACE", "COMMENT", "LINE_COMMENT", - ]; - public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(CashScriptLexer._LITERAL_NAMES, CashScriptLexer._SYMBOLIC_NAMES, []); - - // @Override - // @NotNull - public get vocabulary(): Vocabulary { - return CashScriptLexer.VOCABULARY; - } - // tslint:enable:no-trailing-whitespace - - - constructor(input: CharStream) { - super(input); - this._interp = new LexerATNSimulator(CashScriptLexer._ATN, this); - } - - // @Override - public get grammarFileName(): string { return "CashScript.g4"; } - - // @Override - public get ruleNames(): string[] { return CashScriptLexer.ruleNames; } - - // @Override - public get serializedATN(): string { return CashScriptLexer._serializedATN; } - - // @Override - public get channelNames(): string[] { return CashScriptLexer.channelNames; } - - // @Override - public get modeNames(): string[] { return CashScriptLexer.modeNames; } - - private static readonly _serializedATNSegments: number = 2; - private static readonly _serializedATNSegment0: string = - "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02<\u0282\b\x01" + - "\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06" + - "\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" + - "\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t" + - "\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t" + - "\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t" + - "\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t" + - "\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04\'\t\'\x04(\t(\x04)\t)\x04*\t*\x04" + - "+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x04" + - "4\t4\x045\t5\x046\t6\x047\t7\x048\t8\x049\t9\x04:\t:\x04;\t;\x03\x02\x03" + - "\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03" + - "\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03" + - "\x04\x03\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\b\x03" + - "\b\x03\t\x03\t\x03\n\x03\n\x03\n\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03" + - "\f\x03\f\x03\f\x03\f\x03\f\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0F\x03\x0F" + - "\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x10\x03\x10" + - "\x03\x11\x03\x11\x03\x12\x03\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13" + - "\x03\x13\x03\x13\x03\x13\x03\x14\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15" + - "\x03\x15\x03\x15\x03\x16\x03\x16\x03\x16\x03\x16\x03\x17\x03\x17\x03\x18" + - "\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19" + - "\x03\x19\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A" + - "\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1D\x03\x1D\x03\x1D" + - "\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03 " + - "\x03 \x03!\x03!\x03!\x03\"\x03\"\x03\"\x03#\x03#\x03$\x03$\x03%\x03%\x03" + - "%\x03&\x03&\x03&\x03\'\x03\'\x03\'\x03\'\x03(\x03(\x03(\x03(\x03(\x03" + - ")\x03)\x03)\x03)\x03)\x03)\x03)\x03*\x03*\x03*\x03*\x03*\x03*\x03*\x03" + - "+\x03+\x03+\x03+\x03,\x03,\x03,\x03,\x03,\x03,\x03,\x03,\x03-\x06-\u0128" + - "\n-\r-\x0E-\u0129\x03-\x03-\x06-\u012E\n-\r-\x0E-\u012F\x03-\x03-\x06" + - "-\u0134\n-\r-\x0E-\u0135\x03.\x03.\x03.\x03.\x03.\x03.\x03.\x03.\x03." + - "\x05.\u0141\n.\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/" + - "\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03" + - "/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03" + - "/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03" + - "/\x03/\x03/\x03/\x03/\x05/\u017C\n/\x030\x050\u017F\n0\x030\x060\u0182" + - "\n0\r0\x0E0\u0183\x030\x030\x060\u0188\n0\r0\x0E0\u0189\x050\u018C\n0" + - "\x031\x031\x031\x031\x031\x031\x031\x051\u0195\n1\x031\x031\x031\x031" + - "\x051\u019B\n1\x032\x032\x072\u019F\n2\f2\x0E2\u01A2\v2\x033\x033\x03" + - "3\x033\x073\u01A8\n3\f3\x0E3\u01AB\v3\x033\x033\x033\x033\x033\x073\u01B2" + - "\n3\f3\x0E3\u01B5\v3\x033\x053\u01B8\n3\x034\x034\x034\x034\x034\x034" + - "\x034\x034\x034\x035\x035\x035\x075\u01C6\n5\f5\x0E5\u01C9\v5\x036\x03" + - "6\x036\x036\x036\x036\x036\x036\x036\x036\x036\x036\x036\x056\u01D8\n" + - "6\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + - "7\x037\x037\x057\u025A\n7\x038\x038\x078\u025E\n8\f8\x0E8\u0261\v8\x03" + - "9\x069\u0264\n9\r9\x0E9\u0265\x039\x039\x03:\x03:\x03:\x03:\x07:\u026E" + - "\n:\f:\x0E:\u0271\v:\x03:\x03:\x03:\x03:\x03:\x03;\x03;\x03;\x03;\x07" + - ";\u027C\n;\f;\x0E;\u027F\v;\x03;\x03;\x05\u01A9\u01B3\u026F\x02\x02<\x03" + - "\x02\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07\r\x02\b\x0F\x02\t" + - "\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02\x0F\x1D\x02" + - "\x10\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02\x15)\x02\x16+\x02\x17" + - "-\x02\x18/\x02\x191\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02\x1E;\x02\x1F" + - "=\x02 ?\x02!A\x02\"C\x02#E\x02$G\x02%I\x02&K\x02\'M\x02(O\x02)Q\x02*S" + - "\x02+U\x02,W\x02-Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x024g\x025i\x02" + - "6k\x027m\x028o\x029q\x02:s\x02;u\x02<\x03\x02\x0E\x03\x022;\x03\x02//" + - "\x04\x02GGgg\x03\x023;\x05\x02\f\f\x0F\x0F$$\x05\x02\f\f\x0F\x0F))\x04" + - "\x02ZZzz\x05\x022;CHch\x04\x02C\\c|\x06\x022;C\\aac|\x05\x02\v\f\x0E\x0F" + - "\"\"\x04\x02\f\f\x0F\x0F\x02\u02AA\x02\x03\x03\x02\x02\x02\x02\x05\x03" + - "\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02\x02\x02\x02\v\x03\x02" + - "\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02\x02\x02\x11\x03\x02" + - "\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02\x02\x02\x17\x03\x02" + - "\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02\x02\x02\x1D\x03\x02" + - "\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02\x02\x02#\x03\x02\x02" + - "\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02\x02)\x03\x02\x02\x02\x02" + - "+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02\x02\x02\x021\x03\x02" + - "\x02\x02\x023\x03\x02\x02\x02\x025\x03\x02\x02\x02\x027\x03\x02\x02\x02" + - "\x029\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02=\x03\x02\x02\x02\x02?\x03" + - "\x02\x02\x02\x02A\x03\x02\x02\x02\x02C\x03\x02\x02\x02\x02E\x03\x02\x02" + - "\x02\x02G\x03\x02\x02\x02\x02I\x03\x02\x02\x02\x02K\x03\x02\x02\x02\x02" + - "M\x03\x02\x02\x02\x02O\x03\x02\x02\x02\x02Q\x03\x02\x02\x02\x02S\x03\x02" + - "\x02\x02\x02U\x03\x02\x02\x02\x02W\x03\x02\x02\x02\x02Y\x03\x02\x02\x02" + - "\x02[\x03\x02\x02\x02\x02]\x03\x02\x02\x02\x02_\x03\x02\x02\x02\x02a\x03" + - "\x02\x02\x02\x02c\x03\x02\x02\x02\x02e\x03\x02\x02\x02\x02g\x03\x02\x02" + - "\x02\x02i\x03\x02\x02\x02\x02k\x03\x02\x02\x02\x02m\x03\x02\x02\x02\x02" + - "o\x03\x02\x02\x02\x02q\x03\x02\x02\x02\x02s\x03\x02\x02\x02\x02u\x03\x02" + - "\x02\x02\x03w\x03\x02\x02\x02\x05~\x03\x02\x02\x02\x07\x80\x03\x02\x02" + - "\x02\t\x8B\x03\x02\x02\x02\v\x8D\x03\x02\x02\x02\r\x8F\x03\x02\x02\x02" + - "\x0F\x92\x03\x02\x02\x02\x11\x94\x03\x02\x02\x02\x13\x96\x03\x02\x02\x02" + - "\x15\x99\x03\x02\x02\x02\x17\x9B\x03\x02\x02\x02\x19\xA4\x03\x02\x02\x02" + - "\x1B\xA6\x03\x02\x02\x02\x1D\xA8\x03\x02\x02\x02\x1F\xB1\x03\x02\x02\x02" + - "!\xB3\x03\x02\x02\x02#\xB5\x03\x02\x02\x02%\xB7\x03\x02\x02\x02\'\xBF" + - "\x03\x02\x02\x02)\xC2\x03\x02\x02\x02+\xC7\x03\x02\x02\x02-\xCB\x03\x02" + - "\x02\x02/\xCD\x03\x02\x02\x021\xCF\x03\x02\x02\x023\xDA\x03\x02\x02\x02" + - "5\xE2\x03\x02\x02\x027\xE4\x03\x02\x02\x029\xE6\x03\x02\x02\x02;\xED\x03" + - "\x02\x02\x02=\xEF\x03\x02\x02\x02?\xF1\x03\x02\x02\x02A\xF3\x03\x02\x02" + - "\x02C\xF6\x03\x02\x02\x02E\xF9\x03\x02\x02\x02G\xFB\x03\x02\x02\x02I\xFD" + - "\x03\x02\x02\x02K\u0100\x03\x02\x02\x02M\u0103\x03\x02\x02\x02O\u0107" + - "\x03\x02\x02\x02Q\u010C\x03\x02\x02\x02S\u0113\x03\x02\x02\x02U\u011A" + - "\x03\x02\x02\x02W\u011E\x03\x02\x02\x02Y\u0127\x03\x02\x02\x02[\u0140" + - "\x03\x02\x02\x02]\u017B\x03\x02\x02\x02_\u017E\x03\x02\x02\x02a\u019A" + - "\x03\x02\x02\x02c\u019C\x03\x02\x02\x02e\u01B7\x03\x02\x02\x02g\u01B9" + - "\x03\x02\x02\x02i\u01C2\x03\x02\x02\x02k\u01D7\x03\x02\x02\x02m\u0259" + - "\x03\x02\x02\x02o\u025B\x03\x02\x02\x02q\u0263\x03\x02\x02\x02s\u0269" + - "\x03\x02\x02\x02u\u0277\x03\x02\x02\x02wx\x07r\x02\x02xy\x07t\x02\x02" + - "yz\x07c\x02\x02z{\x07i\x02\x02{|\x07o\x02\x02|}\x07c\x02\x02}\x04\x03" + - "\x02\x02\x02~\x7F\x07=\x02\x02\x7F\x06\x03\x02\x02\x02\x80\x81\x07e\x02" + - "\x02\x81\x82\x07c\x02\x02\x82\x83\x07u\x02\x02\x83\x84\x07j\x02\x02\x84" + - "\x85\x07u\x02\x02\x85\x86\x07e\x02\x02\x86\x87\x07t\x02\x02\x87\x88\x07" + - "k\x02\x02\x88\x89\x07r\x02\x02\x89\x8A\x07v\x02\x02\x8A\b\x03\x02\x02" + - "\x02\x8B\x8C\x07`\x02\x02\x8C\n\x03\x02\x02\x02\x8D\x8E\x07\x80\x02\x02" + - "\x8E\f\x03\x02\x02\x02\x8F\x90\x07@\x02\x02\x90\x91\x07?\x02\x02\x91\x0E" + - "\x03\x02\x02\x02\x92\x93\x07@\x02\x02\x93\x10\x03\x02\x02\x02\x94\x95" + - "\x07>\x02\x02\x95\x12\x03\x02\x02\x02\x96\x97\x07>\x02\x02\x97\x98\x07" + - "?\x02\x02\x98\x14\x03\x02\x02\x02\x99\x9A\x07?\x02\x02\x9A\x16\x03\x02" + - "\x02\x02\x9B\x9C\x07e\x02\x02\x9C\x9D\x07q\x02\x02\x9D\x9E\x07p\x02\x02" + - "\x9E\x9F\x07v\x02\x02\x9F\xA0\x07t\x02\x02\xA0\xA1\x07c\x02\x02\xA1\xA2" + - "\x07e\x02\x02\xA2\xA3\x07v\x02\x02\xA3\x18\x03\x02\x02\x02\xA4\xA5\x07" + - "}\x02\x02\xA5\x1A\x03\x02\x02\x02\xA6\xA7\x07\x7F\x02\x02\xA7\x1C\x03" + - "\x02\x02\x02\xA8\xA9\x07h\x02\x02\xA9\xAA\x07w\x02\x02\xAA\xAB\x07p\x02" + - "\x02\xAB\xAC\x07e\x02\x02\xAC\xAD\x07v\x02\x02\xAD\xAE\x07k\x02\x02\xAE" + - "\xAF\x07q\x02\x02\xAF\xB0\x07p\x02\x02\xB0\x1E\x03\x02\x02\x02\xB1\xB2" + - "\x07*\x02\x02\xB2 \x03\x02\x02\x02\xB3\xB4\x07.\x02\x02\xB4\"\x03\x02" + - "\x02\x02\xB5\xB6\x07+\x02\x02\xB6$\x03\x02\x02\x02\xB7\xB8\x07t\x02\x02" + - "\xB8\xB9\x07g\x02\x02\xB9\xBA\x07s\x02\x02\xBA\xBB\x07w\x02\x02\xBB\xBC" + - "\x07k\x02\x02\xBC\xBD\x07t\x02\x02\xBD\xBE\x07g\x02\x02\xBE&\x03\x02\x02" + - "\x02\xBF\xC0\x07k\x02\x02\xC0\xC1\x07h\x02\x02\xC1(\x03\x02\x02\x02\xC2" + - "\xC3\x07g\x02\x02\xC3\xC4\x07n\x02\x02\xC4\xC5\x07u\x02\x02\xC5\xC6\x07" + - "g\x02\x02\xC6*\x03\x02\x02\x02\xC7\xC8\x07p\x02\x02\xC8\xC9\x07g\x02\x02" + - "\xC9\xCA\x07y\x02\x02\xCA,\x03\x02\x02\x02\xCB\xCC\x07]\x02\x02\xCC.\x03" + - "\x02\x02\x02\xCD\xCE\x07_\x02\x02\xCE0\x03\x02\x02\x02\xCF\xD0\x070\x02" + - "\x02\xD0\xD1\x07t\x02\x02\xD1\xD2\x07g\x02\x02\xD2\xD3\x07x\x02\x02\xD3" + - "\xD4\x07g\x02\x02\xD4\xD5\x07t\x02\x02\xD5\xD6\x07u\x02\x02\xD6\xD7\x07" + - "g\x02\x02\xD7\xD8\x07*\x02\x02\xD8\xD9\x07+\x02\x02\xD92\x03\x02\x02\x02" + - "\xDA\xDB\x070\x02\x02\xDB\xDC\x07n\x02\x02\xDC\xDD\x07g\x02\x02\xDD\xDE" + - "\x07p\x02\x02\xDE\xDF\x07i\x02\x02\xDF\xE0\x07v\x02\x02\xE0\xE1\x07j\x02" + - "\x02\xE14\x03\x02\x02\x02\xE2\xE3\x07#\x02\x02\xE36\x03\x02\x02\x02\xE4" + - "\xE5\x07/\x02\x02\xE58\x03\x02\x02\x02\xE6\xE7\x070\x02\x02\xE7\xE8\x07" + - "u\x02\x02\xE8\xE9\x07r\x02\x02\xE9\xEA\x07n\x02\x02\xEA\xEB\x07k\x02\x02" + - "\xEB\xEC\x07v\x02\x02\xEC:\x03\x02\x02\x02\xED\xEE\x071\x02\x02\xEE<\x03" + - "\x02\x02\x02\xEF\xF0\x07\'\x02\x02\xF0>\x03\x02\x02\x02\xF1\xF2\x07-\x02" + - "\x02\xF2@\x03\x02\x02\x02\xF3\xF4\x07?\x02\x02\xF4\xF5\x07?\x02\x02\xF5" + - "B\x03\x02\x02\x02\xF6\xF7\x07#\x02\x02\xF7\xF8\x07?\x02\x02\xF8D\x03\x02" + - "\x02\x02\xF9\xFA\x07(\x02\x02\xFAF\x03\x02\x02\x02\xFB\xFC\x07~\x02\x02" + - "\xFCH\x03\x02\x02\x02\xFD\xFE\x07(\x02\x02\xFE\xFF\x07(\x02\x02\xFFJ\x03" + - "\x02\x02\x02\u0100\u0101\x07~\x02\x02\u0101\u0102\x07~\x02\x02\u0102L" + - "\x03\x02\x02\x02\u0103\u0104\x07k\x02\x02\u0104\u0105\x07p\x02\x02\u0105" + - "\u0106\x07v\x02\x02\u0106N\x03\x02\x02\x02\u0107\u0108\x07d\x02\x02\u0108" + - "\u0109\x07q\x02\x02\u0109\u010A\x07q\x02\x02\u010A\u010B\x07n\x02\x02" + - "\u010BP\x03\x02\x02\x02\u010C\u010D\x07u\x02\x02\u010D\u010E\x07v\x02" + - "\x02\u010E\u010F\x07t\x02\x02\u010F\u0110\x07k\x02\x02\u0110\u0111\x07" + - "p\x02\x02\u0111\u0112\x07i\x02\x02\u0112R\x03\x02\x02\x02\u0113\u0114" + - "\x07r\x02\x02\u0114\u0115\x07w\x02\x02\u0115\u0116\x07d\x02\x02\u0116" + - "\u0117\x07m\x02\x02\u0117\u0118\x07g\x02\x02\u0118\u0119\x07{\x02\x02" + - "\u0119T\x03\x02\x02\x02\u011A\u011B\x07u\x02\x02\u011B\u011C\x07k\x02" + - "\x02\u011C\u011D\x07i\x02\x02\u011DV\x03\x02\x02\x02\u011E\u011F\x07f" + - "\x02\x02\u011F\u0120\x07c\x02\x02\u0120\u0121\x07v\x02\x02\u0121\u0122" + - "\x07c\x02\x02\u0122\u0123\x07u\x02\x02\u0123\u0124\x07k\x02\x02\u0124" + - "\u0125\x07i\x02\x02\u0125X\x03\x02\x02\x02\u0126\u0128\t\x02\x02\x02\u0127" + - "\u0126\x03\x02\x02\x02\u0128\u0129\x03\x02\x02\x02\u0129\u0127\x03\x02" + - "\x02\x02\u0129\u012A\x03\x02\x02\x02\u012A\u012B\x03\x02\x02\x02\u012B" + - "\u012D\x070\x02\x02\u012C\u012E\t\x02\x02\x02\u012D\u012C\x03\x02\x02" + - "\x02\u012E\u012F\x03\x02\x02\x02\u012F\u012D\x03\x02\x02\x02\u012F\u0130" + - "\x03\x02\x02\x02\u0130\u0131\x03\x02\x02\x02\u0131\u0133\x070\x02\x02" + - "\u0132\u0134\t\x02\x02\x02\u0133\u0132\x03\x02\x02\x02\u0134\u0135\x03" + - "\x02\x02\x02\u0135\u0133\x03\x02\x02\x02\u0135\u0136\x03\x02\x02\x02\u0136" + - "Z\x03\x02\x02\x02\u0137\u0138\x07v\x02\x02\u0138\u0139\x07t\x02\x02\u0139" + - "\u013A\x07w\x02\x02\u013A\u0141\x07g\x02\x02\u013B\u013C\x07h\x02\x02" + - "\u013C\u013D\x07c\x02\x02\u013D\u013E\x07n\x02\x02\u013E\u013F\x07u\x02" + - "\x02\u013F\u0141\x07g\x02\x02\u0140\u0137\x03\x02\x02\x02\u0140\u013B" + - "\x03\x02\x02\x02\u0141\\\x03\x02\x02\x02\u0142\u0143\x07u\x02\x02\u0143" + - "\u0144\x07c\x02\x02\u0144\u0145\x07v\x02\x02\u0145\u0146\x07q\x02\x02" + - "\u0146\u0147\x07u\x02\x02\u0147\u0148\x07j\x02\x02\u0148\u0149\x07k\x02" + - "\x02\u0149\u017C\x07u\x02\x02\u014A\u014B\x07u\x02\x02\u014B\u014C\x07" + - "c\x02\x02\u014C\u014D\x07v\x02\x02\u014D\u017C\x07u\x02\x02\u014E\u014F" + - "\x07h\x02\x02\u014F\u0150\x07k\x02\x02\u0150\u0151\x07p\x02\x02\u0151" + - "\u0152\x07p\x02\x02\u0152\u0153\x07g\x02\x02\u0153\u017C\x07{\x02\x02" + - "\u0154\u0155\x07d\x02\x02\u0155\u0156\x07k\x02\x02\u0156\u0157\x07v\x02" + - "\x02\u0157\u017C\x07u\x02\x02\u0158\u0159\x07d\x02\x02\u0159\u015A\x07" + - "k\x02\x02\u015A\u015B\x07v\x02\x02\u015B\u015C\x07e\x02\x02\u015C\u015D" + - "\x07q\x02\x02\u015D\u015E\x07k\x02\x02\u015E\u017C\x07p\x02\x02\u015F" + - "\u0160\x07u\x02\x02\u0160\u0161\x07g\x02\x02\u0161\u0162\x07e\x02\x02" + - "\u0162\u0163\x07q\x02\x02\u0163\u0164\x07p\x02\x02\u0164\u0165\x07f\x02" + - "\x02\u0165\u017C\x07u\x02\x02\u0166\u0167\x07o\x02\x02\u0167\u0168\x07" + - "k\x02\x02\u0168\u0169\x07p\x02\x02\u0169\u016A\x07w\x02\x02\u016A\u016B" + - "\x07v\x02\x02\u016B\u016C\x07g\x02\x02\u016C\u017C\x07u\x02\x02\u016D" + - "\u016E\x07j\x02\x02\u016E\u016F\x07q\x02\x02\u016F\u0170\x07w\x02\x02" + - "\u0170\u0171\x07t\x02\x02\u0171\u017C\x07u\x02\x02\u0172\u0173\x07f\x02" + - "\x02\u0173\u0174\x07c\x02\x02\u0174\u0175\x07{\x02\x02\u0175\u017C\x07" + - "u\x02\x02\u0176\u0177\x07y\x02\x02\u0177\u0178\x07g\x02\x02\u0178\u0179" + - "\x07g\x02\x02\u0179\u017A\x07m\x02\x02\u017A\u017C\x07u\x02\x02\u017B" + - "\u0142\x03\x02\x02\x02\u017B\u014A\x03\x02\x02\x02\u017B\u014E\x03\x02" + - "\x02\x02\u017B\u0154\x03\x02\x02\x02\u017B\u0158\x03\x02\x02\x02\u017B" + - "\u015F\x03\x02\x02\x02\u017B\u0166\x03\x02\x02\x02\u017B\u016D\x03\x02" + - "\x02\x02\u017B\u0172\x03\x02\x02\x02\u017B\u0176\x03\x02\x02\x02\u017C" + - "^\x03\x02\x02\x02\u017D\u017F\t\x03\x02\x02\u017E\u017D\x03\x02\x02\x02" + - "\u017E\u017F\x03\x02\x02\x02\u017F\u0181\x03\x02\x02\x02\u0180\u0182\t" + - "\x02\x02\x02\u0181\u0180\x03\x02\x02\x02\u0182\u0183\x03\x02\x02\x02\u0183" + - "\u0181\x03\x02\x02\x02\u0183\u0184\x03\x02\x02\x02\u0184\u018B\x03\x02" + - "\x02\x02\u0185\u0187\t\x04\x02\x02\u0186\u0188\t\x02\x02\x02\u0187\u0186" + - "\x03\x02\x02\x02\u0188\u0189\x03\x02\x02\x02\u0189\u0187\x03\x02\x02\x02" + - "\u0189\u018A\x03\x02\x02\x02\u018A\u018C\x03\x02\x02\x02\u018B\u0185\x03" + - "\x02\x02\x02\u018B\u018C\x03\x02\x02\x02\u018C`\x03\x02\x02\x02\u018D" + - "\u018E\x07d\x02\x02\u018E\u018F\x07{\x02\x02\u018F\u0190\x07v\x02\x02" + - "\u0190\u0191\x07g\x02\x02\u0191\u0192\x07u\x02\x02\u0192\u0194\x03\x02" + - "\x02\x02\u0193\u0195\x05c2\x02\u0194\u0193\x03\x02\x02\x02\u0194\u0195" + - "\x03\x02\x02\x02\u0195\u019B\x03\x02\x02\x02\u0196\u0197\x07d\x02\x02" + - "\u0197\u0198\x07{\x02\x02\u0198\u0199\x07v\x02\x02\u0199\u019B\x07g\x02" + - "\x02\u019A\u018D\x03\x02\x02\x02\u019A\u0196\x03\x02\x02\x02\u019Bb\x03" + - "\x02\x02\x02\u019C\u01A0\t\x05\x02\x02\u019D\u019F\t\x02\x02\x02\u019E" + - "\u019D\x03\x02\x02\x02\u019F\u01A2\x03\x02\x02\x02\u01A0\u019E\x03\x02" + - "\x02\x02\u01A0\u01A1\x03\x02\x02\x02\u01A1d\x03\x02\x02\x02\u01A2\u01A0" + - "\x03\x02\x02\x02\u01A3\u01A9\x07$\x02\x02\u01A4\u01A5\x07^\x02\x02\u01A5" + - "\u01A8\x07$\x02\x02\u01A6\u01A8\n\x06\x02\x02\u01A7\u01A4\x03\x02\x02" + - "\x02\u01A7\u01A6\x03\x02\x02\x02\u01A8\u01AB\x03\x02\x02\x02\u01A9\u01AA" + - "\x03\x02\x02\x02\u01A9\u01A7\x03\x02\x02\x02\u01AA\u01AC\x03\x02\x02\x02" + - "\u01AB\u01A9\x03\x02\x02\x02\u01AC\u01B8\x07$\x02\x02\u01AD\u01B3\x07" + - ")\x02\x02\u01AE\u01AF\x07^\x02\x02\u01AF\u01B2\x07)\x02\x02\u01B0\u01B2" + - "\n\x07\x02\x02\u01B1\u01AE\x03\x02\x02\x02\u01B1\u01B0\x03\x02\x02\x02" + - "\u01B2\u01B5\x03\x02\x02\x02\u01B3\u01B4\x03\x02\x02\x02\u01B3\u01B1\x03" + - "\x02\x02\x02\u01B4\u01B6\x03\x02\x02\x02\u01B5\u01B3\x03\x02\x02\x02\u01B6" + - "\u01B8\x07)\x02\x02\u01B7\u01A3\x03\x02\x02\x02\u01B7\u01AD\x03\x02\x02" + - "\x02\u01B8f\x03\x02\x02\x02\u01B9\u01BA\x07f\x02\x02\u01BA\u01BB\x07c" + - "\x02\x02\u01BB\u01BC\x07v\x02\x02\u01BC\u01BD\x07g\x02\x02\u01BD\u01BE" + - "\x07*\x02\x02\u01BE\u01BF\x03\x02\x02\x02\u01BF\u01C0\x05e3\x02\u01C0" + - "\u01C1\x07+\x02\x02\u01C1h\x03\x02\x02\x02\u01C2\u01C3\x072\x02\x02\u01C3" + - "\u01C7\t\b\x02\x02\u01C4\u01C6\t\t\x02\x02\u01C5\u01C4\x03\x02\x02\x02" + - "\u01C6\u01C9\x03\x02\x02\x02\u01C7\u01C5\x03\x02\x02\x02\u01C7\u01C8\x03" + - "\x02\x02\x02\u01C8j\x03\x02\x02\x02\u01C9\u01C7\x03\x02\x02\x02\u01CA" + - "\u01CB\x07v\x02\x02\u01CB\u01CC\x07z\x02\x02\u01CC\u01CD\x070\x02\x02" + - "\u01CD\u01CE\x07c\x02\x02\u01CE\u01CF\x07i\x02\x02\u01CF\u01D8\x07g\x02" + - "\x02\u01D0\u01D1\x07v\x02\x02\u01D1\u01D2\x07z\x02\x02\u01D2\u01D3\x07" + - "0\x02\x02\u01D3\u01D4\x07v\x02\x02\u01D4\u01D5\x07k\x02\x02\u01D5\u01D6" + - "\x07o\x02\x02\u01D6\u01D8\x07g\x02\x02\u01D7\u01CA\x03\x02\x02\x02\u01D7" + - "\u01D0\x03\x02\x02\x02\u01D8l\x03\x02\x02\x02\u01D9\u01DA\x07v\x02\x02" + - "\u01DA\u01DB\x07z\x02\x02\u01DB\u01DC\x070\x02\x02\u01DC\u01DD\x07x\x02" + - "\x02\u01DD\u01DE\x07g\x02\x02\u01DE\u01DF\x07t\x02\x02\u01DF\u01E0\x07" + - "u\x02\x02\u01E0\u01E1\x07k\x02\x02\u01E1\u01E2\x07q\x02\x02\u01E2\u025A" + - "\x07p\x02\x02\u01E3\u01E4\x07v\x02\x02\u01E4\u01E5\x07z\x02\x02\u01E5" + - "\u01E6\x070\x02\x02\u01E6\u01E7\x07j\x02\x02\u01E7\u01E8\x07c\x02\x02" + - "\u01E8\u01E9\x07u\x02\x02\u01E9\u01EA\x07j\x02\x02\u01EA\u01EB\x07R\x02" + - "\x02\u01EB\u01EC\x07t\x02\x02\u01EC\u01ED\x07g\x02\x02\u01ED\u01EE\x07" + - "x\x02\x02\u01EE\u01EF\x07q\x02\x02\u01EF\u01F0\x07w\x02\x02\u01F0\u01F1" + - "\x07v\x02\x02\u01F1\u025A\x07u\x02\x02\u01F2\u01F3\x07v\x02\x02\u01F3" + - "\u01F4\x07z\x02\x02\u01F4\u01F5\x070\x02\x02\u01F5\u01F6\x07j\x02\x02" + - "\u01F6\u01F7\x07c\x02\x02\u01F7\u01F8\x07u\x02\x02\u01F8\u01F9\x07j\x02" + - "\x02\u01F9\u01FA\x07U\x02\x02\u01FA\u01FB\x07g\x02\x02\u01FB\u01FC\x07" + - "s\x02\x02\u01FC\u01FD\x07w\x02\x02\u01FD\u01FE\x07g\x02\x02\u01FE\u01FF" + - "\x07p\x02\x02\u01FF\u0200\x07e\x02\x02\u0200\u025A\x07g\x02\x02\u0201" + - "\u0202\x07v\x02\x02\u0202\u0203\x07z\x02\x02\u0203\u0204\x070\x02\x02" + - "\u0204\u0205\x07q\x02\x02\u0205\u0206\x07w\x02\x02\u0206\u0207\x07v\x02" + - "\x02\u0207\u0208\x07r\x02\x02\u0208\u0209\x07q\x02\x02\u0209\u020A\x07" + - "k\x02\x02\u020A\u020B\x07p\x02\x02\u020B\u025A\x07v\x02\x02\u020C\u020D" + - "\x07v\x02\x02\u020D\u020E\x07z\x02\x02\u020E\u020F\x070\x02\x02\u020F" + - "\u0210\x07d\x02\x02\u0210\u0211\x07{\x02\x02\u0211\u0212\x07v\x02\x02" + - "\u0212\u0213\x07g\x02\x02\u0213\u0214\x07e\x02\x02\u0214\u0215\x07q\x02" + - "\x02\u0215\u0216\x07f\x02\x02\u0216\u025A\x07g\x02\x02\u0217\u0218\x07" + - "v\x02\x02\u0218\u0219\x07z\x02\x02\u0219\u021A\x070\x02\x02\u021A\u021B" + - "\x07x\x02\x02\u021B\u021C\x07c\x02\x02\u021C\u021D\x07n\x02\x02\u021D" + - "\u021E\x07w\x02\x02\u021E\u025A\x07g\x02\x02\u021F\u0220\x07v\x02\x02" + - "\u0220"; - private static readonly _serializedATNSegment1: string = - "\u0221\x07z\x02\x02\u0221\u0222\x070\x02\x02\u0222\u0223\x07u\x02\x02" + - "\u0223\u0224\x07g\x02\x02\u0224\u0225\x07s\x02\x02\u0225\u0226\x07w\x02" + - "\x02\u0226\u0227\x07g\x02\x02\u0227\u0228\x07p\x02\x02\u0228\u0229\x07" + - "e\x02\x02\u0229\u025A\x07g\x02\x02\u022A\u022B\x07v\x02\x02\u022B\u022C" + - "\x07z\x02\x02\u022C\u022D\x070\x02\x02\u022D\u022E\x07j\x02\x02\u022E" + - "\u022F\x07c\x02\x02\u022F\u0230\x07u\x02\x02\u0230\u0231\x07j\x02\x02" + - "\u0231\u0232\x07Q\x02\x02\u0232\u0233\x07w\x02\x02\u0233\u0234\x07v\x02" + - "\x02\u0234\u0235\x07r\x02\x02\u0235\u0236\x07w\x02\x02\u0236\u0237\x07" + - "v\x02\x02\u0237\u025A\x07u\x02\x02\u0238\u0239\x07v\x02\x02\u0239\u023A" + - "\x07z\x02\x02\u023A\u023B\x070\x02\x02\u023B\u023C\x07n\x02\x02\u023C" + - "\u023D\x07q\x02\x02\u023D\u023E\x07e\x02\x02\u023E\u023F\x07m\x02\x02" + - "\u023F\u0240\x07v\x02\x02\u0240\u0241\x07k\x02\x02\u0241\u0242\x07o\x02" + - "\x02\u0242\u025A\x07g\x02\x02\u0243\u0244\x07v\x02\x02\u0244\u0245\x07" + - "z\x02\x02\u0245\u0246\x070\x02\x02\u0246\u0247\x07j\x02\x02\u0247\u0248" + - "\x07c\x02\x02\u0248\u0249\x07u\x02\x02\u0249\u024A\x07j\x02\x02\u024A" + - "\u024B\x07v\x02\x02\u024B\u024C\x07{\x02\x02\u024C\u024D\x07r\x02\x02" + - "\u024D\u025A\x07g\x02\x02\u024E\u024F\x07v\x02\x02\u024F\u0250\x07z\x02" + - "\x02\u0250\u0251\x070\x02\x02\u0251\u0252\x07r\x02\x02\u0252\u0253\x07" + - "t\x02\x02\u0253\u0254\x07g\x02\x02\u0254\u0255\x07k\x02\x02\u0255\u0256" + - "\x07o\x02\x02\u0256\u0257\x07c\x02\x02\u0257\u0258\x07i\x02\x02\u0258" + - "\u025A\x07g\x02\x02\u0259\u01D9\x03\x02\x02\x02\u0259\u01E3\x03\x02\x02" + - "\x02\u0259\u01F2\x03\x02\x02\x02\u0259\u0201\x03\x02\x02\x02\u0259\u020C" + - "\x03\x02\x02\x02\u0259\u0217\x03\x02\x02\x02\u0259\u021F\x03\x02\x02\x02" + - "\u0259\u022A\x03\x02\x02\x02\u0259\u0238\x03\x02\x02\x02\u0259\u0243\x03" + - "\x02\x02\x02\u0259\u024E\x03\x02\x02\x02\u025An\x03\x02\x02\x02\u025B" + - "\u025F\t\n\x02\x02\u025C\u025E\t\v\x02\x02\u025D\u025C\x03\x02\x02\x02" + - "\u025E\u0261\x03\x02\x02\x02\u025F\u025D\x03\x02\x02\x02\u025F\u0260\x03" + - "\x02\x02\x02\u0260p\x03\x02\x02\x02\u0261\u025F\x03\x02\x02\x02\u0262" + - "\u0264\t\f\x02\x02\u0263\u0262\x03\x02\x02\x02\u0264\u0265\x03\x02\x02" + - "\x02\u0265\u0263\x03\x02\x02\x02\u0265\u0266\x03\x02\x02\x02\u0266\u0267" + - "\x03\x02\x02\x02\u0267\u0268\b9\x02\x02\u0268r\x03\x02\x02\x02\u0269\u026A" + - "\x071\x02\x02\u026A\u026B\x07,\x02\x02\u026B\u026F\x03\x02\x02\x02\u026C" + - "\u026E\v\x02\x02\x02\u026D\u026C\x03\x02\x02\x02\u026E\u0271\x03\x02\x02" + - "\x02\u026F\u0270\x03\x02\x02\x02\u026F\u026D\x03\x02\x02\x02\u0270\u0272" + - "\x03\x02\x02\x02\u0271\u026F\x03\x02\x02\x02\u0272\u0273\x07,\x02\x02" + - "\u0273\u0274\x071\x02\x02\u0274\u0275\x03\x02\x02\x02\u0275\u0276\b:\x03" + - "\x02\u0276t\x03\x02\x02\x02\u0277\u0278\x071\x02\x02\u0278\u0279\x071" + - "\x02\x02\u0279\u027D\x03\x02\x02\x02\u027A\u027C\n\r\x02\x02\u027B\u027A" + - "\x03\x02\x02\x02\u027C\u027F\x03\x02\x02\x02\u027D\u027B\x03\x02\x02\x02" + - "\u027D\u027E\x03\x02\x02\x02\u027E\u0280\x03\x02\x02\x02\u027F\u027D\x03" + - "\x02\x02\x02\u0280\u0281\b;\x03\x02\u0281v\x03\x02\x02\x02\x1B\x02\u0129" + - "\u012F\u0135\u0140\u017B\u017E\u0183\u0189\u018B\u0194\u019A\u01A0\u01A7" + - "\u01A9\u01B1\u01B3\u01B7\u01C7\u01D7\u0259\u025F\u0265\u026F\u027D\x04" + - "\b\x02\x02\x02\x03\x02"; - public static readonly _serializedATN: string = Utils.join( - [ - CashScriptLexer._serializedATNSegment0, - CashScriptLexer._serializedATNSegment1, - ], - "", - ); - public static __ATN: ATN; - public static get _ATN(): ATN { - if (!CashScriptLexer.__ATN) { - CashScriptLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(CashScriptLexer._serializedATN)); - } - - return CashScriptLexer.__ATN; - } - -} - +// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ATN } from "antlr4ts/atn/ATN"; +import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; +import { CharStream } from "antlr4ts/CharStream"; +import { Lexer } from "antlr4ts/Lexer"; +import { LexerATNSimulator } from "antlr4ts/atn/LexerATNSimulator"; +import { NotNull } from "antlr4ts/Decorators"; +import { Override } from "antlr4ts/Decorators"; +import { RuleContext } from "antlr4ts/RuleContext"; +import { Vocabulary } from "antlr4ts/Vocabulary"; +import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; + +import * as Utils from "antlr4ts/misc/Utils"; + + +export class CashScriptLexer extends Lexer { + public static readonly T__0 = 1; + public static readonly T__1 = 2; + public static readonly T__2 = 3; + public static readonly T__3 = 4; + public static readonly T__4 = 5; + public static readonly T__5 = 6; + public static readonly T__6 = 7; + public static readonly T__7 = 8; + public static readonly T__8 = 9; + public static readonly T__9 = 10; + public static readonly T__10 = 11; + public static readonly T__11 = 12; + public static readonly T__12 = 13; + public static readonly T__13 = 14; + public static readonly T__14 = 15; + public static readonly T__15 = 16; + public static readonly T__16 = 17; + public static readonly T__17 = 18; + public static readonly T__18 = 19; + public static readonly T__19 = 20; + public static readonly T__20 = 21; + public static readonly T__21 = 22; + public static readonly T__22 = 23; + public static readonly T__23 = 24; + public static readonly T__24 = 25; + public static readonly T__25 = 26; + public static readonly T__26 = 27; + public static readonly T__27 = 28; + public static readonly T__28 = 29; + public static readonly T__29 = 30; + public static readonly T__30 = 31; + public static readonly T__31 = 32; + public static readonly T__32 = 33; + public static readonly T__33 = 34; + public static readonly T__34 = 35; + public static readonly T__35 = 36; + public static readonly T__36 = 37; + public static readonly T__37 = 38; + public static readonly T__38 = 39; + public static readonly T__39 = 40; + public static readonly T__40 = 41; + public static readonly T__41 = 42; + public static readonly T__42 = 43; + public static readonly T__43 = 44; + public static readonly T__44 = 45; + public static readonly T__45 = 46; + public static readonly T__46 = 47; + public static readonly T__47 = 48; + public static readonly T__48 = 49; + public static readonly T__49 = 50; + public static readonly T__50 = 51; + public static readonly T__51 = 52; + public static readonly T__52 = 53; + public static readonly VersionLiteral = 54; + public static readonly BooleanLiteral = 55; + public static readonly NumberUnit = 56; + public static readonly NumberLiteral = 57; + public static readonly Bytes = 58; + public static readonly Bound = 59; + public static readonly StringLiteral = 60; + public static readonly DateLiteral = 61; + public static readonly HexLiteral = 62; + public static readonly TxVar = 63; + public static readonly NullaryOp = 64; + public static readonly Identifier = 65; + public static readonly WHITESPACE = 66; + public static readonly COMMENT = 67; + public static readonly LINE_COMMENT = 68; + + // tslint:disable:no-trailing-whitespace + public static readonly channelNames: string[] = [ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", + ]; + + // tslint:disable:no-trailing-whitespace + public static readonly modeNames: string[] = [ + "DEFAULT_MODE", + ]; + + public static readonly ruleNames: string[] = [ + "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", + "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", + "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", + "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", + "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", + "T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48", + "T__49", "T__50", "T__51", "T__52", "VersionLiteral", "BooleanLiteral", + "NumberUnit", "NumberLiteral", "Bytes", "Bound", "StringLiteral", "DateLiteral", + "HexLiteral", "TxVar", "NullaryOp", "Identifier", "WHITESPACE", "COMMENT", + "LINE_COMMENT", + ]; + + private static readonly _LITERAL_NAMES: Array = [ + undefined, "'pragma'", "';'", "'cashscript'", "'^'", "'~'", "'>='", "'>'", + "'<'", "'<='", "'='", "'contract'", "'{'", "'}'", "'function'", "'('", + "','", "')'", "'require'", "'if'", "'else'", "'new'", "'['", "']'", "'tx.outputs'", + "'.value'", "'.lockingBytecode'", "'tx.inputs'", "'.outpointTransactionHash'", + "'.outpointIndex'", "'.unlockingBytecode'", "'.sequenceNumber'", "'.reverse()'", + "'.length'", "'.split'", "'!'", "'-'", "'*'", "'/'", "'%'", "'+'", "'=='", + "'!='", "'&'", "'|'", "'&&'", "'||'", "'constant'", "'int'", "'bool'", + "'string'", "'pubkey'", "'sig'", "'datasig'", + ]; + private static readonly _SYMBOLIC_NAMES: Array = [ + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, "VersionLiteral", + "BooleanLiteral", "NumberUnit", "NumberLiteral", "Bytes", "Bound", "StringLiteral", + "DateLiteral", "HexLiteral", "TxVar", "NullaryOp", "Identifier", "WHITESPACE", + "COMMENT", "LINE_COMMENT", + ]; + public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(CashScriptLexer._LITERAL_NAMES, CashScriptLexer._SYMBOLIC_NAMES, []); + + // @Override + // @NotNull + public get vocabulary(): Vocabulary { + return CashScriptLexer.VOCABULARY; + } + // tslint:enable:no-trailing-whitespace + + + constructor(input: CharStream) { + super(input); + this._interp = new LexerATNSimulator(CashScriptLexer._ATN, this); + } + + // @Override + public get grammarFileName(): string { return "CashScript.g4"; } + + // @Override + public get ruleNames(): string[] { return CashScriptLexer.ruleNames; } + + // @Override + public get serializedATN(): string { return CashScriptLexer._serializedATN; } + + // @Override + public get channelNames(): string[] { return CashScriptLexer.channelNames; } + + // @Override + public get modeNames(): string[] { return CashScriptLexer.modeNames; } + + private static readonly _serializedATNSegments: number = 2; + private static readonly _serializedATNSegment0: string = + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02F\u02F7\b\x01" + + "\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06" + + "\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" + + "\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t" + + "\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t" + + "\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t" + + "\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t" + + "\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04\'\t\'\x04(\t(\x04)\t)\x04*\t*\x04" + + "+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x04" + + "4\t4\x045\t5\x046\t6\x047\t7\x048\t8\x049\t9\x04:\t:\x04;\t;\x04<\t<\x04" + + "=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04B\tB\x04C\tC\x04D\tD\x04E\tE\x03" + + "\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03" + + "\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03" + + "\x04\x03\x04\x03\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03" + + "\b\x03\b\x03\t\x03\t\x03\n\x03\n\x03\n\x03\v\x03\v\x03\f\x03\f\x03\f\x03" + + "\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0F\x03" + + "\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x10\x03" + + "\x10\x03\x11\x03\x11\x03\x12\x03\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03" + + "\x13\x03\x13\x03\x13\x03\x13\x03\x14\x03\x14\x03\x14\x03\x15\x03\x15\x03" + + "\x15\x03\x15\x03\x15\x03\x16\x03\x16\x03\x16\x03\x16\x03\x17\x03\x17\x03" + + "\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03" + + "\x19\x03\x19\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03" + + "\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03" + + "\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03" + + "\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03" + + "\x1C\x03\x1C\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03" + + "\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03" + + "\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03" + + "\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03" + + "\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03\x1F\x03" + + "\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03" + + "\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03 \x03 \x03 \x03" + + " \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03!\x03" + + "!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03\"\x03\"\x03\"\x03\"" + + "\x03\"\x03\"\x03\"\x03\"\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03$\x03$" + + "\x03%\x03%\x03&\x03&\x03\'\x03\'\x03(\x03(\x03)\x03)\x03*\x03*\x03*\x03" + + "+\x03+\x03+\x03,\x03,\x03-\x03-\x03.\x03.\x03.\x03/\x03/\x03/\x030\x03" + + "0\x030\x030\x030\x030\x030\x030\x030\x031\x031\x031\x031\x032\x032\x03" + + "2\x032\x032\x033\x033\x033\x033\x033\x033\x033\x034\x034\x034\x034\x03" + + "4\x034\x034\x035\x035\x035\x035\x036\x036\x036\x036\x036\x036\x036\x03" + + "6\x037\x067\u01BF\n7\r7\x0E7\u01C0\x037\x037\x067\u01C5\n7\r7\x0E7\u01C6" + + "\x037\x037\x067\u01CB\n7\r7\x0E7\u01CC\x038\x038\x038\x038\x038\x038\x03" + + "8\x038\x038\x058\u01D8\n8\x039\x039\x039\x039\x039\x039\x039\x039\x03" + + "9\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x03" + + "9\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x03" + + "9\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x03" + + "9\x039\x039\x039\x039\x039\x039\x059\u0213\n9\x03:\x05:\u0216\n:\x03:" + + "\x06:\u0219\n:\r:\x0E:\u021A\x03:\x03:\x06:\u021F\n:\r:\x0E:\u0220\x05" + + ":\u0223\n:\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x05;\u022C\n;\x03;\x03;" + + "\x03;\x03;\x05;\u0232\n;\x03<\x03<\x07<\u0236\n<\f<\x0E<\u0239\v<\x03" + + "=\x03=\x03=\x03=\x07=\u023F\n=\f=\x0E=\u0242\v=\x03=\x03=\x03=\x03=\x03" + + "=\x07=\u0249\n=\f=\x0E=\u024C\v=\x03=\x05=\u024F\n=\x03>\x03>\x03>\x03" + + ">\x03>\x03>\x03>\x03>\x03>\x03?\x03?\x03?\x07?\u025D\n?\f?\x0E?\u0260" + + "\v?\x03@\x03@\x03@\x03@\x03@\x03@\x03@\x03@\x03@\x03@\x03@\x03@\x03@\x05" + + "@\u026F\n@\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03" + + "A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03" + + "A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03" + + "A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03" + + "A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03" + + "A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03" + + "A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x05A\u02CF" + + "\nA\x03B\x03B\x07B\u02D3\nB\fB\x0EB\u02D6\vB\x03C\x06C\u02D9\nC\rC\x0E" + + "C\u02DA\x03C\x03C\x03D\x03D\x03D\x03D\x07D\u02E3\nD\fD\x0ED\u02E6\vD\x03" + + "D\x03D\x03D\x03D\x03D\x03E\x03E\x03E\x03E\x07E\u02F1\nE\fE\x0EE\u02F4" + + "\vE\x03E\x03E\x05\u0240\u024A\u02E4\x02\x02F\x03\x02\x03\x05\x02\x04\x07" + + "\x02\x05\t\x02\x06\v\x02\x07\r\x02\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15" + + "\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02\x0F\x1D\x02\x10\x1F\x02\x11!\x02" + + "\x12#\x02\x13%\x02\x14\'\x02\x15)\x02\x16+\x02\x17-\x02\x18/\x02\x191" + + "\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02\x1E;\x02\x1F=\x02 ?\x02!A\x02" + + "\"C\x02#E\x02$G\x02%I\x02&K\x02\'M\x02(O\x02)Q\x02*S\x02+U\x02,W\x02-" + + "Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x024g\x025i\x026k\x027m\x028o\x02" + + "9q\x02:s\x02;u\x02{\x02?}\x02@\x7F\x02A\x81\x02B\x83\x02" + + "C\x85\x02D\x87\x02E\x89\x02F\x03\x02\x0E\x03\x022;\x03\x02//\x04\x02G" + + "Ggg\x03\x023;\x05\x02\f\f\x0F\x0F$$\x05\x02\f\f\x0F\x0F))\x04\x02ZZzz" + + "\x05\x022;CHch\x04\x02C\\c|\x06\x022;C\\aac|\x05\x02\v\f\x0E\x0F\"\"\x04" + + "\x02\f\f\x0F\x0F\x02\u031A\x02\x03\x03\x02\x02\x02\x02\x05\x03\x02\x02" + + "\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02\x02\x02\x02\v\x03\x02\x02\x02" + + "\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02\x02\x02\x11\x03\x02\x02\x02" + + "\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02\x02\x02\x17\x03\x02\x02\x02" + + "\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02\x02\x02\x1D\x03\x02\x02\x02" + + "\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02\x02\x02#\x03\x02\x02\x02\x02" + + "%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02\x02)\x03\x02\x02\x02\x02+\x03" + + "\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02\x02\x02\x021\x03\x02\x02" + + "\x02\x023\x03\x02\x02\x02\x025\x03\x02\x02\x02\x027\x03\x02\x02\x02\x02" + + "9\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02=\x03\x02\x02\x02\x02?\x03\x02" + + "\x02\x02\x02A\x03\x02\x02\x02\x02C\x03\x02\x02\x02\x02E\x03\x02\x02\x02" + + "\x02G\x03\x02\x02\x02\x02I\x03\x02\x02\x02\x02K\x03\x02\x02\x02\x02M\x03" + + "\x02\x02\x02\x02O\x03\x02\x02\x02\x02Q\x03\x02\x02\x02\x02S\x03\x02\x02" + + "\x02\x02U\x03\x02\x02\x02\x02W\x03\x02\x02\x02\x02Y\x03\x02\x02\x02\x02" + + "[\x03\x02\x02\x02\x02]\x03\x02\x02\x02\x02_\x03\x02\x02\x02\x02a\x03\x02" + + "\x02\x02\x02c\x03\x02\x02\x02\x02e\x03\x02\x02\x02\x02g\x03\x02\x02\x02" + + "\x02i\x03\x02\x02\x02\x02k\x03\x02\x02\x02\x02m\x03\x02\x02\x02\x02o\x03" + + "\x02\x02\x02\x02q\x03\x02\x02\x02\x02s\x03\x02\x02\x02\x02u\x03\x02\x02" + + "\x02\x02w\x03\x02\x02\x02\x02y\x03\x02\x02\x02\x02{\x03\x02\x02\x02\x02" + + "}\x03\x02\x02\x02\x02\x7F\x03\x02\x02\x02\x02\x81\x03\x02\x02\x02\x02" + + "\x83\x03\x02\x02\x02\x02\x85\x03\x02\x02\x02\x02\x87\x03\x02\x02\x02\x02" + + "\x89\x03\x02\x02\x02\x03\x8B\x03\x02\x02\x02\x05\x92\x03\x02\x02\x02\x07" + + "\x94\x03\x02\x02\x02\t\x9F\x03\x02\x02\x02\v\xA1\x03\x02\x02\x02\r\xA3" + + "\x03\x02\x02\x02\x0F\xA6\x03\x02\x02\x02\x11\xA8\x03\x02\x02\x02\x13\xAA" + + "\x03\x02\x02\x02\x15\xAD\x03\x02\x02\x02\x17\xAF\x03\x02\x02\x02\x19\xB8" + + "\x03\x02\x02\x02\x1B\xBA\x03\x02\x02\x02\x1D\xBC\x03\x02\x02\x02\x1F\xC5" + + "\x03\x02\x02\x02!\xC7\x03\x02\x02\x02#\xC9\x03\x02\x02\x02%\xCB\x03\x02" + + "\x02\x02\'\xD3\x03\x02\x02\x02)\xD6\x03\x02\x02\x02+\xDB\x03\x02\x02\x02" + + "-\xDF\x03\x02\x02\x02/\xE1\x03\x02\x02\x021\xE3\x03\x02\x02\x023\xEE\x03" + + "\x02\x02\x025\xF5\x03\x02\x02\x027\u0106\x03\x02\x02\x029\u0110\x03\x02" + + "\x02\x02;\u0129\x03\x02\x02\x02=\u0138\x03\x02\x02\x02?\u014B\x03\x02" + + "\x02\x02A\u015B\x03\x02\x02\x02C\u0166\x03\x02\x02\x02E\u016E\x03\x02" + + "\x02\x02G\u0175\x03\x02\x02\x02I\u0177\x03\x02\x02\x02K\u0179\x03\x02" + + "\x02\x02M\u017B\x03\x02\x02\x02O\u017D\x03\x02\x02\x02Q\u017F\x03\x02" + + "\x02\x02S\u0181\x03\x02\x02\x02U\u0184\x03\x02\x02\x02W\u0187\x03\x02" + + "\x02\x02Y\u0189\x03\x02\x02\x02[\u018B\x03\x02\x02\x02]\u018E\x03\x02" + + "\x02\x02_\u0191\x03\x02\x02\x02a\u019A\x03\x02\x02\x02c\u019E\x03\x02" + + "\x02\x02e\u01A3\x03\x02\x02\x02g\u01AA\x03\x02\x02\x02i\u01B1\x03\x02" + + "\x02\x02k\u01B5\x03\x02\x02\x02m\u01BE\x03\x02\x02\x02o\u01D7\x03\x02" + + "\x02\x02q\u0212\x03\x02\x02\x02s\u0215\x03\x02\x02\x02u\u0231\x03\x02" + + "\x02\x02w\u0233\x03\x02\x02\x02y\u024E\x03\x02\x02\x02{\u0250\x03\x02" + + "\x02\x02}\u0259\x03\x02\x02\x02\x7F\u026E\x03\x02\x02\x02\x81\u02CE\x03" + + "\x02\x02\x02\x83\u02D0\x03\x02\x02\x02\x85\u02D8\x03\x02\x02\x02\x87\u02DE" + + "\x03\x02\x02\x02\x89\u02EC\x03\x02\x02\x02\x8B\x8C\x07r\x02\x02\x8C\x8D" + + "\x07t\x02\x02\x8D\x8E\x07c\x02\x02\x8E\x8F\x07i\x02\x02\x8F\x90\x07o\x02" + + "\x02\x90\x91\x07c\x02\x02\x91\x04\x03\x02\x02\x02\x92\x93\x07=\x02\x02" + + "\x93\x06\x03\x02\x02\x02\x94\x95\x07e\x02\x02\x95\x96\x07c\x02\x02\x96" + + "\x97\x07u\x02\x02\x97\x98\x07j\x02\x02\x98\x99\x07u\x02\x02\x99\x9A\x07" + + "e\x02\x02\x9A\x9B\x07t\x02\x02\x9B\x9C\x07k\x02\x02\x9C\x9D\x07r\x02\x02" + + "\x9D\x9E\x07v\x02\x02\x9E\b\x03\x02\x02\x02\x9F\xA0\x07`\x02\x02\xA0\n" + + "\x03\x02\x02\x02\xA1\xA2\x07\x80\x02\x02\xA2\f\x03\x02\x02\x02\xA3\xA4" + + "\x07@\x02\x02\xA4\xA5\x07?\x02\x02\xA5\x0E\x03\x02\x02\x02\xA6\xA7\x07" + + "@\x02\x02\xA7\x10\x03\x02\x02\x02\xA8\xA9\x07>\x02\x02\xA9\x12\x03\x02" + + "\x02\x02\xAA\xAB\x07>\x02\x02\xAB\xAC\x07?\x02\x02\xAC\x14\x03\x02\x02" + + "\x02\xAD\xAE\x07?\x02\x02\xAE\x16\x03\x02\x02\x02\xAF\xB0\x07e\x02\x02" + + "\xB0\xB1\x07q\x02\x02\xB1\xB2\x07p\x02\x02\xB2\xB3\x07v\x02\x02\xB3\xB4" + + "\x07t\x02\x02\xB4\xB5\x07c\x02\x02\xB5\xB6\x07e\x02\x02\xB6\xB7\x07v\x02" + + "\x02\xB7\x18\x03\x02\x02\x02\xB8\xB9\x07}\x02\x02\xB9\x1A\x03\x02\x02" + + "\x02\xBA\xBB\x07\x7F\x02\x02\xBB\x1C\x03\x02\x02\x02\xBC\xBD\x07h\x02" + + "\x02\xBD\xBE\x07w\x02\x02\xBE\xBF\x07p\x02\x02\xBF\xC0\x07e\x02\x02\xC0" + + "\xC1\x07v\x02\x02\xC1\xC2\x07k\x02\x02\xC2\xC3\x07q\x02\x02\xC3\xC4\x07" + + "p\x02\x02\xC4\x1E\x03\x02\x02\x02\xC5\xC6\x07*\x02\x02\xC6 \x03\x02\x02" + + "\x02\xC7\xC8\x07.\x02\x02\xC8\"\x03\x02\x02\x02\xC9\xCA\x07+\x02\x02\xCA" + + "$\x03\x02\x02\x02\xCB\xCC\x07t\x02\x02\xCC\xCD\x07g\x02\x02\xCD\xCE\x07" + + "s\x02\x02\xCE\xCF\x07w\x02\x02\xCF\xD0\x07k\x02\x02\xD0\xD1\x07t\x02\x02" + + "\xD1\xD2\x07g\x02\x02\xD2&\x03\x02\x02\x02\xD3\xD4\x07k\x02\x02\xD4\xD5" + + "\x07h\x02\x02\xD5(\x03\x02\x02\x02\xD6\xD7\x07g\x02\x02\xD7\xD8\x07n\x02" + + "\x02\xD8\xD9\x07u\x02\x02\xD9\xDA\x07g\x02\x02\xDA*\x03\x02\x02\x02\xDB" + + "\xDC\x07p\x02\x02\xDC\xDD\x07g\x02\x02\xDD\xDE\x07y\x02\x02\xDE,\x03\x02" + + "\x02\x02\xDF\xE0\x07]\x02\x02\xE0.\x03\x02\x02\x02\xE1\xE2\x07_\x02\x02" + + "\xE20\x03\x02\x02\x02\xE3\xE4\x07v\x02\x02\xE4\xE5\x07z\x02\x02\xE5\xE6" + + "\x070\x02\x02\xE6\xE7\x07q\x02\x02\xE7\xE8\x07w\x02\x02\xE8\xE9\x07v\x02" + + "\x02\xE9\xEA\x07r\x02\x02\xEA\xEB\x07w\x02\x02\xEB\xEC\x07v\x02\x02\xEC" + + "\xED\x07u\x02\x02\xED2\x03\x02\x02\x02\xEE\xEF\x070\x02\x02\xEF\xF0\x07" + + "x\x02\x02\xF0\xF1\x07c\x02\x02\xF1\xF2\x07n\x02\x02\xF2\xF3\x07w\x02\x02" + + "\xF3\xF4\x07g\x02\x02\xF44\x03\x02\x02\x02\xF5\xF6\x070\x02\x02\xF6\xF7" + + "\x07n\x02\x02\xF7\xF8\x07q\x02\x02\xF8\xF9\x07e\x02\x02\xF9\xFA\x07m\x02" + + "\x02\xFA\xFB\x07k\x02\x02\xFB\xFC\x07p\x02\x02\xFC\xFD\x07i\x02\x02\xFD" + + "\xFE\x07D\x02\x02\xFE\xFF\x07{\x02\x02\xFF\u0100\x07v\x02\x02\u0100\u0101" + + "\x07g\x02\x02\u0101\u0102\x07e\x02\x02\u0102\u0103\x07q\x02\x02\u0103" + + "\u0104\x07f\x02\x02\u0104\u0105\x07g\x02\x02\u01056\x03\x02\x02\x02\u0106" + + "\u0107\x07v\x02\x02\u0107\u0108\x07z\x02\x02\u0108\u0109\x070\x02\x02" + + "\u0109\u010A\x07k\x02\x02\u010A\u010B\x07p\x02\x02\u010B\u010C\x07r\x02" + + "\x02\u010C\u010D\x07w\x02\x02\u010D\u010E\x07v\x02\x02\u010E\u010F\x07" + + "u\x02\x02\u010F8\x03\x02\x02\x02\u0110\u0111\x070\x02\x02\u0111\u0112" + + "\x07q\x02\x02\u0112\u0113\x07w\x02\x02\u0113\u0114\x07v\x02\x02\u0114" + + "\u0115\x07r\x02\x02\u0115\u0116\x07q\x02\x02\u0116\u0117\x07k\x02\x02" + + "\u0117\u0118\x07p\x02\x02\u0118\u0119\x07v\x02\x02\u0119\u011A\x07V\x02" + + "\x02\u011A\u011B\x07t\x02\x02\u011B\u011C\x07c\x02\x02\u011C\u011D\x07" + + "p\x02\x02\u011D\u011E\x07u\x02\x02\u011E\u011F\x07c\x02\x02\u011F\u0120" + + "\x07e\x02\x02\u0120\u0121\x07v\x02\x02\u0121\u0122\x07k\x02\x02\u0122" + + "\u0123\x07q\x02\x02\u0123\u0124\x07p\x02\x02\u0124\u0125\x07J\x02\x02" + + "\u0125\u0126\x07c\x02\x02\u0126\u0127\x07u\x02\x02\u0127\u0128\x07j\x02" + + "\x02\u0128:\x03\x02\x02\x02\u0129\u012A\x070\x02\x02\u012A\u012B\x07q" + + "\x02\x02\u012B\u012C\x07w\x02\x02\u012C\u012D\x07v\x02\x02\u012D\u012E" + + "\x07r\x02\x02\u012E\u012F\x07q\x02\x02\u012F\u0130\x07k\x02\x02\u0130" + + "\u0131\x07p\x02\x02\u0131\u0132\x07v\x02\x02\u0132\u0133\x07K\x02\x02" + + "\u0133\u0134\x07p\x02\x02\u0134\u0135\x07f\x02\x02\u0135\u0136\x07g\x02" + + "\x02\u0136\u0137\x07z\x02\x02\u0137<\x03\x02\x02\x02\u0138\u0139\x070" + + "\x02\x02\u0139\u013A\x07w\x02\x02\u013A\u013B\x07p\x02\x02\u013B\u013C" + + "\x07n\x02\x02\u013C\u013D\x07q\x02\x02\u013D\u013E\x07e\x02\x02\u013E" + + "\u013F\x07m\x02\x02\u013F\u0140\x07k\x02\x02\u0140\u0141\x07p\x02\x02" + + "\u0141\u0142\x07i\x02\x02\u0142\u0143\x07D\x02\x02\u0143\u0144\x07{\x02" + + "\x02\u0144\u0145\x07v\x02\x02\u0145\u0146\x07g\x02\x02\u0146\u0147\x07" + + "e\x02\x02\u0147\u0148\x07q\x02\x02\u0148\u0149\x07f\x02\x02\u0149\u014A" + + "\x07g\x02\x02\u014A>\x03\x02\x02\x02\u014B\u014C\x070\x02\x02\u014C\u014D" + + "\x07u\x02\x02\u014D\u014E\x07g\x02\x02\u014E\u014F\x07s\x02\x02\u014F" + + "\u0150\x07w\x02\x02\u0150\u0151\x07g\x02\x02\u0151\u0152\x07p\x02\x02" + + "\u0152\u0153\x07e\x02\x02\u0153\u0154\x07g\x02\x02\u0154\u0155\x07P\x02" + + "\x02\u0155\u0156\x07w\x02\x02\u0156\u0157\x07o\x02\x02\u0157\u0158\x07" + + "d\x02\x02\u0158\u0159\x07g\x02\x02\u0159\u015A\x07t\x02\x02\u015A@\x03" + + "\x02\x02\x02\u015B\u015C\x070\x02\x02\u015C\u015D\x07t\x02\x02\u015D\u015E" + + "\x07g\x02\x02\u015E\u015F\x07x\x02\x02\u015F\u0160\x07g\x02\x02\u0160" + + "\u0161\x07t\x02\x02\u0161\u0162\x07u\x02\x02\u0162\u0163\x07g\x02\x02" + + "\u0163\u0164\x07*\x02\x02\u0164\u0165\x07+\x02\x02\u0165B\x03\x02\x02" + + "\x02\u0166\u0167\x070\x02\x02\u0167\u0168\x07n\x02\x02\u0168\u0169\x07" + + "g\x02\x02\u0169\u016A\x07p\x02\x02\u016A\u016B\x07i\x02\x02\u016B\u016C" + + "\x07v\x02\x02\u016C\u016D\x07j\x02\x02\u016DD\x03\x02\x02\x02\u016E\u016F" + + "\x070\x02\x02\u016F\u0170\x07u\x02\x02\u0170\u0171\x07r\x02\x02\u0171" + + "\u0172\x07n\x02\x02\u0172\u0173\x07k\x02\x02\u0173\u0174\x07v\x02\x02" + + "\u0174F\x03\x02\x02\x02\u0175\u0176\x07#\x02\x02\u0176H\x03\x02\x02\x02" + + "\u0177\u0178\x07/\x02\x02\u0178J\x03\x02\x02\x02\u0179\u017A\x07,\x02" + + "\x02\u017AL\x03\x02\x02\x02\u017B\u017C\x071\x02\x02\u017CN\x03\x02\x02" + + "\x02\u017D\u017E\x07\'\x02\x02\u017EP\x03\x02\x02\x02\u017F\u0180\x07" + + "-\x02\x02\u0180R\x03\x02\x02\x02\u0181\u0182\x07?\x02\x02\u0182\u0183" + + "\x07?\x02\x02\u0183T\x03\x02\x02\x02\u0184\u0185\x07#\x02\x02\u0185\u0186" + + "\x07?\x02\x02\u0186V\x03\x02\x02\x02\u0187\u0188\x07(\x02\x02\u0188X\x03" + + "\x02\x02\x02\u0189\u018A\x07~\x02\x02\u018AZ\x03\x02\x02\x02\u018B\u018C" + + "\x07(\x02\x02\u018C\u018D\x07(\x02\x02\u018D\\\x03\x02\x02\x02\u018E\u018F" + + "\x07~\x02\x02\u018F\u0190\x07~\x02\x02\u0190^\x03\x02\x02\x02\u0191\u0192" + + "\x07e\x02\x02\u0192\u0193\x07q\x02\x02\u0193\u0194\x07p\x02\x02\u0194" + + "\u0195\x07u\x02\x02\u0195\u0196\x07v\x02\x02\u0196\u0197\x07c\x02\x02" + + "\u0197\u0198\x07p\x02\x02\u0198\u0199\x07v\x02\x02\u0199`\x03\x02\x02" + + "\x02\u019A\u019B\x07k\x02\x02\u019B\u019C\x07p\x02\x02\u019C\u019D\x07" + + "v\x02\x02\u019Db\x03\x02\x02\x02\u019E\u019F\x07d\x02\x02\u019F\u01A0" + + "\x07q\x02\x02\u01A0\u01A1\x07q\x02\x02\u01A1\u01A2\x07n\x02\x02\u01A2" + + "d\x03\x02\x02\x02\u01A3\u01A4\x07u\x02\x02\u01A4\u01A5\x07v\x02\x02\u01A5" + + "\u01A6\x07t\x02\x02\u01A6\u01A7\x07k\x02\x02\u01A7\u01A8\x07p\x02\x02" + + "\u01A8\u01A9\x07i\x02\x02\u01A9f\x03\x02\x02\x02\u01AA\u01AB\x07r\x02" + + "\x02\u01AB\u01AC\x07w\x02\x02\u01AC\u01AD\x07d\x02\x02\u01AD\u01AE\x07" + + "m\x02\x02\u01AE\u01AF\x07g\x02\x02\u01AF\u01B0\x07{\x02\x02\u01B0h\x03" + + "\x02\x02\x02\u01B1\u01B2\x07u\x02\x02\u01B2\u01B3\x07k\x02\x02\u01B3\u01B4" + + "\x07i\x02\x02\u01B4j\x03\x02\x02\x02\u01B5\u01B6\x07f\x02\x02\u01B6\u01B7" + + "\x07c\x02\x02\u01B7\u01B8\x07v\x02\x02\u01B8\u01B9\x07c\x02\x02\u01B9" + + "\u01BA\x07u\x02\x02\u01BA\u01BB\x07k\x02\x02\u01BB\u01BC\x07i\x02\x02" + + "\u01BCl\x03\x02\x02\x02\u01BD\u01BF\t\x02\x02\x02\u01BE\u01BD\x03\x02" + + "\x02\x02\u01BF\u01C0\x03\x02\x02\x02\u01C0\u01BE\x03\x02\x02\x02\u01C0" + + "\u01C1\x03\x02\x02\x02\u01C1\u01C2\x03\x02\x02\x02\u01C2\u01C4\x070\x02" + + "\x02\u01C3\u01C5\t\x02\x02\x02\u01C4\u01C3\x03\x02\x02\x02\u01C5\u01C6" + + "\x03\x02\x02\x02\u01C6\u01C4\x03\x02\x02\x02\u01C6\u01C7\x03\x02\x02\x02" + + "\u01C7\u01C8\x03\x02\x02\x02\u01C8\u01CA\x070\x02\x02\u01C9\u01CB\t\x02" + + "\x02\x02\u01CA\u01C9\x03\x02\x02\x02\u01CB\u01CC\x03\x02\x02\x02\u01CC" + + "\u01CA\x03\x02\x02\x02\u01CC\u01CD\x03\x02\x02\x02\u01CDn\x03\x02\x02" + + "\x02\u01CE\u01CF\x07v\x02\x02\u01CF\u01D0\x07t\x02\x02\u01D0\u01D1\x07" + + "w\x02\x02\u01D1\u01D8\x07g\x02\x02\u01D2\u01D3\x07h\x02\x02\u01D3\u01D4" + + "\x07c\x02\x02\u01D4\u01D5\x07n\x02\x02\u01D5\u01D6\x07u\x02\x02\u01D6" + + "\u01D8\x07g\x02\x02\u01D7\u01CE\x03\x02\x02\x02\u01D7\u01D2\x03\x02\x02" + + "\x02\u01D8p\x03\x02\x02\x02\u01D9\u01DA\x07u\x02\x02\u01DA\u01DB\x07c" + + "\x02\x02\u01DB\u01DC\x07v\x02\x02\u01DC\u01DD\x07q\x02\x02\u01DD\u01DE" + + "\x07u\x02\x02\u01DE\u01DF\x07j\x02\x02\u01DF\u01E0\x07k\x02\x02\u01E0" + + "\u0213\x07u\x02\x02\u01E1\u01E2\x07u\x02\x02\u01E2\u01E3\x07c\x02\x02" + + "\u01E3\u01E4\x07v\x02\x02\u01E4\u0213\x07u\x02\x02\u01E5\u01E6\x07h\x02" + + "\x02\u01E6\u01E7\x07k\x02\x02\u01E7\u01E8\x07p\x02\x02\u01E8\u01E9\x07" + + "p\x02\x02\u01E9\u01EA\x07g\x02\x02\u01EA\u0213\x07{\x02\x02\u01EB\u01EC" + + "\x07d\x02\x02\u01EC\u01ED\x07k\x02\x02\u01ED\u01EE\x07v\x02\x02\u01EE" + + "\u0213\x07u\x02\x02\u01EF\u01F0\x07d\x02\x02\u01F0\u01F1\x07k\x02\x02" + + "\u01F1\u01F2\x07v\x02\x02\u01F2\u01F3\x07e\x02\x02\u01F3\u01F4\x07q\x02" + + "\x02\u01F4\u01F5\x07k\x02\x02\u01F5\u0213\x07p\x02\x02\u01F6\u01F7\x07" + + "u\x02\x02\u01F7\u01F8\x07g\x02\x02\u01F8\u01F9\x07e\x02\x02\u01F9\u01FA" + + "\x07q\x02\x02\u01FA\u01FB\x07p\x02\x02\u01FB\u01FC\x07f\x02\x02\u01FC" + + "\u0213\x07u\x02\x02\u01FD\u01FE\x07o\x02\x02\u01FE\u01FF\x07k\x02\x02" + + "\u01FF\u0200\x07p\x02\x02\u0200\u0201\x07w\x02\x02\u0201\u0202\x07v\x02" + + "\x02\u0202\u0203\x07g\x02\x02\u0203\u0213\x07u\x02\x02\u0204\u0205\x07" + + "j\x02\x02\u0205\u0206\x07q\x02\x02\u0206\u0207\x07w\x02\x02\u0207\u0208" + + "\x07t\x02\x02\u0208\u0213\x07u\x02\x02\u0209\u020A\x07f\x02\x02\u020A" + + "\u020B\x07c\x02\x02\u020B"; + private static readonly _serializedATNSegment1: string = + "\u020C\x07{\x02\x02\u020C\u0213\x07u\x02\x02\u020D\u020E\x07y\x02\x02" + + "\u020E\u020F\x07g\x02\x02\u020F\u0210\x07g\x02\x02\u0210\u0211\x07m\x02" + + "\x02\u0211\u0213\x07u\x02\x02\u0212\u01D9\x03\x02\x02\x02\u0212\u01E1" + + "\x03\x02\x02\x02\u0212\u01E5\x03\x02\x02\x02\u0212\u01EB\x03\x02\x02\x02" + + "\u0212\u01EF\x03\x02\x02\x02\u0212\u01F6\x03\x02\x02\x02\u0212\u01FD\x03" + + "\x02\x02\x02\u0212\u0204\x03\x02\x02\x02\u0212\u0209\x03\x02\x02\x02\u0212" + + "\u020D\x03\x02\x02\x02\u0213r\x03\x02\x02\x02\u0214\u0216\t\x03\x02\x02" + + "\u0215\u0214\x03\x02\x02\x02\u0215\u0216\x03\x02\x02\x02\u0216\u0218\x03" + + "\x02\x02\x02\u0217\u0219\t\x02\x02\x02\u0218\u0217\x03\x02\x02\x02\u0219" + + "\u021A\x03\x02\x02\x02\u021A\u0218\x03\x02\x02\x02\u021A\u021B\x03\x02" + + "\x02\x02\u021B\u0222\x03\x02\x02\x02\u021C\u021E\t\x04\x02\x02\u021D\u021F" + + "\t\x02\x02\x02\u021E\u021D\x03\x02\x02\x02\u021F\u0220\x03\x02\x02\x02" + + "\u0220\u021E\x03\x02\x02\x02\u0220\u0221\x03\x02\x02\x02\u0221\u0223\x03" + + "\x02\x02\x02\u0222\u021C\x03\x02\x02\x02\u0222\u0223\x03\x02\x02\x02\u0223" + + "t\x03\x02\x02\x02\u0224\u0225\x07d\x02\x02\u0225\u0226\x07{\x02\x02\u0226" + + "\u0227\x07v\x02\x02\u0227\u0228\x07g\x02\x02\u0228\u0229\x07u\x02\x02" + + "\u0229\u022B\x03\x02\x02\x02\u022A\u022C\x05w<\x02\u022B\u022A\x03\x02" + + "\x02\x02\u022B\u022C\x03\x02\x02\x02\u022C\u0232\x03\x02\x02\x02\u022D" + + "\u022E\x07d\x02\x02\u022E\u022F\x07{\x02\x02\u022F\u0230\x07v\x02\x02" + + "\u0230\u0232\x07g\x02\x02\u0231\u0224\x03\x02\x02\x02\u0231\u022D\x03" + + "\x02\x02\x02\u0232v\x03\x02\x02\x02\u0233\u0237\t\x05\x02\x02\u0234\u0236" + + "\t\x02\x02\x02\u0235\u0234\x03\x02\x02\x02\u0236\u0239\x03\x02\x02\x02" + + "\u0237\u0235\x03\x02\x02\x02\u0237\u0238\x03\x02\x02\x02\u0238x\x03\x02" + + "\x02\x02\u0239\u0237\x03\x02\x02\x02\u023A\u0240\x07$\x02\x02\u023B\u023C" + + "\x07^\x02\x02\u023C\u023F\x07$\x02\x02\u023D\u023F\n\x06\x02\x02\u023E" + + "\u023B\x03\x02\x02\x02\u023E\u023D\x03\x02\x02\x02\u023F\u0242\x03\x02" + + "\x02\x02\u0240\u0241\x03\x02\x02\x02\u0240\u023E\x03\x02\x02\x02\u0241" + + "\u0243\x03\x02\x02\x02\u0242\u0240\x03\x02\x02\x02\u0243\u024F\x07$\x02" + + "\x02\u0244\u024A\x07)\x02\x02\u0245\u0246\x07^\x02\x02\u0246\u0249\x07" + + ")\x02\x02\u0247\u0249\n\x07\x02\x02\u0248\u0245\x03\x02\x02\x02\u0248" + + "\u0247\x03\x02\x02\x02\u0249\u024C\x03\x02\x02\x02\u024A\u024B\x03\x02" + + "\x02\x02\u024A\u0248\x03\x02\x02\x02\u024B\u024D\x03\x02\x02\x02\u024C" + + "\u024A\x03\x02\x02\x02\u024D\u024F\x07)\x02\x02\u024E\u023A\x03\x02\x02" + + "\x02\u024E\u0244\x03\x02\x02\x02\u024Fz\x03\x02\x02\x02\u0250\u0251\x07" + + "f\x02\x02\u0251\u0252\x07c\x02\x02\u0252\u0253\x07v\x02\x02\u0253\u0254" + + "\x07g\x02\x02\u0254\u0255\x07*\x02\x02\u0255\u0256\x03\x02\x02\x02\u0256" + + "\u0257\x05y=\x02\u0257\u0258\x07+\x02\x02\u0258|\x03\x02\x02\x02\u0259" + + "\u025A\x072\x02\x02\u025A\u025E\t\b\x02\x02\u025B\u025D\t\t\x02\x02\u025C" + + "\u025B\x03\x02\x02\x02\u025D\u0260\x03\x02\x02\x02\u025E\u025C\x03\x02" + + "\x02\x02\u025E\u025F\x03\x02\x02\x02\u025F~\x03\x02\x02\x02\u0260\u025E" + + "\x03\x02\x02\x02\u0261\u0262\x07v\x02\x02\u0262\u0263\x07z\x02\x02\u0263" + + "\u0264\x070\x02\x02\u0264\u0265\x07c\x02\x02\u0265\u0266\x07i\x02\x02" + + "\u0266\u026F\x07g\x02\x02\u0267\u0268\x07v\x02\x02\u0268\u0269\x07z\x02" + + "\x02\u0269\u026A\x070\x02\x02\u026A\u026B\x07v\x02\x02\u026B\u026C\x07" + + "k\x02\x02\u026C\u026D\x07o\x02\x02\u026D\u026F\x07g\x02\x02\u026E\u0261" + + "\x03\x02\x02\x02\u026E\u0267\x03\x02\x02\x02\u026F\x80\x03\x02\x02\x02" + + "\u0270\u0271\x07v\x02\x02\u0271\u0272\x07j\x02\x02\u0272\u0273\x07k\x02" + + "\x02\u0273\u0274\x07u\x02\x02\u0274\u0275\x070\x02\x02\u0275\u0276\x07" + + "c\x02\x02\u0276\u0277\x07e\x02\x02\u0277\u0278\x07v\x02\x02\u0278\u0279" + + "\x07k\x02\x02\u0279\u027A\x07x\x02\x02\u027A\u027B\x07g\x02\x02\u027B" + + "\u027C\x07K\x02\x02\u027C\u027D\x07p\x02\x02\u027D\u027E\x07r\x02\x02" + + "\u027E\u027F\x07w\x02\x02\u027F\u0280\x07v\x02\x02\u0280\u0281\x07K\x02" + + "\x02\u0281\u0282\x07p\x02\x02\u0282\u0283\x07f\x02\x02\u0283\u0284\x07" + + "g\x02\x02\u0284\u02CF\x07z\x02\x02\u0285\u0286\x07v\x02\x02\u0286\u0287" + + "\x07j\x02\x02\u0287\u0288\x07k\x02\x02\u0288\u0289\x07u\x02\x02\u0289" + + "\u028A\x070\x02\x02\u028A\u028B\x07c\x02\x02\u028B\u028C\x07e\x02\x02" + + "\u028C\u028D\x07v\x02\x02\u028D\u028E\x07k\x02\x02\u028E\u028F\x07x\x02" + + "\x02\u028F\u0290\x07g\x02\x02\u0290\u0291\x07D\x02\x02\u0291\u0292\x07" + + "{\x02\x02\u0292\u0293\x07v\x02\x02\u0293\u0294\x07g\x02\x02\u0294\u0295" + + "\x07e\x02\x02\u0295\u0296\x07q\x02\x02\u0296\u0297\x07f\x02\x02\u0297" + + "\u02CF\x07g\x02\x02\u0298\u0299\x07v\x02\x02\u0299\u029A\x07z\x02\x02" + + "\u029A\u029B\x070\x02\x02\u029B\u029C\x07k\x02\x02\u029C\u029D\x07p\x02" + + "\x02\u029D\u029E\x07r\x02\x02\u029E\u029F\x07w\x02\x02\u029F\u02A0\x07" + + "v\x02\x02\u02A0\u02A1\x07u\x02\x02\u02A1\u02A2\x070\x02\x02\u02A2\u02A3" + + "\x07n\x02\x02\u02A3\u02A4\x07g\x02\x02\u02A4\u02A5\x07p\x02\x02\u02A5" + + "\u02A6\x07i\x02\x02\u02A6\u02A7\x07v\x02\x02\u02A7\u02CF\x07j\x02\x02" + + "\u02A8\u02A9\x07v\x02\x02\u02A9\u02AA\x07z\x02\x02\u02AA\u02AB\x070\x02" + + "\x02\u02AB\u02AC\x07q\x02\x02\u02AC\u02AD\x07w\x02\x02\u02AD\u02AE\x07" + + "v\x02\x02\u02AE\u02AF\x07r\x02\x02\u02AF\u02B0\x07w\x02\x02\u02B0\u02B1" + + "\x07v\x02\x02\u02B1\u02B2\x07u\x02\x02\u02B2\u02B3\x070\x02\x02\u02B3" + + "\u02B4\x07n\x02\x02\u02B4\u02B5\x07g\x02\x02\u02B5\u02B6\x07p\x02\x02" + + "\u02B6\u02B7\x07i\x02\x02\u02B7\u02B8\x07v\x02\x02\u02B8\u02CF\x07j\x02" + + "\x02\u02B9\u02BA\x07v\x02\x02\u02BA\u02BB\x07z\x02\x02\u02BB\u02BC\x07" + + "0\x02\x02\u02BC\u02BD\x07x\x02\x02\u02BD\u02BE\x07g\x02\x02\u02BE\u02BF" + + "\x07t\x02\x02\u02BF\u02C0\x07u\x02\x02\u02C0\u02C1\x07k\x02\x02\u02C1" + + "\u02C2\x07q\x02\x02\u02C2\u02CF\x07p\x02\x02\u02C3\u02C4\x07v\x02\x02" + + "\u02C4\u02C5\x07z\x02\x02\u02C5\u02C6\x070\x02\x02\u02C6\u02C7\x07n\x02" + + "\x02\u02C7\u02C8\x07q\x02\x02\u02C8\u02C9\x07e\x02\x02\u02C9\u02CA\x07" + + "m\x02\x02\u02CA\u02CB\x07v\x02\x02\u02CB\u02CC\x07k\x02\x02\u02CC\u02CD" + + "\x07o\x02\x02\u02CD\u02CF\x07g\x02\x02\u02CE\u0270\x03\x02\x02\x02\u02CE" + + "\u0285\x03\x02\x02\x02\u02CE\u0298\x03\x02\x02\x02\u02CE\u02A8\x03\x02" + + "\x02\x02\u02CE\u02B9\x03\x02\x02\x02\u02CE\u02C3\x03\x02\x02\x02\u02CF" + + "\x82\x03\x02\x02\x02\u02D0\u02D4\t\n\x02\x02\u02D1\u02D3\t\v\x02\x02\u02D2" + + "\u02D1\x03\x02\x02\x02\u02D3\u02D6\x03\x02\x02\x02\u02D4\u02D2\x03\x02" + + "\x02\x02\u02D4\u02D5\x03\x02\x02\x02\u02D5\x84\x03\x02\x02\x02\u02D6\u02D4" + + "\x03\x02\x02\x02\u02D7\u02D9\t\f\x02\x02\u02D8\u02D7\x03\x02\x02\x02\u02D9" + + "\u02DA\x03\x02\x02\x02\u02DA\u02D8\x03\x02\x02\x02\u02DA\u02DB\x03\x02" + + "\x02\x02\u02DB\u02DC\x03\x02\x02\x02\u02DC\u02DD\bC\x02\x02\u02DD\x86" + + "\x03\x02\x02\x02\u02DE\u02DF\x071\x02\x02\u02DF\u02E0\x07,\x02\x02\u02E0" + + "\u02E4\x03\x02\x02\x02\u02E1\u02E3\v\x02\x02\x02\u02E2\u02E1\x03\x02\x02" + + "\x02\u02E3\u02E6\x03\x02\x02\x02\u02E4\u02E5\x03\x02\x02\x02\u02E4\u02E2" + + "\x03\x02\x02\x02\u02E5\u02E7\x03\x02\x02\x02\u02E6\u02E4\x03\x02\x02\x02" + + "\u02E7\u02E8\x07,\x02\x02\u02E8\u02E9\x071\x02\x02\u02E9\u02EA\x03\x02" + + "\x02\x02\u02EA\u02EB\bD\x03\x02\u02EB\x88\x03\x02\x02\x02\u02EC\u02ED" + + "\x071\x02\x02\u02ED\u02EE\x071\x02\x02\u02EE\u02F2\x03\x02\x02\x02\u02EF" + + "\u02F1\n\r\x02\x02\u02F0\u02EF\x03\x02\x02\x02\u02F1\u02F4\x03\x02\x02" + + "\x02\u02F2\u02F0\x03\x02\x02\x02\u02F2\u02F3\x03\x02\x02\x02\u02F3\u02F5" + + "\x03\x02\x02\x02\u02F4\u02F2\x03\x02\x02\x02\u02F5\u02F6\bE\x03\x02\u02F6" + + "\x8A\x03\x02\x02\x02\x1B\x02\u01C0\u01C6\u01CC\u01D7\u0212\u0215\u021A" + + "\u0220\u0222\u022B\u0231\u0237\u023E\u0240\u0248\u024A\u024E\u025E\u026E" + + "\u02CE\u02D4\u02DA\u02E4\u02F2\x04\b\x02\x02\x02\x03\x02"; + public static readonly _serializedATN: string = Utils.join( + [ + CashScriptLexer._serializedATNSegment0, + CashScriptLexer._serializedATNSegment1, + ], + "", + ); + public static __ATN: ATN; + public static get _ATN(): ATN { + if (!CashScriptLexer.__ATN) { + CashScriptLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(CashScriptLexer._serializedATN)); + } + + return CashScriptLexer.__ATN; + } + +} + diff --git a/src/CashscriptLinter/grammar/CashScriptListener.ts b/src/CashscriptLinter/grammar/CashScriptListener.ts index cf16a3e..0b1c732 100644 --- a/src/CashscriptLinter/grammar/CashScriptListener.ts +++ b/src/CashscriptLinter/grammar/CashScriptListener.ts @@ -1,443 +1,481 @@ -// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT - - -import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; - -import { ParenthesisedContext } from "./CashScriptParser"; -import { CastContext } from "./CashScriptParser"; -import { FunctionCallExpressionContext } from "./CashScriptParser"; -import { InstantiationContext } from "./CashScriptParser"; -import { TupleIndexOpContext } from "./CashScriptParser"; -import { UnaryOpContext } from "./CashScriptParser"; -import { BinaryOpContext } from "./CashScriptParser"; -import { ArrayContext } from "./CashScriptParser"; -import { PreimageFieldContext } from "./CashScriptParser"; -import { IdentifierContext } from "./CashScriptParser"; -import { LiteralExpressionContext } from "./CashScriptParser"; -import { SourceFileContext } from "./CashScriptParser"; -import { PragmaDirectiveContext } from "./CashScriptParser"; -import { PragmaNameContext } from "./CashScriptParser"; -import { PragmaValueContext } from "./CashScriptParser"; -import { VersionConstraintContext } from "./CashScriptParser"; -import { VersionOperatorContext } from "./CashScriptParser"; -import { ContractDefinitionContext } from "./CashScriptParser"; -import { FunctionDefinitionContext } from "./CashScriptParser"; -import { ParameterListContext } from "./CashScriptParser"; -import { ParameterContext } from "./CashScriptParser"; -import { BlockContext } from "./CashScriptParser"; -import { StatementContext } from "./CashScriptParser"; -import { VariableDefinitionContext } from "./CashScriptParser"; -import { AssignStatementContext } from "./CashScriptParser"; -import { TimeOpStatementContext } from "./CashScriptParser"; -import { RequireStatementContext } from "./CashScriptParser"; -import { IfStatementContext } from "./CashScriptParser"; -import { FunctionCallContext } from "./CashScriptParser"; -import { ExpressionListContext } from "./CashScriptParser"; -import { ExpressionContext } from "./CashScriptParser"; -import { LiteralContext } from "./CashScriptParser"; -import { NumberLiteralContext } from "./CashScriptParser"; -import { TypeNameContext } from "./CashScriptParser"; - - -/** - * This interface defines a complete listener for a parse tree produced by - * `CashScriptParser`. - */ -export interface CashScriptListener extends ParseTreeListener { - /** - * Enter a parse tree produced by the `Parenthesised` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterParenthesised?: (ctx: ParenthesisedContext) => void; - /** - * Exit a parse tree produced by the `Parenthesised` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitParenthesised?: (ctx: ParenthesisedContext) => void; - - /** - * Enter a parse tree produced by the `Cast` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterCast?: (ctx: CastContext) => void; - /** - * Exit a parse tree produced by the `Cast` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitCast?: (ctx: CastContext) => void; - - /** - * Enter a parse tree produced by the `FunctionCallExpression` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void; - /** - * Exit a parse tree produced by the `FunctionCallExpression` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void; - - /** - * Enter a parse tree produced by the `Instantiation` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterInstantiation?: (ctx: InstantiationContext) => void; - /** - * Exit a parse tree produced by the `Instantiation` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitInstantiation?: (ctx: InstantiationContext) => void; - - /** - * Enter a parse tree produced by the `TupleIndexOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterTupleIndexOp?: (ctx: TupleIndexOpContext) => void; - /** - * Exit a parse tree produced by the `TupleIndexOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitTupleIndexOp?: (ctx: TupleIndexOpContext) => void; - - /** - * Enter a parse tree produced by the `UnaryOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterUnaryOp?: (ctx: UnaryOpContext) => void; - /** - * Exit a parse tree produced by the `UnaryOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitUnaryOp?: (ctx: UnaryOpContext) => void; - - /** - * Enter a parse tree produced by the `BinaryOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterBinaryOp?: (ctx: BinaryOpContext) => void; - /** - * Exit a parse tree produced by the `BinaryOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitBinaryOp?: (ctx: BinaryOpContext) => void; - - /** - * Enter a parse tree produced by the `Array` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterArray?: (ctx: ArrayContext) => void; - /** - * Exit a parse tree produced by the `Array` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitArray?: (ctx: ArrayContext) => void; - - /** - * Enter a parse tree produced by the `PreimageField` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterPreimageField?: (ctx: PreimageFieldContext) => void; - /** - * Exit a parse tree produced by the `PreimageField` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitPreimageField?: (ctx: PreimageFieldContext) => void; - - /** - * Enter a parse tree produced by the `Identifier` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterIdentifier?: (ctx: IdentifierContext) => void; - /** - * Exit a parse tree produced by the `Identifier` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitIdentifier?: (ctx: IdentifierContext) => void; - - /** - * Enter a parse tree produced by the `LiteralExpression` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterLiteralExpression?: (ctx: LiteralExpressionContext) => void; - /** - * Exit a parse tree produced by the `LiteralExpression` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitLiteralExpression?: (ctx: LiteralExpressionContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.sourceFile`. - * @param ctx the parse tree - */ - enterSourceFile?: (ctx: SourceFileContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.sourceFile`. - * @param ctx the parse tree - */ - exitSourceFile?: (ctx: SourceFileContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.pragmaDirective`. - * @param ctx the parse tree - */ - enterPragmaDirective?: (ctx: PragmaDirectiveContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.pragmaDirective`. - * @param ctx the parse tree - */ - exitPragmaDirective?: (ctx: PragmaDirectiveContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.pragmaName`. - * @param ctx the parse tree - */ - enterPragmaName?: (ctx: PragmaNameContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.pragmaName`. - * @param ctx the parse tree - */ - exitPragmaName?: (ctx: PragmaNameContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.pragmaValue`. - * @param ctx the parse tree - */ - enterPragmaValue?: (ctx: PragmaValueContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.pragmaValue`. - * @param ctx the parse tree - */ - exitPragmaValue?: (ctx: PragmaValueContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.versionConstraint`. - * @param ctx the parse tree - */ - enterVersionConstraint?: (ctx: VersionConstraintContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.versionConstraint`. - * @param ctx the parse tree - */ - exitVersionConstraint?: (ctx: VersionConstraintContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.versionOperator`. - * @param ctx the parse tree - */ - enterVersionOperator?: (ctx: VersionOperatorContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.versionOperator`. - * @param ctx the parse tree - */ - exitVersionOperator?: (ctx: VersionOperatorContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.contractDefinition`. - * @param ctx the parse tree - */ - enterContractDefinition?: (ctx: ContractDefinitionContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.contractDefinition`. - * @param ctx the parse tree - */ - exitContractDefinition?: (ctx: ContractDefinitionContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.functionDefinition`. - * @param ctx the parse tree - */ - enterFunctionDefinition?: (ctx: FunctionDefinitionContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.functionDefinition`. - * @param ctx the parse tree - */ - exitFunctionDefinition?: (ctx: FunctionDefinitionContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.parameterList`. - * @param ctx the parse tree - */ - enterParameterList?: (ctx: ParameterListContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.parameterList`. - * @param ctx the parse tree - */ - exitParameterList?: (ctx: ParameterListContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.parameter`. - * @param ctx the parse tree - */ - enterParameter?: (ctx: ParameterContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.parameter`. - * @param ctx the parse tree - */ - exitParameter?: (ctx: ParameterContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.block`. - * @param ctx the parse tree - */ - enterBlock?: (ctx: BlockContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.block`. - * @param ctx the parse tree - */ - exitBlock?: (ctx: BlockContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.statement`. - * @param ctx the parse tree - */ - enterStatement?: (ctx: StatementContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.statement`. - * @param ctx the parse tree - */ - exitStatement?: (ctx: StatementContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.variableDefinition`. - * @param ctx the parse tree - */ - enterVariableDefinition?: (ctx: VariableDefinitionContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.variableDefinition`. - * @param ctx the parse tree - */ - exitVariableDefinition?: (ctx: VariableDefinitionContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.assignStatement`. - * @param ctx the parse tree - */ - enterAssignStatement?: (ctx: AssignStatementContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.assignStatement`. - * @param ctx the parse tree - */ - exitAssignStatement?: (ctx: AssignStatementContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.timeOpStatement`. - * @param ctx the parse tree - */ - enterTimeOpStatement?: (ctx: TimeOpStatementContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.timeOpStatement`. - * @param ctx the parse tree - */ - exitTimeOpStatement?: (ctx: TimeOpStatementContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.requireStatement`. - * @param ctx the parse tree - */ - enterRequireStatement?: (ctx: RequireStatementContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.requireStatement`. - * @param ctx the parse tree - */ - exitRequireStatement?: (ctx: RequireStatementContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.ifStatement`. - * @param ctx the parse tree - */ - enterIfStatement?: (ctx: IfStatementContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.ifStatement`. - * @param ctx the parse tree - */ - exitIfStatement?: (ctx: IfStatementContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.functionCall`. - * @param ctx the parse tree - */ - enterFunctionCall?: (ctx: FunctionCallContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.functionCall`. - * @param ctx the parse tree - */ - exitFunctionCall?: (ctx: FunctionCallContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.expressionList`. - * @param ctx the parse tree - */ - enterExpressionList?: (ctx: ExpressionListContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.expressionList`. - * @param ctx the parse tree - */ - exitExpressionList?: (ctx: ExpressionListContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.expression`. - * @param ctx the parse tree - */ - enterExpression?: (ctx: ExpressionContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.expression`. - * @param ctx the parse tree - */ - exitExpression?: (ctx: ExpressionContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.literal`. - * @param ctx the parse tree - */ - enterLiteral?: (ctx: LiteralContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.literal`. - * @param ctx the parse tree - */ - exitLiteral?: (ctx: LiteralContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.numberLiteral`. - * @param ctx the parse tree - */ - enterNumberLiteral?: (ctx: NumberLiteralContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.numberLiteral`. - * @param ctx the parse tree - */ - exitNumberLiteral?: (ctx: NumberLiteralContext) => void; - - /** - * Enter a parse tree produced by `CashScriptParser.typeName`. - * @param ctx the parse tree - */ - enterTypeName?: (ctx: TypeNameContext) => void; - /** - * Exit a parse tree produced by `CashScriptParser.typeName`. - * @param ctx the parse tree - */ - exitTypeName?: (ctx: TypeNameContext) => void; -} - +// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; + +import { ParenthesisedContext } from "./CashScriptParser"; +import { CastContext } from "./CashScriptParser"; +import { FunctionCallExpressionContext } from "./CashScriptParser"; +import { InstantiationContext } from "./CashScriptParser"; +import { TupleIndexOpContext } from "./CashScriptParser"; +import { UnaryIntrospectionOpContext } from "./CashScriptParser"; +import { UnaryOpContext } from "./CashScriptParser"; +import { BinaryOpContext } from "./CashScriptParser"; +import { ArrayContext } from "./CashScriptParser"; +import { NullaryOpContext } from "./CashScriptParser"; +import { IdentifierContext } from "./CashScriptParser"; +import { LiteralExpressionContext } from "./CashScriptParser"; +import { SourceFileContext } from "./CashScriptParser"; +import { PragmaDirectiveContext } from "./CashScriptParser"; +import { PragmaNameContext } from "./CashScriptParser"; +import { PragmaValueContext } from "./CashScriptParser"; +import { VersionConstraintContext } from "./CashScriptParser"; +import { VersionOperatorContext } from "./CashScriptParser"; +import { ContractDefinitionContext } from "./CashScriptParser"; +import { FunctionDefinitionContext } from "./CashScriptParser"; +import { ParameterListContext } from "./CashScriptParser"; +import { ParameterContext } from "./CashScriptParser"; +import { BlockContext } from "./CashScriptParser"; +import { StatementContext } from "./CashScriptParser"; +import { VariableDefinitionContext } from "./CashScriptParser"; +import { TupleAssignmentContext } from "./CashScriptParser"; +import { AssignStatementContext } from "./CashScriptParser"; +import { TimeOpStatementContext } from "./CashScriptParser"; +import { RequireStatementContext } from "./CashScriptParser"; +import { IfStatementContext } from "./CashScriptParser"; +import { FunctionCallContext } from "./CashScriptParser"; +import { ExpressionListContext } from "./CashScriptParser"; +import { ExpressionContext } from "./CashScriptParser"; +import { ModifierContext } from "./CashScriptParser"; +import { LiteralContext } from "./CashScriptParser"; +import { NumberLiteralContext } from "./CashScriptParser"; +import { TypeNameContext } from "./CashScriptParser"; + + +/** + * This interface defines a complete listener for a parse tree produced by + * `CashScriptParser`. + */ +export interface CashScriptListener extends ParseTreeListener { + /** + * Enter a parse tree produced by the `Parenthesised` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterParenthesised?: (ctx: ParenthesisedContext) => void; + /** + * Exit a parse tree produced by the `Parenthesised` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitParenthesised?: (ctx: ParenthesisedContext) => void; + + /** + * Enter a parse tree produced by the `Cast` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterCast?: (ctx: CastContext) => void; + /** + * Exit a parse tree produced by the `Cast` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitCast?: (ctx: CastContext) => void; + + /** + * Enter a parse tree produced by the `FunctionCallExpression` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void; + /** + * Exit a parse tree produced by the `FunctionCallExpression` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void; + + /** + * Enter a parse tree produced by the `Instantiation` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterInstantiation?: (ctx: InstantiationContext) => void; + /** + * Exit a parse tree produced by the `Instantiation` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitInstantiation?: (ctx: InstantiationContext) => void; + + /** + * Enter a parse tree produced by the `TupleIndexOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterTupleIndexOp?: (ctx: TupleIndexOpContext) => void; + /** + * Exit a parse tree produced by the `TupleIndexOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitTupleIndexOp?: (ctx: TupleIndexOpContext) => void; + + /** + * Enter a parse tree produced by the `UnaryIntrospectionOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterUnaryIntrospectionOp?: (ctx: UnaryIntrospectionOpContext) => void; + /** + * Exit a parse tree produced by the `UnaryIntrospectionOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitUnaryIntrospectionOp?: (ctx: UnaryIntrospectionOpContext) => void; + + /** + * Enter a parse tree produced by the `UnaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterUnaryOp?: (ctx: UnaryOpContext) => void; + /** + * Exit a parse tree produced by the `UnaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitUnaryOp?: (ctx: UnaryOpContext) => void; + + /** + * Enter a parse tree produced by the `BinaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterBinaryOp?: (ctx: BinaryOpContext) => void; + /** + * Exit a parse tree produced by the `BinaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitBinaryOp?: (ctx: BinaryOpContext) => void; + + /** + * Enter a parse tree produced by the `Array` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterArray?: (ctx: ArrayContext) => void; + /** + * Exit a parse tree produced by the `Array` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitArray?: (ctx: ArrayContext) => void; + + /** + * Enter a parse tree produced by the `NullaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterNullaryOp?: (ctx: NullaryOpContext) => void; + /** + * Exit a parse tree produced by the `NullaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitNullaryOp?: (ctx: NullaryOpContext) => void; + + /** + * Enter a parse tree produced by the `Identifier` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterIdentifier?: (ctx: IdentifierContext) => void; + /** + * Exit a parse tree produced by the `Identifier` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitIdentifier?: (ctx: IdentifierContext) => void; + + /** + * Enter a parse tree produced by the `LiteralExpression` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterLiteralExpression?: (ctx: LiteralExpressionContext) => void; + /** + * Exit a parse tree produced by the `LiteralExpression` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitLiteralExpression?: (ctx: LiteralExpressionContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.sourceFile`. + * @param ctx the parse tree + */ + enterSourceFile?: (ctx: SourceFileContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.sourceFile`. + * @param ctx the parse tree + */ + exitSourceFile?: (ctx: SourceFileContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.pragmaDirective`. + * @param ctx the parse tree + */ + enterPragmaDirective?: (ctx: PragmaDirectiveContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.pragmaDirective`. + * @param ctx the parse tree + */ + exitPragmaDirective?: (ctx: PragmaDirectiveContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.pragmaName`. + * @param ctx the parse tree + */ + enterPragmaName?: (ctx: PragmaNameContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.pragmaName`. + * @param ctx the parse tree + */ + exitPragmaName?: (ctx: PragmaNameContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.pragmaValue`. + * @param ctx the parse tree + */ + enterPragmaValue?: (ctx: PragmaValueContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.pragmaValue`. + * @param ctx the parse tree + */ + exitPragmaValue?: (ctx: PragmaValueContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.versionConstraint`. + * @param ctx the parse tree + */ + enterVersionConstraint?: (ctx: VersionConstraintContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.versionConstraint`. + * @param ctx the parse tree + */ + exitVersionConstraint?: (ctx: VersionConstraintContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.versionOperator`. + * @param ctx the parse tree + */ + enterVersionOperator?: (ctx: VersionOperatorContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.versionOperator`. + * @param ctx the parse tree + */ + exitVersionOperator?: (ctx: VersionOperatorContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.contractDefinition`. + * @param ctx the parse tree + */ + enterContractDefinition?: (ctx: ContractDefinitionContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.contractDefinition`. + * @param ctx the parse tree + */ + exitContractDefinition?: (ctx: ContractDefinitionContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.functionDefinition`. + * @param ctx the parse tree + */ + enterFunctionDefinition?: (ctx: FunctionDefinitionContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.functionDefinition`. + * @param ctx the parse tree + */ + exitFunctionDefinition?: (ctx: FunctionDefinitionContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.parameterList`. + * @param ctx the parse tree + */ + enterParameterList?: (ctx: ParameterListContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.parameterList`. + * @param ctx the parse tree + */ + exitParameterList?: (ctx: ParameterListContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.parameter`. + * @param ctx the parse tree + */ + enterParameter?: (ctx: ParameterContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.parameter`. + * @param ctx the parse tree + */ + exitParameter?: (ctx: ParameterContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.block`. + * @param ctx the parse tree + */ + enterBlock?: (ctx: BlockContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.block`. + * @param ctx the parse tree + */ + exitBlock?: (ctx: BlockContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.statement`. + * @param ctx the parse tree + */ + enterStatement?: (ctx: StatementContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.statement`. + * @param ctx the parse tree + */ + exitStatement?: (ctx: StatementContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.variableDefinition`. + * @param ctx the parse tree + */ + enterVariableDefinition?: (ctx: VariableDefinitionContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.variableDefinition`. + * @param ctx the parse tree + */ + exitVariableDefinition?: (ctx: VariableDefinitionContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.tupleAssignment`. + * @param ctx the parse tree + */ + enterTupleAssignment?: (ctx: TupleAssignmentContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.tupleAssignment`. + * @param ctx the parse tree + */ + exitTupleAssignment?: (ctx: TupleAssignmentContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.assignStatement`. + * @param ctx the parse tree + */ + enterAssignStatement?: (ctx: AssignStatementContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.assignStatement`. + * @param ctx the parse tree + */ + exitAssignStatement?: (ctx: AssignStatementContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.timeOpStatement`. + * @param ctx the parse tree + */ + enterTimeOpStatement?: (ctx: TimeOpStatementContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.timeOpStatement`. + * @param ctx the parse tree + */ + exitTimeOpStatement?: (ctx: TimeOpStatementContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.requireStatement`. + * @param ctx the parse tree + */ + enterRequireStatement?: (ctx: RequireStatementContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.requireStatement`. + * @param ctx the parse tree + */ + exitRequireStatement?: (ctx: RequireStatementContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.ifStatement`. + * @param ctx the parse tree + */ + enterIfStatement?: (ctx: IfStatementContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.ifStatement`. + * @param ctx the parse tree + */ + exitIfStatement?: (ctx: IfStatementContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.functionCall`. + * @param ctx the parse tree + */ + enterFunctionCall?: (ctx: FunctionCallContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.functionCall`. + * @param ctx the parse tree + */ + exitFunctionCall?: (ctx: FunctionCallContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.expressionList`. + * @param ctx the parse tree + */ + enterExpressionList?: (ctx: ExpressionListContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.expressionList`. + * @param ctx the parse tree + */ + exitExpressionList?: (ctx: ExpressionListContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.expression`. + * @param ctx the parse tree + */ + enterExpression?: (ctx: ExpressionContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.expression`. + * @param ctx the parse tree + */ + exitExpression?: (ctx: ExpressionContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.modifier`. + * @param ctx the parse tree + */ + enterModifier?: (ctx: ModifierContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.modifier`. + * @param ctx the parse tree + */ + exitModifier?: (ctx: ModifierContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.literal`. + * @param ctx the parse tree + */ + enterLiteral?: (ctx: LiteralContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.literal`. + * @param ctx the parse tree + */ + exitLiteral?: (ctx: LiteralContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.numberLiteral`. + * @param ctx the parse tree + */ + enterNumberLiteral?: (ctx: NumberLiteralContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.numberLiteral`. + * @param ctx the parse tree + */ + exitNumberLiteral?: (ctx: NumberLiteralContext) => void; + + /** + * Enter a parse tree produced by `CashScriptParser.typeName`. + * @param ctx the parse tree + */ + enterTypeName?: (ctx: TypeNameContext) => void; + /** + * Exit a parse tree produced by `CashScriptParser.typeName`. + * @param ctx the parse tree + */ + exitTypeName?: (ctx: TypeNameContext) => void; +} + diff --git a/src/CashscriptLinter/grammar/CashScriptParser.ts b/src/CashscriptLinter/grammar/CashScriptParser.ts index 66988ad..93b9de7 100644 --- a/src/CashscriptLinter/grammar/CashScriptParser.ts +++ b/src/CashscriptLinter/grammar/CashScriptParser.ts @@ -1,2922 +1,3213 @@ -// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT - - -import { ATN } from "antlr4ts/atn/ATN"; -import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; -import { FailedPredicateException } from "antlr4ts/FailedPredicateException"; -import { NotNull } from "antlr4ts/Decorators"; -import { NoViableAltException } from "antlr4ts/NoViableAltException"; -import { Override } from "antlr4ts/Decorators"; -import { Parser } from "antlr4ts/Parser"; -import { ParserRuleContext } from "antlr4ts/ParserRuleContext"; -import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator"; -import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; -import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; -import { RecognitionException } from "antlr4ts/RecognitionException"; -import { RuleContext } from "antlr4ts/RuleContext"; -//import { RuleVersion } from "antlr4ts/RuleVersion"; -import { TerminalNode } from "antlr4ts/tree/TerminalNode"; -import { Token } from "antlr4ts/Token"; -import { TokenStream } from "antlr4ts/TokenStream"; -import { Vocabulary } from "antlr4ts/Vocabulary"; -import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; - -import * as Utils from "antlr4ts/misc/Utils"; - -import { CashScriptListener } from "./CashScriptListener"; -import { CashScriptVisitor } from "./CashScriptVisitor"; - - -export class CashScriptParser extends Parser { - public static readonly T__0 = 1; - public static readonly T__1 = 2; - public static readonly T__2 = 3; - public static readonly T__3 = 4; - public static readonly T__4 = 5; - public static readonly T__5 = 6; - public static readonly T__6 = 7; - public static readonly T__7 = 8; - public static readonly T__8 = 9; - public static readonly T__9 = 10; - public static readonly T__10 = 11; - public static readonly T__11 = 12; - public static readonly T__12 = 13; - public static readonly T__13 = 14; - public static readonly T__14 = 15; - public static readonly T__15 = 16; - public static readonly T__16 = 17; - public static readonly T__17 = 18; - public static readonly T__18 = 19; - public static readonly T__19 = 20; - public static readonly T__20 = 21; - public static readonly T__21 = 22; - public static readonly T__22 = 23; - public static readonly T__23 = 24; - public static readonly T__24 = 25; - public static readonly T__25 = 26; - public static readonly T__26 = 27; - public static readonly T__27 = 28; - public static readonly T__28 = 29; - public static readonly T__29 = 30; - public static readonly T__30 = 31; - public static readonly T__31 = 32; - public static readonly T__32 = 33; - public static readonly T__33 = 34; - public static readonly T__34 = 35; - public static readonly T__35 = 36; - public static readonly T__36 = 37; - public static readonly T__37 = 38; - public static readonly T__38 = 39; - public static readonly T__39 = 40; - public static readonly T__40 = 41; - public static readonly T__41 = 42; - public static readonly T__42 = 43; - public static readonly VersionLiteral = 44; - public static readonly BooleanLiteral = 45; - public static readonly NumberUnit = 46; - public static readonly NumberLiteral = 47; - public static readonly Bytes = 48; - public static readonly Bound = 49; - public static readonly StringLiteral = 50; - public static readonly DateLiteral = 51; - public static readonly HexLiteral = 52; - public static readonly TxVar = 53; - public static readonly PreimageField = 54; - public static readonly Identifier = 55; - public static readonly WHITESPACE = 56; - public static readonly COMMENT = 57; - public static readonly LINE_COMMENT = 58; - public static readonly RULE_sourceFile = 0; - public static readonly RULE_pragmaDirective = 1; - public static readonly RULE_pragmaName = 2; - public static readonly RULE_pragmaValue = 3; - public static readonly RULE_versionConstraint = 4; - public static readonly RULE_versionOperator = 5; - public static readonly RULE_contractDefinition = 6; - public static readonly RULE_functionDefinition = 7; - public static readonly RULE_parameterList = 8; - public static readonly RULE_parameter = 9; - public static readonly RULE_block = 10; - public static readonly RULE_statement = 11; - public static readonly RULE_variableDefinition = 12; - public static readonly RULE_assignStatement = 13; - public static readonly RULE_timeOpStatement = 14; - public static readonly RULE_requireStatement = 15; - public static readonly RULE_ifStatement = 16; - public static readonly RULE_functionCall = 17; - public static readonly RULE_expressionList = 18; - public static readonly RULE_expression = 19; - public static readonly RULE_literal = 20; - public static readonly RULE_numberLiteral = 21; - public static readonly RULE_typeName = 22; - // tslint:disable:no-trailing-whitespace - public static readonly ruleNames: string[] = [ - "sourceFile", "pragmaDirective", "pragmaName", "pragmaValue", "versionConstraint", - "versionOperator", "contractDefinition", "functionDefinition", "parameterList", - "parameter", "block", "statement", "variableDefinition", "assignStatement", - "timeOpStatement", "requireStatement", "ifStatement", "functionCall", - "expressionList", "expression", "literal", "numberLiteral", "typeName", - ]; - - private static readonly _LITERAL_NAMES: Array = [ - undefined, "'pragma'", "';'", "'cashscript'", "'^'", "'~'", "'>='", "'>'", - "'<'", "'<='", "'='", "'contract'", "'{'", "'}'", "'function'", "'('", - "','", "')'", "'require'", "'if'", "'else'", "'new'", "'['", "']'", "'.reverse()'", - "'.length'", "'!'", "'-'", "'.split'", "'/'", "'%'", "'+'", "'=='", "'!='", - "'&'", "'|'", "'&&'", "'||'", "'int'", "'bool'", "'string'", "'pubkey'", - "'sig'", "'datasig'", - ]; - private static readonly _SYMBOLIC_NAMES: Array = [ - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, "VersionLiteral", "BooleanLiteral", "NumberUnit", - "NumberLiteral", "Bytes", "Bound", "StringLiteral", "DateLiteral", "HexLiteral", - "TxVar", "PreimageField", "Identifier", "WHITESPACE", "COMMENT", "LINE_COMMENT", - ]; - public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(CashScriptParser._LITERAL_NAMES, CashScriptParser._SYMBOLIC_NAMES, []); - - // @Override - // @NotNull - public get vocabulary(): Vocabulary { - return CashScriptParser.VOCABULARY; - } - // tslint:enable:no-trailing-whitespace - - // @Override - public get grammarFileName(): string { return "CashScript.g4"; } - - // @Override - public get ruleNames(): string[] { return CashScriptParser.ruleNames; } - - // @Override - public get serializedATN(): string { return CashScriptParser._serializedATN; } - - protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException { - return new FailedPredicateException(this, predicate, message); - } - - constructor(input: TokenStream) { - super(input); - this._interp = new ParserATNSimulator(CashScriptParser._ATN, this); - } - // @RuleVersion(0) - public sourceFile(): SourceFileContext { - let _localctx: SourceFileContext = new SourceFileContext(this._ctx, this.state); - this.enterRule(_localctx, 0, CashScriptParser.RULE_sourceFile); - let _la: number; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 49; - this._errHandler.sync(this); - _la = this._input.LA(1); - while (_la === CashScriptParser.T__0) { - { - { - this.state = 46; - this.pragmaDirective(); - } - } - this.state = 51; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - this.state = 52; - this.contractDefinition(); - this.state = 53; - this.match(CashScriptParser.EOF); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public pragmaDirective(): PragmaDirectiveContext { - let _localctx: PragmaDirectiveContext = new PragmaDirectiveContext(this._ctx, this.state); - this.enterRule(_localctx, 2, CashScriptParser.RULE_pragmaDirective); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 55; - this.match(CashScriptParser.T__0); - this.state = 56; - this.pragmaName(); - this.state = 57; - this.pragmaValue(); - this.state = 58; - this.match(CashScriptParser.T__1); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public pragmaName(): PragmaNameContext { - let _localctx: PragmaNameContext = new PragmaNameContext(this._ctx, this.state); - this.enterRule(_localctx, 4, CashScriptParser.RULE_pragmaName); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 60; - this.match(CashScriptParser.T__2); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public pragmaValue(): PragmaValueContext { - let _localctx: PragmaValueContext = new PragmaValueContext(this._ctx, this.state); - this.enterRule(_localctx, 6, CashScriptParser.RULE_pragmaValue); - let _la: number; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 62; - this.versionConstraint(); - this.state = 64; - this._errHandler.sync(this); - _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__3) | (1 << CashScriptParser.T__4) | (1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8) | (1 << CashScriptParser.T__9))) !== 0) || _la === CashScriptParser.VersionLiteral) { - { - this.state = 63; - this.versionConstraint(); - } - } - - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public versionConstraint(): VersionConstraintContext { - let _localctx: VersionConstraintContext = new VersionConstraintContext(this._ctx, this.state); - this.enterRule(_localctx, 8, CashScriptParser.RULE_versionConstraint); - let _la: number; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 67; - this._errHandler.sync(this); - _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__3) | (1 << CashScriptParser.T__4) | (1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8) | (1 << CashScriptParser.T__9))) !== 0)) { - { - this.state = 66; - this.versionOperator(); - } - } - - this.state = 69; - this.match(CashScriptParser.VersionLiteral); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public versionOperator(): VersionOperatorContext { - let _localctx: VersionOperatorContext = new VersionOperatorContext(this._ctx, this.state); - this.enterRule(_localctx, 10, CashScriptParser.RULE_versionOperator); - let _la: number; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 71; - _la = this._input.LA(1); - if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__3) | (1 << CashScriptParser.T__4) | (1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8) | (1 << CashScriptParser.T__9))) !== 0))) { - this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public contractDefinition(): ContractDefinitionContext { - let _localctx: ContractDefinitionContext = new ContractDefinitionContext(this._ctx, this.state); - this.enterRule(_localctx, 12, CashScriptParser.RULE_contractDefinition); - let _la: number; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 73; - this.match(CashScriptParser.T__10); - this.state = 74; - this.match(CashScriptParser.Identifier); - this.state = 75; - this.parameterList(); - this.state = 76; - this.match(CashScriptParser.T__11); - this.state = 80; - this._errHandler.sync(this); - _la = this._input.LA(1); - while (_la === CashScriptParser.T__13) { - { - { - this.state = 77; - this.functionDefinition(); - } - } - this.state = 82; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - this.state = 83; - this.match(CashScriptParser.T__12); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public functionDefinition(): FunctionDefinitionContext { - let _localctx: FunctionDefinitionContext = new FunctionDefinitionContext(this._ctx, this.state); - this.enterRule(_localctx, 14, CashScriptParser.RULE_functionDefinition); - let _la: number; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 85; - this.match(CashScriptParser.T__13); - this.state = 86; - this.match(CashScriptParser.Identifier); - this.state = 87; - this.parameterList(); - this.state = 88; - this.match(CashScriptParser.T__11); - this.state = 92; - this._errHandler.sync(this); - _la = this._input.LA(1); - while (_la === CashScriptParser.T__17 || _la === CashScriptParser.T__18 || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (CashScriptParser.T__37 - 38)) | (1 << (CashScriptParser.T__38 - 38)) | (1 << (CashScriptParser.T__39 - 38)) | (1 << (CashScriptParser.T__40 - 38)) | (1 << (CashScriptParser.T__41 - 38)) | (1 << (CashScriptParser.T__42 - 38)) | (1 << (CashScriptParser.Bytes - 38)) | (1 << (CashScriptParser.Identifier - 38)))) !== 0)) { - { - { - this.state = 89; - this.statement(); - } - } - this.state = 94; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - this.state = 95; - this.match(CashScriptParser.T__12); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public parameterList(): ParameterListContext { - let _localctx: ParameterListContext = new ParameterListContext(this._ctx, this.state); - this.enterRule(_localctx, 16, CashScriptParser.RULE_parameterList); - let _la: number; - try { - let _alt: number; - this.enterOuterAlt(_localctx, 1); - { - this.state = 97; - this.match(CashScriptParser.T__14); - this.state = 109; - this._errHandler.sync(this); - _la = this._input.LA(1); - if (((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (CashScriptParser.T__37 - 38)) | (1 << (CashScriptParser.T__38 - 38)) | (1 << (CashScriptParser.T__39 - 38)) | (1 << (CashScriptParser.T__40 - 38)) | (1 << (CashScriptParser.T__41 - 38)) | (1 << (CashScriptParser.T__42 - 38)) | (1 << (CashScriptParser.Bytes - 38)))) !== 0)) { - { - this.state = 98; - this.parameter(); - this.state = 103; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); - while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { - if (_alt === 1) { - { - { - this.state = 99; - this.match(CashScriptParser.T__15); - this.state = 100; - this.parameter(); - } - } - } - this.state = 105; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); - } - this.state = 107; - this._errHandler.sync(this); - _la = this._input.LA(1); - if (_la === CashScriptParser.T__15) { - { - this.state = 106; - this.match(CashScriptParser.T__15); - } - } - - } - } - - this.state = 111; - this.match(CashScriptParser.T__16); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public parameter(): ParameterContext { - let _localctx: ParameterContext = new ParameterContext(this._ctx, this.state); - this.enterRule(_localctx, 18, CashScriptParser.RULE_parameter); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 113; - this.typeName(); - this.state = 114; - this.match(CashScriptParser.Identifier); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public block(): BlockContext { - let _localctx: BlockContext = new BlockContext(this._ctx, this.state); - this.enterRule(_localctx, 20, CashScriptParser.RULE_block); - let _la: number; - try { - this.state = 125; - this._errHandler.sync(this); - switch (this._input.LA(1)) { - case CashScriptParser.T__11: - this.enterOuterAlt(_localctx, 1); - { - this.state = 116; - this.match(CashScriptParser.T__11); - this.state = 120; - this._errHandler.sync(this); - _la = this._input.LA(1); - while (_la === CashScriptParser.T__17 || _la === CashScriptParser.T__18 || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (CashScriptParser.T__37 - 38)) | (1 << (CashScriptParser.T__38 - 38)) | (1 << (CashScriptParser.T__39 - 38)) | (1 << (CashScriptParser.T__40 - 38)) | (1 << (CashScriptParser.T__41 - 38)) | (1 << (CashScriptParser.T__42 - 38)) | (1 << (CashScriptParser.Bytes - 38)) | (1 << (CashScriptParser.Identifier - 38)))) !== 0)) { - { - { - this.state = 117; - this.statement(); - } - } - this.state = 122; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - this.state = 123; - this.match(CashScriptParser.T__12); - } - break; - case CashScriptParser.T__17: - case CashScriptParser.T__18: - case CashScriptParser.T__37: - case CashScriptParser.T__38: - case CashScriptParser.T__39: - case CashScriptParser.T__40: - case CashScriptParser.T__41: - case CashScriptParser.T__42: - case CashScriptParser.Bytes: - case CashScriptParser.Identifier: - this.enterOuterAlt(_localctx, 2); - { - this.state = 124; - this.statement(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public statement(): StatementContext { - let _localctx: StatementContext = new StatementContext(this._ctx, this.state); - this.enterRule(_localctx, 22, CashScriptParser.RULE_statement); - try { - this.state = 132; - this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 10, this._ctx) ) { - case 1: - this.enterOuterAlt(_localctx, 1); - { - this.state = 127; - this.variableDefinition(); - } - break; - - case 2: - this.enterOuterAlt(_localctx, 2); - { - this.state = 128; - this.assignStatement(); - } - break; - - case 3: - this.enterOuterAlt(_localctx, 3); - { - this.state = 129; - this.timeOpStatement(); - } - break; - - case 4: - this.enterOuterAlt(_localctx, 4); - { - this.state = 130; - this.requireStatement(); - } - break; - - case 5: - this.enterOuterAlt(_localctx, 5); - { - this.state = 131; - this.ifStatement(); - } - break; - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public variableDefinition(): VariableDefinitionContext { - let _localctx: VariableDefinitionContext = new VariableDefinitionContext(this._ctx, this.state); - this.enterRule(_localctx, 24, CashScriptParser.RULE_variableDefinition); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 134; - this.typeName(); - this.state = 135; - this.match(CashScriptParser.Identifier); - this.state = 136; - this.match(CashScriptParser.T__9); - this.state = 137; - this.expression(0); - this.state = 138; - this.match(CashScriptParser.T__1); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public assignStatement(): AssignStatementContext { - let _localctx: AssignStatementContext = new AssignStatementContext(this._ctx, this.state); - this.enterRule(_localctx, 26, CashScriptParser.RULE_assignStatement); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 140; - this.match(CashScriptParser.Identifier); - this.state = 141; - this.match(CashScriptParser.T__9); - this.state = 142; - this.expression(0); - this.state = 143; - this.match(CashScriptParser.T__1); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public timeOpStatement(): TimeOpStatementContext { - let _localctx: TimeOpStatementContext = new TimeOpStatementContext(this._ctx, this.state); - this.enterRule(_localctx, 28, CashScriptParser.RULE_timeOpStatement); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 145; - this.match(CashScriptParser.T__17); - this.state = 146; - this.match(CashScriptParser.T__14); - this.state = 147; - this.match(CashScriptParser.TxVar); - this.state = 148; - this.match(CashScriptParser.T__5); - this.state = 149; - this.expression(0); - this.state = 150; - this.match(CashScriptParser.T__16); - this.state = 151; - this.match(CashScriptParser.T__1); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public requireStatement(): RequireStatementContext { - let _localctx: RequireStatementContext = new RequireStatementContext(this._ctx, this.state); - this.enterRule(_localctx, 30, CashScriptParser.RULE_requireStatement); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 153; - this.match(CashScriptParser.T__17); - this.state = 154; - this.match(CashScriptParser.T__14); - this.state = 155; - this.expression(0); - this.state = 156; - this.match(CashScriptParser.T__16); - this.state = 157; - this.match(CashScriptParser.T__1); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public ifStatement(): IfStatementContext { - let _localctx: IfStatementContext = new IfStatementContext(this._ctx, this.state); - this.enterRule(_localctx, 32, CashScriptParser.RULE_ifStatement); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 159; - this.match(CashScriptParser.T__18); - this.state = 160; - this.match(CashScriptParser.T__14); - this.state = 161; - this.expression(0); - this.state = 162; - this.match(CashScriptParser.T__16); - this.state = 163; - _localctx._ifBlock = this.block(); - this.state = 166; - this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 11, this._ctx) ) { - case 1: - { - this.state = 164; - this.match(CashScriptParser.T__19); - this.state = 165; - _localctx._elseBlock = this.block(); - } - break; - } - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public functionCall(): FunctionCallContext { - let _localctx: FunctionCallContext = new FunctionCallContext(this._ctx, this.state); - this.enterRule(_localctx, 34, CashScriptParser.RULE_functionCall); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 168; - this.match(CashScriptParser.Identifier); - this.state = 169; - this.expressionList(); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public expressionList(): ExpressionListContext { - let _localctx: ExpressionListContext = new ExpressionListContext(this._ctx, this.state); - this.enterRule(_localctx, 36, CashScriptParser.RULE_expressionList); - let _la: number; - try { - let _alt: number; - this.enterOuterAlt(_localctx, 1); - { - this.state = 171; - this.match(CashScriptParser.T__14); - this.state = 183; - this._errHandler.sync(this); - _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__14) | (1 << CashScriptParser.T__20) | (1 << CashScriptParser.T__21) | (1 << CashScriptParser.T__25) | (1 << CashScriptParser.T__26))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (CashScriptParser.T__37 - 38)) | (1 << (CashScriptParser.T__38 - 38)) | (1 << (CashScriptParser.T__39 - 38)) | (1 << (CashScriptParser.T__40 - 38)) | (1 << (CashScriptParser.T__41 - 38)) | (1 << (CashScriptParser.T__42 - 38)) | (1 << (CashScriptParser.BooleanLiteral - 38)) | (1 << (CashScriptParser.NumberLiteral - 38)) | (1 << (CashScriptParser.Bytes - 38)) | (1 << (CashScriptParser.StringLiteral - 38)) | (1 << (CashScriptParser.DateLiteral - 38)) | (1 << (CashScriptParser.HexLiteral - 38)) | (1 << (CashScriptParser.PreimageField - 38)) | (1 << (CashScriptParser.Identifier - 38)))) !== 0)) { - { - this.state = 172; - this.expression(0); - this.state = 177; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); - while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { - if (_alt === 1) { - { - { - this.state = 173; - this.match(CashScriptParser.T__15); - this.state = 174; - this.expression(0); - } - } - } - this.state = 179; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); - } - this.state = 181; - this._errHandler.sync(this); - _la = this._input.LA(1); - if (_la === CashScriptParser.T__15) { - { - this.state = 180; - this.match(CashScriptParser.T__15); - } - } - - } - } - - this.state = 185; - this.match(CashScriptParser.T__16); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - - public expression(): ExpressionContext; - public expression(_p: number): ExpressionContext; - // @RuleVersion(0) - public expression(_p?: number): ExpressionContext { - if (_p === undefined) { - _p = 0; - } - - let _parentctx: ParserRuleContext = this._ctx; - let _parentState: number = this.state; - let _localctx: ExpressionContext = new ExpressionContext(this._ctx, _parentState); - let _prevctx: ExpressionContext = _localctx; - let _startState: number = 38; - this.enterRecursionRule(_localctx, 38, CashScriptParser.RULE_expression, _p); - let _la: number; - try { - let _alt: number; - this.enterOuterAlt(_localctx, 1); - { - this.state = 228; - this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 20, this._ctx) ) { - case 1: - { - _localctx = new ParenthesisedContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - - this.state = 188; - this.match(CashScriptParser.T__14); - this.state = 189; - this.expression(0); - this.state = 190; - this.match(CashScriptParser.T__16); - } - break; - - case 2: - { - _localctx = new CastContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 192; - this.typeName(); - this.state = 193; - this.match(CashScriptParser.T__14); - this.state = 194; - (_localctx as CastContext)._castable = this.expression(0); - this.state = 197; - this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 15, this._ctx) ) { - case 1: - { - this.state = 195; - this.match(CashScriptParser.T__15); - this.state = 196; - (_localctx as CastContext)._size = this.expression(0); - } - break; - } - this.state = 200; - this._errHandler.sync(this); - _la = this._input.LA(1); - if (_la === CashScriptParser.T__15) { - { - this.state = 199; - this.match(CashScriptParser.T__15); - } - } - - this.state = 202; - this.match(CashScriptParser.T__16); - } - break; - - case 3: - { - _localctx = new FunctionCallExpressionContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 204; - this.functionCall(); - } - break; - - case 4: - { - _localctx = new InstantiationContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 205; - this.match(CashScriptParser.T__20); - this.state = 206; - this.match(CashScriptParser.Identifier); - this.state = 207; - this.expressionList(); - } - break; - - case 5: - { - _localctx = new UnaryOpContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 208; - (_localctx as UnaryOpContext)._op = this._input.LT(1); - _la = this._input.LA(1); - if (!(_la === CashScriptParser.T__25 || _la === CashScriptParser.T__26)) { - (_localctx as UnaryOpContext)._op = this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 209; - this.expression(15); - } - break; - - case 6: - { - _localctx = new ArrayContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 210; - this.match(CashScriptParser.T__21); - this.state = 222; - this._errHandler.sync(this); - _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__14) | (1 << CashScriptParser.T__20) | (1 << CashScriptParser.T__21) | (1 << CashScriptParser.T__25) | (1 << CashScriptParser.T__26))) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (CashScriptParser.T__37 - 38)) | (1 << (CashScriptParser.T__38 - 38)) | (1 << (CashScriptParser.T__39 - 38)) | (1 << (CashScriptParser.T__40 - 38)) | (1 << (CashScriptParser.T__41 - 38)) | (1 << (CashScriptParser.T__42 - 38)) | (1 << (CashScriptParser.BooleanLiteral - 38)) | (1 << (CashScriptParser.NumberLiteral - 38)) | (1 << (CashScriptParser.Bytes - 38)) | (1 << (CashScriptParser.StringLiteral - 38)) | (1 << (CashScriptParser.DateLiteral - 38)) | (1 << (CashScriptParser.HexLiteral - 38)) | (1 << (CashScriptParser.PreimageField - 38)) | (1 << (CashScriptParser.Identifier - 38)))) !== 0)) { - { - this.state = 211; - this.expression(0); - this.state = 216; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 17, this._ctx); - while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { - if (_alt === 1) { - { - { - this.state = 212; - this.match(CashScriptParser.T__15); - this.state = 213; - this.expression(0); - } - } - } - this.state = 218; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 17, this._ctx); - } - this.state = 220; - this._errHandler.sync(this); - _la = this._input.LA(1); - if (_la === CashScriptParser.T__15) { - { - this.state = 219; - this.match(CashScriptParser.T__15); - } - } - - } - } - - this.state = 224; - this.match(CashScriptParser.T__22); - } - break; - - case 7: - { - _localctx = new PreimageFieldContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 225; - this.match(CashScriptParser.PreimageField); - } - break; - - case 8: - { - _localctx = new IdentifierContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 226; - this.match(CashScriptParser.Identifier); - } - break; - - case 9: - { - _localctx = new LiteralExpressionContext(_localctx); - this._ctx = _localctx; - _prevctx = _localctx; - this.state = 227; - this.literal(); - } - break; - } - this._ctx._stop = this._input.tryLT(-1); - this.state = 271; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 22, this._ctx); - while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { - if (_alt === 1) { - if (this._parseListeners != null) { - this.triggerExitRuleEvent(); - } - _prevctx = _localctx; - { - this.state = 269; - this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 21, this._ctx) ) { - case 1: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 230; - if (!(this.precpred(this._ctx, 13))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); - } - this.state = 231; - (_localctx as BinaryOpContext)._op = this._input.LT(1); - _la = this._input.LA(1); - if (!(_la === CashScriptParser.T__28 || _la === CashScriptParser.T__29)) { - (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 232; - (_localctx as BinaryOpContext)._right = this.expression(14); - } - break; - - case 2: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 233; - if (!(this.precpred(this._ctx, 12))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); - } - this.state = 234; - (_localctx as BinaryOpContext)._op = this._input.LT(1); - _la = this._input.LA(1); - if (!(_la === CashScriptParser.T__26 || _la === CashScriptParser.T__30)) { - (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 235; - (_localctx as BinaryOpContext)._right = this.expression(13); - } - break; - - case 3: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 236; - if (!(this.precpred(this._ctx, 11))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); - } - this.state = 237; - (_localctx as BinaryOpContext)._op = this._input.LT(1); - _la = this._input.LA(1); - if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8))) !== 0))) { - (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 238; - (_localctx as BinaryOpContext)._right = this.expression(12); - } - break; - - case 4: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 239; - if (!(this.precpred(this._ctx, 10))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); - } - this.state = 240; - (_localctx as BinaryOpContext)._op = this._input.LT(1); - _la = this._input.LA(1); - if (!(_la === CashScriptParser.T__31 || _la === CashScriptParser.T__32)) { - (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - this.state = 241; - (_localctx as BinaryOpContext)._right = this.expression(11); - } - break; - - case 5: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 242; - if (!(this.precpred(this._ctx, 9))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); - } - this.state = 243; - (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__33); - this.state = 244; - (_localctx as BinaryOpContext)._right = this.expression(10); - } - break; - - case 6: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 245; - if (!(this.precpred(this._ctx, 8))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); - } - this.state = 246; - (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__3); - this.state = 247; - (_localctx as BinaryOpContext)._right = this.expression(9); - } - break; - - case 7: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 248; - if (!(this.precpred(this._ctx, 7))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); - } - this.state = 249; - (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__34); - this.state = 250; - (_localctx as BinaryOpContext)._right = this.expression(8); - } - break; - - case 8: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 251; - if (!(this.precpred(this._ctx, 6))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); - } - this.state = 252; - (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__35); - this.state = 253; - (_localctx as BinaryOpContext)._right = this.expression(7); - } - break; - - case 9: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 254; - if (!(this.precpred(this._ctx, 5))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); - } - this.state = 255; - (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__36); - this.state = 256; - (_localctx as BinaryOpContext)._right = this.expression(6); - } - break; - - case 10: - { - _localctx = new TupleIndexOpContext(new ExpressionContext(_parentctx, _parentState)); - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 257; - if (!(this.precpred(this._ctx, 17))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); - } - this.state = 258; - this.match(CashScriptParser.T__21); - this.state = 259; - (_localctx as TupleIndexOpContext)._index = this.match(CashScriptParser.NumberLiteral); - this.state = 260; - this.match(CashScriptParser.T__22); - } - break; - - case 11: - { - _localctx = new UnaryOpContext(new ExpressionContext(_parentctx, _parentState)); - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 261; - if (!(this.precpred(this._ctx, 16))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); - } - this.state = 262; - (_localctx as UnaryOpContext)._op = this._input.LT(1); - _la = this._input.LA(1); - if (!(_la === CashScriptParser.T__23 || _la === CashScriptParser.T__24)) { - (_localctx as UnaryOpContext)._op = this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - } - break; - - case 12: - { - _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); - (_localctx as BinaryOpContext)._left = _prevctx; - this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); - this.state = 263; - if (!(this.precpred(this._ctx, 14))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); - } - this.state = 264; - (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__27); - this.state = 265; - this.match(CashScriptParser.T__14); - this.state = 266; - (_localctx as BinaryOpContext)._right = this.expression(0); - this.state = 267; - this.match(CashScriptParser.T__16); - } - break; - } - } - } - this.state = 273; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 22, this._ctx); - } - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.unrollRecursionContexts(_parentctx); - } - return _localctx; - } - // @RuleVersion(0) - public literal(): LiteralContext { - let _localctx: LiteralContext = new LiteralContext(this._ctx, this.state); - this.enterRule(_localctx, 40, CashScriptParser.RULE_literal); - try { - this.state = 279; - this._errHandler.sync(this); - switch (this._input.LA(1)) { - case CashScriptParser.BooleanLiteral: - this.enterOuterAlt(_localctx, 1); - { - this.state = 274; - this.match(CashScriptParser.BooleanLiteral); - } - break; - case CashScriptParser.NumberLiteral: - this.enterOuterAlt(_localctx, 2); - { - this.state = 275; - this.numberLiteral(); - } - break; - case CashScriptParser.StringLiteral: - this.enterOuterAlt(_localctx, 3); - { - this.state = 276; - this.match(CashScriptParser.StringLiteral); - } - break; - case CashScriptParser.DateLiteral: - this.enterOuterAlt(_localctx, 4); - { - this.state = 277; - this.match(CashScriptParser.DateLiteral); - } - break; - case CashScriptParser.HexLiteral: - this.enterOuterAlt(_localctx, 5); - { - this.state = 278; - this.match(CashScriptParser.HexLiteral); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public numberLiteral(): NumberLiteralContext { - let _localctx: NumberLiteralContext = new NumberLiteralContext(this._ctx, this.state); - this.enterRule(_localctx, 42, CashScriptParser.RULE_numberLiteral); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 281; - this.match(CashScriptParser.NumberLiteral); - this.state = 283; - this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 24, this._ctx) ) { - case 1: - { - this.state = 282; - this.match(CashScriptParser.NumberUnit); - } - break; - } - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - public typeName(): TypeNameContext { - let _localctx: TypeNameContext = new TypeNameContext(this._ctx, this.state); - this.enterRule(_localctx, 44, CashScriptParser.RULE_typeName); - let _la: number; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 285; - _la = this._input.LA(1); - if (!(((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & ((1 << (CashScriptParser.T__37 - 38)) | (1 << (CashScriptParser.T__38 - 38)) | (1 << (CashScriptParser.T__39 - 38)) | (1 << (CashScriptParser.T__40 - 38)) | (1 << (CashScriptParser.T__41 - 38)) | (1 << (CashScriptParser.T__42 - 38)) | (1 << (CashScriptParser.Bytes - 38)))) !== 0))) { - this._errHandler.recoverInline(this); - } else { - if (this._input.LA(1) === Token.EOF) { - this.matchedEOF = true; - } - - this._errHandler.reportMatch(this); - this.consume(); - } - } - } - catch (re) { - if (re instanceof RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - - public sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean { - switch (ruleIndex) { - case 19: - return this.expression_sempred(_localctx as ExpressionContext, predIndex); - } - return true; - } - private expression_sempred(_localctx: ExpressionContext, predIndex: number): boolean { - switch (predIndex) { - case 0: - return this.precpred(this._ctx, 13); - - case 1: - return this.precpred(this._ctx, 12); - - case 2: - return this.precpred(this._ctx, 11); - - case 3: - return this.precpred(this._ctx, 10); - - case 4: - return this.precpred(this._ctx, 9); - - case 5: - return this.precpred(this._ctx, 8); - - case 6: - return this.precpred(this._ctx, 7); - - case 7: - return this.precpred(this._ctx, 6); - - case 8: - return this.precpred(this._ctx, 5); - - case 9: - return this.precpred(this._ctx, 17); - - case 10: - return this.precpred(this._ctx, 16); - - case 11: - return this.precpred(this._ctx, 14); - } - return true; - } - - public static readonly _serializedATN: string = - "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03<\u0122\x04\x02" + - "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\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\t\r\x04" + - "\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04" + - "\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17\x04" + - "\x18\t\x18\x03\x02\x07\x022\n\x02\f\x02\x0E\x025\v\x02\x03\x02\x03\x02" + - "\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x04\x03\x04\x03\x05" + - "\x03\x05\x05\x05C\n\x05\x03\x06\x05\x06F\n\x06\x03\x06\x03\x06\x03\x07" + - "\x03\x07\x03\b\x03\b\x03\b\x03\b\x03\b\x07\bQ\n\b\f\b\x0E\bT\v\b\x03\b" + - "\x03\b\x03\t\x03\t\x03\t\x03\t\x03\t\x07\t]\n\t\f\t\x0E\t`\v\t\x03\t\x03" + - "\t\x03\n\x03\n\x03\n\x03\n\x07\nh\n\n\f\n\x0E\nk\v\n\x03\n\x05\nn\n\n" + - "\x05\np\n\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\f\x03\f\x07\fy\n\f\f\f\x0E" + - "\f|\v\f\x03\f\x03\f\x05\f\x80\n\f\x03\r\x03\r\x03\r\x03\r\x03\r\x05\r" + - "\x87\n\r\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F" + - "\x03\x0F\x03\x0F\x03\x0F\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10" + - "\x03\x10\x03\x10\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x12" + - "\x03\x12\x03\x12\x03\x12\x03\x12\x03\x12\x03\x12\x05\x12\xA9\n\x12\x03" + - "\x13\x03\x13\x03\x13\x03\x14\x03\x14\x03\x14\x03\x14\x07\x14\xB2\n\x14" + - "\f\x14\x0E\x14\xB5\v\x14\x03\x14\x05\x14\xB8\n\x14\x05\x14\xBA\n\x14\x03" + - "\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03" + - "\x15\x03\x15\x03\x15\x05\x15\xC8\n\x15\x03\x15\x05\x15\xCB\n\x15\x03\x15" + - "\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15" + - "\x03\x15\x03\x15\x07\x15\xD9\n\x15\f\x15\x0E\x15\xDC\v\x15\x03\x15\x05" + - "\x15\xDF\n\x15\x05\x15\xE1\n\x15\x03\x15\x03\x15\x03\x15\x03\x15\x05\x15" + - "\xE7\n\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03" + - "\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03" + - "\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03" + - "\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03" + - "\x15\x03\x15\x03\x15\x03\x15\x03\x15\x07\x15\u0110\n\x15\f\x15\x0E\x15" + - "\u0113\v\x15\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x05\x16\u011A\n\x16" + - "\x03\x17\x03\x17\x05\x17\u011E\n\x17\x03\x18\x03\x18\x03\x18\x02\x02\x03" + - "(\x19\x02\x02\x04\x02\x06\x02\b\x02\n\x02\f\x02\x0E\x02\x10\x02\x12\x02" + - "\x14\x02\x16\x02\x18\x02\x1A\x02\x1C\x02\x1E\x02 \x02\"\x02$\x02&\x02" + - "(\x02*\x02,\x02.\x02\x02\n\x03\x02\x06\f\x03\x02\x1C\x1D\x03\x02\x1F " + - "\x04\x02\x1D\x1D!!\x03\x02\b\v\x03\x02\"#\x03\x02\x1A\x1B\x04\x02(-22" + - "\x02\u013A\x023\x03\x02\x02\x02\x049\x03\x02\x02\x02\x06>\x03\x02\x02" + - "\x02\b@\x03\x02\x02\x02\nE\x03\x02\x02\x02\fI\x03\x02\x02\x02\x0EK\x03" + - "\x02\x02\x02\x10W\x03\x02\x02\x02\x12c\x03\x02\x02\x02\x14s\x03\x02\x02" + - "\x02\x16\x7F\x03\x02\x02\x02\x18\x86\x03\x02\x02\x02\x1A\x88\x03\x02\x02" + - "\x02\x1C\x8E\x03\x02\x02\x02\x1E\x93\x03\x02\x02\x02 \x9B\x03\x02\x02" + - "\x02\"\xA1\x03\x02\x02\x02$\xAA\x03\x02\x02\x02&\xAD\x03\x02\x02\x02(" + - "\xE6\x03\x02\x02\x02*\u0119\x03\x02\x02\x02,\u011B\x03\x02\x02\x02.\u011F" + - "\x03\x02\x02\x0202\x05\x04\x03\x0210\x03\x02\x02\x0225\x03\x02\x02\x02" + - "31\x03\x02\x02\x0234\x03\x02\x02\x0246\x03\x02\x02\x0253\x03\x02\x02\x02" + - "67\x05\x0E\b\x0278\x07\x02\x02\x038\x03\x03\x02\x02\x029:\x07\x03\x02" + - "\x02:;\x05\x06\x04\x02;<\x05\b\x05\x02<=\x07\x04\x02\x02=\x05\x03\x02" + - "\x02\x02>?\x07\x05\x02\x02?\x07\x03\x02\x02\x02@B\x05\n\x06\x02AC\x05" + - "\n\x06\x02BA\x03\x02\x02\x02BC\x03\x02\x02\x02C\t\x03\x02\x02\x02DF\x05" + - "\f\x07\x02ED\x03\x02\x02\x02EF\x03\x02\x02\x02FG\x03\x02\x02\x02GH\x07" + - ".\x02\x02H\v\x03\x02\x02\x02IJ\t\x02\x02\x02J\r\x03\x02\x02\x02KL\x07" + - "\r\x02\x02LM\x079\x02\x02MN\x05\x12\n\x02NR\x07\x0E\x02\x02OQ\x05\x10" + - "\t\x02PO\x03\x02\x02\x02QT\x03\x02\x02\x02RP\x03\x02\x02\x02RS\x03\x02" + - "\x02\x02SU\x03\x02\x02\x02TR\x03\x02\x02\x02UV\x07\x0F\x02\x02V\x0F\x03" + - "\x02\x02\x02WX\x07\x10\x02\x02XY\x079\x02\x02YZ\x05\x12\n\x02Z^\x07\x0E" + - "\x02\x02[]\x05\x18\r\x02\\[\x03\x02\x02\x02]`\x03\x02\x02\x02^\\\x03\x02" + - "\x02\x02^_\x03\x02\x02\x02_a\x03\x02\x02\x02`^\x03\x02\x02\x02ab\x07\x0F" + - "\x02\x02b\x11\x03\x02\x02\x02co\x07\x11\x02\x02di\x05\x14\v\x02ef\x07" + - "\x12\x02\x02fh\x05\x14\v\x02ge\x03\x02\x02\x02hk\x03\x02\x02\x02ig\x03" + - "\x02\x02\x02ij\x03\x02\x02\x02jm\x03\x02\x02\x02ki\x03\x02\x02\x02ln\x07" + - "\x12\x02\x02ml\x03\x02\x02\x02mn\x03\x02\x02\x02np\x03\x02\x02\x02od\x03" + - "\x02\x02\x02op\x03\x02\x02\x02pq\x03\x02\x02\x02qr\x07\x13\x02\x02r\x13" + - "\x03\x02\x02\x02st\x05.\x18\x02tu\x079\x02\x02u\x15\x03\x02\x02\x02vz" + - "\x07\x0E\x02\x02wy\x05\x18\r\x02xw\x03\x02\x02\x02y|\x03\x02\x02\x02z" + - "x\x03\x02\x02\x02z{\x03\x02\x02\x02{}\x03\x02\x02\x02|z\x03\x02\x02\x02" + - "}\x80\x07\x0F\x02\x02~\x80\x05\x18\r\x02\x7Fv\x03\x02\x02\x02\x7F~\x03" + - "\x02\x02\x02\x80\x17\x03\x02\x02\x02\x81\x87\x05\x1A\x0E\x02\x82\x87\x05" + - "\x1C\x0F\x02\x83\x87\x05\x1E\x10\x02\x84\x87\x05 \x11\x02\x85\x87\x05" + - "\"\x12\x02\x86\x81\x03\x02\x02\x02\x86\x82\x03\x02\x02\x02\x86\x83\x03" + - "\x02\x02\x02\x86\x84\x03\x02\x02\x02\x86\x85\x03\x02\x02\x02\x87\x19\x03" + - "\x02\x02\x02\x88\x89\x05.\x18\x02\x89\x8A\x079\x02\x02\x8A\x8B\x07\f\x02" + - "\x02\x8B\x8C\x05(\x15\x02\x8C\x8D\x07\x04\x02\x02\x8D\x1B\x03\x02\x02" + - "\x02\x8E\x8F\x079\x02\x02\x8F\x90\x07\f\x02\x02\x90\x91\x05(\x15\x02\x91" + - "\x92\x07\x04\x02\x02\x92\x1D\x03\x02\x02\x02\x93\x94\x07\x14\x02\x02\x94" + - "\x95\x07\x11\x02\x02\x95\x96\x077\x02\x02\x96\x97\x07\b\x02\x02\x97\x98" + - "\x05(\x15\x02\x98\x99\x07\x13\x02\x02\x99\x9A\x07\x04\x02\x02\x9A\x1F" + - "\x03\x02\x02\x02\x9B\x9C\x07\x14\x02\x02\x9C\x9D\x07\x11\x02\x02\x9D\x9E" + - "\x05(\x15\x02\x9E\x9F\x07\x13\x02\x02\x9F\xA0\x07\x04\x02\x02\xA0!\x03" + - "\x02\x02\x02\xA1\xA2\x07\x15\x02\x02\xA2\xA3\x07\x11\x02\x02\xA3\xA4\x05" + - "(\x15\x02\xA4\xA5\x07\x13\x02\x02\xA5\xA8\x05\x16\f\x02\xA6\xA7\x07\x16" + - "\x02\x02\xA7\xA9\x05\x16\f\x02\xA8\xA6\x03\x02\x02\x02\xA8\xA9\x03\x02" + - "\x02\x02\xA9#\x03\x02\x02\x02\xAA\xAB\x079\x02\x02\xAB\xAC\x05&\x14\x02" + - "\xAC%\x03\x02\x02\x02\xAD\xB9\x07\x11\x02\x02\xAE\xB3\x05(\x15\x02\xAF" + - "\xB0\x07\x12\x02\x02\xB0\xB2\x05(\x15\x02\xB1\xAF\x03\x02\x02\x02\xB2" + - "\xB5\x03\x02\x02\x02\xB3\xB1\x03\x02\x02\x02\xB3\xB4\x03\x02\x02\x02\xB4" + - "\xB7\x03\x02\x02\x02\xB5\xB3\x03\x02\x02\x02\xB6\xB8\x07\x12\x02\x02\xB7" + - "\xB6\x03\x02\x02\x02\xB7\xB8\x03\x02\x02\x02\xB8\xBA\x03\x02\x02\x02\xB9" + - "\xAE\x03\x02\x02\x02\xB9\xBA\x03\x02\x02\x02\xBA\xBB\x03\x02\x02\x02\xBB" + - "\xBC\x07\x13\x02\x02\xBC\'\x03\x02\x02\x02\xBD\xBE\b\x15\x01\x02\xBE\xBF" + - "\x07\x11\x02\x02\xBF\xC0\x05(\x15\x02\xC0\xC1\x07\x13\x02\x02\xC1\xE7" + - "\x03\x02\x02\x02\xC2\xC3\x05.\x18\x02\xC3\xC4\x07\x11\x02\x02\xC4\xC7" + - "\x05(\x15\x02\xC5\xC6\x07\x12\x02\x02\xC6\xC8\x05(\x15\x02\xC7\xC5\x03" + - "\x02\x02\x02\xC7\xC8\x03\x02\x02\x02\xC8\xCA\x03\x02\x02\x02\xC9\xCB\x07" + - "\x12\x02\x02\xCA\xC9\x03\x02\x02\x02\xCA\xCB\x03\x02\x02\x02\xCB\xCC\x03" + - "\x02\x02\x02\xCC\xCD\x07\x13\x02\x02\xCD\xE7\x03\x02\x02\x02\xCE\xE7\x05" + - "$\x13\x02\xCF\xD0\x07\x17\x02\x02\xD0\xD1\x079\x02\x02\xD1\xE7\x05&\x14" + - "\x02\xD2\xD3\t\x03\x02\x02\xD3\xE7\x05(\x15\x11\xD4\xE0\x07\x18\x02\x02" + - "\xD5\xDA\x05(\x15\x02\xD6\xD7\x07\x12\x02\x02\xD7\xD9\x05(\x15\x02\xD8" + - "\xD6\x03\x02\x02\x02\xD9\xDC\x03\x02\x02\x02\xDA\xD8\x03\x02\x02\x02\xDA" + - "\xDB\x03\x02\x02\x02\xDB\xDE\x03\x02\x02\x02\xDC\xDA\x03\x02\x02\x02\xDD" + - "\xDF\x07\x12\x02\x02\xDE\xDD\x03\x02\x02\x02\xDE\xDF\x03\x02\x02\x02\xDF" + - "\xE1\x03\x02\x02\x02\xE0\xD5\x03\x02\x02\x02\xE0\xE1\x03\x02\x02\x02\xE1" + - "\xE2\x03\x02\x02\x02\xE2\xE7\x07\x19\x02\x02\xE3\xE7\x078\x02\x02\xE4" + - "\xE7\x079\x02\x02\xE5\xE7\x05*\x16\x02\xE6\xBD\x03\x02\x02\x02\xE6\xC2" + - "\x03\x02\x02\x02\xE6\xCE\x03\x02\x02\x02\xE6\xCF\x03\x02\x02\x02\xE6\xD2" + - "\x03\x02\x02\x02\xE6\xD4\x03\x02\x02\x02\xE6\xE3\x03\x02\x02\x02\xE6\xE4" + - "\x03\x02\x02\x02\xE6\xE5\x03\x02\x02\x02\xE7\u0111\x03\x02\x02\x02\xE8" + - "\xE9\f\x0F\x02\x02\xE9\xEA\t\x04\x02\x02\xEA\u0110\x05(\x15\x10\xEB\xEC" + - "\f\x0E\x02\x02\xEC\xED\t\x05\x02\x02\xED\u0110\x05(\x15\x0F\xEE\xEF\f" + - "\r\x02\x02\xEF\xF0\t\x06\x02\x02\xF0\u0110\x05(\x15\x0E\xF1\xF2\f\f\x02" + - "\x02\xF2\xF3\t\x07\x02\x02\xF3\u0110\x05(\x15\r\xF4\xF5\f\v\x02\x02\xF5" + - "\xF6\x07$\x02\x02\xF6\u0110\x05(\x15\f\xF7\xF8\f\n\x02\x02\xF8\xF9\x07" + - "\x06\x02\x02\xF9\u0110\x05(\x15\v\xFA\xFB\f\t\x02\x02\xFB\xFC\x07%\x02" + - "\x02\xFC\u0110\x05(\x15\n\xFD\xFE\f\b\x02\x02\xFE\xFF\x07&\x02\x02\xFF" + - "\u0110\x05(\x15\t\u0100\u0101\f\x07\x02\x02\u0101\u0102\x07\'\x02\x02" + - "\u0102\u0110\x05(\x15\b\u0103\u0104\f\x13\x02\x02\u0104\u0105\x07\x18" + - "\x02\x02\u0105\u0106\x071\x02\x02\u0106\u0110\x07\x19\x02\x02\u0107\u0108" + - "\f\x12\x02\x02\u0108\u0110\t\b\x02\x02\u0109\u010A\f\x10\x02\x02\u010A" + - "\u010B\x07\x1E\x02\x02\u010B\u010C\x07\x11\x02\x02\u010C\u010D\x05(\x15" + - "\x02\u010D\u010E\x07\x13\x02\x02\u010E\u0110\x03\x02\x02\x02\u010F\xE8" + - "\x03\x02\x02\x02\u010F\xEB\x03\x02\x02\x02\u010F\xEE\x03\x02\x02\x02\u010F" + - "\xF1\x03\x02\x02\x02\u010F\xF4\x03\x02\x02\x02\u010F\xF7\x03\x02\x02\x02" + - "\u010F\xFA\x03\x02\x02\x02\u010F\xFD\x03\x02\x02\x02\u010F\u0100\x03\x02" + - "\x02\x02\u010F\u0103\x03\x02\x02\x02\u010F\u0107\x03\x02\x02\x02\u010F" + - "\u0109\x03\x02\x02\x02\u0110\u0113\x03\x02\x02\x02\u0111\u010F\x03\x02" + - "\x02\x02\u0111\u0112\x03\x02\x02\x02\u0112)\x03\x02\x02\x02\u0113\u0111" + - "\x03\x02\x02\x02\u0114\u011A\x07/\x02\x02\u0115\u011A\x05,\x17\x02\u0116" + - "\u011A\x074\x02\x02\u0117\u011A\x075\x02\x02\u0118\u011A\x076\x02\x02" + - "\u0119\u0114\x03\x02\x02\x02\u0119\u0115\x03\x02\x02\x02\u0119\u0116\x03" + - "\x02\x02\x02\u0119\u0117\x03\x02\x02\x02\u0119\u0118\x03\x02\x02\x02\u011A" + - "+\x03\x02\x02\x02\u011B\u011D\x071\x02\x02\u011C\u011E\x070\x02\x02\u011D" + - "\u011C\x03\x02\x02\x02\u011D\u011E\x03\x02\x02\x02\u011E-\x03\x02\x02" + - "\x02\u011F\u0120\t\t\x02\x02\u0120/\x03\x02\x02\x02\x1B3BER^imoz\x7F\x86" + - "\xA8\xB3\xB7\xB9\xC7\xCA\xDA\xDE\xE0\xE6\u010F\u0111\u0119\u011D"; - public static __ATN: ATN; - public static get _ATN(): ATN { - if (!CashScriptParser.__ATN) { - CashScriptParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(CashScriptParser._serializedATN)); - } - - return CashScriptParser.__ATN; - } - -} - -export class SourceFileContext extends ParserRuleContext { - public contractDefinition(): ContractDefinitionContext { - return this.getRuleContext(0, ContractDefinitionContext); - } - public EOF(): TerminalNode { return this.getToken(CashScriptParser.EOF, 0); } - public pragmaDirective(): PragmaDirectiveContext[]; - public pragmaDirective(i: number): PragmaDirectiveContext; - public pragmaDirective(i?: number): PragmaDirectiveContext | PragmaDirectiveContext[] { - if (i === undefined) { - return this.getRuleContexts(PragmaDirectiveContext); - } else { - return this.getRuleContext(i, PragmaDirectiveContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_sourceFile; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterSourceFile) { - listener.enterSourceFile(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitSourceFile) { - listener.exitSourceFile(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitSourceFile) { - return visitor.visitSourceFile(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class PragmaDirectiveContext extends ParserRuleContext { - public pragmaName(): PragmaNameContext { - return this.getRuleContext(0, PragmaNameContext); - } - public pragmaValue(): PragmaValueContext { - return this.getRuleContext(0, PragmaValueContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_pragmaDirective; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterPragmaDirective) { - listener.enterPragmaDirective(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitPragmaDirective) { - listener.exitPragmaDirective(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitPragmaDirective) { - return visitor.visitPragmaDirective(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class PragmaNameContext extends ParserRuleContext { - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_pragmaName; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterPragmaName) { - listener.enterPragmaName(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitPragmaName) { - listener.exitPragmaName(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitPragmaName) { - return visitor.visitPragmaName(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class PragmaValueContext extends ParserRuleContext { - public versionConstraint(): VersionConstraintContext[]; - public versionConstraint(i: number): VersionConstraintContext; - public versionConstraint(i?: number): VersionConstraintContext | VersionConstraintContext[] { - if (i === undefined) { - return this.getRuleContexts(VersionConstraintContext); - } else { - return this.getRuleContext(i, VersionConstraintContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_pragmaValue; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterPragmaValue) { - listener.enterPragmaValue(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitPragmaValue) { - listener.exitPragmaValue(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitPragmaValue) { - return visitor.visitPragmaValue(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class VersionConstraintContext extends ParserRuleContext { - public VersionLiteral(): TerminalNode { return this.getToken(CashScriptParser.VersionLiteral, 0); } - public versionOperator(): VersionOperatorContext | undefined { - return this.tryGetRuleContext(0, VersionOperatorContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_versionConstraint; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterVersionConstraint) { - listener.enterVersionConstraint(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitVersionConstraint) { - listener.exitVersionConstraint(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitVersionConstraint) { - return visitor.visitVersionConstraint(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class VersionOperatorContext extends ParserRuleContext { - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_versionOperator; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterVersionOperator) { - listener.enterVersionOperator(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitVersionOperator) { - listener.exitVersionOperator(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitVersionOperator) { - return visitor.visitVersionOperator(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class ContractDefinitionContext extends ParserRuleContext { - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - public parameterList(): ParameterListContext { - return this.getRuleContext(0, ParameterListContext); - } - public functionDefinition(): FunctionDefinitionContext[]; - public functionDefinition(i: number): FunctionDefinitionContext; - public functionDefinition(i?: number): FunctionDefinitionContext | FunctionDefinitionContext[] { - if (i === undefined) { - return this.getRuleContexts(FunctionDefinitionContext); - } else { - return this.getRuleContext(i, FunctionDefinitionContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_contractDefinition; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterContractDefinition) { - listener.enterContractDefinition(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitContractDefinition) { - listener.exitContractDefinition(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitContractDefinition) { - return visitor.visitContractDefinition(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class FunctionDefinitionContext extends ParserRuleContext { - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - public parameterList(): ParameterListContext { - return this.getRuleContext(0, ParameterListContext); - } - public statement(): StatementContext[]; - public statement(i: number): StatementContext; - public statement(i?: number): StatementContext | StatementContext[] { - if (i === undefined) { - return this.getRuleContexts(StatementContext); - } else { - return this.getRuleContext(i, StatementContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_functionDefinition; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterFunctionDefinition) { - listener.enterFunctionDefinition(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitFunctionDefinition) { - listener.exitFunctionDefinition(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitFunctionDefinition) { - return visitor.visitFunctionDefinition(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class ParameterListContext extends ParserRuleContext { - public parameter(): ParameterContext[]; - public parameter(i: number): ParameterContext; - public parameter(i?: number): ParameterContext | ParameterContext[] { - if (i === undefined) { - return this.getRuleContexts(ParameterContext); - } else { - return this.getRuleContext(i, ParameterContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_parameterList; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterParameterList) { - listener.enterParameterList(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitParameterList) { - listener.exitParameterList(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitParameterList) { - return visitor.visitParameterList(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class ParameterContext extends ParserRuleContext { - public typeName(): TypeNameContext { - return this.getRuleContext(0, TypeNameContext); - } - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_parameter; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterParameter) { - listener.enterParameter(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitParameter) { - listener.exitParameter(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitParameter) { - return visitor.visitParameter(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class BlockContext extends ParserRuleContext { - public statement(): StatementContext[]; - public statement(i: number): StatementContext; - public statement(i?: number): StatementContext | StatementContext[] { - if (i === undefined) { - return this.getRuleContexts(StatementContext); - } else { - return this.getRuleContext(i, StatementContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_block; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterBlock) { - listener.enterBlock(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitBlock) { - listener.exitBlock(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitBlock) { - return visitor.visitBlock(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class StatementContext extends ParserRuleContext { - public variableDefinition(): VariableDefinitionContext | undefined { - return this.tryGetRuleContext(0, VariableDefinitionContext); - } - public assignStatement(): AssignStatementContext | undefined { - return this.tryGetRuleContext(0, AssignStatementContext); - } - public timeOpStatement(): TimeOpStatementContext | undefined { - return this.tryGetRuleContext(0, TimeOpStatementContext); - } - public requireStatement(): RequireStatementContext | undefined { - return this.tryGetRuleContext(0, RequireStatementContext); - } - public ifStatement(): IfStatementContext | undefined { - return this.tryGetRuleContext(0, IfStatementContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_statement; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterStatement) { - listener.enterStatement(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitStatement) { - listener.exitStatement(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitStatement) { - return visitor.visitStatement(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class VariableDefinitionContext extends ParserRuleContext { - public typeName(): TypeNameContext { - return this.getRuleContext(0, TypeNameContext); - } - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_variableDefinition; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterVariableDefinition) { - listener.enterVariableDefinition(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitVariableDefinition) { - listener.exitVariableDefinition(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitVariableDefinition) { - return visitor.visitVariableDefinition(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class AssignStatementContext extends ParserRuleContext { - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_assignStatement; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterAssignStatement) { - listener.enterAssignStatement(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitAssignStatement) { - listener.exitAssignStatement(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitAssignStatement) { - return visitor.visitAssignStatement(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class TimeOpStatementContext extends ParserRuleContext { - public TxVar(): TerminalNode { return this.getToken(CashScriptParser.TxVar, 0); } - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_timeOpStatement; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterTimeOpStatement) { - listener.enterTimeOpStatement(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitTimeOpStatement) { - listener.exitTimeOpStatement(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitTimeOpStatement) { - return visitor.visitTimeOpStatement(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class RequireStatementContext extends ParserRuleContext { - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_requireStatement; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterRequireStatement) { - listener.enterRequireStatement(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitRequireStatement) { - listener.exitRequireStatement(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitRequireStatement) { - return visitor.visitRequireStatement(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class IfStatementContext extends ParserRuleContext { - public _ifBlock!: BlockContext; - public _elseBlock!: BlockContext; - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - public block(): BlockContext[]; - public block(i: number): BlockContext; - public block(i?: number): BlockContext | BlockContext[] { - if (i === undefined) { - return this.getRuleContexts(BlockContext); - } else { - return this.getRuleContext(i, BlockContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_ifStatement; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterIfStatement) { - listener.enterIfStatement(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitIfStatement) { - listener.exitIfStatement(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitIfStatement) { - return visitor.visitIfStatement(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class FunctionCallContext extends ParserRuleContext { - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - public expressionList(): ExpressionListContext { - return this.getRuleContext(0, ExpressionListContext); - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_functionCall; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterFunctionCall) { - listener.enterFunctionCall(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitFunctionCall) { - listener.exitFunctionCall(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitFunctionCall) { - return visitor.visitFunctionCall(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class ExpressionListContext extends ParserRuleContext { - public expression(): ExpressionContext[]; - public expression(i: number): ExpressionContext; - public expression(i?: number): ExpressionContext | ExpressionContext[] { - if (i === undefined) { - return this.getRuleContexts(ExpressionContext); - } else { - return this.getRuleContext(i, ExpressionContext); - } - } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_expressionList; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterExpressionList) { - listener.enterExpressionList(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitExpressionList) { - listener.exitExpressionList(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitExpressionList) { - return visitor.visitExpressionList(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class ExpressionContext extends ParserRuleContext { - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_expression; } - public copyFrom(ctx: ExpressionContext): void { - super.copyFrom(ctx); - } -} -export class ParenthesisedContext extends ExpressionContext { - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterParenthesised) { - listener.enterParenthesised(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitParenthesised) { - listener.exitParenthesised(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitParenthesised) { - return visitor.visitParenthesised(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class CastContext extends ExpressionContext { - public _castable!: ExpressionContext; - public _size!: ExpressionContext; - public typeName(): TypeNameContext { - return this.getRuleContext(0, TypeNameContext); - } - public expression(): ExpressionContext[]; - public expression(i: number): ExpressionContext; - public expression(i?: number): ExpressionContext | ExpressionContext[] { - if (i === undefined) { - return this.getRuleContexts(ExpressionContext); - } else { - return this.getRuleContext(i, ExpressionContext); - } - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterCast) { - listener.enterCast(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitCast) { - listener.exitCast(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitCast) { - return visitor.visitCast(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class FunctionCallExpressionContext extends ExpressionContext { - public functionCall(): FunctionCallContext { - return this.getRuleContext(0, FunctionCallContext); - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterFunctionCallExpression) { - listener.enterFunctionCallExpression(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitFunctionCallExpression) { - listener.exitFunctionCallExpression(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitFunctionCallExpression) { - return visitor.visitFunctionCallExpression(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class InstantiationContext extends ExpressionContext { - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - public expressionList(): ExpressionListContext { - return this.getRuleContext(0, ExpressionListContext); - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterInstantiation) { - listener.enterInstantiation(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitInstantiation) { - listener.exitInstantiation(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitInstantiation) { - return visitor.visitInstantiation(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class TupleIndexOpContext extends ExpressionContext { - public _index!: Token; - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - public NumberLiteral(): TerminalNode { return this.getToken(CashScriptParser.NumberLiteral, 0); } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterTupleIndexOp) { - listener.enterTupleIndexOp(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitTupleIndexOp) { - listener.exitTupleIndexOp(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitTupleIndexOp) { - return visitor.visitTupleIndexOp(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class UnaryOpContext extends ExpressionContext { - public _op!: Token; - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext); - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterUnaryOp) { - listener.enterUnaryOp(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitUnaryOp) { - listener.exitUnaryOp(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitUnaryOp) { - return visitor.visitUnaryOp(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class BinaryOpContext extends ExpressionContext { - public _left!: ExpressionContext; - public _op!: Token; - public _right!: ExpressionContext; - public expression(): ExpressionContext[]; - public expression(i: number): ExpressionContext; - public expression(i?: number): ExpressionContext | ExpressionContext[] { - if (i === undefined) { - return this.getRuleContexts(ExpressionContext); - } else { - return this.getRuleContext(i, ExpressionContext); - } - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterBinaryOp) { - listener.enterBinaryOp(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitBinaryOp) { - listener.exitBinaryOp(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitBinaryOp) { - return visitor.visitBinaryOp(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class ArrayContext extends ExpressionContext { - public expression(): ExpressionContext[]; - public expression(i: number): ExpressionContext; - public expression(i?: number): ExpressionContext | ExpressionContext[] { - if (i === undefined) { - return this.getRuleContexts(ExpressionContext); - } else { - return this.getRuleContext(i, ExpressionContext); - } - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterArray) { - listener.enterArray(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitArray) { - listener.exitArray(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitArray) { - return visitor.visitArray(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class PreimageFieldContext extends ExpressionContext { - public PreimageField(): TerminalNode { return this.getToken(CashScriptParser.PreimageField, 0); } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterPreimageField) { - listener.enterPreimageField(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitPreimageField) { - listener.exitPreimageField(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitPreimageField) { - return visitor.visitPreimageField(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class IdentifierContext extends ExpressionContext { - public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterIdentifier) { - listener.enterIdentifier(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitIdentifier) { - listener.exitIdentifier(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitIdentifier) { - return visitor.visitIdentifier(this); - } else { - return visitor.visitChildren(this); - } - } -} -export class LiteralExpressionContext extends ExpressionContext { - public literal(): LiteralContext { - return this.getRuleContext(0, LiteralContext); - } - constructor(ctx: ExpressionContext) { - super(ctx.parent, ctx.invokingState); - this.copyFrom(ctx); - } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterLiteralExpression) { - listener.enterLiteralExpression(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitLiteralExpression) { - listener.exitLiteralExpression(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitLiteralExpression) { - return visitor.visitLiteralExpression(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class LiteralContext extends ParserRuleContext { - public BooleanLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.BooleanLiteral, 0); } - public numberLiteral(): NumberLiteralContext | undefined { - return this.tryGetRuleContext(0, NumberLiteralContext); - } - public StringLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.StringLiteral, 0); } - public DateLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.DateLiteral, 0); } - public HexLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.HexLiteral, 0); } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_literal; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterLiteral) { - listener.enterLiteral(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitLiteral) { - listener.exitLiteral(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitLiteral) { - return visitor.visitLiteral(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class NumberLiteralContext extends ParserRuleContext { - public NumberLiteral(): TerminalNode { return this.getToken(CashScriptParser.NumberLiteral, 0); } - public NumberUnit(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.NumberUnit, 0); } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_numberLiteral; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterNumberLiteral) { - listener.enterNumberLiteral(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitNumberLiteral) { - listener.exitNumberLiteral(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitNumberLiteral) { - return visitor.visitNumberLiteral(this); - } else { - return visitor.visitChildren(this); - } - } -} - - -export class TypeNameContext extends ParserRuleContext { - public Bytes(): TerminalNode { return this.getToken(CashScriptParser.Bytes, 0); } - constructor(parent: ParserRuleContext | undefined, invokingState: number) { - super(parent, invokingState); - } - // @Override - public get ruleIndex(): number { return CashScriptParser.RULE_typeName; } - // @Override - public enterRule(listener: CashScriptListener): void { - if (listener.enterTypeName) { - listener.enterTypeName(this); - } - } - // @Override - public exitRule(listener: CashScriptListener): void { - if (listener.exitTypeName) { - listener.exitTypeName(this); - } - } - // @Override - public accept(visitor: CashScriptVisitor): Result { - if (visitor.visitTypeName) { - return visitor.visitTypeName(this); - } else { - return visitor.visitChildren(this); - } - } -} - - +// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ATN } from "antlr4ts/atn/ATN"; +import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; +import { FailedPredicateException } from "antlr4ts/FailedPredicateException"; +import { NotNull } from "antlr4ts/Decorators"; +import { NoViableAltException } from "antlr4ts/NoViableAltException"; +import { Override } from "antlr4ts/Decorators"; +import { Parser } from "antlr4ts/Parser"; +import { ParserRuleContext } from "antlr4ts/ParserRuleContext"; +import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator"; +import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; +import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; +import { RecognitionException } from "antlr4ts/RecognitionException"; +import { RuleContext } from "antlr4ts/RuleContext"; +//import { RuleVersion } from "antlr4ts/RuleVersion"; +import { TerminalNode } from "antlr4ts/tree/TerminalNode"; +import { Token } from "antlr4ts/Token"; +import { TokenStream } from "antlr4ts/TokenStream"; +import { Vocabulary } from "antlr4ts/Vocabulary"; +import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; + +import * as Utils from "antlr4ts/misc/Utils"; + +import { CashScriptListener } from "./CashScriptListener"; +import { CashScriptVisitor } from "./CashScriptVisitor"; + + +export class CashScriptParser extends Parser { + public static readonly T__0 = 1; + public static readonly T__1 = 2; + public static readonly T__2 = 3; + public static readonly T__3 = 4; + public static readonly T__4 = 5; + public static readonly T__5 = 6; + public static readonly T__6 = 7; + public static readonly T__7 = 8; + public static readonly T__8 = 9; + public static readonly T__9 = 10; + public static readonly T__10 = 11; + public static readonly T__11 = 12; + public static readonly T__12 = 13; + public static readonly T__13 = 14; + public static readonly T__14 = 15; + public static readonly T__15 = 16; + public static readonly T__16 = 17; + public static readonly T__17 = 18; + public static readonly T__18 = 19; + public static readonly T__19 = 20; + public static readonly T__20 = 21; + public static readonly T__21 = 22; + public static readonly T__22 = 23; + public static readonly T__23 = 24; + public static readonly T__24 = 25; + public static readonly T__25 = 26; + public static readonly T__26 = 27; + public static readonly T__27 = 28; + public static readonly T__28 = 29; + public static readonly T__29 = 30; + public static readonly T__30 = 31; + public static readonly T__31 = 32; + public static readonly T__32 = 33; + public static readonly T__33 = 34; + public static readonly T__34 = 35; + public static readonly T__35 = 36; + public static readonly T__36 = 37; + public static readonly T__37 = 38; + public static readonly T__38 = 39; + public static readonly T__39 = 40; + public static readonly T__40 = 41; + public static readonly T__41 = 42; + public static readonly T__42 = 43; + public static readonly T__43 = 44; + public static readonly T__44 = 45; + public static readonly T__45 = 46; + public static readonly T__46 = 47; + public static readonly T__47 = 48; + public static readonly T__48 = 49; + public static readonly T__49 = 50; + public static readonly T__50 = 51; + public static readonly T__51 = 52; + public static readonly T__52 = 53; + public static readonly VersionLiteral = 54; + public static readonly BooleanLiteral = 55; + public static readonly NumberUnit = 56; + public static readonly NumberLiteral = 57; + public static readonly Bytes = 58; + public static readonly Bound = 59; + public static readonly StringLiteral = 60; + public static readonly DateLiteral = 61; + public static readonly HexLiteral = 62; + public static readonly TxVar = 63; + public static readonly NullaryOp = 64; + public static readonly Identifier = 65; + public static readonly WHITESPACE = 66; + public static readonly COMMENT = 67; + public static readonly LINE_COMMENT = 68; + public static readonly RULE_sourceFile = 0; + public static readonly RULE_pragmaDirective = 1; + public static readonly RULE_pragmaName = 2; + public static readonly RULE_pragmaValue = 3; + public static readonly RULE_versionConstraint = 4; + public static readonly RULE_versionOperator = 5; + public static readonly RULE_contractDefinition = 6; + public static readonly RULE_functionDefinition = 7; + public static readonly RULE_parameterList = 8; + public static readonly RULE_parameter = 9; + public static readonly RULE_block = 10; + public static readonly RULE_statement = 11; + public static readonly RULE_variableDefinition = 12; + public static readonly RULE_tupleAssignment = 13; + public static readonly RULE_assignStatement = 14; + public static readonly RULE_timeOpStatement = 15; + public static readonly RULE_requireStatement = 16; + public static readonly RULE_ifStatement = 17; + public static readonly RULE_functionCall = 18; + public static readonly RULE_expressionList = 19; + public static readonly RULE_expression = 20; + public static readonly RULE_modifier = 21; + public static readonly RULE_literal = 22; + public static readonly RULE_numberLiteral = 23; + public static readonly RULE_typeName = 24; + // tslint:disable:no-trailing-whitespace + public static readonly ruleNames: string[] = [ + "sourceFile", "pragmaDirective", "pragmaName", "pragmaValue", "versionConstraint", + "versionOperator", "contractDefinition", "functionDefinition", "parameterList", + "parameter", "block", "statement", "variableDefinition", "tupleAssignment", + "assignStatement", "timeOpStatement", "requireStatement", "ifStatement", + "functionCall", "expressionList", "expression", "modifier", "literal", + "numberLiteral", "typeName", + ]; + + private static readonly _LITERAL_NAMES: Array = [ + undefined, "'pragma'", "';'", "'cashscript'", "'^'", "'~'", "'>='", "'>'", + "'<'", "'<='", "'='", "'contract'", "'{'", "'}'", "'function'", "'('", + "','", "')'", "'require'", "'if'", "'else'", "'new'", "'['", "']'", "'tx.outputs'", + "'.value'", "'.lockingBytecode'", "'tx.inputs'", "'.outpointTransactionHash'", + "'.outpointIndex'", "'.unlockingBytecode'", "'.sequenceNumber'", "'.reverse()'", + "'.length'", "'.split'", "'!'", "'-'", "'*'", "'/'", "'%'", "'+'", "'=='", + "'!='", "'&'", "'|'", "'&&'", "'||'", "'constant'", "'int'", "'bool'", + "'string'", "'pubkey'", "'sig'", "'datasig'", + ]; + private static readonly _SYMBOLIC_NAMES: Array = [ + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, "VersionLiteral", + "BooleanLiteral", "NumberUnit", "NumberLiteral", "Bytes", "Bound", "StringLiteral", + "DateLiteral", "HexLiteral", "TxVar", "NullaryOp", "Identifier", "WHITESPACE", + "COMMENT", "LINE_COMMENT", + ]; + public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(CashScriptParser._LITERAL_NAMES, CashScriptParser._SYMBOLIC_NAMES, []); + + // @Override + // @NotNull + public get vocabulary(): Vocabulary { + return CashScriptParser.VOCABULARY; + } + // tslint:enable:no-trailing-whitespace + + // @Override + public get grammarFileName(): string { return "CashScript.g4"; } + + // @Override + public get ruleNames(): string[] { return CashScriptParser.ruleNames; } + + // @Override + public get serializedATN(): string { return CashScriptParser._serializedATN; } + + protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException { + return new FailedPredicateException(this, predicate, message); + } + + constructor(input: TokenStream) { + super(input); + this._interp = new ParserATNSimulator(CashScriptParser._ATN, this); + } + // @RuleVersion(0) + public sourceFile(): SourceFileContext { + let _localctx: SourceFileContext = new SourceFileContext(this._ctx, this.state); + this.enterRule(_localctx, 0, CashScriptParser.RULE_sourceFile); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 53; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === CashScriptParser.T__0) { + { + { + this.state = 50; + this.pragmaDirective(); + } + } + this.state = 55; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 56; + this.contractDefinition(); + this.state = 57; + this.match(CashScriptParser.EOF); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public pragmaDirective(): PragmaDirectiveContext { + let _localctx: PragmaDirectiveContext = new PragmaDirectiveContext(this._ctx, this.state); + this.enterRule(_localctx, 2, CashScriptParser.RULE_pragmaDirective); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 59; + this.match(CashScriptParser.T__0); + this.state = 60; + this.pragmaName(); + this.state = 61; + this.pragmaValue(); + this.state = 62; + this.match(CashScriptParser.T__1); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public pragmaName(): PragmaNameContext { + let _localctx: PragmaNameContext = new PragmaNameContext(this._ctx, this.state); + this.enterRule(_localctx, 4, CashScriptParser.RULE_pragmaName); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 64; + this.match(CashScriptParser.T__2); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public pragmaValue(): PragmaValueContext { + let _localctx: PragmaValueContext = new PragmaValueContext(this._ctx, this.state); + this.enterRule(_localctx, 6, CashScriptParser.RULE_pragmaValue); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 66; + this.versionConstraint(); + this.state = 68; + this._errHandler.sync(this); + _la = this._input.LA(1); + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__3) | (1 << CashScriptParser.T__4) | (1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8) | (1 << CashScriptParser.T__9))) !== 0) || _la === CashScriptParser.VersionLiteral) { + { + this.state = 67; + this.versionConstraint(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public versionConstraint(): VersionConstraintContext { + let _localctx: VersionConstraintContext = new VersionConstraintContext(this._ctx, this.state); + this.enterRule(_localctx, 8, CashScriptParser.RULE_versionConstraint); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 71; + this._errHandler.sync(this); + _la = this._input.LA(1); + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__3) | (1 << CashScriptParser.T__4) | (1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8) | (1 << CashScriptParser.T__9))) !== 0)) { + { + this.state = 70; + this.versionOperator(); + } + } + + this.state = 73; + this.match(CashScriptParser.VersionLiteral); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public versionOperator(): VersionOperatorContext { + let _localctx: VersionOperatorContext = new VersionOperatorContext(this._ctx, this.state); + this.enterRule(_localctx, 10, CashScriptParser.RULE_versionOperator); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 75; + _la = this._input.LA(1); + if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__3) | (1 << CashScriptParser.T__4) | (1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8) | (1 << CashScriptParser.T__9))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public contractDefinition(): ContractDefinitionContext { + let _localctx: ContractDefinitionContext = new ContractDefinitionContext(this._ctx, this.state); + this.enterRule(_localctx, 12, CashScriptParser.RULE_contractDefinition); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 77; + this.match(CashScriptParser.T__10); + this.state = 78; + this.match(CashScriptParser.Identifier); + this.state = 79; + this.parameterList(); + this.state = 80; + this.match(CashScriptParser.T__11); + this.state = 84; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === CashScriptParser.T__13) { + { + { + this.state = 81; + this.functionDefinition(); + } + } + this.state = 86; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 87; + this.match(CashScriptParser.T__12); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public functionDefinition(): FunctionDefinitionContext { + let _localctx: FunctionDefinitionContext = new FunctionDefinitionContext(this._ctx, this.state); + this.enterRule(_localctx, 14, CashScriptParser.RULE_functionDefinition); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 89; + this.match(CashScriptParser.T__13); + this.state = 90; + this.match(CashScriptParser.Identifier); + this.state = 91; + this.parameterList(); + this.state = 92; + this.match(CashScriptParser.T__11); + this.state = 96; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === CashScriptParser.T__17 || _la === CashScriptParser.T__18 || ((((_la - 48)) & ~0x1F) === 0 && ((1 << (_la - 48)) & ((1 << (CashScriptParser.T__47 - 48)) | (1 << (CashScriptParser.T__48 - 48)) | (1 << (CashScriptParser.T__49 - 48)) | (1 << (CashScriptParser.T__50 - 48)) | (1 << (CashScriptParser.T__51 - 48)) | (1 << (CashScriptParser.T__52 - 48)) | (1 << (CashScriptParser.Bytes - 48)) | (1 << (CashScriptParser.Identifier - 48)))) !== 0)) { + { + { + this.state = 93; + this.statement(); + } + } + this.state = 98; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 99; + this.match(CashScriptParser.T__12); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public parameterList(): ParameterListContext { + let _localctx: ParameterListContext = new ParameterListContext(this._ctx, this.state); + this.enterRule(_localctx, 16, CashScriptParser.RULE_parameterList); + let _la: number; + try { + let _alt: number; + this.enterOuterAlt(_localctx, 1); + { + this.state = 101; + this.match(CashScriptParser.T__14); + this.state = 113; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (((((_la - 48)) & ~0x1F) === 0 && ((1 << (_la - 48)) & ((1 << (CashScriptParser.T__47 - 48)) | (1 << (CashScriptParser.T__48 - 48)) | (1 << (CashScriptParser.T__49 - 48)) | (1 << (CashScriptParser.T__50 - 48)) | (1 << (CashScriptParser.T__51 - 48)) | (1 << (CashScriptParser.T__52 - 48)) | (1 << (CashScriptParser.Bytes - 48)))) !== 0)) { + { + this.state = 102; + this.parameter(); + this.state = 107; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + { + { + this.state = 103; + this.match(CashScriptParser.T__15); + this.state = 104; + this.parameter(); + } + } + } + this.state = 109; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); + } + this.state = 111; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === CashScriptParser.T__15) { + { + this.state = 110; + this.match(CashScriptParser.T__15); + } + } + + } + } + + this.state = 115; + this.match(CashScriptParser.T__16); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public parameter(): ParameterContext { + let _localctx: ParameterContext = new ParameterContext(this._ctx, this.state); + this.enterRule(_localctx, 18, CashScriptParser.RULE_parameter); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 117; + this.typeName(); + this.state = 118; + this.match(CashScriptParser.Identifier); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public block(): BlockContext { + let _localctx: BlockContext = new BlockContext(this._ctx, this.state); + this.enterRule(_localctx, 20, CashScriptParser.RULE_block); + let _la: number; + try { + this.state = 129; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case CashScriptParser.T__11: + this.enterOuterAlt(_localctx, 1); + { + this.state = 120; + this.match(CashScriptParser.T__11); + this.state = 124; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === CashScriptParser.T__17 || _la === CashScriptParser.T__18 || ((((_la - 48)) & ~0x1F) === 0 && ((1 << (_la - 48)) & ((1 << (CashScriptParser.T__47 - 48)) | (1 << (CashScriptParser.T__48 - 48)) | (1 << (CashScriptParser.T__49 - 48)) | (1 << (CashScriptParser.T__50 - 48)) | (1 << (CashScriptParser.T__51 - 48)) | (1 << (CashScriptParser.T__52 - 48)) | (1 << (CashScriptParser.Bytes - 48)) | (1 << (CashScriptParser.Identifier - 48)))) !== 0)) { + { + { + this.state = 121; + this.statement(); + } + } + this.state = 126; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 127; + this.match(CashScriptParser.T__12); + } + break; + case CashScriptParser.T__17: + case CashScriptParser.T__18: + case CashScriptParser.T__47: + case CashScriptParser.T__48: + case CashScriptParser.T__49: + case CashScriptParser.T__50: + case CashScriptParser.T__51: + case CashScriptParser.T__52: + case CashScriptParser.Bytes: + case CashScriptParser.Identifier: + this.enterOuterAlt(_localctx, 2); + { + this.state = 128; + this.statement(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public statement(): StatementContext { + let _localctx: StatementContext = new StatementContext(this._ctx, this.state); + this.enterRule(_localctx, 22, CashScriptParser.RULE_statement); + try { + this.state = 137; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 10, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 131; + this.variableDefinition(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 132; + this.tupleAssignment(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 133; + this.assignStatement(); + } + break; + + case 4: + this.enterOuterAlt(_localctx, 4); + { + this.state = 134; + this.timeOpStatement(); + } + break; + + case 5: + this.enterOuterAlt(_localctx, 5); + { + this.state = 135; + this.requireStatement(); + } + break; + + case 6: + this.enterOuterAlt(_localctx, 6); + { + this.state = 136; + this.ifStatement(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public variableDefinition(): VariableDefinitionContext { + let _localctx: VariableDefinitionContext = new VariableDefinitionContext(this._ctx, this.state); + this.enterRule(_localctx, 24, CashScriptParser.RULE_variableDefinition); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 139; + this.typeName(); + this.state = 141; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === CashScriptParser.T__46) { + { + this.state = 140; + this.modifier(); + } + } + + this.state = 143; + this.match(CashScriptParser.Identifier); + this.state = 144; + this.match(CashScriptParser.T__9); + this.state = 145; + this.expression(0); + this.state = 146; + this.match(CashScriptParser.T__1); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public tupleAssignment(): TupleAssignmentContext { + let _localctx: TupleAssignmentContext = new TupleAssignmentContext(this._ctx, this.state); + this.enterRule(_localctx, 26, CashScriptParser.RULE_tupleAssignment); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 148; + this.typeName(); + this.state = 149; + this.match(CashScriptParser.Identifier); + this.state = 150; + this.match(CashScriptParser.T__15); + this.state = 151; + this.typeName(); + this.state = 152; + this.match(CashScriptParser.Identifier); + this.state = 153; + this.match(CashScriptParser.T__9); + this.state = 154; + this.expression(0); + this.state = 155; + this.match(CashScriptParser.T__1); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public assignStatement(): AssignStatementContext { + let _localctx: AssignStatementContext = new AssignStatementContext(this._ctx, this.state); + this.enterRule(_localctx, 28, CashScriptParser.RULE_assignStatement); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 157; + this.match(CashScriptParser.Identifier); + this.state = 158; + this.match(CashScriptParser.T__9); + this.state = 159; + this.expression(0); + this.state = 160; + this.match(CashScriptParser.T__1); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public timeOpStatement(): TimeOpStatementContext { + let _localctx: TimeOpStatementContext = new TimeOpStatementContext(this._ctx, this.state); + this.enterRule(_localctx, 30, CashScriptParser.RULE_timeOpStatement); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 162; + this.match(CashScriptParser.T__17); + this.state = 163; + this.match(CashScriptParser.T__14); + this.state = 164; + this.match(CashScriptParser.TxVar); + this.state = 165; + this.match(CashScriptParser.T__5); + this.state = 166; + this.expression(0); + this.state = 167; + this.match(CashScriptParser.T__16); + this.state = 168; + this.match(CashScriptParser.T__1); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public requireStatement(): RequireStatementContext { + let _localctx: RequireStatementContext = new RequireStatementContext(this._ctx, this.state); + this.enterRule(_localctx, 32, CashScriptParser.RULE_requireStatement); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 170; + this.match(CashScriptParser.T__17); + this.state = 171; + this.match(CashScriptParser.T__14); + this.state = 172; + this.expression(0); + this.state = 173; + this.match(CashScriptParser.T__16); + this.state = 174; + this.match(CashScriptParser.T__1); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public ifStatement(): IfStatementContext { + let _localctx: IfStatementContext = new IfStatementContext(this._ctx, this.state); + this.enterRule(_localctx, 34, CashScriptParser.RULE_ifStatement); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 176; + this.match(CashScriptParser.T__18); + this.state = 177; + this.match(CashScriptParser.T__14); + this.state = 178; + this.expression(0); + this.state = 179; + this.match(CashScriptParser.T__16); + this.state = 180; + _localctx._ifBlock = this.block(); + this.state = 183; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 12, this._ctx) ) { + case 1: + { + this.state = 181; + this.match(CashScriptParser.T__19); + this.state = 182; + _localctx._elseBlock = this.block(); + } + break; + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public functionCall(): FunctionCallContext { + let _localctx: FunctionCallContext = new FunctionCallContext(this._ctx, this.state); + this.enterRule(_localctx, 36, CashScriptParser.RULE_functionCall); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 185; + this.match(CashScriptParser.Identifier); + this.state = 186; + this.expressionList(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public expressionList(): ExpressionListContext { + let _localctx: ExpressionListContext = new ExpressionListContext(this._ctx, this.state); + this.enterRule(_localctx, 38, CashScriptParser.RULE_expressionList); + let _la: number; + try { + let _alt: number; + this.enterOuterAlt(_localctx, 1); + { + this.state = 188; + this.match(CashScriptParser.T__14); + this.state = 200; + this._errHandler.sync(this); + _la = this._input.LA(1); + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__14) | (1 << CashScriptParser.T__20) | (1 << CashScriptParser.T__21) | (1 << CashScriptParser.T__23) | (1 << CashScriptParser.T__26))) !== 0) || ((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & ((1 << (CashScriptParser.T__34 - 35)) | (1 << (CashScriptParser.T__35 - 35)) | (1 << (CashScriptParser.T__47 - 35)) | (1 << (CashScriptParser.T__48 - 35)) | (1 << (CashScriptParser.T__49 - 35)) | (1 << (CashScriptParser.T__50 - 35)) | (1 << (CashScriptParser.T__51 - 35)) | (1 << (CashScriptParser.T__52 - 35)) | (1 << (CashScriptParser.BooleanLiteral - 35)) | (1 << (CashScriptParser.NumberLiteral - 35)) | (1 << (CashScriptParser.Bytes - 35)) | (1 << (CashScriptParser.StringLiteral - 35)) | (1 << (CashScriptParser.DateLiteral - 35)) | (1 << (CashScriptParser.HexLiteral - 35)) | (1 << (CashScriptParser.NullaryOp - 35)) | (1 << (CashScriptParser.Identifier - 35)))) !== 0)) { + { + this.state = 189; + this.expression(0); + this.state = 194; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 13, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + { + { + this.state = 190; + this.match(CashScriptParser.T__15); + this.state = 191; + this.expression(0); + } + } + } + this.state = 196; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 13, this._ctx); + } + this.state = 198; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === CashScriptParser.T__15) { + { + this.state = 197; + this.match(CashScriptParser.T__15); + } + } + + } + } + + this.state = 202; + this.match(CashScriptParser.T__16); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + + public expression(): ExpressionContext; + public expression(_p: number): ExpressionContext; + // @RuleVersion(0) + public expression(_p?: number): ExpressionContext { + if (_p === undefined) { + _p = 0; + } + + let _parentctx: ParserRuleContext = this._ctx; + let _parentState: number = this.state; + let _localctx: ExpressionContext = new ExpressionContext(this._ctx, _parentState); + let _prevctx: ExpressionContext = _localctx; + let _startState: number = 40; + this.enterRecursionRule(_localctx, 40, CashScriptParser.RULE_expression, _p); + let _la: number; + try { + let _alt: number; + this.enterOuterAlt(_localctx, 1); + { + this.state = 257; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 21, this._ctx) ) { + case 1: + { + _localctx = new ParenthesisedContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + + this.state = 205; + this.match(CashScriptParser.T__14); + this.state = 206; + this.expression(0); + this.state = 207; + this.match(CashScriptParser.T__16); + } + break; + + case 2: + { + _localctx = new CastContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 209; + this.typeName(); + this.state = 210; + this.match(CashScriptParser.T__14); + this.state = 211; + (_localctx as CastContext)._castable = this.expression(0); + this.state = 214; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 16, this._ctx) ) { + case 1: + { + this.state = 212; + this.match(CashScriptParser.T__15); + this.state = 213; + (_localctx as CastContext)._size = this.expression(0); + } + break; + } + this.state = 217; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === CashScriptParser.T__15) { + { + this.state = 216; + this.match(CashScriptParser.T__15); + } + } + + this.state = 219; + this.match(CashScriptParser.T__16); + } + break; + + case 3: + { + _localctx = new FunctionCallExpressionContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 221; + this.functionCall(); + } + break; + + case 4: + { + _localctx = new InstantiationContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 222; + this.match(CashScriptParser.T__20); + this.state = 223; + this.match(CashScriptParser.Identifier); + this.state = 224; + this.expressionList(); + } + break; + + case 5: + { + _localctx = new UnaryIntrospectionOpContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 225; + (_localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__23); + this.state = 226; + this.match(CashScriptParser.T__21); + this.state = 227; + this.expression(0); + this.state = 228; + this.match(CashScriptParser.T__22); + this.state = 229; + (_localctx as UnaryIntrospectionOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!(_la === CashScriptParser.T__24 || _la === CashScriptParser.T__25)) { + (_localctx as UnaryIntrospectionOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + break; + + case 6: + { + _localctx = new UnaryIntrospectionOpContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 231; + (_localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__26); + this.state = 232; + this.match(CashScriptParser.T__21); + this.state = 233; + this.expression(0); + this.state = 234; + this.match(CashScriptParser.T__22); + this.state = 235; + (_localctx as UnaryIntrospectionOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__24) | (1 << CashScriptParser.T__25) | (1 << CashScriptParser.T__27) | (1 << CashScriptParser.T__28) | (1 << CashScriptParser.T__29) | (1 << CashScriptParser.T__30))) !== 0))) { + (_localctx as UnaryIntrospectionOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + break; + + case 7: + { + _localctx = new UnaryOpContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 237; + (_localctx as UnaryOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!(_la === CashScriptParser.T__34 || _la === CashScriptParser.T__35)) { + (_localctx as UnaryOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + this.state = 238; + this.expression(14); + } + break; + + case 8: + { + _localctx = new ArrayContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 239; + this.match(CashScriptParser.T__21); + this.state = 251; + this._errHandler.sync(this); + _la = this._input.LA(1); + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__14) | (1 << CashScriptParser.T__20) | (1 << CashScriptParser.T__21) | (1 << CashScriptParser.T__23) | (1 << CashScriptParser.T__26))) !== 0) || ((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & ((1 << (CashScriptParser.T__34 - 35)) | (1 << (CashScriptParser.T__35 - 35)) | (1 << (CashScriptParser.T__47 - 35)) | (1 << (CashScriptParser.T__48 - 35)) | (1 << (CashScriptParser.T__49 - 35)) | (1 << (CashScriptParser.T__50 - 35)) | (1 << (CashScriptParser.T__51 - 35)) | (1 << (CashScriptParser.T__52 - 35)) | (1 << (CashScriptParser.BooleanLiteral - 35)) | (1 << (CashScriptParser.NumberLiteral - 35)) | (1 << (CashScriptParser.Bytes - 35)) | (1 << (CashScriptParser.StringLiteral - 35)) | (1 << (CashScriptParser.DateLiteral - 35)) | (1 << (CashScriptParser.HexLiteral - 35)) | (1 << (CashScriptParser.NullaryOp - 35)) | (1 << (CashScriptParser.Identifier - 35)))) !== 0)) { + { + this.state = 240; + this.expression(0); + this.state = 245; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + { + { + this.state = 241; + this.match(CashScriptParser.T__15); + this.state = 242; + this.expression(0); + } + } + } + this.state = 247; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx); + } + this.state = 249; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === CashScriptParser.T__15) { + { + this.state = 248; + this.match(CashScriptParser.T__15); + } + } + + } + } + + this.state = 253; + this.match(CashScriptParser.T__22); + } + break; + + case 9: + { + _localctx = new NullaryOpContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 254; + this.match(CashScriptParser.NullaryOp); + } + break; + + case 10: + { + _localctx = new IdentifierContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 255; + this.match(CashScriptParser.Identifier); + } + break; + + case 11: + { + _localctx = new LiteralExpressionContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 256; + this.literal(); + } + break; + } + this._ctx._stop = this._input.tryLT(-1); + this.state = 300; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + if (this._parseListeners != null) { + this.triggerExitRuleEvent(); + } + _prevctx = _localctx; + { + this.state = 298; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 22, this._ctx) ) { + case 1: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 259; + if (!(this.precpred(this._ctx, 13))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); + } + this.state = 260; + (_localctx as BinaryOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!(((((_la - 37)) & ~0x1F) === 0 && ((1 << (_la - 37)) & ((1 << (CashScriptParser.T__36 - 37)) | (1 << (CashScriptParser.T__37 - 37)) | (1 << (CashScriptParser.T__38 - 37)))) !== 0))) { + (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + this.state = 261; + (_localctx as BinaryOpContext)._right = this.expression(14); + } + break; + + case 2: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 262; + if (!(this.precpred(this._ctx, 12))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); + } + this.state = 263; + (_localctx as BinaryOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!(_la === CashScriptParser.T__35 || _la === CashScriptParser.T__39)) { + (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + this.state = 264; + (_localctx as BinaryOpContext)._right = this.expression(13); + } + break; + + case 3: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 265; + if (!(this.precpred(this._ctx, 11))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); + } + this.state = 266; + (_localctx as BinaryOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CashScriptParser.T__5) | (1 << CashScriptParser.T__6) | (1 << CashScriptParser.T__7) | (1 << CashScriptParser.T__8))) !== 0))) { + (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + this.state = 267; + (_localctx as BinaryOpContext)._right = this.expression(12); + } + break; + + case 4: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 268; + if (!(this.precpred(this._ctx, 10))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); + } + this.state = 269; + (_localctx as BinaryOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!(_la === CashScriptParser.T__40 || _la === CashScriptParser.T__41)) { + (_localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + this.state = 270; + (_localctx as BinaryOpContext)._right = this.expression(11); + } + break; + + case 5: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 271; + if (!(this.precpred(this._ctx, 9))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); + } + this.state = 272; + (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__42); + this.state = 273; + (_localctx as BinaryOpContext)._right = this.expression(10); + } + break; + + case 6: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 274; + if (!(this.precpred(this._ctx, 8))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); + } + this.state = 275; + (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__3); + this.state = 276; + (_localctx as BinaryOpContext)._right = this.expression(9); + } + break; + + case 7: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 277; + if (!(this.precpred(this._ctx, 7))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); + } + this.state = 278; + (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__43); + this.state = 279; + (_localctx as BinaryOpContext)._right = this.expression(8); + } + break; + + case 8: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 280; + if (!(this.precpred(this._ctx, 6))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); + } + this.state = 281; + (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__44); + this.state = 282; + (_localctx as BinaryOpContext)._right = this.expression(7); + } + break; + + case 9: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 283; + if (!(this.precpred(this._ctx, 5))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); + } + this.state = 284; + (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__45); + this.state = 285; + (_localctx as BinaryOpContext)._right = this.expression(6); + } + break; + + case 10: + { + _localctx = new TupleIndexOpContext(new ExpressionContext(_parentctx, _parentState)); + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 286; + if (!(this.precpred(this._ctx, 19))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 19)"); + } + this.state = 287; + this.match(CashScriptParser.T__21); + this.state = 288; + (_localctx as TupleIndexOpContext)._index = this.match(CashScriptParser.NumberLiteral); + this.state = 289; + this.match(CashScriptParser.T__22); + } + break; + + case 11: + { + _localctx = new UnaryOpContext(new ExpressionContext(_parentctx, _parentState)); + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 290; + if (!(this.precpred(this._ctx, 16))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); + } + this.state = 291; + (_localctx as UnaryOpContext)._op = this._input.LT(1); + _la = this._input.LA(1); + if (!(_la === CashScriptParser.T__31 || _la === CashScriptParser.T__32)) { + (_localctx as UnaryOpContext)._op = this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + break; + + case 12: + { + _localctx = new BinaryOpContext(new ExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryOpContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, CashScriptParser.RULE_expression); + this.state = 292; + if (!(this.precpred(this._ctx, 15))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 15)"); + } + this.state = 293; + (_localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__33); + this.state = 294; + this.match(CashScriptParser.T__14); + this.state = 295; + (_localctx as BinaryOpContext)._right = this.expression(0); + this.state = 296; + this.match(CashScriptParser.T__16); + } + break; + } + } + } + this.state = 302; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.unrollRecursionContexts(_parentctx); + } + return _localctx; + } + // @RuleVersion(0) + public modifier(): ModifierContext { + let _localctx: ModifierContext = new ModifierContext(this._ctx, this.state); + this.enterRule(_localctx, 42, CashScriptParser.RULE_modifier); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 303; + this.match(CashScriptParser.T__46); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public literal(): LiteralContext { + let _localctx: LiteralContext = new LiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 44, CashScriptParser.RULE_literal); + try { + this.state = 310; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case CashScriptParser.BooleanLiteral: + this.enterOuterAlt(_localctx, 1); + { + this.state = 305; + this.match(CashScriptParser.BooleanLiteral); + } + break; + case CashScriptParser.NumberLiteral: + this.enterOuterAlt(_localctx, 2); + { + this.state = 306; + this.numberLiteral(); + } + break; + case CashScriptParser.StringLiteral: + this.enterOuterAlt(_localctx, 3); + { + this.state = 307; + this.match(CashScriptParser.StringLiteral); + } + break; + case CashScriptParser.DateLiteral: + this.enterOuterAlt(_localctx, 4); + { + this.state = 308; + this.match(CashScriptParser.DateLiteral); + } + break; + case CashScriptParser.HexLiteral: + this.enterOuterAlt(_localctx, 5); + { + this.state = 309; + this.match(CashScriptParser.HexLiteral); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public numberLiteral(): NumberLiteralContext { + let _localctx: NumberLiteralContext = new NumberLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 46, CashScriptParser.RULE_numberLiteral); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 312; + this.match(CashScriptParser.NumberLiteral); + this.state = 314; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 25, this._ctx) ) { + case 1: + { + this.state = 313; + this.match(CashScriptParser.NumberUnit); + } + break; + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public typeName(): TypeNameContext { + let _localctx: TypeNameContext = new TypeNameContext(this._ctx, this.state); + this.enterRule(_localctx, 48, CashScriptParser.RULE_typeName); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 316; + _la = this._input.LA(1); + if (!(((((_la - 48)) & ~0x1F) === 0 && ((1 << (_la - 48)) & ((1 << (CashScriptParser.T__47 - 48)) | (1 << (CashScriptParser.T__48 - 48)) | (1 << (CashScriptParser.T__49 - 48)) | (1 << (CashScriptParser.T__50 - 48)) | (1 << (CashScriptParser.T__51 - 48)) | (1 << (CashScriptParser.T__52 - 48)) | (1 << (CashScriptParser.Bytes - 48)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + + public sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean { + switch (ruleIndex) { + case 20: + return this.expression_sempred(_localctx as ExpressionContext, predIndex); + } + return true; + } + private expression_sempred(_localctx: ExpressionContext, predIndex: number): boolean { + switch (predIndex) { + case 0: + return this.precpred(this._ctx, 13); + + case 1: + return this.precpred(this._ctx, 12); + + case 2: + return this.precpred(this._ctx, 11); + + case 3: + return this.precpred(this._ctx, 10); + + case 4: + return this.precpred(this._ctx, 9); + + case 5: + return this.precpred(this._ctx, 8); + + case 6: + return this.precpred(this._ctx, 7); + + case 7: + return this.precpred(this._ctx, 6); + + case 8: + return this.precpred(this._ctx, 5); + + case 9: + return this.precpred(this._ctx, 19); + + case 10: + return this.precpred(this._ctx, 16); + + case 11: + return this.precpred(this._ctx, 15); + } + return true; + } + + public static readonly _serializedATN: string = + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03F\u0141\x04\x02" + + "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\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\t\r\x04" + + "\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04" + + "\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17\x04" + + "\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x03\x02\x07\x026\n\x02\f\x02\x0E" + + "\x029\v\x02\x03\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03\x03" + + "\x03\x03\x04\x03\x04\x03\x05\x03\x05\x05\x05G\n\x05\x03\x06\x05\x06J\n" + + "\x06\x03\x06\x03\x06\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x03\b\x07" + + "\bU\n\b\f\b\x0E\bX\v\b\x03\b\x03\b\x03\t\x03\t\x03\t\x03\t\x03\t\x07\t" + + "a\n\t\f\t\x0E\td\v\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x07\nl\n\n\f" + + "\n\x0E\no\v\n\x03\n\x05\nr\n\n\x05\nt\n\n\x03\n\x03\n\x03\v\x03\v\x03" + + "\v\x03\f\x03\f\x07\f}\n\f\f\f\x0E\f\x80\v\f\x03\f\x03\f\x05\f\x84\n\f" + + "\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x05\r\x8C\n\r\x03\x0E\x03\x0E\x05" + + "\x0E\x90\n\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F" + + "\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x10\x03\x10" + + "\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11" + + "\x03\x11\x03\x11\x03\x12\x03\x12\x03\x12\x03\x12\x03\x12\x03\x12\x03\x13" + + "\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x05\x13\xBA\n\x13\x03" + + "\x14\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x15\x07\x15\xC3\n\x15" + + "\f\x15\x0E\x15\xC6\v\x15\x03\x15\x05\x15\xC9\n\x15\x05\x15\xCB\n\x15\x03" + + "\x15\x03\x15\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03" + + "\x16\x03\x16\x03\x16\x05\x16\xD9\n\x16\x03\x16\x05\x16\xDC\n\x16\x03\x16" + + "\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16" + + "\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16" + + "\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x07\x16\xF6\n\x16\f\x16\x0E\x16" + + "\xF9\v\x16\x03\x16\x05\x16\xFC\n\x16\x05\x16\xFE\n\x16\x03\x16\x03\x16" + + "\x03\x16\x03\x16\x05\x16\u0104\n\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03" + + "\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03" + + "\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03" + + "\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03" + + "\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x07\x16\u012D" + + "\n\x16\f\x16\x0E\x16\u0130\v\x16\x03\x17\x03\x17\x03\x18\x03\x18\x03\x18" + + "\x03\x18\x03\x18\x05\x18\u0139\n\x18\x03\x19\x03\x19\x05\x19\u013D\n\x19" + + "\x03\x1A\x03\x1A\x03\x1A\x02\x02\x03*\x1B\x02\x02\x04\x02\x06\x02\b\x02" + + "\n\x02\f\x02\x0E\x02\x10\x02\x12\x02\x14\x02\x16\x02\x18\x02\x1A\x02\x1C" + + "\x02\x1E\x02 \x02\"\x02$\x02&\x02(\x02*\x02,\x02.\x020\x022\x02\x02\f" + + "\x03\x02\x06\f\x03\x02\x1B\x1C\x04\x02\x1B\x1C\x1E!\x03\x02%&\x03\x02" + + "\')\x04\x02&&**\x03\x02\b\v\x03\x02+,\x03\x02\"#\x04\x0227<<\x02\u015B" + + "\x027\x03\x02\x02\x02\x04=\x03\x02\x02\x02\x06B\x03\x02\x02\x02\bD\x03" + + "\x02\x02\x02\nI\x03\x02\x02\x02\fM\x03\x02\x02\x02\x0EO\x03\x02\x02\x02" + + "\x10[\x03\x02\x02\x02\x12g\x03\x02\x02\x02\x14w\x03\x02\x02\x02\x16\x83" + + "\x03\x02\x02\x02\x18\x8B\x03\x02\x02\x02\x1A\x8D\x03\x02\x02\x02\x1C\x96" + + "\x03\x02\x02\x02\x1E\x9F\x03\x02\x02\x02 \xA4\x03\x02\x02\x02\"\xAC\x03" + + "\x02\x02\x02$\xB2\x03\x02\x02\x02&\xBB\x03\x02\x02\x02(\xBE\x03\x02\x02" + + "\x02*\u0103\x03\x02\x02\x02,\u0131\x03\x02\x02\x02.\u0138\x03\x02\x02" + + "\x020\u013A\x03\x02\x02\x022\u013E\x03\x02\x02\x0246\x05\x04\x03\x025" + + "4\x03\x02\x02\x0269\x03\x02\x02\x0275\x03\x02\x02\x0278\x03\x02\x02\x02" + + "8:\x03\x02\x02\x0297\x03\x02\x02\x02:;\x05\x0E\b\x02;<\x07\x02\x02\x03" + + "<\x03\x03\x02\x02\x02=>\x07\x03\x02\x02>?\x05\x06\x04\x02?@\x05\b\x05" + + "\x02@A\x07\x04\x02\x02A\x05\x03\x02\x02\x02BC\x07\x05\x02\x02C\x07\x03" + + "\x02\x02\x02DF\x05\n\x06\x02EG\x05\n\x06\x02FE\x03\x02\x02\x02FG\x03\x02" + + "\x02\x02G\t\x03\x02\x02\x02HJ\x05\f\x07\x02IH\x03\x02\x02\x02IJ\x03\x02" + + "\x02\x02JK\x03\x02\x02\x02KL\x078\x02\x02L\v\x03\x02\x02\x02MN\t\x02\x02" + + "\x02N\r\x03\x02\x02\x02OP\x07\r\x02\x02PQ\x07C\x02\x02QR\x05\x12\n\x02" + + "RV\x07\x0E\x02\x02SU\x05\x10\t\x02TS\x03\x02\x02\x02UX\x03\x02\x02\x02" + + "VT\x03\x02\x02\x02VW\x03\x02\x02\x02WY\x03\x02\x02\x02XV\x03\x02\x02\x02" + + "YZ\x07\x0F\x02\x02Z\x0F\x03\x02\x02\x02[\\\x07\x10\x02\x02\\]\x07C\x02" + + "\x02]^\x05\x12\n\x02^b\x07\x0E\x02\x02_a\x05\x18\r\x02`_\x03\x02\x02\x02" + + "ad\x03\x02\x02\x02b`\x03\x02\x02\x02bc\x03\x02\x02\x02ce\x03\x02\x02\x02" + + "db\x03\x02\x02\x02ef\x07\x0F\x02\x02f\x11\x03\x02\x02\x02gs\x07\x11\x02" + + "\x02hm\x05\x14\v\x02ij\x07\x12\x02\x02jl\x05\x14\v\x02ki\x03\x02\x02\x02" + + "lo\x03\x02\x02\x02mk\x03\x02\x02\x02mn\x03\x02\x02\x02nq\x03\x02\x02\x02" + + "om\x03\x02\x02\x02pr\x07\x12\x02\x02qp\x03\x02\x02\x02qr\x03\x02\x02\x02" + + "rt\x03\x02\x02\x02sh\x03\x02\x02\x02st\x03\x02\x02\x02tu\x03\x02\x02\x02" + + "uv\x07\x13\x02\x02v\x13\x03\x02\x02\x02wx\x052\x1A\x02xy\x07C\x02\x02" + + "y\x15\x03\x02\x02\x02z~\x07\x0E\x02\x02{}\x05\x18\r\x02|{\x03\x02\x02" + + "\x02}\x80\x03\x02\x02\x02~|\x03\x02\x02\x02~\x7F\x03\x02\x02\x02\x7F\x81" + + "\x03\x02\x02\x02\x80~\x03\x02\x02\x02\x81\x84\x07\x0F\x02\x02\x82\x84" + + "\x05\x18\r\x02\x83z\x03\x02\x02\x02\x83\x82\x03\x02\x02\x02\x84\x17\x03" + + "\x02\x02\x02\x85\x8C\x05\x1A\x0E\x02\x86\x8C\x05\x1C\x0F\x02\x87\x8C\x05" + + "\x1E\x10\x02\x88\x8C\x05 \x11\x02\x89\x8C\x05\"\x12\x02\x8A\x8C\x05$\x13" + + "\x02\x8B\x85\x03\x02\x02\x02\x8B\x86\x03\x02\x02\x02\x8B\x87\x03\x02\x02" + + "\x02\x8B\x88\x03\x02\x02\x02\x8B\x89\x03\x02\x02\x02\x8B\x8A\x03\x02\x02" + + "\x02\x8C\x19\x03\x02\x02\x02\x8D\x8F\x052\x1A\x02\x8E\x90\x05,\x17\x02" + + "\x8F\x8E\x03\x02\x02\x02\x8F\x90\x03\x02\x02\x02\x90\x91\x03\x02\x02\x02" + + "\x91\x92\x07C\x02\x02\x92\x93\x07\f\x02\x02\x93\x94\x05*\x16\x02\x94\x95" + + "\x07\x04\x02\x02\x95\x1B\x03\x02\x02\x02\x96\x97\x052\x1A\x02\x97\x98" + + "\x07C\x02\x02\x98\x99\x07\x12\x02\x02\x99\x9A\x052\x1A\x02\x9A\x9B\x07" + + "C\x02\x02\x9B\x9C\x07\f\x02\x02\x9C\x9D\x05*\x16\x02\x9D\x9E\x07\x04\x02" + + "\x02\x9E\x1D\x03\x02\x02\x02\x9F\xA0\x07C\x02\x02\xA0\xA1\x07\f\x02\x02" + + "\xA1\xA2\x05*\x16\x02\xA2\xA3\x07\x04\x02\x02\xA3\x1F\x03\x02\x02\x02" + + "\xA4\xA5\x07\x14\x02\x02\xA5\xA6\x07\x11\x02\x02\xA6\xA7\x07A\x02\x02" + + "\xA7\xA8\x07\b\x02\x02\xA8\xA9\x05*\x16\x02\xA9\xAA\x07\x13\x02\x02\xAA" + + "\xAB\x07\x04\x02\x02\xAB!\x03\x02\x02\x02\xAC\xAD\x07\x14\x02\x02\xAD" + + "\xAE\x07\x11\x02\x02\xAE\xAF\x05*\x16\x02\xAF\xB0\x07\x13\x02\x02\xB0" + + "\xB1\x07\x04\x02\x02\xB1#\x03\x02\x02\x02\xB2\xB3\x07\x15\x02\x02\xB3" + + "\xB4\x07\x11\x02\x02\xB4\xB5\x05*\x16\x02\xB5\xB6\x07\x13\x02\x02\xB6" + + "\xB9\x05\x16\f\x02\xB7\xB8\x07\x16\x02\x02\xB8\xBA\x05\x16\f\x02\xB9\xB7" + + "\x03\x02\x02\x02\xB9\xBA\x03\x02\x02\x02\xBA%\x03\x02\x02\x02\xBB\xBC" + + "\x07C\x02\x02\xBC\xBD\x05(\x15\x02\xBD\'\x03\x02\x02\x02\xBE\xCA\x07\x11" + + "\x02\x02\xBF\xC4\x05*\x16\x02\xC0\xC1\x07\x12\x02\x02\xC1\xC3\x05*\x16" + + "\x02\xC2\xC0\x03\x02\x02\x02\xC3\xC6\x03\x02\x02\x02\xC4\xC2\x03\x02\x02" + + "\x02\xC4\xC5\x03\x02\x02\x02\xC5\xC8\x03\x02\x02\x02\xC6\xC4\x03\x02\x02" + + "\x02\xC7\xC9\x07\x12\x02\x02\xC8\xC7\x03\x02\x02\x02\xC8\xC9\x03\x02\x02" + + "\x02\xC9\xCB\x03\x02\x02\x02\xCA\xBF\x03\x02\x02\x02\xCA\xCB\x03\x02\x02" + + "\x02\xCB\xCC\x03\x02\x02\x02\xCC\xCD\x07\x13\x02\x02\xCD)\x03\x02\x02" + + "\x02\xCE\xCF\b\x16\x01\x02\xCF\xD0\x07\x11\x02\x02\xD0\xD1\x05*\x16\x02" + + "\xD1\xD2\x07\x13\x02\x02\xD2\u0104\x03\x02\x02\x02\xD3\xD4\x052\x1A\x02" + + "\xD4\xD5\x07\x11\x02\x02\xD5\xD8\x05*\x16\x02\xD6\xD7\x07\x12\x02\x02" + + "\xD7\xD9\x05*\x16\x02\xD8\xD6\x03\x02\x02\x02\xD8\xD9\x03\x02\x02\x02" + + "\xD9\xDB\x03\x02\x02\x02\xDA\xDC\x07\x12\x02\x02\xDB\xDA\x03\x02\x02\x02" + + "\xDB\xDC\x03\x02\x02\x02\xDC\xDD\x03\x02\x02\x02\xDD\xDE\x07\x13\x02\x02" + + "\xDE\u0104\x03\x02\x02\x02\xDF\u0104\x05&\x14\x02\xE0\xE1\x07\x17\x02" + + "\x02\xE1\xE2\x07C\x02\x02\xE2\u0104\x05(\x15\x02\xE3\xE4\x07\x1A\x02\x02" + + "\xE4\xE5\x07\x18\x02\x02\xE5\xE6\x05*\x16\x02\xE6\xE7\x07\x19\x02\x02" + + "\xE7\xE8\t\x03\x02\x02\xE8\u0104\x03\x02\x02\x02\xE9\xEA\x07\x1D\x02\x02" + + "\xEA\xEB\x07\x18\x02\x02\xEB\xEC\x05*\x16\x02\xEC\xED\x07\x19\x02\x02" + + "\xED\xEE\t\x04\x02\x02\xEE\u0104\x03\x02\x02\x02\xEF\xF0\t\x05\x02\x02" + + "\xF0\u0104\x05*\x16\x10\xF1\xFD\x07\x18\x02\x02\xF2\xF7\x05*\x16\x02\xF3" + + "\xF4\x07\x12\x02\x02\xF4\xF6\x05*\x16\x02\xF5\xF3\x03\x02\x02\x02\xF6" + + "\xF9\x03\x02\x02\x02\xF7\xF5\x03\x02\x02\x02\xF7\xF8\x03\x02\x02\x02\xF8" + + "\xFB\x03\x02\x02\x02\xF9\xF7\x03\x02\x02\x02\xFA\xFC\x07\x12\x02\x02\xFB" + + "\xFA\x03\x02\x02\x02\xFB\xFC\x03\x02\x02\x02\xFC\xFE\x03\x02\x02\x02\xFD" + + "\xF2\x03\x02\x02\x02\xFD\xFE\x03\x02\x02\x02\xFE\xFF\x03\x02\x02\x02\xFF" + + "\u0104\x07\x19\x02\x02\u0100\u0104\x07B\x02\x02\u0101\u0104\x07C\x02\x02" + + "\u0102\u0104\x05.\x18\x02\u0103\xCE\x03\x02\x02\x02\u0103\xD3\x03\x02" + + "\x02\x02\u0103\xDF\x03\x02\x02\x02\u0103\xE0\x03\x02\x02\x02\u0103\xE3" + + "\x03\x02\x02\x02\u0103\xE9\x03\x02\x02\x02\u0103\xEF\x03\x02\x02\x02\u0103" + + "\xF1\x03\x02\x02\x02\u0103\u0100\x03\x02\x02\x02\u0103\u0101\x03\x02\x02" + + "\x02\u0103\u0102\x03\x02\x02\x02\u0104\u012E\x03\x02\x02\x02\u0105\u0106" + + "\f\x0F\x02\x02\u0106\u0107\t\x06\x02\x02\u0107\u012D\x05*\x16\x10\u0108" + + "\u0109\f\x0E\x02\x02\u0109\u010A\t\x07\x02\x02\u010A\u012D\x05*\x16\x0F" + + "\u010B\u010C\f\r\x02\x02\u010C\u010D\t\b\x02\x02\u010D\u012D\x05*\x16" + + "\x0E\u010E\u010F\f\f\x02\x02\u010F\u0110\t\t\x02\x02\u0110\u012D\x05*" + + "\x16\r\u0111\u0112\f\v\x02\x02\u0112\u0113\x07-\x02\x02\u0113\u012D\x05" + + "*\x16\f\u0114\u0115\f\n\x02\x02\u0115\u0116\x07\x06\x02\x02\u0116\u012D" + + "\x05*\x16\v\u0117\u0118\f\t\x02\x02\u0118\u0119\x07.\x02\x02\u0119\u012D" + + "\x05*\x16\n\u011A\u011B\f\b\x02\x02\u011B\u011C\x07/\x02\x02\u011C\u012D" + + "\x05*\x16\t\u011D\u011E\f\x07\x02\x02\u011E\u011F\x070\x02\x02\u011F\u012D" + + "\x05*\x16\b\u0120\u0121\f\x15\x02\x02\u0121\u0122\x07\x18\x02\x02\u0122" + + "\u0123\x07;\x02\x02\u0123\u012D\x07\x19\x02\x02\u0124\u0125\f\x12\x02" + + "\x02\u0125\u012D\t\n\x02\x02\u0126\u0127\f\x11\x02\x02\u0127\u0128\x07" + + "$\x02\x02\u0128\u0129\x07\x11\x02\x02\u0129\u012A\x05*\x16\x02\u012A\u012B" + + "\x07\x13\x02\x02\u012B\u012D\x03\x02\x02\x02\u012C\u0105\x03\x02\x02\x02" + + "\u012C\u0108\x03\x02\x02\x02\u012C\u010B\x03\x02\x02\x02\u012C\u010E\x03" + + "\x02\x02\x02\u012C\u0111\x03\x02\x02\x02\u012C\u0114\x03\x02\x02\x02\u012C" + + "\u0117\x03\x02\x02\x02\u012C\u011A\x03\x02\x02\x02\u012C\u011D\x03\x02" + + "\x02\x02\u012C\u0120\x03\x02\x02\x02\u012C\u0124\x03\x02\x02\x02\u012C" + + "\u0126\x03\x02\x02\x02\u012D\u0130\x03\x02\x02\x02\u012E\u012C\x03\x02" + + "\x02\x02\u012E\u012F\x03\x02\x02\x02\u012F+\x03\x02\x02\x02\u0130\u012E" + + "\x03\x02\x02\x02\u0131\u0132\x071\x02\x02\u0132-\x03\x02\x02\x02\u0133" + + "\u0139\x079\x02\x02\u0134\u0139\x050\x19\x02\u0135\u0139\x07>\x02\x02" + + "\u0136\u0139\x07?\x02\x02\u0137\u0139\x07@\x02\x02\u0138\u0133\x03\x02" + + "\x02\x02\u0138\u0134\x03\x02\x02\x02\u0138\u0135\x03\x02\x02\x02\u0138" + + "\u0136\x03\x02\x02\x02\u0138\u0137\x03\x02\x02\x02\u0139/\x03\x02\x02" + + "\x02\u013A\u013C\x07;\x02\x02\u013B\u013D\x07:\x02\x02\u013C\u013B\x03" + + "\x02\x02\x02\u013C\u013D\x03\x02\x02\x02\u013D1\x03\x02\x02\x02\u013E" + + "\u013F\t\v\x02\x02\u013F3\x03\x02\x02\x02\x1C7FIVbmqs~\x83\x8B\x8F\xB9" + + "\xC4\xC8\xCA\xD8\xDB\xF7\xFB\xFD\u0103\u012C\u012E\u0138\u013C"; + public static __ATN: ATN; + public static get _ATN(): ATN { + if (!CashScriptParser.__ATN) { + CashScriptParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(CashScriptParser._serializedATN)); + } + + return CashScriptParser.__ATN; + } + +} + +export class SourceFileContext extends ParserRuleContext { + public contractDefinition(): ContractDefinitionContext { + return this.getRuleContext(0, ContractDefinitionContext); + } + public EOF(): TerminalNode { return this.getToken(CashScriptParser.EOF, 0); } + public pragmaDirective(): PragmaDirectiveContext[]; + public pragmaDirective(i: number): PragmaDirectiveContext; + public pragmaDirective(i?: number): PragmaDirectiveContext | PragmaDirectiveContext[] { + if (i === undefined) { + return this.getRuleContexts(PragmaDirectiveContext); + } else { + return this.getRuleContext(i, PragmaDirectiveContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_sourceFile; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterSourceFile) { + listener.enterSourceFile(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitSourceFile) { + listener.exitSourceFile(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitSourceFile) { + return visitor.visitSourceFile(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PragmaDirectiveContext extends ParserRuleContext { + public pragmaName(): PragmaNameContext { + return this.getRuleContext(0, PragmaNameContext); + } + public pragmaValue(): PragmaValueContext { + return this.getRuleContext(0, PragmaValueContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_pragmaDirective; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterPragmaDirective) { + listener.enterPragmaDirective(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitPragmaDirective) { + listener.exitPragmaDirective(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitPragmaDirective) { + return visitor.visitPragmaDirective(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PragmaNameContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_pragmaName; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterPragmaName) { + listener.enterPragmaName(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitPragmaName) { + listener.exitPragmaName(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitPragmaName) { + return visitor.visitPragmaName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PragmaValueContext extends ParserRuleContext { + public versionConstraint(): VersionConstraintContext[]; + public versionConstraint(i: number): VersionConstraintContext; + public versionConstraint(i?: number): VersionConstraintContext | VersionConstraintContext[] { + if (i === undefined) { + return this.getRuleContexts(VersionConstraintContext); + } else { + return this.getRuleContext(i, VersionConstraintContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_pragmaValue; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterPragmaValue) { + listener.enterPragmaValue(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitPragmaValue) { + listener.exitPragmaValue(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitPragmaValue) { + return visitor.visitPragmaValue(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class VersionConstraintContext extends ParserRuleContext { + public VersionLiteral(): TerminalNode { return this.getToken(CashScriptParser.VersionLiteral, 0); } + public versionOperator(): VersionOperatorContext | undefined { + return this.tryGetRuleContext(0, VersionOperatorContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_versionConstraint; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterVersionConstraint) { + listener.enterVersionConstraint(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitVersionConstraint) { + listener.exitVersionConstraint(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitVersionConstraint) { + return visitor.visitVersionConstraint(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class VersionOperatorContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_versionOperator; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterVersionOperator) { + listener.enterVersionOperator(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitVersionOperator) { + listener.exitVersionOperator(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitVersionOperator) { + return visitor.visitVersionOperator(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ContractDefinitionContext extends ParserRuleContext { + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + public parameterList(): ParameterListContext { + return this.getRuleContext(0, ParameterListContext); + } + public functionDefinition(): FunctionDefinitionContext[]; + public functionDefinition(i: number): FunctionDefinitionContext; + public functionDefinition(i?: number): FunctionDefinitionContext | FunctionDefinitionContext[] { + if (i === undefined) { + return this.getRuleContexts(FunctionDefinitionContext); + } else { + return this.getRuleContext(i, FunctionDefinitionContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_contractDefinition; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterContractDefinition) { + listener.enterContractDefinition(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitContractDefinition) { + listener.exitContractDefinition(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitContractDefinition) { + return visitor.visitContractDefinition(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FunctionDefinitionContext extends ParserRuleContext { + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + public parameterList(): ParameterListContext { + return this.getRuleContext(0, ParameterListContext); + } + public statement(): StatementContext[]; + public statement(i: number): StatementContext; + public statement(i?: number): StatementContext | StatementContext[] { + if (i === undefined) { + return this.getRuleContexts(StatementContext); + } else { + return this.getRuleContext(i, StatementContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_functionDefinition; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterFunctionDefinition) { + listener.enterFunctionDefinition(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitFunctionDefinition) { + listener.exitFunctionDefinition(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitFunctionDefinition) { + return visitor.visitFunctionDefinition(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ParameterListContext extends ParserRuleContext { + public parameter(): ParameterContext[]; + public parameter(i: number): ParameterContext; + public parameter(i?: number): ParameterContext | ParameterContext[] { + if (i === undefined) { + return this.getRuleContexts(ParameterContext); + } else { + return this.getRuleContext(i, ParameterContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_parameterList; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterParameterList) { + listener.enterParameterList(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitParameterList) { + listener.exitParameterList(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitParameterList) { + return visitor.visitParameterList(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ParameterContext extends ParserRuleContext { + public typeName(): TypeNameContext { + return this.getRuleContext(0, TypeNameContext); + } + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_parameter; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterParameter) { + listener.enterParameter(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitParameter) { + listener.exitParameter(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitParameter) { + return visitor.visitParameter(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class BlockContext extends ParserRuleContext { + public statement(): StatementContext[]; + public statement(i: number): StatementContext; + public statement(i?: number): StatementContext | StatementContext[] { + if (i === undefined) { + return this.getRuleContexts(StatementContext); + } else { + return this.getRuleContext(i, StatementContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_block; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterBlock) { + listener.enterBlock(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitBlock) { + listener.exitBlock(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitBlock) { + return visitor.visitBlock(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StatementContext extends ParserRuleContext { + public variableDefinition(): VariableDefinitionContext | undefined { + return this.tryGetRuleContext(0, VariableDefinitionContext); + } + public tupleAssignment(): TupleAssignmentContext | undefined { + return this.tryGetRuleContext(0, TupleAssignmentContext); + } + public assignStatement(): AssignStatementContext | undefined { + return this.tryGetRuleContext(0, AssignStatementContext); + } + public timeOpStatement(): TimeOpStatementContext | undefined { + return this.tryGetRuleContext(0, TimeOpStatementContext); + } + public requireStatement(): RequireStatementContext | undefined { + return this.tryGetRuleContext(0, RequireStatementContext); + } + public ifStatement(): IfStatementContext | undefined { + return this.tryGetRuleContext(0, IfStatementContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_statement; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterStatement) { + listener.enterStatement(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitStatement) { + listener.exitStatement(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitStatement) { + return visitor.visitStatement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class VariableDefinitionContext extends ParserRuleContext { + public typeName(): TypeNameContext { + return this.getRuleContext(0, TypeNameContext); + } + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + public modifier(): ModifierContext | undefined { + return this.tryGetRuleContext(0, ModifierContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_variableDefinition; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterVariableDefinition) { + listener.enterVariableDefinition(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitVariableDefinition) { + listener.exitVariableDefinition(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitVariableDefinition) { + return visitor.visitVariableDefinition(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TupleAssignmentContext extends ParserRuleContext { + public typeName(): TypeNameContext[]; + public typeName(i: number): TypeNameContext; + public typeName(i?: number): TypeNameContext | TypeNameContext[] { + if (i === undefined) { + return this.getRuleContexts(TypeNameContext); + } else { + return this.getRuleContext(i, TypeNameContext); + } + } + public Identifier(): TerminalNode[]; + public Identifier(i: number): TerminalNode; + public Identifier(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(CashScriptParser.Identifier); + } else { + return this.getToken(CashScriptParser.Identifier, i); + } + } + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_tupleAssignment; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterTupleAssignment) { + listener.enterTupleAssignment(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitTupleAssignment) { + listener.exitTupleAssignment(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitTupleAssignment) { + return visitor.visitTupleAssignment(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class AssignStatementContext extends ParserRuleContext { + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_assignStatement; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterAssignStatement) { + listener.enterAssignStatement(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitAssignStatement) { + listener.exitAssignStatement(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitAssignStatement) { + return visitor.visitAssignStatement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TimeOpStatementContext extends ParserRuleContext { + public TxVar(): TerminalNode { return this.getToken(CashScriptParser.TxVar, 0); } + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_timeOpStatement; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterTimeOpStatement) { + listener.enterTimeOpStatement(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitTimeOpStatement) { + listener.exitTimeOpStatement(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitTimeOpStatement) { + return visitor.visitTimeOpStatement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RequireStatementContext extends ParserRuleContext { + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_requireStatement; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterRequireStatement) { + listener.enterRequireStatement(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitRequireStatement) { + listener.exitRequireStatement(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitRequireStatement) { + return visitor.visitRequireStatement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IfStatementContext extends ParserRuleContext { + public _ifBlock!: BlockContext; + public _elseBlock!: BlockContext; + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + public block(): BlockContext[]; + public block(i: number): BlockContext; + public block(i?: number): BlockContext | BlockContext[] { + if (i === undefined) { + return this.getRuleContexts(BlockContext); + } else { + return this.getRuleContext(i, BlockContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_ifStatement; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterIfStatement) { + listener.enterIfStatement(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitIfStatement) { + listener.exitIfStatement(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitIfStatement) { + return visitor.visitIfStatement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FunctionCallContext extends ParserRuleContext { + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + public expressionList(): ExpressionListContext { + return this.getRuleContext(0, ExpressionListContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_functionCall; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterFunctionCall) { + listener.enterFunctionCall(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitFunctionCall) { + listener.exitFunctionCall(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitFunctionCall) { + return visitor.visitFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ExpressionListContext extends ParserRuleContext { + public expression(): ExpressionContext[]; + public expression(i: number): ExpressionContext; + public expression(i?: number): ExpressionContext | ExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(ExpressionContext); + } else { + return this.getRuleContext(i, ExpressionContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_expressionList; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterExpressionList) { + listener.enterExpressionList(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitExpressionList) { + listener.exitExpressionList(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitExpressionList) { + return visitor.visitExpressionList(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ExpressionContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_expression; } + public copyFrom(ctx: ExpressionContext): void { + super.copyFrom(ctx); + } +} +export class ParenthesisedContext extends ExpressionContext { + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterParenthesised) { + listener.enterParenthesised(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitParenthesised) { + listener.exitParenthesised(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitParenthesised) { + return visitor.visitParenthesised(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class CastContext extends ExpressionContext { + public _castable!: ExpressionContext; + public _size!: ExpressionContext; + public typeName(): TypeNameContext { + return this.getRuleContext(0, TypeNameContext); + } + public expression(): ExpressionContext[]; + public expression(i: number): ExpressionContext; + public expression(i?: number): ExpressionContext | ExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(ExpressionContext); + } else { + return this.getRuleContext(i, ExpressionContext); + } + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterCast) { + listener.enterCast(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitCast) { + listener.exitCast(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitCast) { + return visitor.visitCast(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class FunctionCallExpressionContext extends ExpressionContext { + public functionCall(): FunctionCallContext { + return this.getRuleContext(0, FunctionCallContext); + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterFunctionCallExpression) { + listener.enterFunctionCallExpression(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitFunctionCallExpression) { + listener.exitFunctionCallExpression(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitFunctionCallExpression) { + return visitor.visitFunctionCallExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class InstantiationContext extends ExpressionContext { + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + public expressionList(): ExpressionListContext { + return this.getRuleContext(0, ExpressionListContext); + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterInstantiation) { + listener.enterInstantiation(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitInstantiation) { + listener.exitInstantiation(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitInstantiation) { + return visitor.visitInstantiation(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class TupleIndexOpContext extends ExpressionContext { + public _index!: Token; + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + public NumberLiteral(): TerminalNode { return this.getToken(CashScriptParser.NumberLiteral, 0); } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterTupleIndexOp) { + listener.enterTupleIndexOp(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitTupleIndexOp) { + listener.exitTupleIndexOp(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitTupleIndexOp) { + return visitor.visitTupleIndexOp(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class UnaryIntrospectionOpContext extends ExpressionContext { + public _scope!: Token; + public _op!: Token; + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterUnaryIntrospectionOp) { + listener.enterUnaryIntrospectionOp(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitUnaryIntrospectionOp) { + listener.exitUnaryIntrospectionOp(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitUnaryIntrospectionOp) { + return visitor.visitUnaryIntrospectionOp(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class UnaryOpContext extends ExpressionContext { + public _op!: Token; + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterUnaryOp) { + listener.enterUnaryOp(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitUnaryOp) { + listener.exitUnaryOp(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitUnaryOp) { + return visitor.visitUnaryOp(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class BinaryOpContext extends ExpressionContext { + public _left!: ExpressionContext; + public _op!: Token; + public _right!: ExpressionContext; + public expression(): ExpressionContext[]; + public expression(i: number): ExpressionContext; + public expression(i?: number): ExpressionContext | ExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(ExpressionContext); + } else { + return this.getRuleContext(i, ExpressionContext); + } + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterBinaryOp) { + listener.enterBinaryOp(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitBinaryOp) { + listener.exitBinaryOp(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitBinaryOp) { + return visitor.visitBinaryOp(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class ArrayContext extends ExpressionContext { + public expression(): ExpressionContext[]; + public expression(i: number): ExpressionContext; + public expression(i?: number): ExpressionContext | ExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(ExpressionContext); + } else { + return this.getRuleContext(i, ExpressionContext); + } + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterArray) { + listener.enterArray(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitArray) { + listener.exitArray(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitArray) { + return visitor.visitArray(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class NullaryOpContext extends ExpressionContext { + public NullaryOp(): TerminalNode { return this.getToken(CashScriptParser.NullaryOp, 0); } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterNullaryOp) { + listener.enterNullaryOp(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitNullaryOp) { + listener.exitNullaryOp(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitNullaryOp) { + return visitor.visitNullaryOp(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class IdentifierContext extends ExpressionContext { + public Identifier(): TerminalNode { return this.getToken(CashScriptParser.Identifier, 0); } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterIdentifier) { + listener.enterIdentifier(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitIdentifier) { + listener.exitIdentifier(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitIdentifier) { + return visitor.visitIdentifier(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class LiteralExpressionContext extends ExpressionContext { + public literal(): LiteralContext { + return this.getRuleContext(0, LiteralContext); + } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterLiteralExpression) { + listener.enterLiteralExpression(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitLiteralExpression) { + listener.exitLiteralExpression(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitLiteralExpression) { + return visitor.visitLiteralExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ModifierContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_modifier; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterModifier) { + listener.enterModifier(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitModifier) { + listener.exitModifier(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitModifier) { + return visitor.visitModifier(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class LiteralContext extends ParserRuleContext { + public BooleanLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.BooleanLiteral, 0); } + public numberLiteral(): NumberLiteralContext | undefined { + return this.tryGetRuleContext(0, NumberLiteralContext); + } + public StringLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.StringLiteral, 0); } + public DateLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.DateLiteral, 0); } + public HexLiteral(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.HexLiteral, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_literal; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterLiteral) { + listener.enterLiteral(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitLiteral) { + listener.exitLiteral(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitLiteral) { + return visitor.visitLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class NumberLiteralContext extends ParserRuleContext { + public NumberLiteral(): TerminalNode { return this.getToken(CashScriptParser.NumberLiteral, 0); } + public NumberUnit(): TerminalNode | undefined { return this.tryGetToken(CashScriptParser.NumberUnit, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_numberLiteral; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterNumberLiteral) { + listener.enterNumberLiteral(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitNumberLiteral) { + listener.exitNumberLiteral(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitNumberLiteral) { + return visitor.visitNumberLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TypeNameContext extends ParserRuleContext { + public Bytes(): TerminalNode { return this.getToken(CashScriptParser.Bytes, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CashScriptParser.RULE_typeName; } + // @Override + public enterRule(listener: CashScriptListener): void { + if (listener.enterTypeName) { + listener.enterTypeName(this); + } + } + // @Override + public exitRule(listener: CashScriptListener): void { + if (listener.exitTypeName) { + listener.exitTypeName(this); + } + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitTypeName) { + return visitor.visitTypeName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + diff --git a/src/CashscriptLinter/grammar/CashScriptVisitor.ts b/src/CashscriptLinter/grammar/CashScriptVisitor.ts index a806451..e766322 100644 --- a/src/CashscriptLinter/grammar/CashScriptVisitor.ts +++ b/src/CashscriptLinter/grammar/CashScriptVisitor.ts @@ -1,299 +1,324 @@ -// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT - - -import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; - -import { ParenthesisedContext } from "./CashScriptParser"; -import { CastContext } from "./CashScriptParser"; -import { FunctionCallExpressionContext } from "./CashScriptParser"; -import { InstantiationContext } from "./CashScriptParser"; -import { TupleIndexOpContext } from "./CashScriptParser"; -import { UnaryOpContext } from "./CashScriptParser"; -import { BinaryOpContext } from "./CashScriptParser"; -import { ArrayContext } from "./CashScriptParser"; -import { PreimageFieldContext } from "./CashScriptParser"; -import { IdentifierContext } from "./CashScriptParser"; -import { LiteralExpressionContext } from "./CashScriptParser"; -import { SourceFileContext } from "./CashScriptParser"; -import { PragmaDirectiveContext } from "./CashScriptParser"; -import { PragmaNameContext } from "./CashScriptParser"; -import { PragmaValueContext } from "./CashScriptParser"; -import { VersionConstraintContext } from "./CashScriptParser"; -import { VersionOperatorContext } from "./CashScriptParser"; -import { ContractDefinitionContext } from "./CashScriptParser"; -import { FunctionDefinitionContext } from "./CashScriptParser"; -import { ParameterListContext } from "./CashScriptParser"; -import { ParameterContext } from "./CashScriptParser"; -import { BlockContext } from "./CashScriptParser"; -import { StatementContext } from "./CashScriptParser"; -import { VariableDefinitionContext } from "./CashScriptParser"; -import { AssignStatementContext } from "./CashScriptParser"; -import { TimeOpStatementContext } from "./CashScriptParser"; -import { RequireStatementContext } from "./CashScriptParser"; -import { IfStatementContext } from "./CashScriptParser"; -import { FunctionCallContext } from "./CashScriptParser"; -import { ExpressionListContext } from "./CashScriptParser"; -import { ExpressionContext } from "./CashScriptParser"; -import { LiteralContext } from "./CashScriptParser"; -import { NumberLiteralContext } from "./CashScriptParser"; -import { TypeNameContext } from "./CashScriptParser"; - - -/** - * This interface defines a complete generic visitor for a parse tree produced - * by `CashScriptParser`. - * - * @param The return type of the visit operation. Use `void` for - * operations with no return type. - */ -export interface CashScriptVisitor extends ParseTreeVisitor { - /** - * Visit a parse tree produced by the `Parenthesised` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitParenthesised?: (ctx: ParenthesisedContext) => Result; - - /** - * Visit a parse tree produced by the `Cast` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitCast?: (ctx: CastContext) => Result; - - /** - * Visit a parse tree produced by the `FunctionCallExpression` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => Result; - - /** - * Visit a parse tree produced by the `Instantiation` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitInstantiation?: (ctx: InstantiationContext) => Result; - - /** - * Visit a parse tree produced by the `TupleIndexOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitTupleIndexOp?: (ctx: TupleIndexOpContext) => Result; - - /** - * Visit a parse tree produced by the `UnaryOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitUnaryOp?: (ctx: UnaryOpContext) => Result; - - /** - * Visit a parse tree produced by the `BinaryOp` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitBinaryOp?: (ctx: BinaryOpContext) => Result; - - /** - * Visit a parse tree produced by the `Array` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitArray?: (ctx: ArrayContext) => Result; - - /** - * Visit a parse tree produced by the `PreimageField` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitPreimageField?: (ctx: PreimageFieldContext) => Result; - - /** - * Visit a parse tree produced by the `Identifier` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitIdentifier?: (ctx: IdentifierContext) => Result; - - /** - * Visit a parse tree produced by the `LiteralExpression` - * labeled alternative in `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitLiteralExpression?: (ctx: LiteralExpressionContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.sourceFile`. - * @param ctx the parse tree - * @return the visitor result - */ - visitSourceFile?: (ctx: SourceFileContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.pragmaDirective`. - * @param ctx the parse tree - * @return the visitor result - */ - visitPragmaDirective?: (ctx: PragmaDirectiveContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.pragmaName`. - * @param ctx the parse tree - * @return the visitor result - */ - visitPragmaName?: (ctx: PragmaNameContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.pragmaValue`. - * @param ctx the parse tree - * @return the visitor result - */ - visitPragmaValue?: (ctx: PragmaValueContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.versionConstraint`. - * @param ctx the parse tree - * @return the visitor result - */ - visitVersionConstraint?: (ctx: VersionConstraintContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.versionOperator`. - * @param ctx the parse tree - * @return the visitor result - */ - visitVersionOperator?: (ctx: VersionOperatorContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.contractDefinition`. - * @param ctx the parse tree - * @return the visitor result - */ - visitContractDefinition?: (ctx: ContractDefinitionContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.functionDefinition`. - * @param ctx the parse tree - * @return the visitor result - */ - visitFunctionDefinition?: (ctx: FunctionDefinitionContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.parameterList`. - * @param ctx the parse tree - * @return the visitor result - */ - visitParameterList?: (ctx: ParameterListContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.parameter`. - * @param ctx the parse tree - * @return the visitor result - */ - visitParameter?: (ctx: ParameterContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.block`. - * @param ctx the parse tree - * @return the visitor result - */ - visitBlock?: (ctx: BlockContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.statement`. - * @param ctx the parse tree - * @return the visitor result - */ - visitStatement?: (ctx: StatementContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.variableDefinition`. - * @param ctx the parse tree - * @return the visitor result - */ - visitVariableDefinition?: (ctx: VariableDefinitionContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.assignStatement`. - * @param ctx the parse tree - * @return the visitor result - */ - visitAssignStatement?: (ctx: AssignStatementContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.timeOpStatement`. - * @param ctx the parse tree - * @return the visitor result - */ - visitTimeOpStatement?: (ctx: TimeOpStatementContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.requireStatement`. - * @param ctx the parse tree - * @return the visitor result - */ - visitRequireStatement?: (ctx: RequireStatementContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.ifStatement`. - * @param ctx the parse tree - * @return the visitor result - */ - visitIfStatement?: (ctx: IfStatementContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.functionCall`. - * @param ctx the parse tree - * @return the visitor result - */ - visitFunctionCall?: (ctx: FunctionCallContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.expressionList`. - * @param ctx the parse tree - * @return the visitor result - */ - visitExpressionList?: (ctx: ExpressionListContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.expression`. - * @param ctx the parse tree - * @return the visitor result - */ - visitExpression?: (ctx: ExpressionContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.literal`. - * @param ctx the parse tree - * @return the visitor result - */ - visitLiteral?: (ctx: LiteralContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.numberLiteral`. - * @param ctx the parse tree - * @return the visitor result - */ - visitNumberLiteral?: (ctx: NumberLiteralContext) => Result; - - /** - * Visit a parse tree produced by `CashScriptParser.typeName`. - * @param ctx the parse tree - * @return the visitor result - */ - visitTypeName?: (ctx: TypeNameContext) => Result; -} - +// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; + +import { ParenthesisedContext } from "./CashScriptParser"; +import { CastContext } from "./CashScriptParser"; +import { FunctionCallExpressionContext } from "./CashScriptParser"; +import { InstantiationContext } from "./CashScriptParser"; +import { TupleIndexOpContext } from "./CashScriptParser"; +import { UnaryIntrospectionOpContext } from "./CashScriptParser"; +import { UnaryOpContext } from "./CashScriptParser"; +import { BinaryOpContext } from "./CashScriptParser"; +import { ArrayContext } from "./CashScriptParser"; +import { NullaryOpContext } from "./CashScriptParser"; +import { IdentifierContext } from "./CashScriptParser"; +import { LiteralExpressionContext } from "./CashScriptParser"; +import { SourceFileContext } from "./CashScriptParser"; +import { PragmaDirectiveContext } from "./CashScriptParser"; +import { PragmaNameContext } from "./CashScriptParser"; +import { PragmaValueContext } from "./CashScriptParser"; +import { VersionConstraintContext } from "./CashScriptParser"; +import { VersionOperatorContext } from "./CashScriptParser"; +import { ContractDefinitionContext } from "./CashScriptParser"; +import { FunctionDefinitionContext } from "./CashScriptParser"; +import { ParameterListContext } from "./CashScriptParser"; +import { ParameterContext } from "./CashScriptParser"; +import { BlockContext } from "./CashScriptParser"; +import { StatementContext } from "./CashScriptParser"; +import { VariableDefinitionContext } from "./CashScriptParser"; +import { TupleAssignmentContext } from "./CashScriptParser"; +import { AssignStatementContext } from "./CashScriptParser"; +import { TimeOpStatementContext } from "./CashScriptParser"; +import { RequireStatementContext } from "./CashScriptParser"; +import { IfStatementContext } from "./CashScriptParser"; +import { FunctionCallContext } from "./CashScriptParser"; +import { ExpressionListContext } from "./CashScriptParser"; +import { ExpressionContext } from "./CashScriptParser"; +import { ModifierContext } from "./CashScriptParser"; +import { LiteralContext } from "./CashScriptParser"; +import { NumberLiteralContext } from "./CashScriptParser"; +import { TypeNameContext } from "./CashScriptParser"; + + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by `CashScriptParser`. + * + * @param The return type of the visit operation. Use `void` for + * operations with no return type. + */ +export interface CashScriptVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by the `Parenthesised` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitParenthesised?: (ctx: ParenthesisedContext) => Result; + + /** + * Visit a parse tree produced by the `Cast` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitCast?: (ctx: CastContext) => Result; + + /** + * Visit a parse tree produced by the `FunctionCallExpression` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => Result; + + /** + * Visit a parse tree produced by the `Instantiation` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitInstantiation?: (ctx: InstantiationContext) => Result; + + /** + * Visit a parse tree produced by the `TupleIndexOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTupleIndexOp?: (ctx: TupleIndexOpContext) => Result; + + /** + * Visit a parse tree produced by the `UnaryIntrospectionOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitUnaryIntrospectionOp?: (ctx: UnaryIntrospectionOpContext) => Result; + + /** + * Visit a parse tree produced by the `UnaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitUnaryOp?: (ctx: UnaryOpContext) => Result; + + /** + * Visit a parse tree produced by the `BinaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBinaryOp?: (ctx: BinaryOpContext) => Result; + + /** + * Visit a parse tree produced by the `Array` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitArray?: (ctx: ArrayContext) => Result; + + /** + * Visit a parse tree produced by the `NullaryOp` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitNullaryOp?: (ctx: NullaryOpContext) => Result; + + /** + * Visit a parse tree produced by the `Identifier` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIdentifier?: (ctx: IdentifierContext) => Result; + + /** + * Visit a parse tree produced by the `LiteralExpression` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLiteralExpression?: (ctx: LiteralExpressionContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.sourceFile`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSourceFile?: (ctx: SourceFileContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.pragmaDirective`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPragmaDirective?: (ctx: PragmaDirectiveContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.pragmaName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPragmaName?: (ctx: PragmaNameContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.pragmaValue`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPragmaValue?: (ctx: PragmaValueContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.versionConstraint`. + * @param ctx the parse tree + * @return the visitor result + */ + visitVersionConstraint?: (ctx: VersionConstraintContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.versionOperator`. + * @param ctx the parse tree + * @return the visitor result + */ + visitVersionOperator?: (ctx: VersionOperatorContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.contractDefinition`. + * @param ctx the parse tree + * @return the visitor result + */ + visitContractDefinition?: (ctx: ContractDefinitionContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.functionDefinition`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFunctionDefinition?: (ctx: FunctionDefinitionContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.parameterList`. + * @param ctx the parse tree + * @return the visitor result + */ + visitParameterList?: (ctx: ParameterListContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.parameter`. + * @param ctx the parse tree + * @return the visitor result + */ + visitParameter?: (ctx: ParameterContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.block`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBlock?: (ctx: BlockContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.statement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatement?: (ctx: StatementContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.variableDefinition`. + * @param ctx the parse tree + * @return the visitor result + */ + visitVariableDefinition?: (ctx: VariableDefinitionContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.tupleAssignment`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTupleAssignment?: (ctx: TupleAssignmentContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.assignStatement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitAssignStatement?: (ctx: AssignStatementContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.timeOpStatement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTimeOpStatement?: (ctx: TimeOpStatementContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.requireStatement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRequireStatement?: (ctx: RequireStatementContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.ifStatement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIfStatement?: (ctx: IfStatementContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.functionCall`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFunctionCall?: (ctx: FunctionCallContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.expressionList`. + * @param ctx the parse tree + * @return the visitor result + */ + visitExpressionList?: (ctx: ExpressionListContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitExpression?: (ctx: ExpressionContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.modifier`. + * @param ctx the parse tree + * @return the visitor result + */ + visitModifier?: (ctx: ModifierContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.literal`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLiteral?: (ctx: LiteralContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.numberLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitNumberLiteral?: (ctx: NumberLiteralContext) => Result; + + /** + * Visit a parse tree produced by `CashScriptParser.typeName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTypeName?: (ctx: TypeNameContext) => Result; +} + diff --git a/src/LanguageDesc.ts b/src/LanguageDesc.ts index f3c212d..09c5e00 100644 --- a/src/LanguageDesc.ts +++ b/src/LanguageDesc.ts @@ -113,51 +113,83 @@ let LANGUAGE:Data = {...GLOBAL_FUNCTIONS, ...OUTPUT_INSTANTIATION, ...STATEMENTS let DOT_COMPLETIONS:{[key:string]:CompletionItem[]} = { tx:[ { - label:"time", - kind:CompletionItemKind.Field, + label:"version", + kind:CompletionItemKind.Field }, { - label:"age", + label:"locktime", kind:CompletionItemKind.Field }, { - label:"version", + label:"inputs", kind:CompletionItemKind.Field }, { - label:"hashPrevouts", + label:"outputs", + kind:CompletionItemKind.Field + } + ], + + inputs: [ + { + label:"length", + kind:CompletionItemKind.Field + } + ], + + inputs_indexed: [ + { + label:"value", kind:CompletionItemKind.Field }, { - label:"hashSequence", + label:"lockingBytecode", kind:CompletionItemKind.Field }, { - label:"outpoint", + label:"outpointTransactionHash", kind:CompletionItemKind.Field }, { - label:"bytecode", + label:"outpointIndex", kind:CompletionItemKind.Field }, { - label:"value", + label:"unlockingBytecode", kind:CompletionItemKind.Field }, { - label:"sequence", + label:"sequenceNumber", kind:CompletionItemKind.Field }, + ], + + outputs: [ { - label:"hashOutputs", + label:"length", kind:CompletionItemKind.Field }, + + ], + + outputs_indexed: [ { - label:"locktime", + label:"value", + kind:CompletionItemKind.Field + }, + { + label:"lockingBytecode", + kind:CompletionItemKind.Field + }, + ], + + this:[ + { + label: "activeInputIndex", kind:CompletionItemKind.Field }, { - label:"hashtype", + label: "activeBytecode", kind:CompletionItemKind.Field }, ] diff --git a/syntaxes/cashscript.tmLanguage.json b/syntaxes/cashscript.tmLanguage.json index c71f97f..a50dc54 100644 --- a/syntaxes/cashscript.tmLanguage.json +++ b/syntaxes/cashscript.tmLanguage.json @@ -67,6 +67,12 @@ }, { "include": "#control-other" + }, + { + "include": "#control-this" + }, + { + "include":"#control-modifier" } ] }, @@ -92,6 +98,14 @@ "match": "\\b(new)\\b", "name": "keyword.control.cashscript" }, + "control-this": { + "match": "\\b(this)\\b", + "name": "variable.language.transaction.cashscript" + }, + "control-modifier": { + "match": "\\b(constant)\\b", + "name":"constant.language.modifer" + }, "constant": { "patterns": [ @@ -176,7 +190,7 @@ "global-variables": { "patterns": [ { - "match": "\\b(tx)(?:.(time|age|version|hashPrevouts|hashSequence|outpoint|bytecode|value|sequence|hashOutputs|locktime|hashtype|preimage))?\\b", + "match": "\\b(tx)(?:.(version|locktime|inputs|outputs))?\\b", "captures":{ "1":{ "name":"variable.language.transaction.cashscript"