├── .eslintrc.js ├── .gitignore ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── .vscodeignore ├── Gen.py ├── LICENSE ├── README.md ├── language-configuration.json ├── package-lock.json ├── package.json ├── sample ├── .vscode │ └── settings.json ├── sample.diana └── sigs.diana.json ├── src ├── DianaScript.g4 ├── DianaScript.interp ├── DianaScript.tokens ├── DianaScriptLexer.interp ├── DianaScriptLexer.tokens ├── DianaScriptLexer.ts ├── completion.ts ├── extension.ts └── hightlight.ts ├── static ├── icon.png └── static.png └── tsconfig.json /.eslintrc.js: -------------------------------------------------------------------------------- 1 | /**@type {import('eslint').Linter.Config} */ 2 | // eslint-disable-next-line no-undef 3 | module.exports = { 4 | root: true, 5 | parser: '@typescript-eslint/parser', 6 | plugins: [ 7 | '@typescript-eslint', 8 | ], 9 | extends: [ 10 | 'eslint:recommended', 11 | 'plugin:@typescript-eslint/recommended', 12 | ], 13 | rules: { 14 | 'semi': [2, "always"], 15 | '@typescript-eslint/no-unused-vars': 0, 16 | '@typescript-eslint/no-explicit-any': 0, 17 | '@typescript-eslint/explicit-module-boundary-types': 0, 18 | '@typescript-eslint/no-non-null-assertion': 0, 19 | "no-constant-condition": 0 20 | } 21 | }; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | node_modules 3 | .vscode-test/ 4 | *.vsix 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | 5 | // List of extensions which should be recommended for users of this workspace. 6 | "recommendations": [ 7 | "dbaeumer.vscode-eslint" 8 | ] 9 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [{ 8 | "name": "Run Extension", 9 | "type": "extensionHost", 10 | "request": "launch", 11 | "runtimeExecutable": "${execPath}", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}", 14 | "${workspaceFolder}/sample", 15 | ], 16 | "outFiles": [ 17 | "${workspaceFolder}/out/**/*.js" 18 | ], 19 | "preLaunchTask": "npm: watch" 20 | }, 21 | { 22 | "name": "Run Extension Tests", 23 | "type": "extensionHost", 24 | "request": "launch", 25 | "runtimeExecutable": "${execPath}", 26 | "args": [ 27 | "--extensionDevelopmentPath=${workspaceFolder}", 28 | "--extensionTestsPath=${workspaceFolder}/out/test" 29 | ], 30 | "outFiles": [ 31 | "${workspaceFolder}/out/test/**/*.js" 32 | ], 33 | "preLaunchTask": "npm: watch" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.insertSpaces": false 3 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/test/** 4 | out/**/*.map 5 | src/** 6 | static/static.png 7 | .gitignore 8 | tsconfig.json 9 | vsc-extension-quickstart.md 10 | tslint.json -------------------------------------------------------------------------------- /Gen.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from jinja2 import Environment 3 | from jinja2.loaders import BaseLoader 4 | from pathlib import Path 5 | import requests 6 | import json 7 | 8 | req = requests.get(r"https://raw.githubusercontent.com/thautwarm/DianaScript-JIT/master/sigs-for-builtin-modules.json") 9 | if req.status_code != 200: 10 | raise IOError("cannot read json spec from remote repo") 11 | 12 | SPEC = json.loads(req.text) 13 | 14 | env = Environment( 15 | loader = BaseLoader(), 16 | extensions=['jinja2.ext.do'], 17 | trim_blocks=True, 18 | lstrip_blocks=True 19 | ) 20 | 21 | def find_paths(p: Path): 22 | if not p.is_dir(): 23 | if p.suffix == ".in": 24 | yield p 25 | else: 26 | for i in p.iterdir(): 27 | if i == p: 28 | continue 29 | yield from find_paths(i) 30 | 31 | 32 | py_map = { 33 | 'Tuple': 'tuple', 34 | 'string': 'str' 35 | } 36 | 37 | 38 | 39 | env.filters['each'] = lambda f: lambda seq: map(f, seq) 40 | 41 | def assert_(x): 42 | assert x 43 | 44 | import builtins 45 | 46 | namespace = {**builtins.__dict__, **globals()} 47 | for FROM, TO in [ 48 | (path, path.with_suffix("")) for path in find_paths(Path(__file__).parent.parent) 49 | ]: 50 | try: 51 | template = env.from_string(FROM.open(encoding='utf8').read()) 52 | s = template.render(**namespace) 53 | TO.open('w', encoding='utf8').write(s) 54 | print(TO, "written") 55 | except: 56 | print("error ocurred at", FROM) 57 | raise -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | Copyright (c) 2021 thautwarm 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | # VSCode-Diana 6 | 7 | VSCode extension for [DianaScript](https://github.com/thautwarm/DianaScript-JIT); syntax highlighting support is generated by [Typed-BNF](https://github.com/thautwarm/typed-bnf). 8 | 9 | You can create a [`sigs.diana.json`](https://raw.githubusercontent.com/thautwarm/vscode-diana/master/sample/sigs.diana.json) in the root directory, to define auto-completion for your own modules: 10 | 11 | ```javascript 12 | [ // ... 13 | { 14 | "module": "MyModule", 15 | "doc": "...", 16 | "methods": [ 17 | { 18 | "name": "my_method", 19 | "type": "my_method : (Int) -> Int", // optional 20 | "doc" : "an int-to-int function" // optional 21 | }, 22 | // ... 23 | ] 24 | }, 25 | // ... 26 | ] 27 | ``` 28 | -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": "#" 4 | }, 5 | "brackets": [ 6 | ["{", "}"], 7 | ["[", "]"], 8 | ["(", ")"] 9 | ], 10 | "surroundingPairs": [ 11 | ["{", "}"], 12 | ["[", "]"], 13 | ["(", ")"], 14 | ["'", "'"], 15 | ["\"", "\""], 16 | ["`", "`"] 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-diana", 3 | "version": "0.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.12.11", 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", 10 | "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", 11 | "dev": true, 12 | "requires": { 13 | "@babel/highlight": "^7.10.4" 14 | } 15 | }, 16 | "@babel/helper-validator-identifier": { 17 | "version": "7.12.11", 18 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", 19 | "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", 20 | "dev": true 21 | }, 22 | "@babel/highlight": { 23 | "version": "7.13.8", 24 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", 25 | "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", 26 | "dev": true, 27 | "requires": { 28 | "@babel/helper-validator-identifier": "^7.12.11", 29 | "chalk": "^2.0.0", 30 | "js-tokens": "^4.0.0" 31 | }, 32 | "dependencies": { 33 | "chalk": { 34 | "version": "2.4.2", 35 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 36 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 37 | "dev": true, 38 | "requires": { 39 | "ansi-styles": "^3.2.1", 40 | "escape-string-regexp": "^1.0.5", 41 | "supports-color": "^5.3.0" 42 | } 43 | } 44 | } 45 | }, 46 | "@eslint/eslintrc": { 47 | "version": "0.4.0", 48 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", 49 | "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", 50 | "dev": true, 51 | "requires": { 52 | "ajv": "^6.12.4", 53 | "debug": "^4.1.1", 54 | "espree": "^7.3.0", 55 | "globals": "^12.1.0", 56 | "ignore": "^4.0.6", 57 | "import-fresh": "^3.2.1", 58 | "js-yaml": "^3.13.1", 59 | "minimatch": "^3.0.4", 60 | "strip-json-comments": "^3.1.1" 61 | } 62 | }, 63 | "@nodelib/fs.scandir": { 64 | "version": "2.1.4", 65 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", 66 | "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", 67 | "dev": true, 68 | "requires": { 69 | "@nodelib/fs.stat": "2.0.4", 70 | "run-parallel": "^1.1.9" 71 | } 72 | }, 73 | "@nodelib/fs.stat": { 74 | "version": "2.0.4", 75 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", 76 | "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", 77 | "dev": true 78 | }, 79 | "@nodelib/fs.walk": { 80 | "version": "1.2.6", 81 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", 82 | "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", 83 | "dev": true, 84 | "requires": { 85 | "@nodelib/fs.scandir": "2.1.4", 86 | "fastq": "^1.6.0" 87 | } 88 | }, 89 | "@types/json-schema": { 90 | "version": "7.0.7", 91 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", 92 | "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", 93 | "dev": true 94 | }, 95 | "@types/node": { 96 | "version": "12.12.37", 97 | "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.37.tgz", 98 | "integrity": "sha512-4mXKoDptrXAwZErQHrLzpe0FN/0Wmf5JRniSVIdwUrtDf9wnmEV1teCNLBo/TwuXhkK/bVegoEn/wmb+x0AuPg==", 99 | "dev": true 100 | }, 101 | "@types/vscode": { 102 | "version": "1.45.1", 103 | "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.45.1.tgz", 104 | "integrity": "sha512-0NO9qrrEJBO8FsqHCrFMgR2suKnwCsKBWvRSb2OzH5gs4i3QO5AhEMQYrSzDbU/wLPt7N617/rN9lPY213gmwg==", 105 | "dev": true 106 | }, 107 | "@typescript-eslint/eslint-plugin": { 108 | "version": "4.16.1", 109 | "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz", 110 | "integrity": "sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==", 111 | "dev": true, 112 | "requires": { 113 | "@typescript-eslint/experimental-utils": "4.16.1", 114 | "@typescript-eslint/scope-manager": "4.16.1", 115 | "debug": "^4.1.1", 116 | "functional-red-black-tree": "^1.0.1", 117 | "lodash": "^4.17.15", 118 | "regexpp": "^3.0.0", 119 | "semver": "^7.3.2", 120 | "tsutils": "^3.17.1" 121 | } 122 | }, 123 | "@typescript-eslint/experimental-utils": { 124 | "version": "4.16.1", 125 | "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz", 126 | "integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==", 127 | "dev": true, 128 | "requires": { 129 | "@types/json-schema": "^7.0.3", 130 | "@typescript-eslint/scope-manager": "4.16.1", 131 | "@typescript-eslint/types": "4.16.1", 132 | "@typescript-eslint/typescript-estree": "4.16.1", 133 | "eslint-scope": "^5.0.0", 134 | "eslint-utils": "^2.0.0" 135 | } 136 | }, 137 | "@typescript-eslint/parser": { 138 | "version": "4.16.1", 139 | "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.16.1.tgz", 140 | "integrity": "sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg==", 141 | "dev": true, 142 | "requires": { 143 | "@typescript-eslint/scope-manager": "4.16.1", 144 | "@typescript-eslint/types": "4.16.1", 145 | "@typescript-eslint/typescript-estree": "4.16.1", 146 | "debug": "^4.1.1" 147 | } 148 | }, 149 | "@typescript-eslint/scope-manager": { 150 | "version": "4.16.1", 151 | "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz", 152 | "integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==", 153 | "dev": true, 154 | "requires": { 155 | "@typescript-eslint/types": "4.16.1", 156 | "@typescript-eslint/visitor-keys": "4.16.1" 157 | } 158 | }, 159 | "@typescript-eslint/types": { 160 | "version": "4.16.1", 161 | "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz", 162 | "integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==", 163 | "dev": true 164 | }, 165 | "@typescript-eslint/typescript-estree": { 166 | "version": "4.16.1", 167 | "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz", 168 | "integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==", 169 | "dev": true, 170 | "requires": { 171 | "@typescript-eslint/types": "4.16.1", 172 | "@typescript-eslint/visitor-keys": "4.16.1", 173 | "debug": "^4.1.1", 174 | "globby": "^11.0.1", 175 | "is-glob": "^4.0.1", 176 | "semver": "^7.3.2", 177 | "tsutils": "^3.17.1" 178 | } 179 | }, 180 | "@typescript-eslint/visitor-keys": { 181 | "version": "4.16.1", 182 | "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz", 183 | "integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==", 184 | "dev": true, 185 | "requires": { 186 | "@typescript-eslint/types": "4.16.1", 187 | "eslint-visitor-keys": "^2.0.0" 188 | }, 189 | "dependencies": { 190 | "eslint-visitor-keys": { 191 | "version": "2.0.0", 192 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", 193 | "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", 194 | "dev": true 195 | } 196 | } 197 | }, 198 | "acorn": { 199 | "version": "7.4.1", 200 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 201 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 202 | "dev": true 203 | }, 204 | "acorn-jsx": { 205 | "version": "5.3.1", 206 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", 207 | "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", 208 | "dev": true 209 | }, 210 | "ajv": { 211 | "version": "6.12.6", 212 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 213 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 214 | "dev": true, 215 | "requires": { 216 | "fast-deep-equal": "^3.1.1", 217 | "fast-json-stable-stringify": "^2.0.0", 218 | "json-schema-traverse": "^0.4.1", 219 | "uri-js": "^4.2.2" 220 | } 221 | }, 222 | "ansi-colors": { 223 | "version": "4.1.1", 224 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 225 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 226 | "dev": true 227 | }, 228 | "ansi-regex": { 229 | "version": "5.0.0", 230 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 231 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 232 | "dev": true 233 | }, 234 | "ansi-styles": { 235 | "version": "3.2.1", 236 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 237 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 238 | "dev": true, 239 | "requires": { 240 | "color-convert": "^1.9.0" 241 | } 242 | }, 243 | "antlr4ts": { 244 | "version": "0.5.0-alpha.4", 245 | "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", 246 | "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==" 247 | }, 248 | "antlr4ts-cli": { 249 | "version": "0.5.0-alpha.4", 250 | "resolved": "https://registry.npmjs.org/antlr4ts-cli/-/antlr4ts-cli-0.5.0-alpha.4.tgz", 251 | "integrity": "sha512-lVPVBTA2CVHRYILSKilL6Jd4hAumhSZZWA7UbQNQrmaSSj7dPmmYaN4bOmZG79cOy0lS00i4LY68JZZjZMWVrw==", 252 | "dev": true 253 | }, 254 | "argparse": { 255 | "version": "1.0.10", 256 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 257 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 258 | "dev": true, 259 | "requires": { 260 | "sprintf-js": "~1.0.2" 261 | } 262 | }, 263 | "array-union": { 264 | "version": "2.1.0", 265 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", 266 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", 267 | "dev": true 268 | }, 269 | "astral-regex": { 270 | "version": "2.0.0", 271 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", 272 | "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", 273 | "dev": true 274 | }, 275 | "balanced-match": { 276 | "version": "1.0.0", 277 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 278 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 279 | "dev": true 280 | }, 281 | "brace-expansion": { 282 | "version": "1.1.11", 283 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 284 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 285 | "dev": true, 286 | "requires": { 287 | "balanced-match": "^1.0.0", 288 | "concat-map": "0.0.1" 289 | } 290 | }, 291 | "braces": { 292 | "version": "3.0.2", 293 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 294 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 295 | "dev": true, 296 | "requires": { 297 | "fill-range": "^7.0.1" 298 | } 299 | }, 300 | "callsites": { 301 | "version": "3.1.0", 302 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 303 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 304 | "dev": true 305 | }, 306 | "chalk": { 307 | "version": "4.1.0", 308 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", 309 | "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", 310 | "dev": true, 311 | "requires": { 312 | "ansi-styles": "^4.1.0", 313 | "supports-color": "^7.1.0" 314 | }, 315 | "dependencies": { 316 | "ansi-styles": { 317 | "version": "4.3.0", 318 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 319 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 320 | "dev": true, 321 | "requires": { 322 | "color-convert": "^2.0.1" 323 | } 324 | }, 325 | "color-convert": { 326 | "version": "2.0.1", 327 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 328 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 329 | "dev": true, 330 | "requires": { 331 | "color-name": "~1.1.4" 332 | } 333 | }, 334 | "color-name": { 335 | "version": "1.1.4", 336 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 337 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 338 | "dev": true 339 | }, 340 | "has-flag": { 341 | "version": "4.0.0", 342 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 343 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 344 | "dev": true 345 | }, 346 | "supports-color": { 347 | "version": "7.2.0", 348 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 349 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 350 | "dev": true, 351 | "requires": { 352 | "has-flag": "^4.0.0" 353 | } 354 | } 355 | } 356 | }, 357 | "color-convert": { 358 | "version": "1.9.3", 359 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 360 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 361 | "dev": true, 362 | "requires": { 363 | "color-name": "1.1.3" 364 | } 365 | }, 366 | "color-name": { 367 | "version": "1.1.3", 368 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 369 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 370 | "dev": true 371 | }, 372 | "concat-map": { 373 | "version": "0.0.1", 374 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 375 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 376 | "dev": true 377 | }, 378 | "cross-spawn": { 379 | "version": "7.0.3", 380 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 381 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 382 | "dev": true, 383 | "requires": { 384 | "path-key": "^3.1.0", 385 | "shebang-command": "^2.0.0", 386 | "which": "^2.0.1" 387 | } 388 | }, 389 | "debug": { 390 | "version": "4.1.1", 391 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 392 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 393 | "dev": true, 394 | "requires": { 395 | "ms": "^2.1.1" 396 | } 397 | }, 398 | "deep-is": { 399 | "version": "0.1.3", 400 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 401 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 402 | "dev": true 403 | }, 404 | "dir-glob": { 405 | "version": "3.0.1", 406 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", 407 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", 408 | "dev": true, 409 | "requires": { 410 | "path-type": "^4.0.0" 411 | } 412 | }, 413 | "doctrine": { 414 | "version": "3.0.0", 415 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 416 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 417 | "dev": true, 418 | "requires": { 419 | "esutils": "^2.0.2" 420 | } 421 | }, 422 | "emoji-regex": { 423 | "version": "8.0.0", 424 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 425 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 426 | "dev": true 427 | }, 428 | "enquirer": { 429 | "version": "2.3.6", 430 | "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", 431 | "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", 432 | "dev": true, 433 | "requires": { 434 | "ansi-colors": "^4.1.1" 435 | } 436 | }, 437 | "escape-string-regexp": { 438 | "version": "1.0.5", 439 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 440 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 441 | "dev": true 442 | }, 443 | "eslint": { 444 | "version": "7.21.0", 445 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", 446 | "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", 447 | "dev": true, 448 | "requires": { 449 | "@babel/code-frame": "7.12.11", 450 | "@eslint/eslintrc": "^0.4.0", 451 | "ajv": "^6.10.0", 452 | "chalk": "^4.0.0", 453 | "cross-spawn": "^7.0.2", 454 | "debug": "^4.0.1", 455 | "doctrine": "^3.0.0", 456 | "enquirer": "^2.3.5", 457 | "eslint-scope": "^5.1.1", 458 | "eslint-utils": "^2.1.0", 459 | "eslint-visitor-keys": "^2.0.0", 460 | "espree": "^7.3.1", 461 | "esquery": "^1.4.0", 462 | "esutils": "^2.0.2", 463 | "file-entry-cache": "^6.0.1", 464 | "functional-red-black-tree": "^1.0.1", 465 | "glob-parent": "^5.0.0", 466 | "globals": "^12.1.0", 467 | "ignore": "^4.0.6", 468 | "import-fresh": "^3.0.0", 469 | "imurmurhash": "^0.1.4", 470 | "is-glob": "^4.0.0", 471 | "js-yaml": "^3.13.1", 472 | "json-stable-stringify-without-jsonify": "^1.0.1", 473 | "levn": "^0.4.1", 474 | "lodash": "^4.17.20", 475 | "minimatch": "^3.0.4", 476 | "natural-compare": "^1.4.0", 477 | "optionator": "^0.9.1", 478 | "progress": "^2.0.0", 479 | "regexpp": "^3.1.0", 480 | "semver": "^7.2.1", 481 | "strip-ansi": "^6.0.0", 482 | "strip-json-comments": "^3.1.0", 483 | "table": "^6.0.4", 484 | "text-table": "^0.2.0", 485 | "v8-compile-cache": "^2.0.3" 486 | }, 487 | "dependencies": { 488 | "eslint-scope": { 489 | "version": "5.1.1", 490 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", 491 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", 492 | "dev": true, 493 | "requires": { 494 | "esrecurse": "^4.3.0", 495 | "estraverse": "^4.1.1" 496 | } 497 | }, 498 | "eslint-utils": { 499 | "version": "2.1.0", 500 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", 501 | "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", 502 | "dev": true, 503 | "requires": { 504 | "eslint-visitor-keys": "^1.1.0" 505 | }, 506 | "dependencies": { 507 | "eslint-visitor-keys": { 508 | "version": "1.3.0", 509 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 510 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 511 | "dev": true 512 | } 513 | } 514 | }, 515 | "eslint-visitor-keys": { 516 | "version": "2.0.0", 517 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", 518 | "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", 519 | "dev": true 520 | }, 521 | "esrecurse": { 522 | "version": "4.3.0", 523 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 524 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 525 | "dev": true, 526 | "requires": { 527 | "estraverse": "^5.2.0" 528 | }, 529 | "dependencies": { 530 | "estraverse": { 531 | "version": "5.2.0", 532 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 533 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 534 | "dev": true 535 | } 536 | } 537 | } 538 | } 539 | }, 540 | "eslint-scope": { 541 | "version": "5.0.0", 542 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", 543 | "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", 544 | "dev": true, 545 | "requires": { 546 | "esrecurse": "^4.1.0", 547 | "estraverse": "^4.1.1" 548 | } 549 | }, 550 | "eslint-utils": { 551 | "version": "2.0.0", 552 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", 553 | "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", 554 | "dev": true, 555 | "requires": { 556 | "eslint-visitor-keys": "^1.1.0" 557 | } 558 | }, 559 | "eslint-visitor-keys": { 560 | "version": "1.1.0", 561 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", 562 | "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", 563 | "dev": true 564 | }, 565 | "espree": { 566 | "version": "7.3.1", 567 | "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", 568 | "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", 569 | "dev": true, 570 | "requires": { 571 | "acorn": "^7.4.0", 572 | "acorn-jsx": "^5.3.1", 573 | "eslint-visitor-keys": "^1.3.0" 574 | }, 575 | "dependencies": { 576 | "eslint-visitor-keys": { 577 | "version": "1.3.0", 578 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 579 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 580 | "dev": true 581 | } 582 | } 583 | }, 584 | "esprima": { 585 | "version": "4.0.1", 586 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 587 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 588 | "dev": true 589 | }, 590 | "esquery": { 591 | "version": "1.4.0", 592 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", 593 | "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", 594 | "dev": true, 595 | "requires": { 596 | "estraverse": "^5.1.0" 597 | }, 598 | "dependencies": { 599 | "estraverse": { 600 | "version": "5.2.0", 601 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 602 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 603 | "dev": true 604 | } 605 | } 606 | }, 607 | "esrecurse": { 608 | "version": "4.2.1", 609 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", 610 | "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", 611 | "dev": true, 612 | "requires": { 613 | "estraverse": "^4.1.0" 614 | } 615 | }, 616 | "estraverse": { 617 | "version": "4.3.0", 618 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 619 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 620 | "dev": true 621 | }, 622 | "esutils": { 623 | "version": "2.0.3", 624 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 625 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 626 | "dev": true 627 | }, 628 | "fast-deep-equal": { 629 | "version": "3.1.3", 630 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 631 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 632 | "dev": true 633 | }, 634 | "fast-glob": { 635 | "version": "3.2.5", 636 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", 637 | "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", 638 | "dev": true, 639 | "requires": { 640 | "@nodelib/fs.stat": "^2.0.2", 641 | "@nodelib/fs.walk": "^1.2.3", 642 | "glob-parent": "^5.1.0", 643 | "merge2": "^1.3.0", 644 | "micromatch": "^4.0.2", 645 | "picomatch": "^2.2.1" 646 | } 647 | }, 648 | "fast-json-stable-stringify": { 649 | "version": "2.1.0", 650 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 651 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 652 | "dev": true 653 | }, 654 | "fast-levenshtein": { 655 | "version": "2.0.6", 656 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 657 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 658 | "dev": true 659 | }, 660 | "fastq": { 661 | "version": "1.11.0", 662 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", 663 | "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", 664 | "dev": true, 665 | "requires": { 666 | "reusify": "^1.0.4" 667 | } 668 | }, 669 | "file-entry-cache": { 670 | "version": "6.0.1", 671 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", 672 | "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", 673 | "dev": true, 674 | "requires": { 675 | "flat-cache": "^3.0.4" 676 | } 677 | }, 678 | "fill-range": { 679 | "version": "7.0.1", 680 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 681 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 682 | "dev": true, 683 | "requires": { 684 | "to-regex-range": "^5.0.1" 685 | } 686 | }, 687 | "flat-cache": { 688 | "version": "3.0.4", 689 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", 690 | "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", 691 | "dev": true, 692 | "requires": { 693 | "flatted": "^3.1.0", 694 | "rimraf": "^3.0.2" 695 | } 696 | }, 697 | "flatted": { 698 | "version": "3.1.1", 699 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", 700 | "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", 701 | "dev": true 702 | }, 703 | "fs.realpath": { 704 | "version": "1.0.0", 705 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 706 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 707 | "dev": true 708 | }, 709 | "functional-red-black-tree": { 710 | "version": "1.0.1", 711 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 712 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 713 | "dev": true 714 | }, 715 | "glob": { 716 | "version": "7.1.6", 717 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 718 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 719 | "dev": true, 720 | "requires": { 721 | "fs.realpath": "^1.0.0", 722 | "inflight": "^1.0.4", 723 | "inherits": "2", 724 | "minimatch": "^3.0.4", 725 | "once": "^1.3.0", 726 | "path-is-absolute": "^1.0.0" 727 | } 728 | }, 729 | "glob-parent": { 730 | "version": "5.1.2", 731 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 732 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 733 | "dev": true, 734 | "requires": { 735 | "is-glob": "^4.0.1" 736 | } 737 | }, 738 | "globals": { 739 | "version": "12.4.0", 740 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", 741 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", 742 | "dev": true, 743 | "requires": { 744 | "type-fest": "^0.8.1" 745 | } 746 | }, 747 | "globby": { 748 | "version": "11.0.2", 749 | "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", 750 | "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", 751 | "dev": true, 752 | "requires": { 753 | "array-union": "^2.1.0", 754 | "dir-glob": "^3.0.1", 755 | "fast-glob": "^3.1.1", 756 | "ignore": "^5.1.4", 757 | "merge2": "^1.3.0", 758 | "slash": "^3.0.0" 759 | }, 760 | "dependencies": { 761 | "ignore": { 762 | "version": "5.1.8", 763 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", 764 | "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", 765 | "dev": true 766 | } 767 | } 768 | }, 769 | "has-flag": { 770 | "version": "3.0.0", 771 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 772 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 773 | "dev": true 774 | }, 775 | "ignore": { 776 | "version": "4.0.6", 777 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 778 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 779 | "dev": true 780 | }, 781 | "import-fresh": { 782 | "version": "3.3.0", 783 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 784 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 785 | "dev": true, 786 | "requires": { 787 | "parent-module": "^1.0.0", 788 | "resolve-from": "^4.0.0" 789 | } 790 | }, 791 | "imurmurhash": { 792 | "version": "0.1.4", 793 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 794 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 795 | "dev": true 796 | }, 797 | "inflight": { 798 | "version": "1.0.6", 799 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 800 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 801 | "dev": true, 802 | "requires": { 803 | "once": "^1.3.0", 804 | "wrappy": "1" 805 | } 806 | }, 807 | "inherits": { 808 | "version": "2.0.4", 809 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 810 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 811 | "dev": true 812 | }, 813 | "is-extglob": { 814 | "version": "2.1.1", 815 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 816 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 817 | "dev": true 818 | }, 819 | "is-fullwidth-code-point": { 820 | "version": "3.0.0", 821 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 822 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 823 | "dev": true 824 | }, 825 | "is-glob": { 826 | "version": "4.0.1", 827 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 828 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 829 | "dev": true, 830 | "requires": { 831 | "is-extglob": "^2.1.1" 832 | } 833 | }, 834 | "is-number": { 835 | "version": "7.0.0", 836 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 837 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 838 | "dev": true 839 | }, 840 | "isexe": { 841 | "version": "2.0.0", 842 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 843 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 844 | "dev": true 845 | }, 846 | "js-tokens": { 847 | "version": "4.0.0", 848 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 849 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 850 | "dev": true 851 | }, 852 | "js-yaml": { 853 | "version": "3.14.1", 854 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 855 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 856 | "dev": true, 857 | "requires": { 858 | "argparse": "^1.0.7", 859 | "esprima": "^4.0.0" 860 | } 861 | }, 862 | "json-schema-traverse": { 863 | "version": "0.4.1", 864 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 865 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 866 | "dev": true 867 | }, 868 | "json-stable-stringify-without-jsonify": { 869 | "version": "1.0.1", 870 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 871 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 872 | "dev": true 873 | }, 874 | "levn": { 875 | "version": "0.4.1", 876 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", 877 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", 878 | "dev": true, 879 | "requires": { 880 | "prelude-ls": "^1.2.1", 881 | "type-check": "~0.4.0" 882 | } 883 | }, 884 | "lodash": { 885 | "version": "4.17.21", 886 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 887 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 888 | "dev": true 889 | }, 890 | "lru-cache": { 891 | "version": "6.0.0", 892 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 893 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 894 | "dev": true, 895 | "requires": { 896 | "yallist": "^4.0.0" 897 | } 898 | }, 899 | "merge2": { 900 | "version": "1.4.1", 901 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", 902 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", 903 | "dev": true 904 | }, 905 | "micromatch": { 906 | "version": "4.0.2", 907 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", 908 | "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", 909 | "dev": true, 910 | "requires": { 911 | "braces": "^3.0.1", 912 | "picomatch": "^2.0.5" 913 | } 914 | }, 915 | "minimatch": { 916 | "version": "3.0.4", 917 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 918 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 919 | "dev": true, 920 | "requires": { 921 | "brace-expansion": "^1.1.7" 922 | } 923 | }, 924 | "ms": { 925 | "version": "2.1.2", 926 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 927 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 928 | "dev": true 929 | }, 930 | "natural-compare": { 931 | "version": "1.4.0", 932 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 933 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 934 | "dev": true 935 | }, 936 | "once": { 937 | "version": "1.4.0", 938 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 939 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 940 | "dev": true, 941 | "requires": { 942 | "wrappy": "1" 943 | } 944 | }, 945 | "optionator": { 946 | "version": "0.9.1", 947 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", 948 | "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", 949 | "dev": true, 950 | "requires": { 951 | "deep-is": "^0.1.3", 952 | "fast-levenshtein": "^2.0.6", 953 | "levn": "^0.4.1", 954 | "prelude-ls": "^1.2.1", 955 | "type-check": "^0.4.0", 956 | "word-wrap": "^1.2.3" 957 | } 958 | }, 959 | "parent-module": { 960 | "version": "1.0.1", 961 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 962 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 963 | "dev": true, 964 | "requires": { 965 | "callsites": "^3.0.0" 966 | } 967 | }, 968 | "path-is-absolute": { 969 | "version": "1.0.1", 970 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 971 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 972 | "dev": true 973 | }, 974 | "path-key": { 975 | "version": "3.1.1", 976 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 977 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 978 | "dev": true 979 | }, 980 | "path-type": { 981 | "version": "4.0.0", 982 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", 983 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", 984 | "dev": true 985 | }, 986 | "picomatch": { 987 | "version": "2.2.2", 988 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", 989 | "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", 990 | "dev": true 991 | }, 992 | "prelude-ls": { 993 | "version": "1.2.1", 994 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", 995 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", 996 | "dev": true 997 | }, 998 | "progress": { 999 | "version": "2.0.3", 1000 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 1001 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 1002 | "dev": true 1003 | }, 1004 | "punycode": { 1005 | "version": "2.1.1", 1006 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1007 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 1008 | "dev": true 1009 | }, 1010 | "queue-microtask": { 1011 | "version": "1.2.2", 1012 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", 1013 | "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==", 1014 | "dev": true 1015 | }, 1016 | "regexpp": { 1017 | "version": "3.1.0", 1018 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", 1019 | "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", 1020 | "dev": true 1021 | }, 1022 | "require-from-string": { 1023 | "version": "2.0.2", 1024 | "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", 1025 | "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", 1026 | "dev": true 1027 | }, 1028 | "resolve-from": { 1029 | "version": "4.0.0", 1030 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1031 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1032 | "dev": true 1033 | }, 1034 | "reusify": { 1035 | "version": "1.0.4", 1036 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 1037 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 1038 | "dev": true 1039 | }, 1040 | "rimraf": { 1041 | "version": "3.0.2", 1042 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 1043 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 1044 | "dev": true, 1045 | "requires": { 1046 | "glob": "^7.1.3" 1047 | } 1048 | }, 1049 | "run-parallel": { 1050 | "version": "1.2.0", 1051 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 1052 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 1053 | "dev": true, 1054 | "requires": { 1055 | "queue-microtask": "^1.2.2" 1056 | } 1057 | }, 1058 | "semver": { 1059 | "version": "7.3.4", 1060 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", 1061 | "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", 1062 | "dev": true, 1063 | "requires": { 1064 | "lru-cache": "^6.0.0" 1065 | } 1066 | }, 1067 | "shebang-command": { 1068 | "version": "2.0.0", 1069 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 1070 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 1071 | "dev": true, 1072 | "requires": { 1073 | "shebang-regex": "^3.0.0" 1074 | } 1075 | }, 1076 | "shebang-regex": { 1077 | "version": "3.0.0", 1078 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 1079 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 1080 | "dev": true 1081 | }, 1082 | "slash": { 1083 | "version": "3.0.0", 1084 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", 1085 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", 1086 | "dev": true 1087 | }, 1088 | "slice-ansi": { 1089 | "version": "4.0.0", 1090 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", 1091 | "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", 1092 | "dev": true, 1093 | "requires": { 1094 | "ansi-styles": "^4.0.0", 1095 | "astral-regex": "^2.0.0", 1096 | "is-fullwidth-code-point": "^3.0.0" 1097 | }, 1098 | "dependencies": { 1099 | "ansi-styles": { 1100 | "version": "4.3.0", 1101 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1102 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1103 | "dev": true, 1104 | "requires": { 1105 | "color-convert": "^2.0.1" 1106 | } 1107 | }, 1108 | "color-convert": { 1109 | "version": "2.0.1", 1110 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1111 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1112 | "dev": true, 1113 | "requires": { 1114 | "color-name": "~1.1.4" 1115 | } 1116 | }, 1117 | "color-name": { 1118 | "version": "1.1.4", 1119 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1120 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1121 | "dev": true 1122 | } 1123 | } 1124 | }, 1125 | "sprintf-js": { 1126 | "version": "1.0.3", 1127 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1128 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1129 | "dev": true 1130 | }, 1131 | "string-width": { 1132 | "version": "4.2.2", 1133 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1134 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1135 | "dev": true, 1136 | "requires": { 1137 | "emoji-regex": "^8.0.0", 1138 | "is-fullwidth-code-point": "^3.0.0", 1139 | "strip-ansi": "^6.0.0" 1140 | } 1141 | }, 1142 | "strip-ansi": { 1143 | "version": "6.0.0", 1144 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1145 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1146 | "dev": true, 1147 | "requires": { 1148 | "ansi-regex": "^5.0.0" 1149 | } 1150 | }, 1151 | "strip-json-comments": { 1152 | "version": "3.1.1", 1153 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1154 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1155 | "dev": true 1156 | }, 1157 | "supports-color": { 1158 | "version": "5.5.0", 1159 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1160 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1161 | "dev": true, 1162 | "requires": { 1163 | "has-flag": "^3.0.0" 1164 | } 1165 | }, 1166 | "table": { 1167 | "version": "6.0.7", 1168 | "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", 1169 | "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", 1170 | "dev": true, 1171 | "requires": { 1172 | "ajv": "^7.0.2", 1173 | "lodash": "^4.17.20", 1174 | "slice-ansi": "^4.0.0", 1175 | "string-width": "^4.2.0" 1176 | }, 1177 | "dependencies": { 1178 | "ajv": { 1179 | "version": "7.1.1", 1180 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz", 1181 | "integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==", 1182 | "dev": true, 1183 | "requires": { 1184 | "fast-deep-equal": "^3.1.1", 1185 | "json-schema-traverse": "^1.0.0", 1186 | "require-from-string": "^2.0.2", 1187 | "uri-js": "^4.2.2" 1188 | } 1189 | }, 1190 | "json-schema-traverse": { 1191 | "version": "1.0.0", 1192 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", 1193 | "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", 1194 | "dev": true 1195 | } 1196 | } 1197 | }, 1198 | "text-table": { 1199 | "version": "0.2.0", 1200 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 1201 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 1202 | "dev": true 1203 | }, 1204 | "to-regex-range": { 1205 | "version": "5.0.1", 1206 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1207 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1208 | "dev": true, 1209 | "requires": { 1210 | "is-number": "^7.0.0" 1211 | } 1212 | }, 1213 | "tslib": { 1214 | "version": "1.10.0", 1215 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", 1216 | "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", 1217 | "dev": true 1218 | }, 1219 | "tsutils": { 1220 | "version": "3.20.0", 1221 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", 1222 | "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", 1223 | "dev": true, 1224 | "requires": { 1225 | "tslib": "^1.8.1" 1226 | } 1227 | }, 1228 | "type-check": { 1229 | "version": "0.4.0", 1230 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", 1231 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", 1232 | "dev": true, 1233 | "requires": { 1234 | "prelude-ls": "^1.2.1" 1235 | } 1236 | }, 1237 | "type-fest": { 1238 | "version": "0.8.1", 1239 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 1240 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 1241 | "dev": true 1242 | }, 1243 | "typescript": { 1244 | "version": "4.4.3", 1245 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", 1246 | "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", 1247 | "dev": true 1248 | }, 1249 | "uri-js": { 1250 | "version": "4.4.1", 1251 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1252 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1253 | "dev": true, 1254 | "requires": { 1255 | "punycode": "^2.1.0" 1256 | } 1257 | }, 1258 | "v8-compile-cache": { 1259 | "version": "2.2.0", 1260 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", 1261 | "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", 1262 | "dev": true 1263 | }, 1264 | "which": { 1265 | "version": "2.0.2", 1266 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1267 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1268 | "dev": true, 1269 | "requires": { 1270 | "isexe": "^2.0.0" 1271 | } 1272 | }, 1273 | "word-wrap": { 1274 | "version": "1.2.3", 1275 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 1276 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 1277 | "dev": true 1278 | }, 1279 | "wrappy": { 1280 | "version": "1.0.2", 1281 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1282 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1283 | "dev": true 1284 | }, 1285 | "yallist": { 1286 | "version": "4.0.0", 1287 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1288 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", 1289 | "dev": true 1290 | } 1291 | } 1292 | } 1293 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-diana", 3 | "displayName": "vscode-diana", 4 | "description": "Basic language support for DianaScript", 5 | "version": "0.0.1", 6 | "publisher": "GReSummer", 7 | "private": true, 8 | "license": "MIT", 9 | "icon": "static/icon.png", 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/thautwarm/vscode-diana" 13 | }, 14 | "engines": { 15 | "vscode": "^1.42.0" 16 | }, 17 | "categories": [ 18 | "Other" 19 | ], 20 | "activationEvents": [ 21 | "onLanguage:diana" 22 | ], 23 | "main": "./out/extension.js", 24 | "contributes": { 25 | "languages": [ 26 | { 27 | "id": "diana", 28 | "extensions": [ 29 | ".diana" 30 | ], 31 | "configuration": "./language-configuration.json" 32 | } 33 | ] 34 | }, 35 | "scripts": { 36 | "vscode:prepublish": "npm run compile", 37 | "compile": "tsc -p ./", 38 | "antlr4ts": "antlr4ts -visitor src/DianaScript.g4", 39 | "lint": "eslint . --ext .ts,.tsx", 40 | "watch": "tsc -watch -p ./" 41 | }, 42 | "devDependencies": { 43 | "@types/node": "^12.12.0", 44 | "@types/vscode": "^1.42.0", 45 | "@typescript-eslint/eslint-plugin": "^4.16.0", 46 | "@typescript-eslint/parser": "^4.16.0", 47 | "antlr4ts-cli": "^0.5.0-alpha.4", 48 | "eslint": "^7.21.0", 49 | "typescript": "^4.4.3" 50 | }, 51 | "dependencies": { 52 | "antlr4ts": "^0.5.0-alpha.4" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /sample/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.semanticTokenColorCustomizations": { 3 | "enabled": true, // enable for all themes 4 | } 5 | } -------------------------------------------------------------------------------- /sample/sample.diana: -------------------------------------------------------------------------------- 1 | variable = fun () 2 | var x = 1 3 | x + 1 4 | str = "关注嘉然,顿顿解馋😅" 5 | 0x123 6 | a + b 7 | a + b > c and break 8 | for i in Enum.range(Int.of("10"), 20) do 9 | log(i) 10 | end 11 | end 12 | 13 | workflow { 14 | xpos 0b123 15 | ypos 123 16 | on_click fun (self, pos) 17 | (x, y) = pos 18 | self.xpos = x 19 | self.ypos = x 20 | end 21 | } 22 | -------------------------------------------------------------------------------- /sample/sigs.diana.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "module": "Int", 4 | "doc": "64-bit integer/C# long", 5 | "methods": [ 6 | { 7 | "name": "get_max", 8 | "type": "get_max : () -> Int", 9 | "doc": "get max value of int64" 10 | }, 11 | { 12 | "name": "get_min", 13 | "type": "get_min : () -> Int", 14 | "doc": "get min value of int64" 15 | }, 16 | { 17 | "name": "of", 18 | "type": "of : (Int | Str | Num) -> Int", 19 | "doc": "convert to `Int`, from `Str`, `Int` or `Num`" 20 | } 21 | ] 22 | }, 23 | { 24 | "module": "Num", 25 | "doc": "32-bit float/C# float", 26 | "methods": [ 27 | { 28 | "name": "get_max", 29 | "type": "get_max : () -> Num", 30 | "doc": "get max value of float32" 31 | }, 32 | { 33 | "name": "get_min", 34 | "type": "get_min : () -> Num", 35 | "doc": "get min value of float32" 36 | }, 37 | { 38 | "name": "of", 39 | "type": "of : (Int | Str | Num) -> Num", 40 | "doc": "convert to `Num`, from `Str`, `Int` or `Num`" 41 | } 42 | ] 43 | }, 44 | { 45 | "module": "Str", 46 | "doc": "Unicode-16 strings", 47 | "methods": [ 48 | { 49 | "name": "of", 50 | "type": "of : any -> Str", 51 | "doc": "convert any to `Str`" 52 | }, 53 | { 54 | "name": "join", 55 | "type": "join : (Str, Enum) -> Str" 56 | }, 57 | { 58 | "name": "concat", 59 | "type": "concat : (Enum) -> Str" 60 | }, 61 | { 62 | "name": "endswith", 63 | "type": "endswith : (Str, Str) -> Str" 64 | }, 65 | { 66 | "name": "startswith", 67 | "type": "startswith : (Str, Str) -> Str" 68 | }, 69 | { 70 | "name": "len", 71 | "type": "len : (Str) -> Int" 72 | }, 73 | { 74 | "name": "strip", 75 | "type": "strip : (Str, Str) -> Str" 76 | }, 77 | { 78 | "name": "lstrip", 79 | "type": "lstrip : (Str, Str) -> Str" 80 | }, 81 | { 82 | "name": "rstrip", 83 | "type": "rstrip : (Str, Str) -> Str" 84 | }, 85 | { 86 | "name": "lower", 87 | "type": "lower : (Str) -> Str" 88 | }, 89 | { 90 | "name": "upper", 91 | "type": "upper : (Str) -> Str" 92 | }, 93 | { 94 | "name": "contains", 95 | "type": "contains : (Str) -> Int" 96 | }, 97 | { 98 | "name": "format", 99 | "type": "format : (Str, any...) -> Str" 100 | }, 101 | { 102 | "name": "substr", 103 | "type": "substr : (Str, Int start, Int len) -> Str" 104 | }, 105 | { 106 | "name": "insert", 107 | "type": "insert : (Str, Int pos, Str) -> Str" 108 | }, 109 | { 110 | "name": "remove_at", 111 | "type": "remove_at : (Str, Int pos, Str) -> Str" 112 | }, 113 | { 114 | "name": "index", 115 | "type": "index : (Str, Str, Int? startindex=0, Int? count=1) -> Str" 116 | }, 117 | { 118 | "name": "forkey", 119 | "type": "forkey : (Str, (Int key) -> any)) -> None" 120 | } 121 | ] 122 | }, 123 | { 124 | "module": "Tuple", 125 | "doc": "array of Diana objects; immutable", 126 | "methods": [ 127 | { 128 | "name": "of", 129 | "type": "of : (Enum) -> Tuple", 130 | "doc": "convert any enumerable of diana objects to a tuple" 131 | }, 132 | { 133 | "name": "len", 134 | "type": "len : (Tuple) -> Int" 135 | }, 136 | { 137 | "name": "forkey", 138 | "type": "forkey : (Tuple, (Int key) -> any)) -> None" 139 | } 140 | ] 141 | }, 142 | { 143 | "module": "List", 144 | "doc": "System.Collections.Generic", 145 | "methods": [ 146 | { 147 | "name": "of", 148 | "type": "of : (Enum) -> List" 149 | }, 150 | { 151 | "name": "push", 152 | "type": "push : (List, any) -> None" 153 | }, 154 | { 155 | "name": "pop", 156 | "type": "pop : (List) -> any" 157 | }, 158 | { 159 | "name": "extend", 160 | "type": "extend : (List, Enum) -> None" 161 | }, 162 | { 163 | "name": "clear", 164 | "type": "clear : (List) -> None" 165 | }, 166 | { 167 | "name": "find", 168 | "type": "clear : (List, (any) -> any) -> None", 169 | "doc": "List.find([1, 6, 3], x -> x % 2 == 0)\n# 6\nList.find([1, 6, 3], x -> x > 20)\n# None" 170 | }, 171 | { 172 | "name": "index", 173 | "type": "index : (List, any, Int?) -> Int" 174 | }, 175 | { 176 | "name": "remove_at", 177 | "type": "remove_at : (List, Int) -> None" 178 | }, 179 | { 180 | "name": "forkey", 181 | "type": "forkey : (List, (Int) => any) -> None" 182 | }, 183 | { 184 | "name": "copy" 185 | } 186 | ] 187 | }, 188 | { 189 | "module": "Dict", 190 | "doc": "module for Dictionaries and sets; when converting `Dict` to an enumerable, you get `Dict` keys.", 191 | "methods": [ 192 | { 193 | "name": "of", 194 | "type": "of : (Enum<(any, any)>) -> Dict" 195 | }, 196 | { 197 | "name": "setOf", 198 | "type": "setOf : Enum<(any)> -> Dict" 199 | }, 200 | { 201 | "name": "remove", 202 | "type": "remove : (Dict, key) -> None" 203 | }, 204 | { 205 | "name": "contains" 206 | }, 207 | { 208 | "name": "union" 209 | }, 210 | { 211 | "name": "intersect" 212 | }, 213 | { 214 | "name": "update" 215 | }, 216 | { 217 | "name": "forkey" 218 | }, 219 | { 220 | "name": "copy" 221 | } 222 | ] 223 | }, 224 | { 225 | "module": "Enum", 226 | "doc": "Enumerables", 227 | "methods": [ 228 | { 229 | "name": "foreach" 230 | }, 231 | { 232 | "name": "map" 233 | }, 234 | { 235 | "name": "mapi", 236 | "doc": "the function should take 2 arguements, the first of which is the integer index of the enumerable." 237 | }, 238 | { 239 | "name": "range", 240 | "type": "range : (Int start, Int end, Int sep = 1) -> Enum" 241 | } 242 | ] 243 | } 244 | ] -------------------------------------------------------------------------------- /src/DianaScript.g4: -------------------------------------------------------------------------------- 1 | grammar DianaScript; 2 | options { language = CSharp; } 3 | expr returns [ImmediateAST result] : 4 | '__META' local__2_expr_case0=INT_10 ':' local__4_expr_case0=INT_10 ':' local__6_expr_case0=INT_10 'in' local__8_expr_case0=expr { 5 | ImmediateAST tmp__5 ; 6 | ImmediateAST tmp__4 ; 7 | CommonToken tmp__3 ; 8 | CommonToken tmp__2 ; 9 | CommonToken tmp__1 ; 10 | tmp__1 = ( CommonToken ) _localctx.local__2_expr_case0 ; 11 | tmp__2 = ( CommonToken ) _localctx.local__4_expr_case0 ; 12 | tmp__3 = ( CommonToken ) _localctx.local__6_expr_case0 ; 13 | tmp__4 = ( ImmediateAST ) _localctx.local__8_expr_case0.result ; 14 | tmp__5 = (ImmediateAST) mkMeta( tmp__1.Text, tmp__2.Text, tmp__3.Text, tmp__4 ); 15 | $result = tmp__5; 16 | } 17 | | local__1_expr_case1=or_expr { 18 | ImmediateAST tmp__6 ; 19 | tmp__6 = ( ImmediateAST ) _localctx.local__1_expr_case1.result ; 20 | $result = tmp__6; 21 | } 22 | ; 23 | stmt returns [ImmediateAST result] : 24 | local__1_stmt_case0='raise' local__2_stmt_case0=expr { 25 | ImmediateAST tmp__9 ; 26 | ImmediateAST tmp__8 ; 27 | CommonToken tmp__7 ; 28 | tmp__7 = ( CommonToken ) _localctx.local__1_stmt_case0 ; 29 | tmp__8 = ( ImmediateAST ) _localctx.local__2_stmt_case0.result ; 30 | tmp__9 = (ImmediateAST) mkRaise( tmp__7, tmp__8 ); 31 | $result = tmp__9; 32 | } 33 | | local__1_stmt_case1='__SETMETA' local__2_stmt_case1=INT_10 local__3_stmt_case1=STR_4 { 34 | ImmediateAST tmp__13 ; 35 | CommonToken tmp__12 ; 36 | CommonToken tmp__11 ; 37 | CommonToken tmp__10 ; 38 | tmp__10 = ( CommonToken ) _localctx.local__1_stmt_case1 ; 39 | tmp__11 = ( CommonToken ) _localctx.local__2_stmt_case1 ; 40 | tmp__12 = ( CommonToken ) _localctx.local__3_stmt_case1 ; 41 | tmp__13 = (ImmediateAST) mkSetMeta( tmp__10, tmp__11.Text, tmp__12.Text ); 42 | $result = tmp__13; 43 | } 44 | | '__META' local__2_stmt_case2=INT_10 ':' local__4_stmt_case2=INT_10 ':' local__6_stmt_case2=INT_10 'do' local__8_stmt_case2=stmt { 45 | ImmediateAST tmp__18 ; 46 | ImmediateAST tmp__17 ; 47 | CommonToken tmp__16 ; 48 | CommonToken tmp__15 ; 49 | CommonToken tmp__14 ; 50 | tmp__14 = ( CommonToken ) _localctx.local__2_stmt_case2 ; 51 | tmp__15 = ( CommonToken ) _localctx.local__4_stmt_case2 ; 52 | tmp__16 = ( CommonToken ) _localctx.local__6_stmt_case2 ; 53 | tmp__17 = ( ImmediateAST ) _localctx.local__8_stmt_case2.result ; 54 | tmp__18 = (ImmediateAST) mkMeta( tmp__14.Text, tmp__15.Text, tmp__16.Text, tmp__17 ); 55 | $result = tmp__18; 56 | } 57 | | local__1_stmt_case3=gen__line_wrap_begin local__2_stmt_case3=block gen__line_wrap_end { 58 | ImmediateAST tmp__21 ; 59 | System.Collections.Generic.List tmp__20 ; 60 | CommonToken tmp__19 ; 61 | tmp__19 = ( CommonToken ) _localctx.local__1_stmt_case3.result ; 62 | tmp__20 = ( System.Collections.Generic.List ) _localctx.local__2_stmt_case3.result ; 63 | tmp__21 = (ImmediateAST) mkBlock( tmp__19, tmp__20 ); 64 | $result = tmp__21; 65 | } 66 | | local__1_stmt_case4=lhs_seq local__2_stmt_case4=expr { 67 | ImmediateAST tmp__24 ; 68 | ImmediateAST tmp__23 ; 69 | System.Collections.Generic.List<(ImmediateAST, string)> tmp__22 ; 70 | tmp__22 = ( System.Collections.Generic.List<(ImmediateAST, string)> ) _localctx.local__1_stmt_case4.result ; 71 | tmp__23 = ( ImmediateAST ) _localctx.local__2_stmt_case4.result ; 72 | tmp__24 = (ImmediateAST) mkStoreMany( tmp__22, tmp__23 ); 73 | $result = tmp__24; 74 | } 75 | | local__1_stmt_case5='loop' local__2_stmt_case5=block 'end' { 76 | ImmediateAST tmp__29 ; 77 | ImmediateAST tmp__28 ; 78 | System.Collections.Generic.List tmp__27 ; 79 | CommonToken tmp__26 ; 80 | CommonToken tmp__25 ; 81 | tmp__25 = ( CommonToken ) _localctx.local__1_stmt_case5 ; 82 | tmp__26 = ( CommonToken ) _localctx.local__1_stmt_case5 ; 83 | tmp__27 = ( System.Collections.Generic.List ) _localctx.local__2_stmt_case5.result ; 84 | tmp__28 = (ImmediateAST) mkBlock( tmp__26, tmp__27 ); 85 | tmp__29 = (ImmediateAST) mkLoop( tmp__25, tmp__28 ); 86 | $result = tmp__29; 87 | } 88 | | local__1_stmt_case6='while' local__2_stmt_case6=expr local__3_stmt_case6=gen__blockOf_do 'end' { 89 | ImmediateAST tmp__33 ; 90 | ImmediateAST tmp__32 ; 91 | ImmediateAST tmp__31 ; 92 | CommonToken tmp__30 ; 93 | tmp__30 = ( CommonToken ) _localctx.local__1_stmt_case6 ; 94 | tmp__31 = ( ImmediateAST ) _localctx.local__2_stmt_case6.result ; 95 | tmp__32 = ( ImmediateAST ) _localctx.local__3_stmt_case6.result ; 96 | tmp__33 = (ImmediateAST) mkWhile( tmp__30, tmp__31, tmp__32 ); 97 | $result = tmp__33; 98 | } 99 | | local__1_stmt_case7='for' local__2_stmt_case7=NAME_13 'in' local__4_stmt_case7=expr local__5_stmt_case7=gen__blockOf_do 'end' { 100 | ImmediateAST tmp__38 ; 101 | ImmediateAST tmp__37 ; 102 | ImmediateAST tmp__36 ; 103 | CommonToken tmp__35 ; 104 | CommonToken tmp__34 ; 105 | tmp__34 = ( CommonToken ) _localctx.local__1_stmt_case7 ; 106 | tmp__35 = ( CommonToken ) _localctx.local__2_stmt_case7 ; 107 | tmp__36 = ( ImmediateAST ) _localctx.local__4_stmt_case7.result ; 108 | tmp__37 = ( ImmediateAST ) _localctx.local__5_stmt_case7.result ; 109 | tmp__38 = (ImmediateAST) mkFor( tmp__34, tmp__35.Text, tmp__36, tmp__37 ); 110 | $result = tmp__38; 111 | } 112 | | local__1_stmt_case8='break' { 113 | ImmediateAST tmp__40 ; 114 | CommonToken tmp__39 ; 115 | tmp__39 = ( CommonToken ) _localctx.local__1_stmt_case8 ; 116 | tmp__40 = (ImmediateAST) mkBreak( tmp__39 ); 117 | $result = tmp__40; 118 | } 119 | | local__1_stmt_case9='continue' { 120 | ImmediateAST tmp__42 ; 121 | CommonToken tmp__41 ; 122 | tmp__41 = ( CommonToken ) _localctx.local__1_stmt_case9 ; 123 | tmp__42 = (ImmediateAST) mkContinue( tmp__41 ); 124 | $result = tmp__42; 125 | } 126 | | local__1_stmt_case10='return' local__2_stmt_case10=expr { 127 | ImmediateAST tmp__45 ; 128 | ImmediateAST tmp__44 ; 129 | CommonToken tmp__43 ; 130 | tmp__43 = ( CommonToken ) _localctx.local__1_stmt_case10 ; 131 | tmp__44 = ( ImmediateAST ) _localctx.local__2_stmt_case10.result ; 132 | tmp__45 = (ImmediateAST) mkReturn( tmp__43, tmp__44 ); 133 | $result = tmp__45; 134 | } 135 | | local__1_stmt_case11='return' { 136 | ImmediateAST tmp__47 ; 137 | CommonToken tmp__46 ; 138 | tmp__46 = ( CommonToken ) _localctx.local__1_stmt_case11 ; 139 | tmp__47 = (ImmediateAST) mkReturn( tmp__46, null ); 140 | $result = tmp__47; 141 | } 142 | | local__1_stmt_case12='var' local__2_stmt_case12=gen__seplist__L44__name { 143 | ImmediateAST tmp__50 ; 144 | System.Collections.Generic.List tmp__49 ; 145 | CommonToken tmp__48 ; 146 | tmp__48 = ( CommonToken ) _localctx.local__1_stmt_case12 ; 147 | tmp__49 = ( System.Collections.Generic.List ) _localctx.local__2_stmt_case12.result ; 148 | tmp__50 = (ImmediateAST) mkDecl( tmp__48, tmp__49 ); 149 | $result = tmp__50; 150 | } 151 | | local__1_stmt_case13=expr { 152 | ImmediateAST tmp__51 ; 153 | tmp__51 = ( ImmediateAST ) _localctx.local__1_stmt_case13.result ; 154 | $result = tmp__51; 155 | } 156 | ; 157 | gen__line_wrap_end returns [CommonToken result] : 158 | gen__optional_newline local__2_gen__line_wrap_end_case0='end' gen__optional_newline { 159 | CommonToken tmp__52 ; 160 | tmp__52 = ( CommonToken ) _localctx.local__2_gen__line_wrap_end_case0 ; 161 | $result = tmp__52; 162 | } 163 | ; 164 | gen__optional_newline returns [CommonToken result] : 165 | local__1_gen__optional_newline_case0=newline { 166 | CommonToken tmp__53 ; 167 | tmp__53 = ( CommonToken ) _localctx.local__1_gen__optional_newline_case0.result ; 168 | $result = tmp__53; 169 | } 170 | | { 171 | $result = null; 172 | } 173 | ; 174 | gen__line_wrap_begin returns [CommonToken result] : 175 | gen__optional_newline local__2_gen__line_wrap_begin_case0='begin' gen__optional_newline { 176 | CommonToken tmp__54 ; 177 | tmp__54 = ( CommonToken ) _localctx.local__2_gen__line_wrap_begin_case0 ; 178 | $result = tmp__54; 179 | } 180 | ; 181 | newline returns [CommonToken result] : 182 | local__1_newline_case0=NEWLINE_17 { 183 | CommonToken tmp__55 ; 184 | tmp__55 = ( CommonToken ) _localctx.local__1_newline_case0 ; 185 | $result = tmp__55; 186 | } 187 | | newline local__2_newline_case1=NEWLINE_17 { 188 | CommonToken tmp__56 ; 189 | tmp__56 = ( CommonToken ) _localctx.local__2_newline_case1 ; 190 | $result = tmp__56; 191 | } 192 | ; 193 | atom returns [ImmediateAST result] : 194 | local__1_atom_case0=atom local__2_atom_case0='.' '[' local__4_atom_case0=expr ']' { 195 | ImmediateAST tmp__60 ; 196 | ImmediateAST tmp__59 ; 197 | ImmediateAST tmp__58 ; 198 | CommonToken tmp__57 ; 199 | tmp__57 = ( CommonToken ) _localctx.local__2_atom_case0 ; 200 | tmp__58 = ( ImmediateAST ) _localctx.local__1_atom_case0.result ; 201 | tmp__59 = ( ImmediateAST ) _localctx.local__4_atom_case0.result ; 202 | tmp__60 = (ImmediateAST) mkOGet( tmp__57, tmp__58, tmp__59 ); 203 | $result = tmp__60; 204 | } 205 | | local__1_atom_case1=atom local__2_atom_case1='.' local__3_atom_case1=NAME_13 { 206 | ImmediateAST tmp__67 ; 207 | ImmediateAST tmp__66 ; 208 | DObj tmp__65 ; 209 | CommonToken tmp__64 ; 210 | CommonToken tmp__63 ; 211 | ImmediateAST tmp__62 ; 212 | CommonToken tmp__61 ; 213 | tmp__61 = ( CommonToken ) _localctx.local__2_atom_case1 ; 214 | tmp__62 = ( ImmediateAST ) _localctx.local__1_atom_case1.result ; 215 | tmp__63 = ( CommonToken ) _localctx.local__3_atom_case1 ; 216 | tmp__64 = ( CommonToken ) _localctx.local__3_atom_case1 ; 217 | tmp__65 = (DObj) mkstr( tmp__64.Text ); 218 | tmp__66 = (ImmediateAST) mkVal( tmp__63, tmp__65 ); 219 | tmp__67 = (ImmediateAST) mkOGet( tmp__61, tmp__62, tmp__66 ); 220 | $result = tmp__67; 221 | } 222 | | ':' local__2_atom_case2=NAME_13 { 223 | ImmediateAST tmp__70 ; 224 | CommonToken tmp__69 ; 225 | CommonToken tmp__68 ; 226 | tmp__68 = ( CommonToken ) _localctx.local__2_atom_case2 ; 227 | tmp__69 = ( CommonToken ) _localctx.local__2_atom_case2 ; 228 | tmp__70 = (ImmediateAST) mkSymbol( tmp__68, tmp__69.Text ); 229 | $result = tmp__70; 230 | } 231 | | ':' local__2_atom_case3=STR_4 { 232 | ImmediateAST tmp__74 ; 233 | string tmp__73 ; 234 | CommonToken tmp__72 ; 235 | CommonToken tmp__71 ; 236 | tmp__71 = ( CommonToken ) _localctx.local__2_atom_case3 ; 237 | tmp__72 = ( CommonToken ) _localctx.local__2_atom_case3 ; 238 | tmp__73 = (string) unesc( tmp__72.Text ); 239 | tmp__74 = (ImmediateAST) mkSymbol( tmp__71, tmp__73 ); 240 | $result = tmp__74; 241 | } 242 | | local__1_atom_case4=atom local__2_atom_case4='(' local__3_atom_case4=gen__closelist__L44__expr ')' { 243 | ImmediateAST tmp__78 ; 244 | System.Collections.Generic.List tmp__77 ; 245 | ImmediateAST tmp__76 ; 246 | CommonToken tmp__75 ; 247 | tmp__75 = ( CommonToken ) _localctx.local__2_atom_case4 ; 248 | tmp__76 = ( ImmediateAST ) _localctx.local__1_atom_case4.result ; 249 | tmp__77 = ( System.Collections.Generic.List ) _localctx.local__3_atom_case4.result ; 250 | tmp__78 = (ImmediateAST) mkApp( tmp__75, tmp__76, tmp__77 ); 251 | $result = tmp__78; 252 | } 253 | | local__1_atom_case5='[' local__2_atom_case5=gen__closelist__L44__expr ']' { 254 | ImmediateAST tmp__81 ; 255 | System.Collections.Generic.List tmp__80 ; 256 | CommonToken tmp__79 ; 257 | tmp__79 = ( CommonToken ) _localctx.local__1_atom_case5 ; 258 | tmp__80 = ( System.Collections.Generic.List ) _localctx.local__2_atom_case5.result ; 259 | tmp__81 = (ImmediateAST) mkList( tmp__79, tmp__80 ); 260 | $result = tmp__81; 261 | } 262 | | local__1_atom_case6='(' local__2_atom_case6=gen__closelist__L44__expr local__3_atom_case6=trailer ')' { 263 | ImmediateAST tmp__85 ; 264 | bool tmp__84 ; 265 | System.Collections.Generic.List tmp__83 ; 266 | CommonToken tmp__82 ; 267 | tmp__82 = ( CommonToken ) _localctx.local__1_atom_case6 ; 268 | tmp__83 = ( System.Collections.Generic.List ) _localctx.local__2_atom_case6.result ; 269 | tmp__84 = ( bool ) _localctx.local__3_atom_case6.result ; 270 | tmp__85 = (ImmediateAST) mkTuple( tmp__82, tmp__83, tmp__84 ); 271 | $result = tmp__85; 272 | } 273 | | local__1_atom_case7='{' local__2_atom_case7=gen__closelist__L44__pair trailer '}' { 274 | ImmediateAST tmp__88 ; 275 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__87 ; 276 | CommonToken tmp__86 ; 277 | tmp__86 = ( CommonToken ) _localctx.local__1_atom_case7 ; 278 | tmp__87 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__2_atom_case7.result ; 279 | tmp__88 = (ImmediateAST) mkDict( tmp__86, tmp__87 ); 280 | $result = tmp__88; 281 | } 282 | | local__1_atom_case8='{' local__2_atom_case8=gen__closelist__L44__expr '}' { 283 | ImmediateAST tmp__91 ; 284 | System.Collections.Generic.List tmp__90 ; 285 | CommonToken tmp__89 ; 286 | tmp__89 = ( CommonToken ) _localctx.local__1_atom_case8 ; 287 | tmp__90 = ( System.Collections.Generic.List ) _localctx.local__2_atom_case8.result ; 288 | tmp__91 = (ImmediateAST) mkSet( tmp__89, tmp__90 ); 289 | $result = tmp__91; 290 | } 291 | | local__1_atom_case9=STR_4 { 292 | ImmediateAST tmp__96 ; 293 | DObj tmp__95 ; 294 | string tmp__94 ; 295 | CommonToken tmp__93 ; 296 | CommonToken tmp__92 ; 297 | tmp__92 = ( CommonToken ) _localctx.local__1_atom_case9 ; 298 | tmp__93 = ( CommonToken ) _localctx.local__1_atom_case9 ; 299 | tmp__94 = (string) unesc( tmp__93.Text ); 300 | tmp__95 = (DObj) mkstr( tmp__94 ); 301 | tmp__96 = (ImmediateAST) mkVal( tmp__92, tmp__95 ); 302 | $result = tmp__96; 303 | } 304 | | local__1_atom_case10=INT_10 { 305 | ImmediateAST tmp__101 ; 306 | DObj tmp__100 ; 307 | int tmp__99 ; 308 | CommonToken tmp__98 ; 309 | CommonToken tmp__97 ; 310 | tmp__97 = ( CommonToken ) _localctx.local__1_atom_case10 ; 311 | tmp__98 = ( CommonToken ) _localctx.local__1_atom_case10 ; 312 | tmp__99 = 0 ; 313 | tmp__100 = (DObj) mkint( tmp__98.Text, tmp__99 ); 314 | tmp__101 = (ImmediateAST) mkVal( tmp__97, tmp__100 ); 315 | $result = tmp__101; 316 | } 317 | | local__1_atom_case11=HEX_7 { 318 | ImmediateAST tmp__106 ; 319 | DObj tmp__105 ; 320 | int tmp__104 ; 321 | CommonToken tmp__103 ; 322 | CommonToken tmp__102 ; 323 | tmp__102 = ( CommonToken ) _localctx.local__1_atom_case11 ; 324 | tmp__103 = ( CommonToken ) _localctx.local__1_atom_case11 ; 325 | tmp__104 = 16 ; 326 | tmp__105 = (DObj) mkint( tmp__103.Text, tmp__104 ); 327 | tmp__106 = (ImmediateAST) mkVal( tmp__102, tmp__105 ); 328 | $result = tmp__106; 329 | } 330 | | local__1_atom_case12=OCT_8 { 331 | ImmediateAST tmp__111 ; 332 | DObj tmp__110 ; 333 | int tmp__109 ; 334 | CommonToken tmp__108 ; 335 | CommonToken tmp__107 ; 336 | tmp__107 = ( CommonToken ) _localctx.local__1_atom_case12 ; 337 | tmp__108 = ( CommonToken ) _localctx.local__1_atom_case12 ; 338 | tmp__109 = 8 ; 339 | tmp__110 = (DObj) mkint( tmp__108.Text, tmp__109 ); 340 | tmp__111 = (ImmediateAST) mkVal( tmp__107, tmp__110 ); 341 | $result = tmp__111; 342 | } 343 | | local__1_atom_case13=BIN_9 { 344 | ImmediateAST tmp__116 ; 345 | DObj tmp__115 ; 346 | int tmp__114 ; 347 | CommonToken tmp__113 ; 348 | CommonToken tmp__112 ; 349 | tmp__112 = ( CommonToken ) _localctx.local__1_atom_case13 ; 350 | tmp__113 = ( CommonToken ) _localctx.local__1_atom_case13 ; 351 | tmp__114 = 2 ; 352 | tmp__115 = (DObj) mkint( tmp__113.Text, tmp__114 ); 353 | tmp__116 = (ImmediateAST) mkVal( tmp__112, tmp__115 ); 354 | $result = tmp__116; 355 | } 356 | | local__1_atom_case14=FLOAT_11 { 357 | ImmediateAST tmp__120 ; 358 | DObj tmp__119 ; 359 | CommonToken tmp__118 ; 360 | CommonToken tmp__117 ; 361 | tmp__117 = ( CommonToken ) _localctx.local__1_atom_case14 ; 362 | tmp__118 = ( CommonToken ) _localctx.local__1_atom_case14 ; 363 | tmp__119 = (DObj) mkfloat( tmp__118.Text ); 364 | tmp__120 = (ImmediateAST) mkVal( tmp__117, tmp__119 ); 365 | $result = tmp__120; 366 | } 367 | | local__1_atom_case15='None' { 368 | ImmediateAST tmp__123 ; 369 | DObj tmp__122 ; 370 | CommonToken tmp__121 ; 371 | tmp__121 = ( CommonToken ) _localctx.local__1_atom_case15 ; 372 | tmp__122 = (DObj) mknone( ); 373 | tmp__123 = (ImmediateAST) mkVal( tmp__121, tmp__122 ); 374 | $result = tmp__123; 375 | } 376 | | local__1_atom_case16=NAME_13 { 377 | ImmediateAST tmp__126 ; 378 | CommonToken tmp__125 ; 379 | CommonToken tmp__124 ; 380 | tmp__124 = ( CommonToken ) _localctx.local__1_atom_case16 ; 381 | tmp__125 = ( CommonToken ) _localctx.local__1_atom_case16 ; 382 | tmp__126 = (ImmediateAST) mkVar( tmp__124, tmp__125.Text ); 383 | $result = tmp__126; 384 | } 385 | | local__1_atom_case17='-' local__2_atom_case17=atom { 386 | ImmediateAST tmp__129 ; 387 | ImmediateAST tmp__128 ; 388 | CommonToken tmp__127 ; 389 | tmp__127 = ( CommonToken ) _localctx.local__1_atom_case17 ; 390 | tmp__128 = ( ImmediateAST ) _localctx.local__2_atom_case17.result ; 391 | tmp__129 = (ImmediateAST) mkNeg( tmp__127, tmp__128 ); 392 | $result = tmp__129; 393 | } 394 | | local__1_atom_case18='~' local__2_atom_case18=atom { 395 | ImmediateAST tmp__132 ; 396 | ImmediateAST tmp__131 ; 397 | CommonToken tmp__130 ; 398 | tmp__130 = ( CommonToken ) _localctx.local__1_atom_case18 ; 399 | tmp__131 = ( ImmediateAST ) _localctx.local__2_atom_case18.result ; 400 | tmp__132 = (ImmediateAST) mkInv( tmp__130, tmp__131 ); 401 | $result = tmp__132; 402 | } 403 | | local__1_atom_case19='if' local__2_atom_case19=expr local__3_atom_case19=then local__4_atom_case19=block 'end' { 404 | ImmediateAST tmp__138 ; 405 | ImmediateAST tmp__137 ; 406 | System.Collections.Generic.List tmp__136 ; 407 | CommonToken tmp__135 ; 408 | ImmediateAST tmp__134 ; 409 | CommonToken tmp__133 ; 410 | tmp__133 = ( CommonToken ) _localctx.local__1_atom_case19 ; 411 | tmp__134 = ( ImmediateAST ) _localctx.local__2_atom_case19.result ; 412 | tmp__135 = ( CommonToken ) _localctx.local__3_atom_case19.result ; 413 | tmp__136 = ( System.Collections.Generic.List ) _localctx.local__4_atom_case19.result ; 414 | tmp__137 = (ImmediateAST) mkBlock( tmp__135, tmp__136 ); 415 | tmp__138 = (ImmediateAST) mkIfThen( tmp__133, tmp__134, tmp__137 ); 416 | $result = tmp__138; 417 | } 418 | | local__1_atom_case20='if' local__2_atom_case20=expr local__3_atom_case20=then local__4_atom_case20=block local__5_atom_case20=gen__nullable_gen__list_gen__snd_elif__elifBlock local__6_atom_case20=gen__optional_gen__blockOf_else 'end' { 419 | ImmediateAST tmp__150 ; 420 | ImmediateAST tmp__149 ; 421 | CommonToken tmp__148 ; 422 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> elifs__146 ; 423 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__147 ; 424 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> elifs__144 ; 425 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__145 ; 426 | ImmediateAST tmp__143 ; 427 | System.Collections.Generic.List tmp__142 ; 428 | CommonToken tmp__141 ; 429 | ImmediateAST tmp__140 ; 430 | (ImmediateAST, ImmediateAST) elif__139 ; 431 | tmp__140 = ( ImmediateAST ) _localctx.local__2_atom_case20.result ; 432 | tmp__141 = ( CommonToken ) _localctx.local__3_atom_case20.result ; 433 | tmp__142 = ( System.Collections.Generic.List ) _localctx.local__4_atom_case20.result ; 434 | tmp__143 = (ImmediateAST) mkBlock( tmp__141, tmp__142 ); 435 | elif__139 = ( tmp__140 , tmp__143 ); 436 | tmp__145 = (System.Collections.Generic.List<(ImmediateAST, ImmediateAST)>) empty<(ImmediateAST, ImmediateAST)>( ); 437 | elifs__144 = (System.Collections.Generic.List<(ImmediateAST, ImmediateAST)>) append<(ImmediateAST, ImmediateAST)>( tmp__145, elif__139 ); 438 | tmp__147 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__5_atom_case20.result ; 439 | elifs__146 = (System.Collections.Generic.List<(ImmediateAST, ImmediateAST)>) extend<(ImmediateAST, ImmediateAST)>( elifs__144, tmp__147 ); 440 | tmp__148 = ( CommonToken ) _localctx.local__1_atom_case20 ; 441 | tmp__149 = ( ImmediateAST ) _localctx.local__6_atom_case20.result ; 442 | tmp__150 = (ImmediateAST) mkNestedIf( tmp__148, elifs__144, tmp__149 ); 443 | $result = tmp__150; 444 | } 445 | | local__1_atom_case21='fun' local__2_atom_case21=name '(' local__4_atom_case21=gen__nullable_gen__seplist__L44__name ')' local__6_atom_case21=block 'end' { 446 | ImmediateAST tmp__155 ; 447 | System.Collections.Generic.List tmp__154 ; 448 | System.Collections.Generic.List tmp__153 ; 449 | string tmp__152 ; 450 | CommonToken tmp__151 ; 451 | tmp__151 = ( CommonToken ) _localctx.local__1_atom_case21 ; 452 | tmp__152 = ( string ) _localctx.local__2_atom_case21.result ; 453 | tmp__153 = ( System.Collections.Generic.List ) _localctx.local__4_atom_case21.result ; 454 | tmp__154 = ( System.Collections.Generic.List ) _localctx.local__6_atom_case21.result ; 455 | tmp__155 = (ImmediateAST) mkFunc( tmp__151, tmp__152, tmp__153, tmp__154 ); 456 | $result = tmp__155; 457 | } 458 | | local__1_atom_case22='fun' '(' local__3_atom_case22=gen__nullable_gen__seplist__L44__name ')' local__5_atom_case22=block 'end' { 459 | ImmediateAST tmp__160 ; 460 | System.Collections.Generic.List tmp__159 ; 461 | System.Collections.Generic.List tmp__158 ; 462 | string tmp__157 ; 463 | CommonToken tmp__156 ; 464 | tmp__156 = ( CommonToken ) _localctx.local__1_atom_case22 ; 465 | tmp__157 = "" ; 466 | tmp__158 = ( System.Collections.Generic.List ) _localctx.local__3_atom_case22.result ; 467 | tmp__159 = ( System.Collections.Generic.List ) _localctx.local__5_atom_case22.result ; 468 | tmp__160 = (ImmediateAST) mkFunc( tmp__156, tmp__157, tmp__158, tmp__159 ); 469 | $result = tmp__160; 470 | } 471 | | local__1_atom_case23='(' local__2_atom_case23=gen__nullable_gen__seplist__L44__name ')' '->' local__5_atom_case23=gen__line_wrap_expr { 472 | ImmediateAST tmp__166 ; 473 | ImmediateAST tmp__165 ; 474 | System.Collections.Generic.List tmp__164 ; 475 | System.Collections.Generic.List tmp__163 ; 476 | string tmp__162 ; 477 | CommonToken tmp__161 ; 478 | tmp__161 = ( CommonToken ) _localctx.local__1_atom_case23 ; 479 | tmp__162 = "" ; 480 | tmp__163 = ( System.Collections.Generic.List ) _localctx.local__2_atom_case23.result ; 481 | tmp__165 = ( ImmediateAST ) _localctx.local__5_atom_case23.result ; 482 | tmp__164 = new System.Collections.Generic.List { tmp__165 }; 483 | tmp__166 = (ImmediateAST) mkFunc( tmp__161, tmp__162, tmp__163, tmp__164 ); 484 | $result = tmp__166; 485 | } 486 | | local__1_atom_case24=NAME_13 '->' local__3_atom_case24=gen__line_wrap_expr { 487 | ImmediateAST tmp__173 ; 488 | ImmediateAST tmp__172 ; 489 | System.Collections.Generic.List tmp__171 ; 490 | CommonToken tmp__170 ; 491 | System.Collections.Generic.List tmp__169 ; 492 | string tmp__168 ; 493 | CommonToken tmp__167 ; 494 | tmp__167 = ( CommonToken ) _localctx.local__1_atom_case24 ; 495 | tmp__168 = "" ; 496 | tmp__170 = ( CommonToken ) _localctx.local__1_atom_case24 ; 497 | tmp__169 = new System.Collections.Generic.List { tmp__170.Text }; 498 | tmp__172 = ( ImmediateAST ) _localctx.local__3_atom_case24.result ; 499 | tmp__171 = new System.Collections.Generic.List { tmp__172 }; 500 | tmp__173 = (ImmediateAST) mkFunc( tmp__167, tmp__168, tmp__169, tmp__171 ); 501 | $result = tmp__173; 502 | } 503 | ; 504 | gen__line_wrap_expr returns [ImmediateAST result] : 505 | gen__optional_newline local__2_gen__line_wrap_expr_case0=expr gen__optional_newline { 506 | ImmediateAST tmp__174 ; 507 | tmp__174 = ( ImmediateAST ) _localctx.local__2_gen__line_wrap_expr_case0.result ; 508 | $result = tmp__174; 509 | } 510 | ; 511 | gen__nullable_gen__seplist__L44__name returns [System.Collections.Generic.List result] : 512 | local__1_gen__nullable_gen__seplist__L44__name_case0=gen__seplist__L44__name { 513 | System.Collections.Generic.List tmp__175 ; 514 | tmp__175 = ( System.Collections.Generic.List ) _localctx.local__1_gen__nullable_gen__seplist__L44__name_case0.result ; 515 | $result = tmp__175; 516 | } 517 | | { 518 | System.Collections.Generic.List tmp__176 ; 519 | tmp__176 = (System.Collections.Generic.List) empty( ); 520 | $result = tmp__176; 521 | } 522 | ; 523 | gen__seplist__L44__name returns [System.Collections.Generic.List result] : 524 | local__1_gen__seplist__L44__name_case0=name { 525 | string tmp__178 ; 526 | System.Collections.Generic.List tmp__177 ; 527 | tmp__178 = ( string ) _localctx.local__1_gen__seplist__L44__name_case0.result ; 528 | tmp__177 = new System.Collections.Generic.List { tmp__178 }; 529 | $result = tmp__177; 530 | } 531 | | local__1_gen__seplist__L44__name_case1=gen__seplist__L44__name ',' local__3_gen__seplist__L44__name_case1=name { 532 | System.Collections.Generic.List tmp__181 ; 533 | string tmp__180 ; 534 | System.Collections.Generic.List tmp__179 ; 535 | tmp__179 = ( System.Collections.Generic.List ) _localctx.local__1_gen__seplist__L44__name_case1.result ; 536 | tmp__180 = ( string ) _localctx.local__3_gen__seplist__L44__name_case1.result ; 537 | tmp__181 = (System.Collections.Generic.List) append( tmp__179, tmp__180 ); 538 | $result = tmp__181; 539 | } 540 | ; 541 | gen__optional_gen__blockOf_else returns [ImmediateAST result] : 542 | local__1_gen__optional_gen__blockOf_else_case0=gen__blockOf_else { 543 | ImmediateAST tmp__182 ; 544 | tmp__182 = ( ImmediateAST ) _localctx.local__1_gen__optional_gen__blockOf_else_case0.result ; 545 | $result = tmp__182; 546 | } 547 | | { 548 | $result = null; 549 | } 550 | ; 551 | gen__blockOf_else returns [ImmediateAST result] : 552 | local__1_gen__blockOf_else_case0='else' local__2_gen__blockOf_else_case0=block { 553 | ImmediateAST tmp__185 ; 554 | System.Collections.Generic.List tmp__184 ; 555 | CommonToken tmp__183 ; 556 | tmp__183 = ( CommonToken ) _localctx.local__1_gen__blockOf_else_case0 ; 557 | tmp__184 = ( System.Collections.Generic.List ) _localctx.local__2_gen__blockOf_else_case0.result ; 558 | tmp__185 = (ImmediateAST) mkBlock( tmp__183, tmp__184 ); 559 | $result = tmp__185; 560 | } 561 | ; 562 | gen__nullable_gen__list_gen__snd_elif__elifBlock returns [System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> result] : 563 | local__1_gen__nullable_gen__list_gen__snd_elif__elifBlock_case0=gen__list_gen__snd_elif__elifBlock { 564 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__186 ; 565 | tmp__186 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__1_gen__nullable_gen__list_gen__snd_elif__elifBlock_case0.result ; 566 | $result = tmp__186; 567 | } 568 | | { 569 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__187 ; 570 | tmp__187 = (System.Collections.Generic.List<(ImmediateAST, ImmediateAST)>) empty<(ImmediateAST, ImmediateAST)>( ); 571 | $result = tmp__187; 572 | } 573 | ; 574 | gen__list_gen__snd_elif__elifBlock returns [System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> result] : 575 | local__1_gen__list_gen__snd_elif__elifBlock_case0=gen__snd_elif__elifBlock { 576 | (ImmediateAST, ImmediateAST) tmp__189 ; 577 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__188 ; 578 | tmp__189 = ( (ImmediateAST, ImmediateAST) ) _localctx.local__1_gen__list_gen__snd_elif__elifBlock_case0.result ; 579 | tmp__188 = new System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> { tmp__189 }; 580 | $result = tmp__188; 581 | } 582 | | local__1_gen__list_gen__snd_elif__elifBlock_case1=gen__list_gen__snd_elif__elifBlock local__2_gen__list_gen__snd_elif__elifBlock_case1=gen__snd_elif__elifBlock { 583 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__192 ; 584 | (ImmediateAST, ImmediateAST) tmp__191 ; 585 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__190 ; 586 | tmp__190 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__1_gen__list_gen__snd_elif__elifBlock_case1.result ; 587 | tmp__191 = ( (ImmediateAST, ImmediateAST) ) _localctx.local__2_gen__list_gen__snd_elif__elifBlock_case1.result ; 588 | tmp__192 = (System.Collections.Generic.List<(ImmediateAST, ImmediateAST)>) append<(ImmediateAST, ImmediateAST)>( tmp__190, tmp__191 ); 589 | $result = tmp__192; 590 | } 591 | ; 592 | gen__snd_elif__elifBlock returns [(ImmediateAST, ImmediateAST) result] : 593 | 'elif' local__2_gen__snd_elif__elifBlock_case0=elifBlock { 594 | (ImmediateAST, ImmediateAST) tmp__193 ; 595 | tmp__193 = ( (ImmediateAST, ImmediateAST) ) _localctx.local__2_gen__snd_elif__elifBlock_case0.result ; 596 | $result = tmp__193; 597 | } 598 | ; 599 | gen__closelist__L44__pair returns [System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> result] : 600 | gen__optional_newline local__2_gen__closelist__L44__pair_case0=gen___closelist__L44__pair { 601 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__194 ; 602 | tmp__194 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__2_gen__closelist__L44__pair_case0.result ; 603 | $result = tmp__194; 604 | } 605 | ; 606 | gen___closelist__L44__pair returns [System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> result] : 607 | local__1_gen___closelist__L44__pair_case0=gen___closelist__L44__pair newline { 608 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__195 ; 609 | tmp__195 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__1_gen___closelist__L44__pair_case0.result ; 610 | $result = tmp__195; 611 | } 612 | | local__1_gen___closelist__L44__pair_case1=gen___closelist__L44__pair ',' newline local__4_gen___closelist__L44__pair_case1=pair { 613 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__198 ; 614 | (ImmediateAST, ImmediateAST) tmp__197 ; 615 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__196 ; 616 | tmp__196 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__1_gen___closelist__L44__pair_case1.result ; 617 | tmp__197 = ( (ImmediateAST, ImmediateAST) ) _localctx.local__4_gen___closelist__L44__pair_case1.result ; 618 | tmp__198 = (System.Collections.Generic.List<(ImmediateAST, ImmediateAST)>) append<(ImmediateAST, ImmediateAST)>( tmp__196, tmp__197 ); 619 | $result = tmp__198; 620 | } 621 | | local__1_gen___closelist__L44__pair_case2=gen___closelist__L44__pair ',' local__3_gen___closelist__L44__pair_case2=pair { 622 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__201 ; 623 | (ImmediateAST, ImmediateAST) tmp__200 ; 624 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__199 ; 625 | tmp__199 = ( System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> ) _localctx.local__1_gen___closelist__L44__pair_case2.result ; 626 | tmp__200 = ( (ImmediateAST, ImmediateAST) ) _localctx.local__3_gen___closelist__L44__pair_case2.result ; 627 | tmp__201 = (System.Collections.Generic.List<(ImmediateAST, ImmediateAST)>) append<(ImmediateAST, ImmediateAST)>( tmp__199, tmp__200 ); 628 | $result = tmp__201; 629 | } 630 | | local__1_gen___closelist__L44__pair_case3=pair { 631 | (ImmediateAST, ImmediateAST) tmp__203 ; 632 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__202 ; 633 | tmp__203 = ( (ImmediateAST, ImmediateAST) ) _localctx.local__1_gen___closelist__L44__pair_case3.result ; 634 | tmp__202 = new System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> { tmp__203 }; 635 | $result = tmp__202; 636 | } 637 | | { 638 | System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> tmp__204 ; 639 | tmp__204 = new System.Collections.Generic.List<(ImmediateAST, ImmediateAST)> { }; 640 | $result = tmp__204; 641 | } 642 | ; 643 | gen__closelist__L44__expr returns [System.Collections.Generic.List result] : 644 | gen__optional_newline local__2_gen__closelist__L44__expr_case0=gen___closelist__L44__expr { 645 | System.Collections.Generic.List tmp__205 ; 646 | tmp__205 = ( System.Collections.Generic.List ) _localctx.local__2_gen__closelist__L44__expr_case0.result ; 647 | $result = tmp__205; 648 | } 649 | ; 650 | gen___closelist__L44__expr returns [System.Collections.Generic.List result] : 651 | local__1_gen___closelist__L44__expr_case0=gen___closelist__L44__expr newline { 652 | System.Collections.Generic.List tmp__206 ; 653 | tmp__206 = ( System.Collections.Generic.List ) _localctx.local__1_gen___closelist__L44__expr_case0.result ; 654 | $result = tmp__206; 655 | } 656 | | local__1_gen___closelist__L44__expr_case1=gen___closelist__L44__expr ',' newline local__4_gen___closelist__L44__expr_case1=expr { 657 | System.Collections.Generic.List tmp__209 ; 658 | ImmediateAST tmp__208 ; 659 | System.Collections.Generic.List tmp__207 ; 660 | tmp__207 = ( System.Collections.Generic.List ) _localctx.local__1_gen___closelist__L44__expr_case1.result ; 661 | tmp__208 = ( ImmediateAST ) _localctx.local__4_gen___closelist__L44__expr_case1.result ; 662 | tmp__209 = (System.Collections.Generic.List) append( tmp__207, tmp__208 ); 663 | $result = tmp__209; 664 | } 665 | | local__1_gen___closelist__L44__expr_case2=gen___closelist__L44__expr ',' local__3_gen___closelist__L44__expr_case2=expr { 666 | System.Collections.Generic.List tmp__212 ; 667 | ImmediateAST tmp__211 ; 668 | System.Collections.Generic.List tmp__210 ; 669 | tmp__210 = ( System.Collections.Generic.List ) _localctx.local__1_gen___closelist__L44__expr_case2.result ; 670 | tmp__211 = ( ImmediateAST ) _localctx.local__3_gen___closelist__L44__expr_case2.result ; 671 | tmp__212 = (System.Collections.Generic.List) append( tmp__210, tmp__211 ); 672 | $result = tmp__212; 673 | } 674 | | local__1_gen___closelist__L44__expr_case3=expr { 675 | ImmediateAST tmp__214 ; 676 | System.Collections.Generic.List tmp__213 ; 677 | tmp__214 = ( ImmediateAST ) _localctx.local__1_gen___closelist__L44__expr_case3.result ; 678 | tmp__213 = new System.Collections.Generic.List { tmp__214 }; 679 | $result = tmp__213; 680 | } 681 | | { 682 | System.Collections.Generic.List tmp__215 ; 683 | tmp__215 = new System.Collections.Generic.List { }; 684 | $result = tmp__215; 685 | } 686 | ; 687 | pair returns [(ImmediateAST, ImmediateAST) result] : 688 | local__1_pair_case0=expr gen__line_wrap__L58 local__3_pair_case0=expr { 689 | ImmediateAST tmp__218 ; 690 | ImmediateAST tmp__217 ; 691 | (ImmediateAST, ImmediateAST) tmp__216 ; 692 | tmp__217 = ( ImmediateAST ) _localctx.local__1_pair_case0.result ; 693 | tmp__218 = ( ImmediateAST ) _localctx.local__3_pair_case0.result ; 694 | tmp__216 = ( tmp__217 , tmp__218 ); 695 | $result = tmp__216; 696 | } 697 | ; 698 | gen__line_wrap__L58 returns [CommonToken result] : 699 | gen__optional_newline local__2_gen__line_wrap__L58_case0=':' gen__optional_newline { 700 | CommonToken tmp__219 ; 701 | tmp__219 = ( CommonToken ) _localctx.local__2_gen__line_wrap__L58_case0 ; 702 | $result = tmp__219; 703 | } 704 | ; 705 | trailer returns [bool result] : 706 | ',' { 707 | $result = true; 708 | } 709 | | { 710 | $result = false; 711 | } 712 | ; 713 | bin returns [ImmediateAST result] : 714 | local__1_bin_case0=binseq { 715 | ImmediateAST tmp__221 ; 716 | System.Collections.Generic.List tmp__220 ; 717 | tmp__220 = ( System.Collections.Generic.List ) _localctx.local__1_bin_case0.result ; 718 | tmp__221 = (ImmediateAST) resolve_binop( tmp__220 ); 719 | $result = tmp__221; 720 | } 721 | ; 722 | binseq returns [System.Collections.Generic.List result] : 723 | local__1_binseq_case0=atom { 724 | System.Collections.Generic.List tmp__225 ; 725 | object tmp__224 ; 726 | ImmediateAST tmp__223 ; 727 | System.Collections.Generic.List tmp__222 ; 728 | tmp__222 = (System.Collections.Generic.List) empty( ); 729 | tmp__223 = ( ImmediateAST ) _localctx.local__1_binseq_case0.result ; 730 | tmp__224 = (object) to_obj( tmp__223 ); 731 | tmp__225 = (System.Collections.Generic.List) append( tmp__222, tmp__224 ); 732 | $result = tmp__225; 733 | } 734 | | local__1_binseq_case1=binseq local__2_binseq_case1=binop local__3_binseq_case1=atom { 735 | object tmp__231 ; 736 | ImmediateAST tmp__230 ; 737 | System.Collections.Generic.List tmp__229 ; 738 | System.Collections.Generic.List block__226 ; 739 | object tmp__228 ; 740 | System.Collections.Generic.List tmp__227 ; 741 | tmp__227 = ( System.Collections.Generic.List ) _localctx.local__1_binseq_case1.result ; 742 | tmp__228 = ( object ) _localctx.local__2_binseq_case1.result ; 743 | block__226 = (System.Collections.Generic.List) append( tmp__227, tmp__228 ); 744 | tmp__229 = ( System.Collections.Generic.List ) _localctx.local__1_binseq_case1.result ; 745 | tmp__230 = ( ImmediateAST ) _localctx.local__3_binseq_case1.result ; 746 | tmp__231 = (object) to_obj( tmp__230 ); 747 | block__226 = (System.Collections.Generic.List) append( tmp__229, tmp__231 ); 748 | $result = block__226; 749 | } 750 | ; 751 | ibinop returns [string result] : 752 | local__1_ibinop_case0=SINGLE_BINOP_2 { 753 | CommonToken tmp__232 ; 754 | tmp__232 = ( CommonToken ) _localctx.local__1_ibinop_case0 ; 755 | $result = tmp__232.Text; 756 | } 757 | | '-' { 758 | string tmp__233 ; 759 | tmp__233 = "-" ; 760 | $result = tmp__233; 761 | } 762 | ; 763 | binop returns [object result] : 764 | local__1_binop_case0=SINGLE_BINOP_2 { 765 | object tmp__236 ; 766 | CommonToken tmp__235 ; 767 | CommonToken tmp__234 ; 768 | tmp__234 = ( CommonToken ) _localctx.local__1_binop_case0 ; 769 | tmp__235 = ( CommonToken ) _localctx.local__1_binop_case0 ; 770 | tmp__236 = (object) mkop( tmp__234, tmp__235.Text ); 771 | $result = tmp__236; 772 | } 773 | | local__1_binop_case1='not' 'in' { 774 | object tmp__239 ; 775 | string tmp__238 ; 776 | CommonToken tmp__237 ; 777 | tmp__237 = ( CommonToken ) _localctx.local__1_binop_case1 ; 778 | tmp__238 = "notin" ; 779 | tmp__239 = (object) mkop( tmp__237, tmp__238 ); 780 | $result = tmp__239; 781 | } 782 | | local__1_binop_case2='in' { 783 | object tmp__242 ; 784 | string tmp__241 ; 785 | CommonToken tmp__240 ; 786 | tmp__240 = ( CommonToken ) _localctx.local__1_binop_case2 ; 787 | tmp__241 = "in" ; 788 | tmp__242 = (object) mkop( tmp__240, tmp__241 ); 789 | $result = tmp__242; 790 | } 791 | | local__1_binop_case3='-' { 792 | object tmp__245 ; 793 | string tmp__244 ; 794 | CommonToken tmp__243 ; 795 | tmp__243 = ( CommonToken ) _localctx.local__1_binop_case3 ; 796 | tmp__244 = "-" ; 797 | tmp__245 = (object) mkop( tmp__243, tmp__244 ); 798 | $result = tmp__245; 799 | } 800 | ; 801 | not returns [ImmediateAST result] : 802 | local__1_not_case0=gen__line_wrap_not local__2_not_case0=not { 803 | ImmediateAST tmp__248 ; 804 | ImmediateAST tmp__247 ; 805 | CommonToken tmp__246 ; 806 | tmp__246 = ( CommonToken ) _localctx.local__1_not_case0.result ; 807 | tmp__247 = ( ImmediateAST ) _localctx.local__2_not_case0.result ; 808 | tmp__248 = (ImmediateAST) mkNot( tmp__246, tmp__247 ); 809 | $result = tmp__248; 810 | } 811 | | local__1_not_case1=bin { 812 | ImmediateAST tmp__249 ; 813 | tmp__249 = ( ImmediateAST ) _localctx.local__1_not_case1.result ; 814 | $result = tmp__249; 815 | } 816 | ; 817 | gen__line_wrap_not returns [CommonToken result] : 818 | gen__optional_newline local__2_gen__line_wrap_not_case0='not' gen__optional_newline { 819 | CommonToken tmp__250 ; 820 | tmp__250 = ( CommonToken ) _localctx.local__2_gen__line_wrap_not_case0 ; 821 | $result = tmp__250; 822 | } 823 | ; 824 | and_expr returns [ImmediateAST result] : 825 | local__1_and_expr_case0=and_expr local__2_and_expr_case0=gen__line_wrap_and local__3_and_expr_case0=not { 826 | ImmediateAST tmp__254 ; 827 | ImmediateAST tmp__253 ; 828 | ImmediateAST tmp__252 ; 829 | CommonToken tmp__251 ; 830 | tmp__251 = ( CommonToken ) _localctx.local__2_and_expr_case0.result ; 831 | tmp__252 = ( ImmediateAST ) _localctx.local__1_and_expr_case0.result ; 832 | tmp__253 = ( ImmediateAST ) _localctx.local__3_and_expr_case0.result ; 833 | tmp__254 = (ImmediateAST) mkAnd( tmp__251, tmp__252, tmp__253 ); 834 | $result = tmp__254; 835 | } 836 | | local__1_and_expr_case1=not { 837 | ImmediateAST tmp__255 ; 838 | tmp__255 = ( ImmediateAST ) _localctx.local__1_and_expr_case1.result ; 839 | $result = tmp__255; 840 | } 841 | ; 842 | gen__line_wrap_and returns [CommonToken result] : 843 | gen__optional_newline local__2_gen__line_wrap_and_case0='and' gen__optional_newline { 844 | CommonToken tmp__256 ; 845 | tmp__256 = ( CommonToken ) _localctx.local__2_gen__line_wrap_and_case0 ; 846 | $result = tmp__256; 847 | } 848 | ; 849 | or_expr returns [ImmediateAST result] : 850 | local__1_or_expr_case0=or_expr local__2_or_expr_case0=gen__line_wrap_or local__3_or_expr_case0=and_expr { 851 | ImmediateAST tmp__260 ; 852 | ImmediateAST tmp__259 ; 853 | ImmediateAST tmp__258 ; 854 | CommonToken tmp__257 ; 855 | tmp__257 = ( CommonToken ) _localctx.local__2_or_expr_case0.result ; 856 | tmp__258 = ( ImmediateAST ) _localctx.local__1_or_expr_case0.result ; 857 | tmp__259 = ( ImmediateAST ) _localctx.local__3_or_expr_case0.result ; 858 | tmp__260 = (ImmediateAST) mkOr( tmp__257, tmp__258, tmp__259 ); 859 | $result = tmp__260; 860 | } 861 | | local__1_or_expr_case1=and_expr { 862 | ImmediateAST tmp__261 ; 863 | tmp__261 = ( ImmediateAST ) _localctx.local__1_or_expr_case1.result ; 864 | $result = tmp__261; 865 | } 866 | ; 867 | gen__line_wrap_or returns [CommonToken result] : 868 | gen__optional_newline local__2_gen__line_wrap_or_case0='or' gen__optional_newline { 869 | CommonToken tmp__262 ; 870 | tmp__262 = ( CommonToken ) _localctx.local__2_gen__line_wrap_or_case0 ; 871 | $result = tmp__262; 872 | } 873 | ; 874 | block returns [System.Collections.Generic.List result] : 875 | local__1_block_case0=gen__filter_stmt__gen__or___L59__newline { 876 | System.Collections.Generic.List tmp__263 ; 877 | tmp__263 = ( System.Collections.Generic.List ) _localctx.local__1_block_case0.result ; 878 | $result = tmp__263; 879 | } 880 | ; 881 | gen__filter_stmt__gen__or___L59__newline returns [System.Collections.Generic.List result] : 882 | local__1_gen__filter_stmt__gen__or___L59__newline_case0=gen__filter_stmt__gen__or___L59__newline local__2_gen__filter_stmt__gen__or___L59__newline_case0=stmt { 883 | System.Collections.Generic.List tmp__266 ; 884 | ImmediateAST tmp__265 ; 885 | System.Collections.Generic.List tmp__264 ; 886 | tmp__264 = ( System.Collections.Generic.List ) _localctx.local__1_gen__filter_stmt__gen__or___L59__newline_case0.result ; 887 | tmp__265 = ( ImmediateAST ) _localctx.local__2_gen__filter_stmt__gen__or___L59__newline_case0.result ; 888 | tmp__266 = (System.Collections.Generic.List) append( tmp__264, tmp__265 ); 889 | $result = tmp__266; 890 | } 891 | | local__1_gen__filter_stmt__gen__or___L59__newline_case1=gen__filter_stmt__gen__or___L59__newline gen__or___L59__newline { 892 | System.Collections.Generic.List tmp__267 ; 893 | tmp__267 = ( System.Collections.Generic.List ) _localctx.local__1_gen__filter_stmt__gen__or___L59__newline_case1.result ; 894 | $result = tmp__267; 895 | } 896 | | local__1_gen__filter_stmt__gen__or___L59__newline_case2=stmt { 897 | System.Collections.Generic.List tmp__270 ; 898 | ImmediateAST tmp__269 ; 899 | System.Collections.Generic.List tmp__268 ; 900 | tmp__268 = (System.Collections.Generic.List) empty( ); 901 | tmp__269 = ( ImmediateAST ) _localctx.local__1_gen__filter_stmt__gen__or___L59__newline_case2.result ; 902 | tmp__270 = (System.Collections.Generic.List) append( tmp__268, tmp__269 ); 903 | $result = tmp__270; 904 | } 905 | | gen__or___L59__newline { 906 | System.Collections.Generic.List tmp__271 ; 907 | tmp__271 = (System.Collections.Generic.List) empty( ); 908 | $result = tmp__271; 909 | } 910 | ; 911 | gen__or___L59__newline returns [int result] : 912 | ';' { 913 | int tmp__272 ; 914 | tmp__272 = 0 ; 915 | $result = tmp__272; 916 | } 917 | | newline { 918 | int tmp__273 ; 919 | tmp__273 = 0 ; 920 | $result = tmp__273; 921 | } 922 | ; 923 | lhs returns [ImmediateAST result] : 924 | local__1_lhs_case0=NAME_13 { 925 | ImmediateAST tmp__276 ; 926 | CommonToken tmp__275 ; 927 | CommonToken tmp__274 ; 928 | tmp__274 = ( CommonToken ) _localctx.local__1_lhs_case0 ; 929 | tmp__275 = ( CommonToken ) _localctx.local__1_lhs_case0 ; 930 | tmp__276 = (ImmediateAST) mkVar( tmp__274, tmp__275.Text ); 931 | $result = tmp__276; 932 | } 933 | | local__1_lhs_case1=atom local__2_lhs_case1='.' '[' local__4_lhs_case1=expr ']' { 934 | ImmediateAST tmp__280 ; 935 | ImmediateAST tmp__279 ; 936 | ImmediateAST tmp__278 ; 937 | CommonToken tmp__277 ; 938 | tmp__277 = ( CommonToken ) _localctx.local__2_lhs_case1 ; 939 | tmp__278 = ( ImmediateAST ) _localctx.local__1_lhs_case1.result ; 940 | tmp__279 = ( ImmediateAST ) _localctx.local__4_lhs_case1.result ; 941 | tmp__280 = (ImmediateAST) mkOGet( tmp__277, tmp__278, tmp__279 ); 942 | $result = tmp__280; 943 | } 944 | | local__1_lhs_case2=atom local__2_lhs_case2='.' local__3_lhs_case2=NAME_13 { 945 | ImmediateAST tmp__287 ; 946 | ImmediateAST tmp__286 ; 947 | DObj tmp__285 ; 948 | CommonToken tmp__284 ; 949 | CommonToken tmp__283 ; 950 | ImmediateAST tmp__282 ; 951 | CommonToken tmp__281 ; 952 | tmp__281 = ( CommonToken ) _localctx.local__2_lhs_case2 ; 953 | tmp__282 = ( ImmediateAST ) _localctx.local__1_lhs_case2.result ; 954 | tmp__283 = ( CommonToken ) _localctx.local__3_lhs_case2 ; 955 | tmp__284 = ( CommonToken ) _localctx.local__3_lhs_case2 ; 956 | tmp__285 = (DObj) mkstr( tmp__284.Text ); 957 | tmp__286 = (ImmediateAST) mkVal( tmp__283, tmp__285 ); 958 | tmp__287 = (ImmediateAST) mkOGet( tmp__281, tmp__282, tmp__286 ); 959 | $result = tmp__287; 960 | } 961 | ; 962 | do returns [CommonToken result] : 963 | gen__optional_newline local__2_do_case0='do' { 964 | CommonToken tmp__288 ; 965 | tmp__288 = ( CommonToken ) _localctx.local__2_do_case0 ; 966 | $result = tmp__288; 967 | } 968 | ; 969 | then returns [CommonToken result] : 970 | gen__optional_newline local__2_then_case0='then' { 971 | CommonToken tmp__289 ; 972 | tmp__289 = ( CommonToken ) _localctx.local__2_then_case0 ; 973 | $result = tmp__289; 974 | } 975 | ; 976 | gen__blockOf_do returns [ImmediateAST result] : 977 | local__1_gen__blockOf_do_case0=do local__2_gen__blockOf_do_case0=block { 978 | ImmediateAST tmp__292 ; 979 | System.Collections.Generic.List tmp__291 ; 980 | CommonToken tmp__290 ; 981 | tmp__290 = ( CommonToken ) _localctx.local__1_gen__blockOf_do_case0.result ; 982 | tmp__291 = ( System.Collections.Generic.List ) _localctx.local__2_gen__blockOf_do_case0.result ; 983 | tmp__292 = (ImmediateAST) mkBlock( tmp__290, tmp__291 ); 984 | $result = tmp__292; 985 | } 986 | ; 987 | name returns [string result] : 988 | local__1_name_case0=NAME_13 { 989 | CommonToken tmp__293 ; 990 | tmp__293 = ( CommonToken ) _localctx.local__1_name_case0 ; 991 | $result = tmp__293.Text; 992 | } 993 | ; 994 | elifBlock returns [(ImmediateAST, ImmediateAST) result] : 995 | local__1_elifBlock_case0=expr local__2_elifBlock_case0=gen__blockOf_then { 996 | ImmediateAST tmp__296 ; 997 | ImmediateAST tmp__295 ; 998 | (ImmediateAST, ImmediateAST) tmp__294 ; 999 | tmp__295 = ( ImmediateAST ) _localctx.local__1_elifBlock_case0.result ; 1000 | tmp__296 = ( ImmediateAST ) _localctx.local__2_elifBlock_case0.result ; 1001 | tmp__294 = ( tmp__295 , tmp__296 ); 1002 | $result = tmp__294; 1003 | } 1004 | ; 1005 | gen__blockOf_then returns [ImmediateAST result] : 1006 | local__1_gen__blockOf_then_case0=then local__2_gen__blockOf_then_case0=block { 1007 | ImmediateAST tmp__299 ; 1008 | System.Collections.Generic.List tmp__298 ; 1009 | CommonToken tmp__297 ; 1010 | tmp__297 = ( CommonToken ) _localctx.local__1_gen__blockOf_then_case0.result ; 1011 | tmp__298 = ( System.Collections.Generic.List ) _localctx.local__2_gen__blockOf_then_case0.result ; 1012 | tmp__299 = (ImmediateAST) mkBlock( tmp__297, tmp__298 ); 1013 | $result = tmp__299; 1014 | } 1015 | ; 1016 | lhs_seq returns [System.Collections.Generic.List<(ImmediateAST, string)> result] : 1017 | local__1_lhs_seq_case0=lhs_seq local__2_lhs_seq_case0=lhs local__3_lhs_seq_case0=gen__optional_ibinop '=' { 1018 | System.Collections.Generic.List<(ImmediateAST, string)> tmp__304 ; 1019 | string tmp__303 ; 1020 | ImmediateAST tmp__302 ; 1021 | (ImmediateAST, string) tmp__301 ; 1022 | System.Collections.Generic.List<(ImmediateAST, string)> tmp__300 ; 1023 | tmp__300 = ( System.Collections.Generic.List<(ImmediateAST, string)> ) _localctx.local__1_lhs_seq_case0.result ; 1024 | tmp__302 = ( ImmediateAST ) _localctx.local__2_lhs_seq_case0.result ; 1025 | tmp__303 = ( string ) _localctx.local__3_lhs_seq_case0.result ; 1026 | tmp__301 = ( tmp__302 , tmp__303 ); 1027 | tmp__304 = (System.Collections.Generic.List<(ImmediateAST, string)>) append<(ImmediateAST, string)>( tmp__300, tmp__301 ); 1028 | $result = tmp__304; 1029 | } 1030 | | local__1_lhs_seq_case1=lhs local__2_lhs_seq_case1=gen__optional_ibinop '=' { 1031 | string tmp__308 ; 1032 | ImmediateAST tmp__307 ; 1033 | (ImmediateAST, string) tmp__306 ; 1034 | System.Collections.Generic.List<(ImmediateAST, string)> tmp__305 ; 1035 | tmp__307 = ( ImmediateAST ) _localctx.local__1_lhs_seq_case1.result ; 1036 | tmp__308 = ( string ) _localctx.local__2_lhs_seq_case1.result ; 1037 | tmp__306 = ( tmp__307 , tmp__308 ); 1038 | tmp__305 = new System.Collections.Generic.List<(ImmediateAST, string)> { tmp__306 }; 1039 | $result = tmp__305; 1040 | } 1041 | ; 1042 | gen__optional_ibinop returns [string result] : 1043 | local__1_gen__optional_ibinop_case0=ibinop { 1044 | string tmp__309 ; 1045 | tmp__309 = ( string ) _localctx.local__1_gen__optional_ibinop_case0.result ; 1046 | $result = tmp__309; 1047 | } 1048 | | { 1049 | $result = null; 1050 | } 1051 | ; 1052 | start returns [System.Collections.Generic.List result] : 1053 | gen__optional_newline local__2_start_case0=gen__nullable_gen__seplist_newline__stmt gen__optional_newline EOF { 1054 | System.Collections.Generic.List tmp__310 ; 1055 | tmp__310 = ( System.Collections.Generic.List ) _localctx.local__2_start_case0.result ; 1056 | $result = tmp__310; 1057 | } 1058 | ; 1059 | gen__nullable_gen__seplist_newline__stmt returns [System.Collections.Generic.List result] : 1060 | local__1_gen__nullable_gen__seplist_newline__stmt_case0=gen__seplist_newline__stmt { 1061 | System.Collections.Generic.List tmp__311 ; 1062 | tmp__311 = ( System.Collections.Generic.List ) _localctx.local__1_gen__nullable_gen__seplist_newline__stmt_case0.result ; 1063 | $result = tmp__311; 1064 | } 1065 | | { 1066 | System.Collections.Generic.List tmp__312 ; 1067 | tmp__312 = (System.Collections.Generic.List) empty( ); 1068 | $result = tmp__312; 1069 | } 1070 | ; 1071 | gen__seplist_newline__stmt returns [System.Collections.Generic.List result] : 1072 | local__1_gen__seplist_newline__stmt_case0=stmt { 1073 | ImmediateAST tmp__314 ; 1074 | System.Collections.Generic.List tmp__313 ; 1075 | tmp__314 = ( ImmediateAST ) _localctx.local__1_gen__seplist_newline__stmt_case0.result ; 1076 | tmp__313 = new System.Collections.Generic.List { tmp__314 }; 1077 | $result = tmp__313; 1078 | } 1079 | | local__1_gen__seplist_newline__stmt_case1=gen__seplist_newline__stmt newline local__3_gen__seplist_newline__stmt_case1=stmt { 1080 | System.Collections.Generic.List tmp__317 ; 1081 | ImmediateAST tmp__316 ; 1082 | System.Collections.Generic.List tmp__315 ; 1083 | tmp__315 = ( System.Collections.Generic.List ) _localctx.local__1_gen__seplist_newline__stmt_case1.result ; 1084 | tmp__316 = ( ImmediateAST ) _localctx.local__3_gen__seplist_newline__stmt_case1.result ; 1085 | tmp__317 = (System.Collections.Generic.List) append( tmp__315, tmp__316 ); 1086 | $result = tmp__317; 1087 | } 1088 | ; 1089 | 1090 | 1091 | COMMENT_1 : '#' (~('\n'|'\r'))* -> skip; 1092 | SINGLE_BINOP_2 : ('<'|'>'|'>' '='|'<' '='|'=' '='|'!' '='|'+'|'*'|'*' '*'|'/'|'/' '/'|'%'|'&'|'|'|'<' '<'|'>' '>'); 1093 | fragment ESCAPED_QUOTE_3 : '\\' '"'; 1094 | STR_4 : '"' (ESCAPED_QUOTE_3|~'"')* '"'; 1095 | fragment WS_5 : ('\r'|'\t'|'\n'|' '); 1096 | INT_10 : (DIGIT_6+|HEX_7|OCT_8|BIN_9); 1097 | HEX_7 : '0' 'x' ([\u0030-\u0039]|[\u0061-\u0066])*; 1098 | OCT_8 : '0' 'o' [\u0030-\u0037]*; 1099 | BIN_9 : '0' 'b' [\u0030-\u0031]*; 1100 | fragment DIGIT_6 : [\u0030-\u0039]; 1101 | FLOAT_11 : INT_10 '.' INT_10; 1102 | fragment UCODE_12 : [\u0061-\u007A]|[\u0041-\u005A]|'_'|[\u4e00-\u9fa5]|'☆'; 1103 | NAME_13 : UCODE_12 (DIGIT_6|UCODE_12)*; 1104 | WS_INLINE_14 : (' '|'\t')+ -> skip; 1105 | fragment CR_15 : '\r'; 1106 | fragment LF_16 : '\n'; 1107 | NEWLINE_17 : (CR_15? LF_16)+ (WS_INLINE_14|(CR_15? LF_16))*; 1108 | 1109 | 1110 | -------------------------------------------------------------------------------- /src/DianaScript.interp: -------------------------------------------------------------------------------- 1 | token literal names: 2 | null 3 | '__META' 4 | ':' 5 | 'in' 6 | 'raise' 7 | '__SETMETA' 8 | 'do' 9 | 'loop' 10 | 'end' 11 | 'while' 12 | 'for' 13 | 'break' 14 | 'continue' 15 | 'return' 16 | 'var' 17 | 'begin' 18 | '.' 19 | '[' 20 | ']' 21 | '(' 22 | ')' 23 | '{' 24 | '}' 25 | 'None' 26 | '-' 27 | '~' 28 | 'if' 29 | 'fun' 30 | '->' 31 | ',' 32 | 'else' 33 | 'elif' 34 | 'not' 35 | 'and' 36 | 'or' 37 | ';' 38 | 'then' 39 | '=' 40 | null 41 | null 42 | null 43 | null 44 | null 45 | null 46 | null 47 | null 48 | null 49 | null 50 | null 51 | 52 | token symbolic names: 53 | null 54 | null 55 | null 56 | null 57 | null 58 | null 59 | null 60 | null 61 | null 62 | null 63 | null 64 | null 65 | null 66 | null 67 | null 68 | null 69 | null 70 | null 71 | null 72 | null 73 | null 74 | null 75 | null 76 | null 77 | null 78 | null 79 | null 80 | null 81 | null 82 | null 83 | null 84 | null 85 | null 86 | null 87 | null 88 | null 89 | null 90 | null 91 | COMMENT_1 92 | SINGLE_BINOP_2 93 | STR_4 94 | INT_10 95 | HEX_7 96 | OCT_8 97 | BIN_9 98 | FLOAT_11 99 | NAME_13 100 | WS_INLINE_14 101 | NEWLINE_17 102 | 103 | rule names: 104 | expr 105 | stmt 106 | gen__line_wrap_end 107 | gen__optional_newline 108 | gen__line_wrap_begin 109 | newline 110 | atom 111 | gen__line_wrap_expr 112 | gen__nullable_gen__seplist__L44__name 113 | gen__seplist__L44__name 114 | gen__optional_gen__blockOf_else 115 | gen__blockOf_else 116 | gen__nullable_gen__list_gen__snd_elif__elifBlock 117 | gen__list_gen__snd_elif__elifBlock 118 | gen__snd_elif__elifBlock 119 | gen__closelist__L44__pair 120 | gen___closelist__L44__pair 121 | gen__closelist__L44__expr 122 | gen___closelist__L44__expr 123 | pair 124 | gen__line_wrap__L58 125 | trailer 126 | bin 127 | binseq 128 | ibinop 129 | binop 130 | not 131 | gen__line_wrap_not 132 | and_expr 133 | gen__line_wrap_and 134 | or_expr 135 | gen__line_wrap_or 136 | block 137 | gen__filter_stmt__gen__or___L59__newline 138 | gen__or___L59__newline 139 | lhs 140 | do 141 | then 142 | gen__blockOf_do 143 | name 144 | elifBlock 145 | gen__blockOf_then 146 | lhs_seq 147 | gen__optional_ibinop 148 | start 149 | gen__nullable_gen__seplist_newline__stmt 150 | gen__seplist_newline__stmt 151 | 152 | 153 | atn: 154 | [3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 50, 668, 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, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 110, 10, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 175, 10, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 186, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 200, 10, 7, 12, 7, 14, 7, 203, 11, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 303, 10, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 322, 10, 8, 12, 8, 14, 8, 325, 11, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 336, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 347, 10, 11, 12, 11, 14, 11, 350, 11, 11, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 356, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 366, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 7, 15, 376, 10, 15, 12, 15, 14, 15, 379, 11, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 394, 10, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 411, 10, 18, 12, 18, 14, 18, 414, 11, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 5, 20, 425, 10, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 442, 10, 20, 12, 20, 14, 20, 445, 11, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 5, 23, 460, 10, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 7, 25, 474, 10, 25, 12, 25, 14, 25, 477, 11, 25, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 483, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 494, 10, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 503, 10, 28, 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, 7, 30, 519, 10, 30, 12, 30, 14, 30, 522, 11, 30, 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, 7, 32, 538, 10, 32, 12, 32, 14, 32, 541, 11, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 558, 10, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 7, 35, 568, 10, 35, 12, 35, 14, 35, 571, 11, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 578, 10, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 5, 37, 594, 10, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 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, 44, 3, 44, 3, 44, 3, 44, 7, 44, 631, 10, 44, 12, 44, 14, 44, 634, 11, 44, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 640, 10, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 5, 47, 652, 10, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 7, 48, 663, 10, 48, 12, 48, 14, 48, 666, 11, 48, 3, 48, 2, 2, 14, 12, 14, 20, 28, 34, 38, 48, 58, 62, 68, 86, 94, 49, 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, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2, 72, 2, 74, 2, 76, 2, 78, 2, 80, 2, 82, 2, 84, 2, 86, 2, 88, 2, 90, 2, 92, 2, 94, 2, 2, 2, 2, 692, 2, 109, 3, 2, 2, 2, 4, 174, 3, 2, 2, 2, 6, 176, 3, 2, 2, 2, 8, 185, 3, 2, 2, 2, 10, 187, 3, 2, 2, 2, 12, 192, 3, 2, 2, 2, 14, 302, 3, 2, 2, 2, 16, 326, 3, 2, 2, 2, 18, 335, 3, 2, 2, 2, 20, 337, 3, 2, 2, 2, 22, 355, 3, 2, 2, 2, 24, 357, 3, 2, 2, 2, 26, 365, 3, 2, 2, 2, 28, 367, 3, 2, 2, 2, 30, 380, 3, 2, 2, 2, 32, 384, 3, 2, 2, 2, 34, 393, 3, 2, 2, 2, 36, 415, 3, 2, 2, 2, 38, 424, 3, 2, 2, 2, 40, 446, 3, 2, 2, 2, 42, 451, 3, 2, 2, 2, 44, 459, 3, 2, 2, 2, 46, 461, 3, 2, 2, 2, 48, 464, 3, 2, 2, 2, 50, 482, 3, 2, 2, 2, 52, 493, 3, 2, 2, 2, 54, 502, 3, 2, 2, 2, 56, 504, 3, 2, 2, 2, 58, 509, 3, 2, 2, 2, 60, 523, 3, 2, 2, 2, 62, 528, 3, 2, 2, 2, 64, 542, 3, 2, 2, 2, 66, 547, 3, 2, 2, 2, 68, 557, 3, 2, 2, 2, 70, 577, 3, 2, 2, 2, 72, 593, 3, 2, 2, 2, 74, 595, 3, 2, 2, 2, 76, 599, 3, 2, 2, 2, 78, 603, 3, 2, 2, 2, 80, 607, 3, 2, 2, 2, 82, 610, 3, 2, 2, 2, 84, 614, 3, 2, 2, 2, 86, 618, 3, 2, 2, 2, 88, 639, 3, 2, 2, 2, 90, 641, 3, 2, 2, 2, 92, 651, 3, 2, 2, 2, 94, 653, 3, 2, 2, 2, 96, 97, 7, 3, 2, 2, 97, 98, 7, 43, 2, 2, 98, 99, 7, 4, 2, 2, 99, 100, 7, 43, 2, 2, 100, 101, 7, 4, 2, 2, 101, 102, 7, 43, 2, 2, 102, 103, 7, 5, 2, 2, 103, 104, 5, 2, 2, 2, 104, 105, 8, 2, 1, 2, 105, 110, 3, 2, 2, 2, 106, 107, 5, 62, 32, 2, 107, 108, 8, 2, 1, 2, 108, 110, 3, 2, 2, 2, 109, 96, 3, 2, 2, 2, 109, 106, 3, 2, 2, 2, 110, 3, 3, 2, 2, 2, 111, 112, 7, 6, 2, 2, 112, 113, 5, 2, 2, 2, 113, 114, 8, 3, 1, 2, 114, 175, 3, 2, 2, 2, 115, 116, 7, 7, 2, 2, 116, 117, 7, 43, 2, 2, 117, 118, 7, 42, 2, 2, 118, 175, 8, 3, 1, 2, 119, 120, 7, 3, 2, 2, 120, 121, 7, 43, 2, 2, 121, 122, 7, 4, 2, 2, 122, 123, 7, 43, 2, 2, 123, 124, 7, 4, 2, 2, 124, 125, 7, 43, 2, 2, 125, 126, 7, 8, 2, 2, 126, 127, 5, 4, 3, 2, 127, 128, 8, 3, 1, 2, 128, 175, 3, 2, 2, 2, 129, 130, 5, 10, 6, 2, 130, 131, 5, 66, 34, 2, 131, 132, 5, 6, 4, 2, 132, 133, 8, 3, 1, 2, 133, 175, 3, 2, 2, 2, 134, 135, 5, 86, 44, 2, 135, 136, 5, 2, 2, 2, 136, 137, 8, 3, 1, 2, 137, 175, 3, 2, 2, 2, 138, 139, 7, 9, 2, 2, 139, 140, 5, 66, 34, 2, 140, 141, 7, 10, 2, 2, 141, 142, 8, 3, 1, 2, 142, 175, 3, 2, 2, 2, 143, 144, 7, 11, 2, 2, 144, 145, 5, 2, 2, 2, 145, 146, 5, 78, 40, 2, 146, 147, 7, 10, 2, 2, 147, 148, 8, 3, 1, 2, 148, 175, 3, 2, 2, 2, 149, 150, 7, 12, 2, 2, 150, 151, 7, 48, 2, 2, 151, 152, 7, 5, 2, 2, 152, 153, 5, 2, 2, 2, 153, 154, 5, 78, 40, 2, 154, 155, 7, 10, 2, 2, 155, 156, 8, 3, 1, 2, 156, 175, 3, 2, 2, 2, 157, 158, 7, 13, 2, 2, 158, 175, 8, 3, 1, 2, 159, 160, 7, 14, 2, 2, 160, 175, 8, 3, 1, 2, 161, 162, 7, 15, 2, 2, 162, 163, 5, 2, 2, 2, 163, 164, 8, 3, 1, 2, 164, 175, 3, 2, 2, 2, 165, 166, 7, 15, 2, 2, 166, 175, 8, 3, 1, 2, 167, 168, 7, 16, 2, 2, 168, 169, 5, 20, 11, 2, 169, 170, 8, 3, 1, 2, 170, 175, 3, 2, 2, 2, 171, 172, 5, 2, 2, 2, 172, 173, 8, 3, 1, 2, 173, 175, 3, 2, 2, 2, 174, 111, 3, 2, 2, 2, 174, 115, 3, 2, 2, 2, 174, 119, 3, 2, 2, 2, 174, 129, 3, 2, 2, 2, 174, 134, 3, 2, 2, 2, 174, 138, 3, 2, 2, 2, 174, 143, 3, 2, 2, 2, 174, 149, 3, 2, 2, 2, 174, 157, 3, 2, 2, 2, 174, 159, 3, 2, 2, 2, 174, 161, 3, 2, 2, 2, 174, 165, 3, 2, 2, 2, 174, 167, 3, 2, 2, 2, 174, 171, 3, 2, 2, 2, 175, 5, 3, 2, 2, 2, 176, 177, 5, 8, 5, 2, 177, 178, 7, 10, 2, 2, 178, 179, 5, 8, 5, 2, 179, 180, 8, 4, 1, 2, 180, 7, 3, 2, 2, 2, 181, 182, 5, 12, 7, 2, 182, 183, 8, 5, 1, 2, 183, 186, 3, 2, 2, 2, 184, 186, 8, 5, 1, 2, 185, 181, 3, 2, 2, 2, 185, 184, 3, 2, 2, 2, 186, 9, 3, 2, 2, 2, 187, 188, 5, 8, 5, 2, 188, 189, 7, 17, 2, 2, 189, 190, 5, 8, 5, 2, 190, 191, 8, 6, 1, 2, 191, 11, 3, 2, 2, 2, 192, 193, 8, 7, 1, 2, 193, 194, 7, 50, 2, 2, 194, 195, 8, 7, 1, 2, 195, 201, 3, 2, 2, 2, 196, 197, 12, 3, 2, 2, 197, 198, 7, 50, 2, 2, 198, 200, 8, 7, 1, 2, 199, 196, 3, 2, 2, 2, 200, 203, 3, 2, 2, 2, 201, 199, 3, 2, 2, 2, 201, 202, 3, 2, 2, 2, 202, 13, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 204, 205, 8, 8, 1, 2, 205, 206, 7, 4, 2, 2, 206, 207, 7, 48, 2, 2, 207, 303, 8, 8, 1, 2, 208, 209, 7, 4, 2, 2, 209, 210, 7, 42, 2, 2, 210, 303, 8, 8, 1, 2, 211, 212, 7, 19, 2, 2, 212, 213, 5, 36, 19, 2, 213, 214, 7, 20, 2, 2, 214, 215, 8, 8, 1, 2, 215, 303, 3, 2, 2, 2, 216, 217, 7, 21, 2, 2, 217, 218, 5, 36, 19, 2, 218, 219, 5, 44, 23, 2, 219, 220, 7, 22, 2, 2, 220, 221, 8, 8, 1, 2, 221, 303, 3, 2, 2, 2, 222, 223, 7, 23, 2, 2, 223, 224, 5, 32, 17, 2, 224, 225, 5, 44, 23, 2, 225, 226, 7, 24, 2, 2, 226, 227, 8, 8, 1, 2, 227, 303, 3, 2, 2, 2, 228, 229, 7, 23, 2, 2, 229, 230, 5, 36, 19, 2, 230, 231, 7, 24, 2, 2, 231, 232, 8, 8, 1, 2, 232, 303, 3, 2, 2, 2, 233, 234, 7, 42, 2, 2, 234, 303, 8, 8, 1, 2, 235, 236, 7, 43, 2, 2, 236, 303, 8, 8, 1, 2, 237, 238, 7, 44, 2, 2, 238, 303, 8, 8, 1, 2, 239, 240, 7, 45, 2, 2, 240, 303, 8, 8, 1, 2, 241, 242, 7, 46, 2, 2, 242, 303, 8, 8, 1, 2, 243, 244, 7, 47, 2, 2, 244, 303, 8, 8, 1, 2, 245, 246, 7, 25, 2, 2, 246, 303, 8, 8, 1, 2, 247, 248, 7, 48, 2, 2, 248, 303, 8, 8, 1, 2, 249, 250, 7, 26, 2, 2, 250, 251, 5, 14, 8, 10, 251, 252, 8, 8, 1, 2, 252, 303, 3, 2, 2, 2, 253, 254, 7, 27, 2, 2, 254, 255, 5, 14, 8, 9, 255, 256, 8, 8, 1, 2, 256, 303, 3, 2, 2, 2, 257, 258, 7, 28, 2, 2, 258, 259, 5, 2, 2, 2, 259, 260, 5, 76, 39, 2, 260, 261, 5, 66, 34, 2, 261, 262, 7, 10, 2, 2, 262, 263, 8, 8, 1, 2, 263, 303, 3, 2, 2, 2, 264, 265, 7, 28, 2, 2, 265, 266, 5, 2, 2, 2, 266, 267, 5, 76, 39, 2, 267, 268, 5, 66, 34, 2, 268, 269, 5, 26, 14, 2, 269, 270, 5, 22, 12, 2, 270, 271, 7, 10, 2, 2, 271, 272, 8, 8, 1, 2, 272, 303, 3, 2, 2, 2, 273, 274, 7, 29, 2, 2, 274, 275, 5, 80, 41, 2, 275, 276, 7, 21, 2, 2, 276, 277, 5, 18, 10, 2, 277, 278, 7, 22, 2, 2, 278, 279, 5, 66, 34, 2, 279, 280, 7, 10, 2, 2, 280, 281, 8, 8, 1, 2, 281, 303, 3, 2, 2, 2, 282, 283, 7, 29, 2, 2, 283, 284, 7, 21, 2, 2, 284, 285, 5, 18, 10, 2, 285, 286, 7, 22, 2, 2, 286, 287, 5, 66, 34, 2, 287, 288, 7, 10, 2, 2, 288, 289, 8, 8, 1, 2, 289, 303, 3, 2, 2, 2, 290, 291, 7, 21, 2, 2, 291, 292, 5, 18, 10, 2, 292, 293, 7, 22, 2, 2, 293, 294, 7, 30, 2, 2, 294, 295, 5, 16, 9, 2, 295, 296, 8, 8, 1, 2, 296, 303, 3, 2, 2, 2, 297, 298, 7, 48, 2, 2, 298, 299, 7, 30, 2, 2, 299, 300, 5, 16, 9, 2, 300, 301, 8, 8, 1, 2, 301, 303, 3, 2, 2, 2, 302, 204, 3, 2, 2, 2, 302, 208, 3, 2, 2, 2, 302, 211, 3, 2, 2, 2, 302, 216, 3, 2, 2, 2, 302, 222, 3, 2, 2, 2, 302, 228, 3, 2, 2, 2, 302, 233, 3, 2, 2, 2, 302, 235, 3, 2, 2, 2, 302, 237, 3, 2, 2, 2, 302, 239, 3, 2, 2, 2, 302, 241, 3, 2, 2, 2, 302, 243, 3, 2, 2, 2, 302, 245, 3, 2, 2, 2, 302, 247, 3, 2, 2, 2, 302, 249, 3, 2, 2, 2, 302, 253, 3, 2, 2, 2, 302, 257, 3, 2, 2, 2, 302, 264, 3, 2, 2, 2, 302, 273, 3, 2, 2, 2, 302, 282, 3, 2, 2, 2, 302, 290, 3, 2, 2, 2, 302, 297, 3, 2, 2, 2, 303, 323, 3, 2, 2, 2, 304, 305, 12, 27, 2, 2, 305, 306, 7, 18, 2, 2, 306, 307, 7, 19, 2, 2, 307, 308, 5, 2, 2, 2, 308, 309, 7, 20, 2, 2, 309, 310, 8, 8, 1, 2, 310, 322, 3, 2, 2, 2, 311, 312, 12, 26, 2, 2, 312, 313, 7, 18, 2, 2, 313, 314, 7, 48, 2, 2, 314, 322, 8, 8, 1, 2, 315, 316, 12, 23, 2, 2, 316, 317, 7, 21, 2, 2, 317, 318, 5, 36, 19, 2, 318, 319, 7, 22, 2, 2, 319, 320, 8, 8, 1, 2, 320, 322, 3, 2, 2, 2, 321, 304, 3, 2, 2, 2, 321, 311, 3, 2, 2, 2, 321, 315, 3, 2, 2, 2, 322, 325, 3, 2, 2, 2, 323, 321, 3, 2, 2, 2, 323, 324, 3, 2, 2, 2, 324, 15, 3, 2, 2, 2, 325, 323, 3, 2, 2, 2, 326, 327, 5, 8, 5, 2, 327, 328, 5, 2, 2, 2, 328, 329, 5, 8, 5, 2, 329, 330, 8, 9, 1, 2, 330, 17, 3, 2, 2, 2, 331, 332, 5, 20, 11, 2, 332, 333, 8, 10, 1, 2, 333, 336, 3, 2, 2, 2, 334, 336, 8, 10, 1, 2, 335, 331, 3, 2, 2, 2, 335, 334, 3, 2, 2, 2, 336, 19, 3, 2, 2, 2, 337, 338, 8, 11, 1, 2, 338, 339, 5, 80, 41, 2, 339, 340, 8, 11, 1, 2, 340, 348, 3, 2, 2, 2, 341, 342, 12, 3, 2, 2, 342, 343, 7, 31, 2, 2, 343, 344, 5, 80, 41, 2, 344, 345, 8, 11, 1, 2, 345, 347, 3, 2, 2, 2, 346, 341, 3, 2, 2, 2, 347, 350, 3, 2, 2, 2, 348, 346, 3, 2, 2, 2, 348, 349, 3, 2, 2, 2, 349, 21, 3, 2, 2, 2, 350, 348, 3, 2, 2, 2, 351, 352, 5, 24, 13, 2, 352, 353, 8, 12, 1, 2, 353, 356, 3, 2, 2, 2, 354, 356, 8, 12, 1, 2, 355, 351, 3, 2, 2, 2, 355, 354, 3, 2, 2, 2, 356, 23, 3, 2, 2, 2, 357, 358, 7, 32, 2, 2, 358, 359, 5, 66, 34, 2, 359, 360, 8, 13, 1, 2, 360, 25, 3, 2, 2, 2, 361, 362, 5, 28, 15, 2, 362, 363, 8, 14, 1, 2, 363, 366, 3, 2, 2, 2, 364, 366, 8, 14, 1, 2, 365, 361, 3, 2, 2, 2, 365, 364, 3, 2, 2, 2, 366, 27, 3, 2, 2, 2, 367, 368, 8, 15, 1, 2, 368, 369, 5, 30, 16, 2, 369, 370, 8, 15, 1, 2, 370, 377, 3, 2, 2, 2, 371, 372, 12, 3, 2, 2, 372, 373, 5, 30, 16, 2, 373, 374, 8, 15, 1, 2, 374, 376, 3, 2, 2, 2, 375, 371, 3, 2, 2, 2, 376, 379, 3, 2, 2, 2, 377, 375, 3, 2, 2, 2, 377, 378, 3, 2, 2, 2, 378, 29, 3, 2, 2, 2, 379, 377, 3, 2, 2, 2, 380, 381, 7, 33, 2, 2, 381, 382, 5, 82, 42, 2, 382, 383, 8, 16, 1, 2, 383, 31, 3, 2, 2, 2, 384, 385, 5, 8, 5, 2, 385, 386, 5, 34, 18, 2, 386, 387, 8, 17, 1, 2, 387, 33, 3, 2, 2, 2, 388, 389, 8, 18, 1, 2, 389, 390, 5, 40, 21, 2, 390, 391, 8, 18, 1, 2, 391, 394, 3, 2, 2, 2, 392, 394, 8, 18, 1, 2, 393, 388, 3, 2, 2, 2, 393, 392, 3, 2, 2, 2, 394, 412, 3, 2, 2, 2, 395, 396, 12, 7, 2, 2, 396, 397, 5, 12, 7, 2, 397, 398, 8, 18, 1, 2, 398, 411, 3, 2, 2, 2, 399, 400, 12, 6, 2, 2, 400, 401, 7, 31, 2, 2, 401, 402, 5, 12, 7, 2, 402, 403, 5, 40, 21, 2, 403, 404, 8, 18, 1, 2, 404, 411, 3, 2, 2, 2, 405, 406, 12, 5, 2, 2, 406, 407, 7, 31, 2, 2, 407, 408, 5, 40, 21, 2, 408, 409, 8, 18, 1, 2, 409, 411, 3, 2, 2, 2, 410, 395, 3, 2, 2, 2, 410, 399, 3, 2, 2, 2, 410, 405, 3, 2, 2, 2, 411, 414, 3, 2, 2, 2, 412, 410, 3, 2, 2, 2, 412, 413, 3, 2, 2, 2, 413, 35, 3, 2, 2, 2, 414, 412, 3, 2, 2, 2, 415, 416, 5, 8, 5, 2, 416, 417, 5, 38, 20, 2, 417, 418, 8, 19, 1, 2, 418, 37, 3, 2, 2, 2, 419, 420, 8, 20, 1, 2, 420, 421, 5, 2, 2, 2, 421, 422, 8, 20, 1, 2, 422, 425, 3, 2, 2, 2, 423, 425, 8, 20, 1, 2, 424, 419, 3, 2, 2, 2, 424, 423, 3, 2, 2, 2, 425, 443, 3, 2, 2, 2, 426, 427, 12, 7, 2, 2, 427, 428, 5, 12, 7, 2, 428, 429, 8, 20, 1, 2, 429, 442, 3, 2, 2, 2, 430, 431, 12, 6, 2, 2, 431, 432, 7, 31, 2, 2, 432, 433, 5, 12, 7, 2, 433, 434, 5, 2, 2, 2, 434, 435, 8, 20, 1, 2, 435, 442, 3, 2, 2, 2, 436, 437, 12, 5, 2, 2, 437, 438, 7, 31, 2, 2, 438, 439, 5, 2, 2, 2, 439, 440, 8, 20, 1, 2, 440, 442, 3, 2, 2, 2, 441, 426, 3, 2, 2, 2, 441, 430, 3, 2, 2, 2, 441, 436, 3, 2, 2, 2, 442, 445, 3, 2, 2, 2, 443, 441, 3, 2, 2, 2, 443, 444, 3, 2, 2, 2, 444, 39, 3, 2, 2, 2, 445, 443, 3, 2, 2, 2, 446, 447, 5, 2, 2, 2, 447, 448, 5, 42, 22, 2, 448, 449, 5, 2, 2, 2, 449, 450, 8, 21, 1, 2, 450, 41, 3, 2, 2, 2, 451, 452, 5, 8, 5, 2, 452, 453, 7, 4, 2, 2, 453, 454, 5, 8, 5, 2, 454, 455, 8, 22, 1, 2, 455, 43, 3, 2, 2, 2, 456, 457, 7, 31, 2, 2, 457, 460, 8, 23, 1, 2, 458, 460, 8, 23, 1, 2, 459, 456, 3, 2, 2, 2, 459, 458, 3, 2, 2, 2, 460, 45, 3, 2, 2, 2, 461, 462, 5, 48, 25, 2, 462, 463, 8, 24, 1, 2, 463, 47, 3, 2, 2, 2, 464, 465, 8, 25, 1, 2, 465, 466, 5, 14, 8, 2, 466, 467, 8, 25, 1, 2, 467, 475, 3, 2, 2, 2, 468, 469, 12, 3, 2, 2, 469, 470, 5, 52, 27, 2, 470, 471, 5, 14, 8, 2, 471, 472, 8, 25, 1, 2, 472, 474, 3, 2, 2, 2, 473, 468, 3, 2, 2, 2, 474, 477, 3, 2, 2, 2, 475, 473, 3, 2, 2, 2, 475, 476, 3, 2, 2, 2, 476, 49, 3, 2, 2, 2, 477, 475, 3, 2, 2, 2, 478, 479, 7, 41, 2, 2, 479, 483, 8, 26, 1, 2, 480, 481, 7, 26, 2, 2, 481, 483, 8, 26, 1, 2, 482, 478, 3, 2, 2, 2, 482, 480, 3, 2, 2, 2, 483, 51, 3, 2, 2, 2, 484, 485, 7, 41, 2, 2, 485, 494, 8, 27, 1, 2, 486, 487, 7, 34, 2, 2, 487, 488, 7, 5, 2, 2, 488, 494, 8, 27, 1, 2, 489, 490, 7, 5, 2, 2, 490, 494, 8, 27, 1, 2, 491, 492, 7, 26, 2, 2, 492, 494, 8, 27, 1, 2, 493, 484, 3, 2, 2, 2, 493, 486, 3, 2, 2, 2, 493, 489, 3, 2, 2, 2, 493, 491, 3, 2, 2, 2, 494, 53, 3, 2, 2, 2, 495, 496, 5, 56, 29, 2, 496, 497, 5, 54, 28, 2, 497, 498, 8, 28, 1, 2, 498, 503, 3, 2, 2, 2, 499, 500, 5, 46, 24, 2, 500, 501, 8, 28, 1, 2, 501, 503, 3, 2, 2, 2, 502, 495, 3, 2, 2, 2, 502, 499, 3, 2, 2, 2, 503, 55, 3, 2, 2, 2, 504, 505, 5, 8, 5, 2, 505, 506, 7, 34, 2, 2, 506, 507, 5, 8, 5, 2, 507, 508, 8, 29, 1, 2, 508, 57, 3, 2, 2, 2, 509, 510, 8, 30, 1, 2, 510, 511, 5, 54, 28, 2, 511, 512, 8, 30, 1, 2, 512, 520, 3, 2, 2, 2, 513, 514, 12, 4, 2, 2, 514, 515, 5, 60, 31, 2, 515, 516, 5, 54, 28, 2, 516, 517, 8, 30, 1, 2, 517, 519, 3, 2, 2, 2, 518, 513, 3, 2, 2, 2, 519, 522, 3, 2, 2, 2, 520, 518, 3, 2, 2, 2, 520, 521, 3, 2, 2, 2, 521, 59, 3, 2, 2, 2, 522, 520, 3, 2, 2, 2, 523, 524, 5, 8, 5, 2, 524, 525, 7, 35, 2, 2, 525, 526, 5, 8, 5, 2, 526, 527, 8, 31, 1, 2, 527, 61, 3, 2, 2, 2, 528, 529, 8, 32, 1, 2, 529, 530, 5, 58, 30, 2, 530, 531, 8, 32, 1, 2, 531, 539, 3, 2, 2, 2, 532, 533, 12, 4, 2, 2, 533, 534, 5, 64, 33, 2, 534, 535, 5, 58, 30, 2, 535, 536, 8, 32, 1, 2, 536, 538, 3, 2, 2, 2, 537, 532, 3, 2, 2, 2, 538, 541, 3, 2, 2, 2, 539, 537, 3, 2, 2, 2, 539, 540, 3, 2, 2, 2, 540, 63, 3, 2, 2, 2, 541, 539, 3, 2, 2, 2, 542, 543, 5, 8, 5, 2, 543, 544, 7, 36, 2, 2, 544, 545, 5, 8, 5, 2, 545, 546, 8, 33, 1, 2, 546, 65, 3, 2, 2, 2, 547, 548, 5, 68, 35, 2, 548, 549, 8, 34, 1, 2, 549, 67, 3, 2, 2, 2, 550, 551, 8, 35, 1, 2, 551, 552, 5, 4, 3, 2, 552, 553, 8, 35, 1, 2, 553, 558, 3, 2, 2, 2, 554, 555, 5, 70, 36, 2, 555, 556, 8, 35, 1, 2, 556, 558, 3, 2, 2, 2, 557, 550, 3, 2, 2, 2, 557, 554, 3, 2, 2, 2, 558, 569, 3, 2, 2, 2, 559, 560, 12, 6, 2, 2, 560, 561, 5, 4, 3, 2, 561, 562, 8, 35, 1, 2, 562, 568, 3, 2, 2, 2, 563, 564, 12, 5, 2, 2, 564, 565, 5, 70, 36, 2, 565, 566, 8, 35, 1, 2, 566, 568, 3, 2, 2, 2, 567, 559, 3, 2, 2, 2, 567, 563, 3, 2, 2, 2, 568, 571, 3, 2, 2, 2, 569, 567, 3, 2, 2, 2, 569, 570, 3, 2, 2, 2, 570, 69, 3, 2, 2, 2, 571, 569, 3, 2, 2, 2, 572, 573, 7, 37, 2, 2, 573, 578, 8, 36, 1, 2, 574, 575, 5, 12, 7, 2, 575, 576, 8, 36, 1, 2, 576, 578, 3, 2, 2, 2, 577, 572, 3, 2, 2, 2, 577, 574, 3, 2, 2, 2, 578, 71, 3, 2, 2, 2, 579, 580, 7, 48, 2, 2, 580, 594, 8, 37, 1, 2, 581, 582, 5, 14, 8, 2, 582, 583, 7, 18, 2, 2, 583, 584, 7, 19, 2, 2, 584, 585, 5, 2, 2, 2, 585, 586, 7, 20, 2, 2, 586, 587, 8, 37, 1, 2, 587, 594, 3, 2, 2, 2, 588, 589, 5, 14, 8, 2, 589, 590, 7, 18, 2, 2, 590, 591, 7, 48, 2, 2, 591, 592, 8, 37, 1, 2, 592, 594, 3, 2, 2, 2, 593, 579, 3, 2, 2, 2, 593, 581, 3, 2, 2, 2, 593, 588, 3, 2, 2, 2, 594, 73, 3, 2, 2, 2, 595, 596, 5, 8, 5, 2, 596, 597, 7, 8, 2, 2, 597, 598, 8, 38, 1, 2, 598, 75, 3, 2, 2, 2, 599, 600, 5, 8, 5, 2, 600, 601, 7, 38, 2, 2, 601, 602, 8, 39, 1, 2, 602, 77, 3, 2, 2, 2, 603, 604, 5, 74, 38, 2, 604, 605, 5, 66, 34, 2, 605, 606, 8, 40, 1, 2, 606, 79, 3, 2, 2, 2, 607, 608, 7, 48, 2, 2, 608, 609, 8, 41, 1, 2, 609, 81, 3, 2, 2, 2, 610, 611, 5, 2, 2, 2, 611, 612, 5, 84, 43, 2, 612, 613, 8, 42, 1, 2, 613, 83, 3, 2, 2, 2, 614, 615, 5, 76, 39, 2, 615, 616, 5, 66, 34, 2, 616, 617, 8, 43, 1, 2, 617, 85, 3, 2, 2, 2, 618, 619, 8, 44, 1, 2, 619, 620, 5, 72, 37, 2, 620, 621, 5, 88, 45, 2, 621, 622, 7, 39, 2, 2, 622, 623, 8, 44, 1, 2, 623, 632, 3, 2, 2, 2, 624, 625, 12, 4, 2, 2, 625, 626, 5, 72, 37, 2, 626, 627, 5, 88, 45, 2, 627, 628, 7, 39, 2, 2, 628, 629, 8, 44, 1, 2, 629, 631, 3, 2, 2, 2, 630, 624, 3, 2, 2, 2, 631, 634, 3, 2, 2, 2, 632, 630, 3, 2, 2, 2, 632, 633, 3, 2, 2, 2, 633, 87, 3, 2, 2, 2, 634, 632, 3, 2, 2, 2, 635, 636, 5, 50, 26, 2, 636, 637, 8, 45, 1, 2, 637, 640, 3, 2, 2, 2, 638, 640, 8, 45, 1, 2, 639, 635, 3, 2, 2, 2, 639, 638, 3, 2, 2, 2, 640, 89, 3, 2, 2, 2, 641, 642, 5, 8, 5, 2, 642, 643, 5, 92, 47, 2, 643, 644, 5, 8, 5, 2, 644, 645, 7, 2, 2, 3, 645, 646, 8, 46, 1, 2, 646, 91, 3, 2, 2, 2, 647, 648, 5, 94, 48, 2, 648, 649, 8, 47, 1, 2, 649, 652, 3, 2, 2, 2, 650, 652, 8, 47, 1, 2, 651, 647, 3, 2, 2, 2, 651, 650, 3, 2, 2, 2, 652, 93, 3, 2, 2, 2, 653, 654, 8, 48, 1, 2, 654, 655, 5, 4, 3, 2, 655, 656, 8, 48, 1, 2, 656, 664, 3, 2, 2, 2, 657, 658, 12, 3, 2, 2, 658, 659, 5, 12, 7, 2, 659, 660, 5, 4, 3, 2, 660, 661, 8, 48, 1, 2, 661, 663, 3, 2, 2, 2, 662, 657, 3, 2, 2, 2, 663, 666, 3, 2, 2, 2, 664, 662, 3, 2, 2, 2, 664, 665, 3, 2, 2, 2, 665, 95, 3, 2, 2, 2, 666, 664, 3, 2, 2, 2, 36, 109, 174, 185, 201, 302, 321, 323, 335, 348, 355, 365, 377, 393, 410, 412, 424, 441, 443, 459, 475, 482, 493, 502, 520, 539, 557, 567, 569, 577, 593, 632, 639, 651, 664] -------------------------------------------------------------------------------- /src/DianaScript.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | T__8=9 10 | T__9=10 11 | T__10=11 12 | T__11=12 13 | T__12=13 14 | T__13=14 15 | T__14=15 16 | T__15=16 17 | T__16=17 18 | T__17=18 19 | T__18=19 20 | T__19=20 21 | T__20=21 22 | T__21=22 23 | T__22=23 24 | T__23=24 25 | T__24=25 26 | T__25=26 27 | T__26=27 28 | T__27=28 29 | T__28=29 30 | T__29=30 31 | T__30=31 32 | T__31=32 33 | T__32=33 34 | T__33=34 35 | T__34=35 36 | T__35=36 37 | T__36=37 38 | COMMENT_1=38 39 | SINGLE_BINOP_2=39 40 | STR_4=40 41 | INT_10=41 42 | HEX_7=42 43 | OCT_8=43 44 | BIN_9=44 45 | FLOAT_11=45 46 | NAME_13=46 47 | WS_INLINE_14=47 48 | NEWLINE_17=48 49 | '__META'=1 50 | ':'=2 51 | 'in'=3 52 | 'raise'=4 53 | '__SETMETA'=5 54 | 'do'=6 55 | 'loop'=7 56 | 'end'=8 57 | 'while'=9 58 | 'for'=10 59 | 'break'=11 60 | 'continue'=12 61 | 'return'=13 62 | 'var'=14 63 | 'begin'=15 64 | '.'=16 65 | '['=17 66 | ']'=18 67 | '('=19 68 | ')'=20 69 | '{'=21 70 | '}'=22 71 | 'None'=23 72 | '-'=24 73 | '~'=25 74 | 'if'=26 75 | 'fun'=27 76 | '->'=28 77 | ','=29 78 | 'else'=30 79 | 'elif'=31 80 | 'not'=32 81 | 'and'=33 82 | 'or'=34 83 | ';'=35 84 | 'then'=36 85 | '='=37 86 | -------------------------------------------------------------------------------- /src/DianaScriptLexer.interp: -------------------------------------------------------------------------------- 1 | token literal names: 2 | null 3 | '__META' 4 | ':' 5 | 'in' 6 | 'raise' 7 | '__SETMETA' 8 | 'do' 9 | 'loop' 10 | 'end' 11 | 'while' 12 | 'for' 13 | 'break' 14 | 'continue' 15 | 'return' 16 | 'var' 17 | 'begin' 18 | '.' 19 | '[' 20 | ']' 21 | '(' 22 | ')' 23 | '{' 24 | '}' 25 | 'None' 26 | '-' 27 | '~' 28 | 'if' 29 | 'fun' 30 | '->' 31 | ',' 32 | 'else' 33 | 'elif' 34 | 'not' 35 | 'and' 36 | 'or' 37 | ';' 38 | 'then' 39 | '=' 40 | null 41 | null 42 | null 43 | null 44 | null 45 | null 46 | null 47 | null 48 | null 49 | null 50 | null 51 | 52 | token symbolic names: 53 | null 54 | null 55 | null 56 | null 57 | null 58 | null 59 | null 60 | null 61 | null 62 | null 63 | null 64 | null 65 | null 66 | null 67 | null 68 | null 69 | null 70 | null 71 | null 72 | null 73 | null 74 | null 75 | null 76 | null 77 | null 78 | null 79 | null 80 | null 81 | null 82 | null 83 | null 84 | null 85 | null 86 | null 87 | null 88 | null 89 | null 90 | null 91 | COMMENT_1 92 | SINGLE_BINOP_2 93 | STR_4 94 | INT_10 95 | HEX_7 96 | OCT_8 97 | BIN_9 98 | FLOAT_11 99 | NAME_13 100 | WS_INLINE_14 101 | NEWLINE_17 102 | 103 | rule names: 104 | T__0 105 | T__1 106 | T__2 107 | T__3 108 | T__4 109 | T__5 110 | T__6 111 | T__7 112 | T__8 113 | T__9 114 | T__10 115 | T__11 116 | T__12 117 | T__13 118 | T__14 119 | T__15 120 | T__16 121 | T__17 122 | T__18 123 | T__19 124 | T__20 125 | T__21 126 | T__22 127 | T__23 128 | T__24 129 | T__25 130 | T__26 131 | T__27 132 | T__28 133 | T__29 134 | T__30 135 | T__31 136 | T__32 137 | T__33 138 | T__34 139 | T__35 140 | T__36 141 | COMMENT_1 142 | SINGLE_BINOP_2 143 | ESCAPED_QUOTE_3 144 | STR_4 145 | WS_5 146 | INT_10 147 | HEX_7 148 | OCT_8 149 | BIN_9 150 | DIGIT_6 151 | FLOAT_11 152 | UCODE_12 153 | NAME_13 154 | WS_INLINE_14 155 | CR_15 156 | LF_16 157 | NEWLINE_17 158 | 159 | channel names: 160 | DEFAULT_TOKEN_CHANNEL 161 | HIDDEN 162 | 163 | mode names: 164 | DEFAULT_MODE 165 | 166 | atn: 167 | [3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 50, 384, 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, 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, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 7, 39, 261, 10, 39, 12, 39, 14, 39, 264, 11, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 288, 10, 40, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 7, 42, 296, 10, 42, 12, 42, 14, 42, 299, 11, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 6, 44, 306, 10, 44, 13, 44, 14, 44, 307, 3, 44, 3, 44, 3, 44, 5, 44, 313, 10, 44, 3, 45, 3, 45, 3, 45, 7, 45, 318, 10, 45, 12, 45, 14, 45, 321, 11, 45, 3, 46, 3, 46, 3, 46, 7, 46, 326, 10, 46, 12, 46, 14, 46, 329, 11, 46, 3, 47, 3, 47, 3, 47, 7, 47, 334, 10, 47, 12, 47, 14, 47, 337, 11, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 5, 50, 346, 10, 50, 3, 51, 3, 51, 3, 51, 7, 51, 351, 10, 51, 12, 51, 14, 51, 354, 11, 51, 3, 52, 6, 52, 357, 10, 52, 13, 52, 14, 52, 358, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 5, 55, 368, 10, 55, 3, 55, 6, 55, 371, 10, 55, 13, 55, 14, 55, 372, 3, 55, 3, 55, 5, 55, 377, 10, 55, 3, 55, 7, 55, 380, 10, 55, 12, 55, 14, 55, 383, 11, 55, 2, 2, 2, 56, 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, 2, 83, 2, 42, 85, 2, 2, 87, 2, 43, 89, 2, 44, 91, 2, 45, 93, 2, 46, 95, 2, 2, 97, 2, 47, 99, 2, 2, 101, 2, 48, 103, 2, 49, 105, 2, 2, 107, 2, 2, 109, 2, 50, 3, 2, 13, 4, 2, 12, 12, 15, 15, 4, 2, 62, 62, 64, 64, 4, 2, 39, 40, 126, 126, 3, 2, 36, 36, 5, 2, 11, 12, 15, 15, 34, 34, 4, 2, 50, 59, 99, 104, 3, 2, 50, 57, 3, 2, 50, 51, 3, 2, 50, 59, 7, 2, 67, 92, 97, 97, 99, 124, 9736, 9736, 19970, 40871, 4, 2, 11, 11, 34, 34, 2, 406, 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, 83, 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, 97, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 3, 111, 3, 2, 2, 2, 5, 118, 3, 2, 2, 2, 7, 120, 3, 2, 2, 2, 9, 123, 3, 2, 2, 2, 11, 129, 3, 2, 2, 2, 13, 139, 3, 2, 2, 2, 15, 142, 3, 2, 2, 2, 17, 147, 3, 2, 2, 2, 19, 151, 3, 2, 2, 2, 21, 157, 3, 2, 2, 2, 23, 161, 3, 2, 2, 2, 25, 167, 3, 2, 2, 2, 27, 176, 3, 2, 2, 2, 29, 183, 3, 2, 2, 2, 31, 187, 3, 2, 2, 2, 33, 193, 3, 2, 2, 2, 35, 195, 3, 2, 2, 2, 37, 197, 3, 2, 2, 2, 39, 199, 3, 2, 2, 2, 41, 201, 3, 2, 2, 2, 43, 203, 3, 2, 2, 2, 45, 205, 3, 2, 2, 2, 47, 207, 3, 2, 2, 2, 49, 212, 3, 2, 2, 2, 51, 214, 3, 2, 2, 2, 53, 216, 3, 2, 2, 2, 55, 219, 3, 2, 2, 2, 57, 223, 3, 2, 2, 2, 59, 226, 3, 2, 2, 2, 61, 228, 3, 2, 2, 2, 63, 233, 3, 2, 2, 2, 65, 238, 3, 2, 2, 2, 67, 242, 3, 2, 2, 2, 69, 246, 3, 2, 2, 2, 71, 249, 3, 2, 2, 2, 73, 251, 3, 2, 2, 2, 75, 256, 3, 2, 2, 2, 77, 258, 3, 2, 2, 2, 79, 287, 3, 2, 2, 2, 81, 289, 3, 2, 2, 2, 83, 292, 3, 2, 2, 2, 85, 302, 3, 2, 2, 2, 87, 312, 3, 2, 2, 2, 89, 314, 3, 2, 2, 2, 91, 322, 3, 2, 2, 2, 93, 330, 3, 2, 2, 2, 95, 338, 3, 2, 2, 2, 97, 340, 3, 2, 2, 2, 99, 345, 3, 2, 2, 2, 101, 347, 3, 2, 2, 2, 103, 356, 3, 2, 2, 2, 105, 362, 3, 2, 2, 2, 107, 364, 3, 2, 2, 2, 109, 370, 3, 2, 2, 2, 111, 112, 7, 97, 2, 2, 112, 113, 7, 97, 2, 2, 113, 114, 7, 79, 2, 2, 114, 115, 7, 71, 2, 2, 115, 116, 7, 86, 2, 2, 116, 117, 7, 67, 2, 2, 117, 4, 3, 2, 2, 2, 118, 119, 7, 60, 2, 2, 119, 6, 3, 2, 2, 2, 120, 121, 7, 107, 2, 2, 121, 122, 7, 112, 2, 2, 122, 8, 3, 2, 2, 2, 123, 124, 7, 116, 2, 2, 124, 125, 7, 99, 2, 2, 125, 126, 7, 107, 2, 2, 126, 127, 7, 117, 2, 2, 127, 128, 7, 103, 2, 2, 128, 10, 3, 2, 2, 2, 129, 130, 7, 97, 2, 2, 130, 131, 7, 97, 2, 2, 131, 132, 7, 85, 2, 2, 132, 133, 7, 71, 2, 2, 133, 134, 7, 86, 2, 2, 134, 135, 7, 79, 2, 2, 135, 136, 7, 71, 2, 2, 136, 137, 7, 86, 2, 2, 137, 138, 7, 67, 2, 2, 138, 12, 3, 2, 2, 2, 139, 140, 7, 102, 2, 2, 140, 141, 7, 113, 2, 2, 141, 14, 3, 2, 2, 2, 142, 143, 7, 110, 2, 2, 143, 144, 7, 113, 2, 2, 144, 145, 7, 113, 2, 2, 145, 146, 7, 114, 2, 2, 146, 16, 3, 2, 2, 2, 147, 148, 7, 103, 2, 2, 148, 149, 7, 112, 2, 2, 149, 150, 7, 102, 2, 2, 150, 18, 3, 2, 2, 2, 151, 152, 7, 121, 2, 2, 152, 153, 7, 106, 2, 2, 153, 154, 7, 107, 2, 2, 154, 155, 7, 110, 2, 2, 155, 156, 7, 103, 2, 2, 156, 20, 3, 2, 2, 2, 157, 158, 7, 104, 2, 2, 158, 159, 7, 113, 2, 2, 159, 160, 7, 116, 2, 2, 160, 22, 3, 2, 2, 2, 161, 162, 7, 100, 2, 2, 162, 163, 7, 116, 2, 2, 163, 164, 7, 103, 2, 2, 164, 165, 7, 99, 2, 2, 165, 166, 7, 109, 2, 2, 166, 24, 3, 2, 2, 2, 167, 168, 7, 101, 2, 2, 168, 169, 7, 113, 2, 2, 169, 170, 7, 112, 2, 2, 170, 171, 7, 118, 2, 2, 171, 172, 7, 107, 2, 2, 172, 173, 7, 112, 2, 2, 173, 174, 7, 119, 2, 2, 174, 175, 7, 103, 2, 2, 175, 26, 3, 2, 2, 2, 176, 177, 7, 116, 2, 2, 177, 178, 7, 103, 2, 2, 178, 179, 7, 118, 2, 2, 179, 180, 7, 119, 2, 2, 180, 181, 7, 116, 2, 2, 181, 182, 7, 112, 2, 2, 182, 28, 3, 2, 2, 2, 183, 184, 7, 120, 2, 2, 184, 185, 7, 99, 2, 2, 185, 186, 7, 116, 2, 2, 186, 30, 3, 2, 2, 2, 187, 188, 7, 100, 2, 2, 188, 189, 7, 103, 2, 2, 189, 190, 7, 105, 2, 2, 190, 191, 7, 107, 2, 2, 191, 192, 7, 112, 2, 2, 192, 32, 3, 2, 2, 2, 193, 194, 7, 48, 2, 2, 194, 34, 3, 2, 2, 2, 195, 196, 7, 93, 2, 2, 196, 36, 3, 2, 2, 2, 197, 198, 7, 95, 2, 2, 198, 38, 3, 2, 2, 2, 199, 200, 7, 42, 2, 2, 200, 40, 3, 2, 2, 2, 201, 202, 7, 43, 2, 2, 202, 42, 3, 2, 2, 2, 203, 204, 7, 125, 2, 2, 204, 44, 3, 2, 2, 2, 205, 206, 7, 127, 2, 2, 206, 46, 3, 2, 2, 2, 207, 208, 7, 80, 2, 2, 208, 209, 7, 113, 2, 2, 209, 210, 7, 112, 2, 2, 210, 211, 7, 103, 2, 2, 211, 48, 3, 2, 2, 2, 212, 213, 7, 47, 2, 2, 213, 50, 3, 2, 2, 2, 214, 215, 7, 128, 2, 2, 215, 52, 3, 2, 2, 2, 216, 217, 7, 107, 2, 2, 217, 218, 7, 104, 2, 2, 218, 54, 3, 2, 2, 2, 219, 220, 7, 104, 2, 2, 220, 221, 7, 119, 2, 2, 221, 222, 7, 112, 2, 2, 222, 56, 3, 2, 2, 2, 223, 224, 7, 47, 2, 2, 224, 225, 7, 64, 2, 2, 225, 58, 3, 2, 2, 2, 226, 227, 7, 46, 2, 2, 227, 60, 3, 2, 2, 2, 228, 229, 7, 103, 2, 2, 229, 230, 7, 110, 2, 2, 230, 231, 7, 117, 2, 2, 231, 232, 7, 103, 2, 2, 232, 62, 3, 2, 2, 2, 233, 234, 7, 103, 2, 2, 234, 235, 7, 110, 2, 2, 235, 236, 7, 107, 2, 2, 236, 237, 7, 104, 2, 2, 237, 64, 3, 2, 2, 2, 238, 239, 7, 112, 2, 2, 239, 240, 7, 113, 2, 2, 240, 241, 7, 118, 2, 2, 241, 66, 3, 2, 2, 2, 242, 243, 7, 99, 2, 2, 243, 244, 7, 112, 2, 2, 244, 245, 7, 102, 2, 2, 245, 68, 3, 2, 2, 2, 246, 247, 7, 113, 2, 2, 247, 248, 7, 116, 2, 2, 248, 70, 3, 2, 2, 2, 249, 250, 7, 61, 2, 2, 250, 72, 3, 2, 2, 2, 251, 252, 7, 118, 2, 2, 252, 253, 7, 106, 2, 2, 253, 254, 7, 103, 2, 2, 254, 255, 7, 112, 2, 2, 255, 74, 3, 2, 2, 2, 256, 257, 7, 63, 2, 2, 257, 76, 3, 2, 2, 2, 258, 262, 7, 37, 2, 2, 259, 261, 10, 2, 2, 2, 260, 259, 3, 2, 2, 2, 261, 264, 3, 2, 2, 2, 262, 260, 3, 2, 2, 2, 262, 263, 3, 2, 2, 2, 263, 265, 3, 2, 2, 2, 264, 262, 3, 2, 2, 2, 265, 266, 8, 39, 2, 2, 266, 78, 3, 2, 2, 2, 267, 288, 9, 3, 2, 2, 268, 269, 7, 64, 2, 2, 269, 288, 7, 63, 2, 2, 270, 271, 7, 62, 2, 2, 271, 288, 7, 63, 2, 2, 272, 273, 7, 63, 2, 2, 273, 288, 7, 63, 2, 2, 274, 275, 7, 35, 2, 2, 275, 288, 7, 63, 2, 2, 276, 288, 4, 44, 45, 2, 277, 278, 7, 44, 2, 2, 278, 288, 7, 44, 2, 2, 279, 288, 7, 49, 2, 2, 280, 281, 7, 49, 2, 2, 281, 288, 7, 49, 2, 2, 282, 288, 9, 4, 2, 2, 283, 284, 7, 62, 2, 2, 284, 288, 7, 62, 2, 2, 285, 286, 7, 64, 2, 2, 286, 288, 7, 64, 2, 2, 287, 267, 3, 2, 2, 2, 287, 268, 3, 2, 2, 2, 287, 270, 3, 2, 2, 2, 287, 272, 3, 2, 2, 2, 287, 274, 3, 2, 2, 2, 287, 276, 3, 2, 2, 2, 287, 277, 3, 2, 2, 2, 287, 279, 3, 2, 2, 2, 287, 280, 3, 2, 2, 2, 287, 282, 3, 2, 2, 2, 287, 283, 3, 2, 2, 2, 287, 285, 3, 2, 2, 2, 288, 80, 3, 2, 2, 2, 289, 290, 7, 94, 2, 2, 290, 291, 7, 36, 2, 2, 291, 82, 3, 2, 2, 2, 292, 297, 7, 36, 2, 2, 293, 296, 5, 81, 41, 2, 294, 296, 10, 5, 2, 2, 295, 293, 3, 2, 2, 2, 295, 294, 3, 2, 2, 2, 296, 299, 3, 2, 2, 2, 297, 295, 3, 2, 2, 2, 297, 298, 3, 2, 2, 2, 298, 300, 3, 2, 2, 2, 299, 297, 3, 2, 2, 2, 300, 301, 7, 36, 2, 2, 301, 84, 3, 2, 2, 2, 302, 303, 9, 6, 2, 2, 303, 86, 3, 2, 2, 2, 304, 306, 5, 95, 48, 2, 305, 304, 3, 2, 2, 2, 306, 307, 3, 2, 2, 2, 307, 305, 3, 2, 2, 2, 307, 308, 3, 2, 2, 2, 308, 313, 3, 2, 2, 2, 309, 313, 5, 89, 45, 2, 310, 313, 5, 91, 46, 2, 311, 313, 5, 93, 47, 2, 312, 305, 3, 2, 2, 2, 312, 309, 3, 2, 2, 2, 312, 310, 3, 2, 2, 2, 312, 311, 3, 2, 2, 2, 313, 88, 3, 2, 2, 2, 314, 315, 7, 50, 2, 2, 315, 319, 7, 122, 2, 2, 316, 318, 9, 7, 2, 2, 317, 316, 3, 2, 2, 2, 318, 321, 3, 2, 2, 2, 319, 317, 3, 2, 2, 2, 319, 320, 3, 2, 2, 2, 320, 90, 3, 2, 2, 2, 321, 319, 3, 2, 2, 2, 322, 323, 7, 50, 2, 2, 323, 327, 7, 113, 2, 2, 324, 326, 9, 8, 2, 2, 325, 324, 3, 2, 2, 2, 326, 329, 3, 2, 2, 2, 327, 325, 3, 2, 2, 2, 327, 328, 3, 2, 2, 2, 328, 92, 3, 2, 2, 2, 329, 327, 3, 2, 2, 2, 330, 331, 7, 50, 2, 2, 331, 335, 7, 100, 2, 2, 332, 334, 9, 9, 2, 2, 333, 332, 3, 2, 2, 2, 334, 337, 3, 2, 2, 2, 335, 333, 3, 2, 2, 2, 335, 336, 3, 2, 2, 2, 336, 94, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 338, 339, 9, 10, 2, 2, 339, 96, 3, 2, 2, 2, 340, 341, 5, 87, 44, 2, 341, 342, 7, 48, 2, 2, 342, 343, 5, 87, 44, 2, 343, 98, 3, 2, 2, 2, 344, 346, 9, 11, 2, 2, 345, 344, 3, 2, 2, 2, 346, 100, 3, 2, 2, 2, 347, 352, 5, 99, 50, 2, 348, 351, 5, 95, 48, 2, 349, 351, 5, 99, 50, 2, 350, 348, 3, 2, 2, 2, 350, 349, 3, 2, 2, 2, 351, 354, 3, 2, 2, 2, 352, 350, 3, 2, 2, 2, 352, 353, 3, 2, 2, 2, 353, 102, 3, 2, 2, 2, 354, 352, 3, 2, 2, 2, 355, 357, 9, 12, 2, 2, 356, 355, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 356, 3, 2, 2, 2, 358, 359, 3, 2, 2, 2, 359, 360, 3, 2, 2, 2, 360, 361, 8, 52, 2, 2, 361, 104, 3, 2, 2, 2, 362, 363, 7, 15, 2, 2, 363, 106, 3, 2, 2, 2, 364, 365, 7, 12, 2, 2, 365, 108, 3, 2, 2, 2, 366, 368, 5, 105, 53, 2, 367, 366, 3, 2, 2, 2, 367, 368, 3, 2, 2, 2, 368, 369, 3, 2, 2, 2, 369, 371, 5, 107, 54, 2, 370, 367, 3, 2, 2, 2, 371, 372, 3, 2, 2, 2, 372, 370, 3, 2, 2, 2, 372, 373, 3, 2, 2, 2, 373, 381, 3, 2, 2, 2, 374, 380, 5, 103, 52, 2, 375, 377, 5, 105, 53, 2, 376, 375, 3, 2, 2, 2, 376, 377, 3, 2, 2, 2, 377, 378, 3, 2, 2, 2, 378, 380, 5, 107, 54, 2, 379, 374, 3, 2, 2, 2, 379, 376, 3, 2, 2, 2, 380, 383, 3, 2, 2, 2, 381, 379, 3, 2, 2, 2, 381, 382, 3, 2, 2, 2, 382, 110, 3, 2, 2, 2, 383, 381, 3, 2, 2, 2, 22, 2, 262, 287, 295, 297, 307, 312, 317, 319, 327, 335, 345, 350, 352, 358, 367, 372, 376, 379, 381, 3, 8, 2, 2] -------------------------------------------------------------------------------- /src/DianaScriptLexer.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | T__8=9 10 | T__9=10 11 | T__10=11 12 | T__11=12 13 | T__12=13 14 | T__13=14 15 | T__14=15 16 | T__15=16 17 | T__16=17 18 | T__17=18 19 | T__18=19 20 | T__19=20 21 | T__20=21 22 | T__21=22 23 | T__22=23 24 | T__23=24 25 | T__24=25 26 | T__25=26 27 | T__26=27 28 | T__27=28 29 | T__28=29 30 | T__29=30 31 | T__30=31 32 | T__31=32 33 | T__32=33 34 | T__33=34 35 | T__34=35 36 | T__35=36 37 | T__36=37 38 | COMMENT_1=38 39 | SINGLE_BINOP_2=39 40 | STR_4=40 41 | INT_10=41 42 | HEX_7=42 43 | OCT_8=43 44 | BIN_9=44 45 | FLOAT_11=45 46 | NAME_13=46 47 | WS_INLINE_14=47 48 | NEWLINE_17=48 49 | '__META'=1 50 | ':'=2 51 | 'in'=3 52 | 'raise'=4 53 | '__SETMETA'=5 54 | 'do'=6 55 | 'loop'=7 56 | 'end'=8 57 | 'while'=9 58 | 'for'=10 59 | 'break'=11 60 | 'continue'=12 61 | 'return'=13 62 | 'var'=14 63 | 'begin'=15 64 | '.'=16 65 | '['=17 66 | ']'=18 67 | '('=19 68 | ')'=20 69 | '{'=21 70 | '}'=22 71 | 'None'=23 72 | '-'=24 73 | '~'=25 74 | 'if'=26 75 | 'fun'=27 76 | '->'=28 77 | ','=29 78 | 'else'=30 79 | 'elif'=31 80 | 'not'=32 81 | 'and'=33 82 | 'or'=34 83 | ';'=35 84 | 'then'=36 85 | '='=37 86 | -------------------------------------------------------------------------------- /src/DianaScriptLexer.ts: -------------------------------------------------------------------------------- 1 | // Generated from src/DianaScript.g4 by ANTLR 4.9.0-SNAPSHOT 2 | 3 | 4 | import { ATN } from "antlr4ts/atn/ATN"; 5 | import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; 6 | import { CharStream } from "antlr4ts/CharStream"; 7 | import { Lexer } from "antlr4ts/Lexer"; 8 | import { LexerATNSimulator } from "antlr4ts/atn/LexerATNSimulator"; 9 | import { NotNull } from "antlr4ts/Decorators"; 10 | import { Override } from "antlr4ts/Decorators"; 11 | import { RuleContext } from "antlr4ts/RuleContext"; 12 | import { Vocabulary } from "antlr4ts/Vocabulary"; 13 | import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; 14 | 15 | import * as Utils from "antlr4ts/misc/Utils"; 16 | 17 | 18 | export class DianaScriptLexer extends Lexer { 19 | public static readonly T__0 = 1; 20 | public static readonly T__1 = 2; 21 | public static readonly T__2 = 3; 22 | public static readonly T__3 = 4; 23 | public static readonly T__4 = 5; 24 | public static readonly T__5 = 6; 25 | public static readonly T__6 = 7; 26 | public static readonly T__7 = 8; 27 | public static readonly T__8 = 9; 28 | public static readonly T__9 = 10; 29 | public static readonly T__10 = 11; 30 | public static readonly T__11 = 12; 31 | public static readonly T__12 = 13; 32 | public static readonly T__13 = 14; 33 | public static readonly T__14 = 15; 34 | public static readonly T__15 = 16; 35 | public static readonly T__16 = 17; 36 | public static readonly T__17 = 18; 37 | public static readonly T__18 = 19; 38 | public static readonly T__19 = 20; 39 | public static readonly T__20 = 21; 40 | public static readonly T__21 = 22; 41 | public static readonly T__22 = 23; 42 | public static readonly T__23 = 24; 43 | public static readonly T__24 = 25; 44 | public static readonly T__25 = 26; 45 | public static readonly T__26 = 27; 46 | public static readonly T__27 = 28; 47 | public static readonly T__28 = 29; 48 | public static readonly T__29 = 30; 49 | public static readonly T__30 = 31; 50 | public static readonly T__31 = 32; 51 | public static readonly T__32 = 33; 52 | public static readonly T__33 = 34; 53 | public static readonly T__34 = 35; 54 | public static readonly T__35 = 36; 55 | public static readonly T__36 = 37; 56 | public static readonly COMMENT_1 = 38; 57 | public static readonly SINGLE_BINOP_2 = 39; 58 | public static readonly STR_4 = 40; 59 | public static readonly INT_10 = 41; 60 | public static readonly HEX_7 = 42; 61 | public static readonly OCT_8 = 43; 62 | public static readonly BIN_9 = 44; 63 | public static readonly FLOAT_11 = 45; 64 | public static readonly NAME_13 = 46; 65 | public static readonly WS_INLINE_14 = 47; 66 | public static readonly NEWLINE_17 = 48; 67 | 68 | // tslint:disable:no-trailing-whitespace 69 | public static readonly channelNames: string[] = [ 70 | "DEFAULT_TOKEN_CHANNEL", "HIDDEN", 71 | ]; 72 | 73 | // tslint:disable:no-trailing-whitespace 74 | public static readonly modeNames: string[] = [ 75 | "DEFAULT_MODE", 76 | ]; 77 | 78 | public static readonly ruleNames: string[] = [ 79 | "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", 80 | "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", 81 | "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", 82 | "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", 83 | "T__33", "T__34", "T__35", "T__36", "COMMENT_1", "SINGLE_BINOP_2", "ESCAPED_QUOTE_3", 84 | "STR_4", "WS_5", "INT_10", "HEX_7", "OCT_8", "BIN_9", "DIGIT_6", "FLOAT_11", 85 | "UCODE_12", "NAME_13", "WS_INLINE_14", "CR_15", "LF_16", "NEWLINE_17", 86 | ]; 87 | 88 | private static readonly _LITERAL_NAMES: Array = [ 89 | undefined, "'__META'", "':'", "'in'", "'raise'", "'__SETMETA'", "'do'", 90 | "'loop'", "'end'", "'while'", "'for'", "'break'", "'continue'", "'return'", 91 | "'var'", "'begin'", "'.'", "'['", "']'", "'('", "')'", "'{'", "'}'", "'None'", 92 | "'-'", "'~'", "'if'", "'fun'", "'->'", "','", "'else'", "'elif'", "'not'", 93 | "'and'", "'or'", "';'", "'then'", "'='", 94 | ]; 95 | private static readonly _SYMBOLIC_NAMES: Array = [ 96 | undefined, undefined, undefined, undefined, undefined, undefined, undefined, 97 | undefined, undefined, undefined, undefined, undefined, undefined, undefined, 98 | undefined, undefined, undefined, undefined, undefined, undefined, undefined, 99 | undefined, undefined, undefined, undefined, undefined, undefined, undefined, 100 | undefined, undefined, undefined, undefined, undefined, undefined, undefined, 101 | undefined, undefined, undefined, "COMMENT_1", "SINGLE_BINOP_2", "STR_4", 102 | "INT_10", "HEX_7", "OCT_8", "BIN_9", "FLOAT_11", "NAME_13", "WS_INLINE_14", 103 | "NEWLINE_17", 104 | ]; 105 | public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(DianaScriptLexer._LITERAL_NAMES, DianaScriptLexer._SYMBOLIC_NAMES, []); 106 | 107 | // @Override 108 | // @NotNull 109 | public get vocabulary(): Vocabulary { 110 | return DianaScriptLexer.VOCABULARY; 111 | } 112 | // tslint:enable:no-trailing-whitespace 113 | 114 | 115 | constructor(input: CharStream) { 116 | super(input); 117 | this._interp = new LexerATNSimulator(DianaScriptLexer._ATN, this); 118 | } 119 | 120 | // @Override 121 | public get grammarFileName(): string { return "DianaScript.g4"; } 122 | 123 | // @Override 124 | public get ruleNames(): string[] { return DianaScriptLexer.ruleNames; } 125 | 126 | // @Override 127 | public get serializedATN(): string { return DianaScriptLexer._serializedATN; } 128 | 129 | // @Override 130 | public get channelNames(): string[] { return DianaScriptLexer.channelNames; } 131 | 132 | // @Override 133 | public get modeNames(): string[] { return DianaScriptLexer.modeNames; } 134 | 135 | public static readonly _serializedATN: string = 136 | "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x022\u0180\b\x01" + 137 | "\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06" + 138 | "\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" + 139 | "\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t" + 140 | "\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t" + 141 | "\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t" + 142 | "\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t" + 143 | "\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04\'\t\'\x04(\t(\x04)\t)\x04*\t*\x04" + 144 | "+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x04" + 145 | "4\t4\x045\t5\x046\t6\x047\t7\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03" + 146 | "\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03" + 147 | "\x05\x03\x05\x03\x05\x03\x05\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03" + 148 | "\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\b\x03" + 149 | "\b\x03\b\x03\b\x03\b\x03\t\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03" + 150 | "\n\x03\n\x03\v\x03\v\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03" + 151 | "\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\x0E\x03\x0E\x03" + 152 | "\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03" + 153 | "\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12\x03" + 154 | "\x12\x03\x13\x03\x13\x03\x14\x03\x14\x03\x15\x03\x15\x03\x16\x03\x16\x03" + 155 | "\x17\x03\x17\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03" + 156 | "\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03" + 157 | "\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03" + 158 | "\x1F\x03 \x03 \x03 \x03 \x03 \x03!\x03!\x03!\x03!\x03\"\x03\"\x03\"\x03" + 159 | "\"\x03#\x03#\x03#\x03$\x03$\x03%\x03%\x03%\x03%\x03%\x03&\x03&\x03\'\x03" + 160 | "\'\x07\'\u0105\n\'\f\'\x0E\'\u0108\v\'\x03\'\x03\'\x03(\x03(\x03(\x03" + 161 | "(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03" + 162 | "(\x03(\x03(\x05(\u0120\n(\x03)\x03)\x03)\x03*\x03*\x03*\x07*\u0128\n*" + 163 | "\f*\x0E*\u012B\v*\x03*\x03*\x03+\x03+\x03,\x06,\u0132\n,\r,\x0E,\u0133" + 164 | "\x03,\x03,\x03,\x05,\u0139\n,\x03-\x03-\x03-\x07-\u013E\n-\f-\x0E-\u0141" + 165 | "\v-\x03.\x03.\x03.\x07.\u0146\n.\f.\x0E.\u0149\v.\x03/\x03/\x03/\x07/" + 166 | "\u014E\n/\f/\x0E/\u0151\v/\x030\x030\x031\x031\x031\x031\x032\x052\u015A" + 167 | "\n2\x033\x033\x033\x073\u015F\n3\f3\x0E3\u0162\v3\x034\x064\u0165\n4\r" + 168 | "4\x0E4\u0166\x034\x034\x035\x035\x036\x036\x037\x057\u0170\n7\x037\x06" + 169 | "7\u0173\n7\r7\x0E7\u0174\x037\x037\x057\u0179\n7\x037\x077\u017C\n7\f" + 170 | "7\x0E7\u017F\v7\x02\x02\x028\x03\x02\x03\x05\x02\x04\x07\x02\x05\t\x02" + 171 | "\x06\v\x02\x07\r\x02\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02" + 172 | "\r\x19\x02\x0E\x1B\x02\x0F\x1D\x02\x10\x1F\x02\x11!\x02\x12#\x02\x13%" + 173 | "\x02\x14\'\x02\x15)\x02\x16+\x02\x17-\x02\x18/\x02\x191\x02\x1A3\x02\x1B" + 174 | "5\x02\x1C7\x02\x1D9\x02\x1E;\x02\x1F=\x02 ?\x02!A\x02\"C\x02#E\x02$G\x02" + 175 | "%I\x02&K\x02\'M\x02(O\x02)Q\x02\x02S\x02*U\x02\x02W\x02+Y\x02,[\x02-]" + 176 | "\x02._\x02\x02a\x02/c\x02\x02e\x020g\x021i\x02\x02k\x02\x02m\x022\x03" + 177 | "\x02\r\x04\x02\f\f\x0F\x0F\x04\x02>>@@\x04\x02\'(~~\x03\x02$$\x05\x02" + 178 | "\v\f\x0F\x0F\"\"\x04\x022;ch\x03\x0229\x03\x0223\x03\x022;\x07\x02C\\" + 179 | "aac|\u2608\u2608\u4E02\u9FA7\x04\x02\v\v\"\"\x02\u0196\x02\x03\x03\x02" + 180 | "\x02\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02" + 181 | "\x02\x02\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02" + 182 | "\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02" + 183 | "\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02" + 184 | "\x02\x02\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02" + 185 | "\x02\x02#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02\x02" + 186 | ")\x03\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02" + 187 | "\x02\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02\x02\x025\x03\x02\x02\x02" + 188 | "\x027\x03\x02\x02\x02\x029\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02=\x03" + 189 | "\x02\x02\x02\x02?\x03\x02\x02\x02\x02A\x03\x02\x02\x02\x02C\x03\x02\x02" + 190 | "\x02\x02E\x03\x02\x02\x02\x02G\x03\x02\x02\x02\x02I\x03\x02\x02\x02\x02" + 191 | "K\x03\x02\x02\x02\x02M\x03\x02\x02\x02\x02O\x03\x02\x02\x02\x02S\x03\x02" + 192 | "\x02\x02\x02W\x03\x02\x02\x02\x02Y\x03\x02\x02\x02\x02[\x03\x02\x02\x02" + 193 | "\x02]\x03\x02\x02\x02\x02a\x03\x02\x02\x02\x02e\x03\x02\x02\x02\x02g\x03" + 194 | "\x02\x02\x02\x02m\x03\x02\x02\x02\x03o\x03\x02\x02\x02\x05v\x03\x02\x02" + 195 | "\x02\x07x\x03\x02\x02\x02\t{\x03\x02\x02\x02\v\x81\x03\x02\x02\x02\r\x8B" + 196 | "\x03\x02\x02\x02\x0F\x8E\x03\x02\x02\x02\x11\x93\x03\x02\x02\x02\x13\x97" + 197 | "\x03\x02\x02\x02\x15\x9D\x03\x02\x02\x02\x17\xA1\x03\x02\x02\x02\x19\xA7" + 198 | "\x03\x02\x02\x02\x1B\xB0\x03\x02\x02\x02\x1D\xB7\x03\x02\x02\x02\x1F\xBB" + 199 | "\x03\x02\x02\x02!\xC1\x03\x02\x02\x02#\xC3\x03\x02\x02\x02%\xC5\x03\x02" + 200 | "\x02\x02\'\xC7\x03\x02\x02\x02)\xC9\x03\x02\x02\x02+\xCB\x03\x02\x02\x02" + 201 | "-\xCD\x03\x02\x02\x02/\xCF\x03\x02\x02\x021\xD4\x03\x02\x02\x023\xD6\x03" + 202 | "\x02\x02\x025\xD8\x03\x02\x02\x027\xDB\x03\x02\x02\x029\xDF\x03\x02\x02" + 203 | "\x02;\xE2\x03\x02\x02\x02=\xE4\x03\x02\x02\x02?\xE9\x03\x02\x02\x02A\xEE" + 204 | "\x03\x02\x02\x02C\xF2\x03\x02\x02\x02E\xF6\x03\x02\x02\x02G\xF9\x03\x02" + 205 | "\x02\x02I\xFB\x03\x02\x02\x02K\u0100\x03\x02\x02\x02M\u0102\x03\x02\x02" + 206 | "\x02O\u011F\x03\x02\x02\x02Q\u0121\x03\x02\x02\x02S\u0124\x03\x02\x02" + 207 | "\x02U\u012E\x03\x02\x02\x02W\u0138\x03\x02\x02\x02Y\u013A\x03\x02\x02" + 208 | "\x02[\u0142\x03\x02\x02\x02]\u014A\x03\x02\x02\x02_\u0152\x03\x02\x02" + 209 | "\x02a\u0154\x03\x02\x02\x02c\u0159\x03\x02\x02\x02e\u015B\x03\x02\x02" + 210 | "\x02g\u0164\x03\x02\x02\x02i\u016A\x03\x02\x02\x02k\u016C\x03\x02\x02" + 211 | "\x02m\u0172\x03\x02\x02\x02op\x07a\x02\x02pq\x07a\x02\x02qr\x07O\x02\x02" + 212 | "rs\x07G\x02\x02st\x07V\x02\x02tu\x07C\x02\x02u\x04\x03\x02\x02\x02vw\x07" + 213 | "<\x02\x02w\x06\x03\x02\x02\x02xy\x07k\x02\x02yz\x07p\x02\x02z\b\x03\x02" + 214 | "\x02\x02{|\x07t\x02\x02|}\x07c\x02\x02}~\x07k\x02\x02~\x7F\x07u\x02\x02" + 215 | "\x7F\x80\x07g\x02\x02\x80\n\x03\x02\x02\x02\x81\x82\x07a\x02\x02\x82\x83" + 216 | "\x07a\x02\x02\x83\x84\x07U\x02\x02\x84\x85\x07G\x02\x02\x85\x86\x07V\x02" + 217 | "\x02\x86\x87\x07O\x02\x02\x87\x88\x07G\x02\x02\x88\x89\x07V\x02\x02\x89" + 218 | "\x8A\x07C\x02\x02\x8A\f\x03\x02\x02\x02\x8B\x8C\x07f\x02\x02\x8C\x8D\x07" + 219 | "q\x02\x02\x8D\x0E\x03\x02\x02\x02\x8E\x8F\x07n\x02\x02\x8F\x90\x07q\x02" + 220 | "\x02\x90\x91\x07q\x02\x02\x91\x92\x07r\x02\x02\x92\x10\x03\x02\x02\x02" + 221 | "\x93\x94\x07g\x02\x02\x94\x95\x07p\x02\x02\x95\x96\x07f\x02\x02\x96\x12" + 222 | "\x03\x02\x02\x02\x97\x98\x07y\x02\x02\x98\x99\x07j\x02\x02\x99\x9A\x07" + 223 | "k\x02\x02\x9A\x9B\x07n\x02\x02\x9B\x9C\x07g\x02\x02\x9C\x14\x03\x02\x02" + 224 | "\x02\x9D\x9E\x07h\x02\x02\x9E\x9F\x07q\x02\x02\x9F\xA0\x07t\x02\x02\xA0" + 225 | "\x16\x03\x02\x02\x02\xA1\xA2\x07d\x02\x02\xA2\xA3\x07t\x02\x02\xA3\xA4" + 226 | "\x07g\x02\x02\xA4\xA5\x07c\x02\x02\xA5\xA6\x07m\x02\x02\xA6\x18\x03\x02" + 227 | "\x02\x02\xA7\xA8\x07e\x02\x02\xA8\xA9\x07q\x02\x02\xA9\xAA\x07p\x02\x02" + 228 | "\xAA\xAB\x07v\x02\x02\xAB\xAC\x07k\x02\x02\xAC\xAD\x07p\x02\x02\xAD\xAE" + 229 | "\x07w\x02\x02\xAE\xAF\x07g\x02\x02\xAF\x1A\x03\x02\x02\x02\xB0\xB1\x07" + 230 | "t\x02\x02\xB1\xB2\x07g\x02\x02\xB2\xB3\x07v\x02\x02\xB3\xB4\x07w\x02\x02" + 231 | "\xB4\xB5\x07t\x02\x02\xB5\xB6\x07p\x02\x02\xB6\x1C\x03\x02\x02\x02\xB7" + 232 | "\xB8\x07x\x02\x02\xB8\xB9\x07c\x02\x02\xB9\xBA\x07t\x02\x02\xBA\x1E\x03" + 233 | "\x02\x02\x02\xBB\xBC\x07d\x02\x02\xBC\xBD\x07g\x02\x02\xBD\xBE\x07i\x02" + 234 | "\x02\xBE\xBF\x07k\x02\x02\xBF\xC0\x07p\x02\x02\xC0 \x03\x02\x02\x02\xC1" + 235 | "\xC2\x070\x02\x02\xC2\"\x03\x02\x02\x02\xC3\xC4\x07]\x02\x02\xC4$\x03" + 236 | "\x02\x02\x02\xC5\xC6\x07_\x02\x02\xC6&\x03\x02\x02\x02\xC7\xC8\x07*\x02" + 237 | "\x02\xC8(\x03\x02\x02\x02\xC9\xCA\x07+\x02\x02\xCA*\x03\x02\x02\x02\xCB" + 238 | "\xCC\x07}\x02\x02\xCC,\x03\x02\x02\x02\xCD\xCE\x07\x7F\x02\x02\xCE.\x03" + 239 | "\x02\x02\x02\xCF\xD0\x07P\x02\x02\xD0\xD1\x07q\x02\x02\xD1\xD2\x07p\x02" + 240 | "\x02\xD2\xD3\x07g\x02\x02\xD30\x03\x02\x02\x02\xD4\xD5\x07/\x02\x02\xD5" + 241 | "2\x03\x02\x02\x02\xD6\xD7\x07\x80\x02\x02\xD74\x03\x02\x02\x02\xD8\xD9" + 242 | "\x07k\x02\x02\xD9\xDA\x07h\x02\x02\xDA6\x03\x02\x02\x02\xDB\xDC\x07h\x02" + 243 | "\x02\xDC\xDD\x07w\x02\x02\xDD\xDE\x07p\x02\x02\xDE8\x03\x02\x02\x02\xDF" + 244 | "\xE0\x07/\x02\x02\xE0\xE1\x07@\x02\x02\xE1:\x03\x02\x02\x02\xE2\xE3\x07" + 245 | ".\x02\x02\xE3<\x03\x02\x02\x02\xE4\xE5\x07g\x02\x02\xE5\xE6\x07n\x02\x02" + 246 | "\xE6\xE7\x07u\x02\x02\xE7\xE8\x07g\x02\x02\xE8>\x03\x02\x02\x02\xE9\xEA" + 247 | "\x07g\x02\x02\xEA\xEB\x07n\x02\x02\xEB\xEC\x07k\x02\x02\xEC\xED\x07h\x02" + 248 | "\x02\xED@\x03\x02\x02\x02\xEE\xEF\x07p\x02\x02\xEF\xF0\x07q\x02\x02\xF0" + 249 | "\xF1\x07v\x02\x02\xF1B\x03\x02\x02\x02\xF2\xF3\x07c\x02\x02\xF3\xF4\x07" + 250 | "p\x02\x02\xF4\xF5\x07f\x02\x02\xF5D\x03\x02\x02\x02\xF6\xF7\x07q\x02\x02" + 251 | "\xF7\xF8\x07t\x02\x02\xF8F\x03\x02\x02\x02\xF9\xFA\x07=\x02\x02\xFAH\x03" + 252 | "\x02\x02\x02\xFB\xFC\x07v\x02\x02\xFC\xFD\x07j\x02\x02\xFD\xFE\x07g\x02" + 253 | "\x02\xFE\xFF\x07p\x02\x02\xFFJ\x03\x02\x02\x02\u0100\u0101\x07?\x02\x02" + 254 | "\u0101L\x03\x02\x02\x02\u0102\u0106\x07%\x02\x02\u0103\u0105\n\x02\x02" + 255 | "\x02\u0104\u0103\x03\x02\x02\x02\u0105\u0108\x03\x02\x02\x02\u0106\u0104" + 256 | "\x03\x02\x02\x02\u0106\u0107\x03\x02\x02\x02\u0107\u0109\x03\x02\x02\x02" + 257 | "\u0108\u0106\x03\x02\x02\x02\u0109\u010A\b\'\x02\x02\u010AN\x03\x02\x02" + 258 | "\x02\u010B\u0120\t\x03\x02\x02\u010C\u010D\x07@\x02\x02\u010D\u0120\x07" + 259 | "?\x02\x02\u010E\u010F\x07>\x02\x02\u010F\u0120\x07?\x02\x02\u0110\u0111" + 260 | "\x07?\x02\x02\u0111\u0120\x07?\x02\x02\u0112\u0113\x07#\x02\x02\u0113" + 261 | "\u0120\x07?\x02\x02\u0114\u0120\x04,-\x02\u0115\u0116\x07,\x02\x02\u0116" + 262 | "\u0120\x07,\x02\x02\u0117\u0120\x071\x02\x02\u0118\u0119\x071\x02\x02" + 263 | "\u0119\u0120\x071\x02\x02\u011A\u0120\t\x04\x02\x02\u011B\u011C\x07>\x02" + 264 | "\x02\u011C\u0120\x07>\x02\x02\u011D\u011E\x07@\x02\x02\u011E\u0120\x07" + 265 | "@\x02\x02\u011F\u010B\x03\x02\x02\x02\u011F\u010C\x03\x02\x02\x02\u011F" + 266 | "\u010E\x03\x02\x02\x02\u011F\u0110\x03\x02\x02\x02\u011F\u0112\x03\x02" + 267 | "\x02\x02\u011F\u0114\x03\x02\x02\x02\u011F\u0115\x03\x02\x02\x02\u011F" + 268 | "\u0117\x03\x02\x02\x02\u011F\u0118\x03\x02\x02\x02\u011F\u011A\x03\x02" + 269 | "\x02\x02\u011F\u011B\x03\x02\x02\x02\u011F\u011D\x03\x02\x02\x02\u0120" + 270 | "P\x03\x02\x02\x02\u0121\u0122\x07^\x02\x02\u0122\u0123\x07$\x02\x02\u0123" + 271 | "R\x03\x02\x02\x02\u0124\u0129\x07$\x02\x02\u0125\u0128\x05Q)\x02\u0126" + 272 | "\u0128\n\x05\x02\x02\u0127\u0125\x03\x02\x02\x02\u0127\u0126\x03\x02\x02" + 273 | "\x02\u0128\u012B\x03\x02\x02\x02\u0129\u0127\x03\x02\x02\x02\u0129\u012A" + 274 | "\x03\x02\x02\x02\u012A\u012C\x03\x02\x02\x02\u012B\u0129\x03\x02\x02\x02" + 275 | "\u012C\u012D\x07$\x02\x02\u012DT\x03\x02\x02\x02\u012E\u012F\t\x06\x02" + 276 | "\x02\u012FV\x03\x02\x02\x02\u0130\u0132\x05_0\x02\u0131\u0130\x03\x02" + 277 | "\x02\x02\u0132\u0133\x03\x02\x02\x02\u0133\u0131\x03\x02\x02\x02\u0133" + 278 | "\u0134\x03\x02\x02\x02\u0134\u0139\x03\x02\x02\x02\u0135\u0139\x05Y-\x02" + 279 | "\u0136\u0139\x05[.\x02\u0137\u0139\x05]/\x02\u0138\u0131\x03\x02\x02\x02" + 280 | "\u0138\u0135\x03\x02\x02\x02\u0138\u0136\x03\x02\x02\x02\u0138\u0137\x03" + 281 | "\x02\x02\x02\u0139X\x03\x02\x02\x02\u013A\u013B\x072\x02\x02\u013B\u013F" + 282 | "\x07z\x02\x02\u013C\u013E\t\x07\x02\x02\u013D\u013C\x03\x02\x02\x02\u013E" + 283 | "\u0141\x03\x02\x02\x02\u013F\u013D\x03\x02\x02\x02\u013F\u0140\x03\x02" + 284 | "\x02\x02\u0140Z\x03\x02\x02\x02\u0141\u013F\x03\x02\x02\x02\u0142\u0143" + 285 | "\x072\x02\x02\u0143\u0147\x07q\x02\x02\u0144\u0146\t\b\x02\x02\u0145\u0144" + 286 | "\x03\x02\x02\x02\u0146\u0149\x03\x02\x02\x02\u0147\u0145\x03\x02\x02\x02" + 287 | "\u0147\u0148\x03\x02\x02\x02\u0148\\\x03\x02\x02\x02\u0149\u0147\x03\x02" + 288 | "\x02\x02\u014A\u014B\x072\x02\x02\u014B\u014F\x07d\x02\x02\u014C\u014E" + 289 | "\t\t\x02\x02\u014D\u014C\x03\x02\x02\x02\u014E\u0151\x03\x02\x02\x02\u014F" + 290 | "\u014D\x03\x02\x02\x02\u014F\u0150\x03\x02\x02\x02\u0150^\x03\x02\x02" + 291 | "\x02\u0151\u014F\x03\x02\x02\x02\u0152\u0153\t\n\x02\x02\u0153`\x03\x02" + 292 | "\x02\x02\u0154\u0155\x05W,\x02\u0155\u0156\x070\x02\x02\u0156\u0157\x05" + 293 | "W,\x02\u0157b\x03\x02\x02\x02\u0158\u015A\t\v\x02\x02\u0159\u0158\x03" + 294 | "\x02\x02\x02\u015Ad\x03\x02\x02\x02\u015B\u0160\x05c2\x02\u015C\u015F" + 295 | "\x05_0\x02\u015D\u015F\x05c2\x02\u015E\u015C\x03\x02\x02\x02\u015E\u015D" + 296 | "\x03\x02\x02\x02\u015F\u0162\x03\x02\x02\x02\u0160\u015E\x03\x02\x02\x02" + 297 | "\u0160\u0161\x03\x02\x02\x02\u0161f\x03\x02\x02\x02\u0162\u0160\x03\x02" + 298 | "\x02\x02\u0163\u0165\t\f\x02\x02\u0164\u0163\x03\x02\x02\x02\u0165\u0166" + 299 | "\x03\x02\x02\x02\u0166\u0164\x03\x02\x02\x02\u0166\u0167\x03\x02\x02\x02" + 300 | "\u0167\u0168\x03\x02\x02\x02\u0168\u0169\b4\x02\x02\u0169h\x03\x02\x02" + 301 | "\x02\u016A\u016B\x07\x0F\x02\x02\u016Bj\x03\x02\x02\x02\u016C\u016D\x07" + 302 | "\f\x02\x02\u016Dl\x03\x02\x02\x02\u016E\u0170\x05i5\x02\u016F\u016E\x03" + 303 | "\x02\x02\x02\u016F\u0170\x03\x02\x02\x02\u0170\u0171\x03\x02\x02\x02\u0171" + 304 | "\u0173\x05k6\x02\u0172\u016F\x03\x02\x02\x02\u0173\u0174\x03\x02\x02\x02" + 305 | "\u0174\u0172\x03\x02\x02\x02\u0174\u0175\x03\x02\x02\x02\u0175\u017D\x03" + 306 | "\x02\x02\x02\u0176\u017C\x05g4\x02\u0177\u0179\x05i5\x02\u0178\u0177\x03" + 307 | "\x02\x02\x02\u0178\u0179\x03\x02\x02\x02\u0179\u017A\x03\x02\x02\x02\u017A" + 308 | "\u017C\x05k6\x02\u017B\u0176\x03\x02\x02\x02\u017B\u0178\x03\x02\x02\x02" + 309 | "\u017C\u017F\x03\x02\x02\x02\u017D\u017B\x03\x02\x02\x02\u017D\u017E\x03" + 310 | "\x02\x02\x02\u017En\x03\x02\x02\x02\u017F\u017D\x03\x02\x02\x02\x16\x02" + 311 | "\u0106\u011F\u0127\u0129\u0133\u0138\u013D\u013F\u0147\u014F\u0159\u015E" + 312 | "\u0160\u0166\u016F\u0174\u0178\u017B\u017D\x03\b\x02\x02"; 313 | public static __ATN: ATN; 314 | public static get _ATN(): ATN { 315 | if (!DianaScriptLexer.__ATN) { 316 | DianaScriptLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(DianaScriptLexer._serializedATN)); 317 | } 318 | 319 | return DianaScriptLexer.__ATN; 320 | } 321 | 322 | } 323 | 324 | -------------------------------------------------------------------------------- /src/completion.ts: -------------------------------------------------------------------------------- 1 | import * as os from "os"; 2 | import * as vscode from 'vscode'; 3 | import { DianaScriptLexer } from "./DianaScriptLexer"; 4 | import { Token } from 'antlr4ts'; 5 | import { parseText } from './hightlight'; 6 | import * as fs from 'fs'; 7 | import { join } from "path"; 8 | 9 | function _getLineSpanN(s: string, n: number) { 10 | let i = 0; 11 | let k; 12 | for (k = 0; k < n; k++) { 13 | i = s.indexOf(os.EOL, i); 14 | if (i == undefined) 15 | return undefined; 16 | i += os.EOL.length; 17 | } 18 | return i; 19 | } 20 | 21 | 22 | function _compItem(s: string, type: string, doc: string) { 23 | const item = new vscode.CompletionItem(s); 24 | item.insertText = s; 25 | if (type == "") 26 | item.label = s; 27 | else 28 | item.label = type; 29 | item.detail = doc; 30 | return item; 31 | } 32 | 33 | interface Method { 34 | name: string, 35 | type: string | undefined, 36 | doc: string | undefined 37 | 38 | } 39 | interface Module { 40 | module: string, 41 | doc: string, 42 | methods: Array 43 | } 44 | function eventFunc(uri: vscode.Uri) { 45 | vscode.workspace.openTextDocument(uri).then((document) => { 46 | try { 47 | const mods: Array = JSON.parse(document.getText()); 48 | builtinModules.clear(); 49 | for (const mod of mods) { 50 | builtinModules.set(mod.module, 51 | mod.methods.map((meth) => 52 | _compItem( 53 | meth.name, 54 | meth.type ?? "", 55 | meth.doc ?? ""))); 56 | } 57 | } 58 | catch (e) { 59 | return; 60 | } 61 | return; 62 | 63 | }); 64 | } 65 | 66 | 67 | const watcher = vscode.workspace.createFileSystemWatcher("**/sigs.diana.json", false, false); 68 | watcher.onDidChange(eventFunc); 69 | watcher.onDidCreate(eventFunc); 70 | 71 | 72 | // I don't know how to call the event at startup, so...😅 73 | const filepath = vscode.workspace.workspaceFolders?.[0].uri.fsPath; 74 | if (filepath != undefined) 75 | eventFunc(vscode.Uri.file(join(filepath, "sigs.diana.json"))); 76 | 77 | const builtinModules = new Map(); 78 | 79 | export class DianaCompletionItemProvider implements vscode.CompletionItemProvider { 80 | public provideCompletionItems( 81 | document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): 82 | Thenable { 83 | const docstr = document.getText(); 84 | const start = _getLineSpanN(docstr, position.line); 85 | if (start == undefined) 86 | return Promise.resolve().then(() => []); 87 | let each: Token | undefined = undefined; 88 | for (const tk of parseText(docstr.substr(start, position.character - 1))) { 89 | each = tk; 90 | } 91 | if (each != undefined) 92 | if (each.type == DianaScriptLexer.NAME_13 && each.text) { 93 | const lst = builtinModules.get(each.text); 94 | if (lst != undefined) 95 | return Promise.resolve().then(() => lst); 96 | } 97 | 98 | return Promise.resolve().then(() => []); 99 | 100 | } 101 | } -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from 'vscode'; 2 | import { DocumentSemanticTokensProvider, legend } from "./hightlight"; 3 | import { DianaCompletionItemProvider } from "./completion"; 4 | 5 | export function activate(context: vscode.ExtensionContext) { 6 | context.subscriptions.push(vscode.languages.registerDocumentSemanticTokensProvider({ scheme: 'file', language: 'diana' }, new DocumentSemanticTokensProvider(), legend)); 7 | 8 | context.subscriptions.push( 9 | vscode.languages.registerCompletionItemProvider( 10 | { scheme: 'file', language: 'diana' }, new DianaCompletionItemProvider(), '.')); 11 | } 12 | -------------------------------------------------------------------------------- /src/hightlight.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from 'vscode'; 2 | import * as antlr4ts from 'antlr4ts'; 3 | import * as os from 'os'; 4 | import { DianaScriptLexer } from './DianaScriptLexer'; 5 | 6 | const tokenTypesLegend = [ 7 | 'comment', 8 | 'string', 9 | 'keyword', 10 | 'number', 11 | 'regexp', 12 | 'operator', 13 | 'namespace', 14 | 'type', 15 | 'struct', 16 | 'class', 17 | 'interface', 18 | 'enum', 19 | 'typeParameter', 20 | 'function', 21 | 'method', 22 | 'decorator', 23 | 'macro', 24 | 'variable', 25 | 'parameter', 26 | 'property', 27 | 'label' 28 | ]; 29 | 30 | const tokenModifiersLegend = [ 31 | 'declaration', 32 | 'documentation', 33 | 'readonly', 34 | 'static', 35 | 'abstract', 36 | 'deprecated', 37 | 'modification', 38 | 'async' 39 | ]; 40 | 41 | function getNativeTokenId(s: string): number { 42 | return tokenTypesLegend.indexOf(s); 43 | } 44 | 45 | const tokenTypes = new Map([ 46 | [DianaScriptLexer.COMMENT_1, getNativeTokenId("comment")], 47 | [DianaScriptLexer.FLOAT_11, getNativeTokenId("number")], 48 | [DianaScriptLexer.INT_10, getNativeTokenId("number")], 49 | [DianaScriptLexer.STR_4, getNativeTokenId("string")], 50 | [DianaScriptLexer.NAME_13, getNativeTokenId("variable")], 51 | [DianaScriptLexer.HEX_7, getNativeTokenId("number")], 52 | [DianaScriptLexer.OCT_8, getNativeTokenId("number")], 53 | [DianaScriptLexer.BIN_9, getNativeTokenId("number")], 54 | [DianaScriptLexer.SINGLE_BINOP_2, getNativeTokenId("operator")], 55 | ]); 56 | 57 | const __KEYWORD = getNativeTokenId("keyword"); 58 | for (const ruleName of DianaScriptLexer.ruleNames) { 59 | if (ruleName.startsWith("T")) { 60 | const tokenType = (DianaScriptLexer)[ruleName]; 61 | const litName = DianaScriptLexer.VOCABULARY.getLiteralName(tokenType); 62 | if (litName == undefined) 63 | continue; 64 | if (!(litName.startsWith("'") && litName.endsWith("'"))) 65 | continue; 66 | if (litName.substr(1, litName.length - 2).match(/[a-zA-Z_][a-zA-Z_0-9]*/)) { 67 | tokenTypes.set(tokenType, __KEYWORD); 68 | } 69 | } 70 | } 71 | 72 | export const legend = new vscode.SemanticTokensLegend(tokenTypesLegend, tokenModifiersLegend); 73 | 74 | export function parseText(text: string) { 75 | const inputStream = antlr4ts.CharStreams.fromString(text); 76 | const lexer = new DianaScriptLexer(inputStream); 77 | const EOF = DianaScriptLexer.EOF; 78 | function* genstream() { 79 | while (true) { 80 | const token = lexer.nextToken(); 81 | if (token.type == EOF) 82 | break; 83 | yield token; 84 | } 85 | } 86 | return genstream(); 87 | } 88 | 89 | export class DocumentSemanticTokensProvider implements vscode.DocumentSemanticTokensProvider { 90 | async provideDocumentSemanticTokens(document: vscode.TextDocument, token: vscode.CancellationToken): Promise { 91 | const iter = parseText(document.getText()); 92 | const builder = new vscode.SemanticTokensBuilder(); 93 | 94 | while (true) { 95 | const curr = iter.next(); 96 | if (curr.done) 97 | break; 98 | 99 | const token = curr.value; 100 | if (token.text == undefined) 101 | continue; 102 | 103 | const type = tokenTypes.get(token.type); 104 | if (type == undefined) 105 | continue; 106 | 107 | builder.push(token.line - 1, token.charPositionInLine, token.stopIndex - token.startIndex + 1, type, 0); 108 | } 109 | return builder.build(); 110 | } 111 | } 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thautwarm/vscode-diana/e295d267c40f5d933b4fb620f43a3476031165d4/static/icon.png -------------------------------------------------------------------------------- /static/static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thautwarm/vscode-diana/e295d267c40f5d933b4fb620f43a3476031165d4/static/static.png -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es2019", 5 | "lib": ["ES2019"], 6 | "outDir": "out", 7 | "sourceMap": true, 8 | "rootDir": "src", 9 | "strict": true 10 | }, 11 | "exclude": ["node_modules", ".vscode-test"] 12 | } 13 | --------------------------------------------------------------------------------