├── .github └── workflows │ └── test.yml ├── .gitignore ├── CHANGELOG.md ├── Contributing.md ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── build.sh ├── generate-types.sh ├── package-lock.json ├── package.json ├── rollup.config.js ├── src ├── snowsql.grammar └── tokens.js └── test ├── create.txt ├── custom-test.js ├── describe.txt ├── drop.txt ├── select.txt ├── statements.txt ├── test-errorNodes.js └── test-snowsql.js /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Lezer SnowSQL build and test 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - main 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v2 16 | with: 17 | node-version: '14' 18 | - name: Install dependencies 19 | run: npm ci 20 | - name: Build 21 | run: npm run build 22 | - name: Test 23 | run: npm test 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /src/parser.* 3 | .tern-* 4 | /dist/ 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Snowflake-Labs/lezer-snowsql/5aed55df4ab53c1fa0185a049bbd262ad70e577e/CHANGELOG.md -------------------------------------------------------------------------------- /Contributing.md: -------------------------------------------------------------------------------- 1 | Requirements: npm/yarn 2 | 3 | ------------ 4 | 5 | ### Getting started with Lezer SnowSQL: 6 | 7 | Clone lezer-snowsql 8 | 9 | Cd to lezer-snowsql after cloning. 10 | 11 | Run `npm install` or `yarn install` to install the dependencies. 12 | 13 | Run `npm run build` or `yarn run build` to build lezer-snowsql. 14 | 15 | Run `npm start` or `yarn start` to start it. 16 | 17 | -------------- 18 | 19 | 20 | ### Structure: 21 | 22 | * The statement definitions are present in the snowsql.grammar file, inside src/ directory. 23 | 24 | * The second file in src/, tokens.js file contains the keywords used in snowsql.grammar. 25 | 26 | Rules are made up of terms. A term can mean non-terminals and tokens. Non-terminals contain terms, so can contain both non-terminals and tokens. Tokens match a piece of text. 27 | 28 | Rule/Non-terminal definition names should begin with a capital letter and have no spaces in-between. 29 | 30 | Symbols and their purpose: 31 | 32 | ?: Specifies one optional occurrence of the term it is placed after. 33 | *: Specifies 0 or more occurrences of the term it is placed after. 34 | +: Specifies or more occurrences of the term it is placed after. 35 | |: Specifies alternative/or for a term. 36 | 37 | -------------- 38 | 39 | ### Adding statements to the grammar: 40 | 41 | * In the grammar, we have an Stmt rule, which is the parent rule for all the statements. So for every new statement defined, this is the rule where the name of the rule should be added. E.g. 42 | 43 | ``` 44 | Stmt 45 | { 46 | . 47 | . 48 | . 49 | DescribeStmt | 50 | DropStmt | 51 | NewStmt 52 | 53 | } 54 | ``` 55 | 56 | 57 | In a SnowSQL statement, there will be a variety of keywords being used, we’ll need to add these keyword tokens into three sections between the grammar and the tokens file, like below: 58 | 59 | In snowsql.grammar: 60 | 61 | ``` 62 | @external specialize {Identifier} specializeIdentifier from "./tokens" { 63 | . 64 | . 65 | . 66 | Select, From, Where, With, NewKeyword 67 | 68 | } 69 | ``` 70 | 71 | 72 | In tokens.js: 73 | 74 | First in: 75 | ``` 76 | import { 77 | . 78 | . 79 | . 80 | Select, 81 | From, 82 | Where, 83 | With, 84 | NewKeyword 85 | 86 | } from "./parser.terms.js"; 87 | ``` 88 | And then in: 89 | ``` 90 | const keywordTokens = { 91 | . 92 | . 93 | . 94 | select : Select, 95 | from : From, 96 | where : Where, 97 | with: With, 98 | NewKeyword : NewKeyword 99 | 100 | }; 101 | ``` 102 | 103 | 104 | * Now, let us look at an actual statement. We’ll go with the Describe statement. 105 | 106 | ``` 107 | 108 | DescribeStmt { 109 | 110 | (Describe | Desc) DescribeTargetSimple ObjName | 111 | 112 | (Describe | Desc) (External)? Table ObjName (Type Eql (Columns | Stage))? | 113 | 114 | (Describe | Desc) (Function | Procedure) Identifier UdfSig 115 | 116 | } 117 | 118 | 119 | DescribeTargetSimple { 120 | 121 | Materialized? View | 122 | User | 123 | (Masking | Network | Row Access) Policy | 124 | File Format | 125 | (Api | Storage | Security | Notification)? Integration | 126 | Pipe | 127 | Sequence | 128 | Share | 129 | Stage | 130 | Stream | 131 | Task 132 | 133 | } 134 | ``` 135 | 136 | 137 | * We can have Describe or Desc at the beginning of the statement. So we’ll use the OR symbol (“|”) to have a choice between Desc and Describe. 138 | 139 | * `DescribeTargetSimple` is a non-terminal that has terminals (or keywords) like Stream, Task, Stage etc. 140 | 141 | We’ve clubbed all of the keywords that fit the identical definition, so we don’t have to write a separate Describe definition for each keyword. 142 | 143 | In the second Describe definition you have 144 | 145 | ``` (Describe | Desc) (External)? Table ObjName (Type Eql (Columns | Stage))? |``` 146 | 147 | Where external is optional, because of the ‘?’ symbol. 148 | 149 | The statement ends with a semicolon that is present in the top Stmts definition. The semicolon is a symbol added in the list present after //operator. Like ``` Smc {";"}```, other symbols can be added. 150 | 151 | After you’re done writing the statement, you should run 152 | 153 | ```npm run build``` 154 | 155 | If there are no errors, you’ve successfully added the statement. 156 | 157 | -------------- 158 | 159 | ### Errors you may encounter : 160 | 161 | * Shift/Reduce: 162 | 163 | A shift/reduce conflict occurs when both the shift and reduce actions are valid and the parser doesn’t know which one to continue with. 164 | 165 | Besides the structural changes to avoid ambiguity, you can also add precedences for the problematic tokens. More on precedences in the Lezer docs 166 | 167 | * Reduce/Reduce: 168 | 169 | A reduce/reduce conflict occurs if there are two or more rules that apply to the same sequence of input. This usually means a serious error in the grammar. 170 | 171 | To solve this, you’ll have to fix the rule definitions such that an input can only be reduced “in one way” with the definitions. 172 | 173 | **[Note : Both of the above errors can be isolated by not using the problematic rules/commenting them out. You can continue with adding different parts of the grammar]** 174 | 175 | * Grammar contains zero-length tokens in (“’'): 176 | 177 | As the description suggests, there are zero-length tokens present in the rule. Which usually means an extra “|” symbol, placed accidentally. E.g. 178 | ``` 179 | RuleDefintion { 180 | 181 | TokenA | TokenB | | Token C 182 | 183 | } 184 | ``` 185 | * Duplicate definition of rule (“"): 186 | 187 | There are two identical rule names in the grammar, the rule body can differ. 188 | ``` 189 | RuleDefintion { 190 | 191 | … 192 | 193 | } 194 | 195 | 196 | RuleDefintion { 197 | 198 | … 199 | 200 | } 201 | ``` 202 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Snowflake-Labs/lezer-snowsql/5aed55df4ab53c1fa0185a049bbd262ad70e577e/MAINTAINERS.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lezer-snowsql 2 | 3 | ## Overview 4 | 5 | This is a SnowSQL grammar for the [lezer](https://lezer.codemirror.net/) parser system. 6 | 7 | ### Statements and Features 8 | 9 | - [x] Drop Statement 10 | - [x] Describe Statement 11 | - [x] Create Integration Statement 12 | - [x] Create Account Statement 13 | - [x] Create Resource Monitor Statement 14 | - [x] Create Role Statement 15 | - [x] Create Database Statement 16 | - [x] Create Share Statement 17 | - [x] Create Table Statement 18 | - [x] Grant Statement 19 | - [x] Commit Statement 20 | - [x] Get Statement 21 | - [x] Use Statement 22 | - [x] Truncate Statement 23 | - [x] Copy Statement 24 | - [ ] Select Statment 25 | - [ ] Alter Statements 26 | - [ ] Call Statement 27 | - [ ] Insert Statement 28 | - [ ] Delete Statement 29 | - [ ] Merge Statement 30 | - [ ] Set Statement 31 | - [x] Comments - Inline + Block 32 | 33 | 34 | 35 | ## Installation 36 | 37 | ```bash 38 | npm install 39 | ``` 40 | 41 | ## Development 42 | ### Building 43 | 44 | ```bash 45 | npm run build 46 | ``` 47 | ### Testing 48 | 49 | ```bash 50 | npm test 51 | ``` 52 | 53 | (You can also use yarn instead of npm.) 54 | 55 | 56 | ## License 57 | 58 | The code is licensed under an [Apache 2.0](./LICENSE) license. 59 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | set -ex 2 | 3 | lezer-generator src/snowsql.grammar -o src/parser 4 | 5 | cat src/parser.terms.js >> src/parser.js 6 | 7 | bash ./generate-types.sh 8 | 9 | rollup -c 10 | 11 | # Finally, copy some useful files into the distribution folder for documentation purposes. 12 | cp ./README.md ./dist/README.md 13 | cp ./CHANGELOG.md ./dist/CHANGELOG.md 14 | cp ./LICENSE ./dist/LICENSE 15 | cp ./package.json ./dist/package.json 16 | -------------------------------------------------------------------------------- /generate-types.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | mkdir -p ./dist 6 | indexFile='./dist/index.d.ts' 7 | if [[ -f ${indexFile} ]]; then 8 | rm ${indexFile} 9 | fi 10 | 11 | cat <> ${indexFile} 12 | 13 | // This file was generated by lezer-snowql. You probably should not edit it. 14 | import { Parser } from 'lezer' 15 | 16 | export const parser: Parser 17 | $(sed -E 's/ = [0-9]+/: number/' src/parser.terms.js) 18 | EOF 19 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lezer-snowsql", 3 | "version": "0.1.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "lezer-snowsql", 9 | "version": "0.1.0", 10 | "license": "Apache-2.0", 11 | "dependencies": { 12 | "chai": "^4.3.4" 13 | }, 14 | "devDependencies": { 15 | "@rollup/plugin-node-resolve": "^9.0.0", 16 | "lezer": "^0.13.5", 17 | "lezer-generator": "^0.13.1", 18 | "mocha": "^8.1.3", 19 | "rollup": "^2.27.1" 20 | }, 21 | "peerDependencies": { 22 | "lezer": "^0.13.5" 23 | } 24 | }, 25 | "node_modules/@rollup/plugin-node-resolve": { 26 | "version": "9.0.0", 27 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz", 28 | "integrity": "sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==", 29 | "dev": true, 30 | "dependencies": { 31 | "@rollup/pluginutils": "^3.1.0", 32 | "@types/resolve": "1.17.1", 33 | "builtin-modules": "^3.1.0", 34 | "deepmerge": "^4.2.2", 35 | "is-module": "^1.0.0", 36 | "resolve": "^1.17.0" 37 | }, 38 | "engines": { 39 | "node": ">= 10.0.0" 40 | }, 41 | "peerDependencies": { 42 | "rollup": "^1.20.0||^2.0.0" 43 | } 44 | }, 45 | "node_modules/@rollup/pluginutils": { 46 | "version": "3.1.0", 47 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 48 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 49 | "dev": true, 50 | "dependencies": { 51 | "@types/estree": "0.0.39", 52 | "estree-walker": "^1.0.1", 53 | "picomatch": "^2.2.2" 54 | }, 55 | "engines": { 56 | "node": ">= 8.0.0" 57 | }, 58 | "peerDependencies": { 59 | "rollup": "^1.20.0||^2.0.0" 60 | } 61 | }, 62 | "node_modules/@types/estree": { 63 | "version": "0.0.39", 64 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 65 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 66 | "dev": true 67 | }, 68 | "node_modules/@types/node": { 69 | "version": "16.6.1", 70 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", 71 | "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==", 72 | "dev": true 73 | }, 74 | "node_modules/@types/resolve": { 75 | "version": "1.17.1", 76 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 77 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 78 | "dev": true, 79 | "dependencies": { 80 | "@types/node": "*" 81 | } 82 | }, 83 | "node_modules/@ungap/promise-all-settled": { 84 | "version": "1.1.2", 85 | "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", 86 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", 87 | "dev": true 88 | }, 89 | "node_modules/ansi-colors": { 90 | "version": "4.1.1", 91 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 92 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 93 | "dev": true, 94 | "engines": { 95 | "node": ">=6" 96 | } 97 | }, 98 | "node_modules/ansi-regex": { 99 | "version": "3.0.0", 100 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", 101 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", 102 | "dev": true, 103 | "engines": { 104 | "node": ">=4" 105 | } 106 | }, 107 | "node_modules/ansi-styles": { 108 | "version": "4.3.0", 109 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 110 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 111 | "dev": true, 112 | "dependencies": { 113 | "color-convert": "^2.0.1" 114 | }, 115 | "engines": { 116 | "node": ">=8" 117 | }, 118 | "funding": { 119 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 120 | } 121 | }, 122 | "node_modules/anymatch": { 123 | "version": "3.1.2", 124 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 125 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 126 | "dev": true, 127 | "dependencies": { 128 | "normalize-path": "^3.0.0", 129 | "picomatch": "^2.0.4" 130 | }, 131 | "engines": { 132 | "node": ">= 8" 133 | } 134 | }, 135 | "node_modules/argparse": { 136 | "version": "2.0.1", 137 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 138 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 139 | "dev": true 140 | }, 141 | "node_modules/assertion-error": { 142 | "version": "1.1.0", 143 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", 144 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", 145 | "engines": { 146 | "node": "*" 147 | } 148 | }, 149 | "node_modules/balanced-match": { 150 | "version": "1.0.2", 151 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 152 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 153 | "dev": true 154 | }, 155 | "node_modules/binary-extensions": { 156 | "version": "2.2.0", 157 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 158 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 159 | "dev": true, 160 | "engines": { 161 | "node": ">=8" 162 | } 163 | }, 164 | "node_modules/brace-expansion": { 165 | "version": "1.1.11", 166 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 167 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 168 | "dev": true, 169 | "dependencies": { 170 | "balanced-match": "^1.0.0", 171 | "concat-map": "0.0.1" 172 | } 173 | }, 174 | "node_modules/braces": { 175 | "version": "3.0.2", 176 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 177 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 178 | "dev": true, 179 | "dependencies": { 180 | "fill-range": "^7.0.1" 181 | }, 182 | "engines": { 183 | "node": ">=8" 184 | } 185 | }, 186 | "node_modules/browser-stdout": { 187 | "version": "1.3.1", 188 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 189 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 190 | "dev": true 191 | }, 192 | "node_modules/builtin-modules": { 193 | "version": "3.2.0", 194 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", 195 | "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", 196 | "dev": true, 197 | "engines": { 198 | "node": ">=6" 199 | }, 200 | "funding": { 201 | "url": "https://github.com/sponsors/sindresorhus" 202 | } 203 | }, 204 | "node_modules/camelcase": { 205 | "version": "6.2.0", 206 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", 207 | "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", 208 | "dev": true, 209 | "engines": { 210 | "node": ">=10" 211 | }, 212 | "funding": { 213 | "url": "https://github.com/sponsors/sindresorhus" 214 | } 215 | }, 216 | "node_modules/chai": { 217 | "version": "4.3.4", 218 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", 219 | "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", 220 | "dependencies": { 221 | "assertion-error": "^1.1.0", 222 | "check-error": "^1.0.2", 223 | "deep-eql": "^3.0.1", 224 | "get-func-name": "^2.0.0", 225 | "pathval": "^1.1.1", 226 | "type-detect": "^4.0.5" 227 | }, 228 | "engines": { 229 | "node": ">=4" 230 | } 231 | }, 232 | "node_modules/chalk": { 233 | "version": "4.1.2", 234 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 235 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 236 | "dev": true, 237 | "dependencies": { 238 | "ansi-styles": "^4.1.0", 239 | "supports-color": "^7.1.0" 240 | }, 241 | "engines": { 242 | "node": ">=10" 243 | }, 244 | "funding": { 245 | "url": "https://github.com/chalk/chalk?sponsor=1" 246 | } 247 | }, 248 | "node_modules/chalk/node_modules/supports-color": { 249 | "version": "7.2.0", 250 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 251 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 252 | "dev": true, 253 | "dependencies": { 254 | "has-flag": "^4.0.0" 255 | }, 256 | "engines": { 257 | "node": ">=8" 258 | } 259 | }, 260 | "node_modules/check-error": { 261 | "version": "1.0.2", 262 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", 263 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", 264 | "engines": { 265 | "node": "*" 266 | } 267 | }, 268 | "node_modules/chokidar": { 269 | "version": "3.5.1", 270 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", 271 | "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", 272 | "dev": true, 273 | "dependencies": { 274 | "anymatch": "~3.1.1", 275 | "braces": "~3.0.2", 276 | "glob-parent": "~5.1.0", 277 | "is-binary-path": "~2.1.0", 278 | "is-glob": "~4.0.1", 279 | "normalize-path": "~3.0.0", 280 | "readdirp": "~3.5.0" 281 | }, 282 | "engines": { 283 | "node": ">= 8.10.0" 284 | }, 285 | "optionalDependencies": { 286 | "fsevents": "~2.3.1" 287 | } 288 | }, 289 | "node_modules/cliui": { 290 | "version": "7.0.4", 291 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 292 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 293 | "dev": true, 294 | "dependencies": { 295 | "string-width": "^4.2.0", 296 | "strip-ansi": "^6.0.0", 297 | "wrap-ansi": "^7.0.0" 298 | } 299 | }, 300 | "node_modules/cliui/node_modules/ansi-regex": { 301 | "version": "5.0.0", 302 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 303 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 304 | "dev": true, 305 | "engines": { 306 | "node": ">=8" 307 | } 308 | }, 309 | "node_modules/cliui/node_modules/is-fullwidth-code-point": { 310 | "version": "3.0.0", 311 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 312 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 313 | "dev": true, 314 | "engines": { 315 | "node": ">=8" 316 | } 317 | }, 318 | "node_modules/cliui/node_modules/string-width": { 319 | "version": "4.2.2", 320 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 321 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 322 | "dev": true, 323 | "dependencies": { 324 | "emoji-regex": "^8.0.0", 325 | "is-fullwidth-code-point": "^3.0.0", 326 | "strip-ansi": "^6.0.0" 327 | }, 328 | "engines": { 329 | "node": ">=8" 330 | } 331 | }, 332 | "node_modules/cliui/node_modules/strip-ansi": { 333 | "version": "6.0.0", 334 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 335 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 336 | "dev": true, 337 | "dependencies": { 338 | "ansi-regex": "^5.0.0" 339 | }, 340 | "engines": { 341 | "node": ">=8" 342 | } 343 | }, 344 | "node_modules/color-convert": { 345 | "version": "2.0.1", 346 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 347 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 348 | "dev": true, 349 | "dependencies": { 350 | "color-name": "~1.1.4" 351 | }, 352 | "engines": { 353 | "node": ">=7.0.0" 354 | } 355 | }, 356 | "node_modules/color-name": { 357 | "version": "1.1.4", 358 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 359 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 360 | "dev": true 361 | }, 362 | "node_modules/concat-map": { 363 | "version": "0.0.1", 364 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 365 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 366 | "dev": true 367 | }, 368 | "node_modules/debug": { 369 | "version": "4.3.1", 370 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", 371 | "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", 372 | "dev": true, 373 | "dependencies": { 374 | "ms": "2.1.2" 375 | }, 376 | "engines": { 377 | "node": ">=6.0" 378 | }, 379 | "peerDependenciesMeta": { 380 | "supports-color": { 381 | "optional": true 382 | } 383 | } 384 | }, 385 | "node_modules/debug/node_modules/ms": { 386 | "version": "2.1.2", 387 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 388 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 389 | "dev": true 390 | }, 391 | "node_modules/decamelize": { 392 | "version": "4.0.0", 393 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 394 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 395 | "dev": true, 396 | "engines": { 397 | "node": ">=10" 398 | }, 399 | "funding": { 400 | "url": "https://github.com/sponsors/sindresorhus" 401 | } 402 | }, 403 | "node_modules/deep-eql": { 404 | "version": "3.0.1", 405 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", 406 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", 407 | "dependencies": { 408 | "type-detect": "^4.0.0" 409 | }, 410 | "engines": { 411 | "node": ">=0.12" 412 | } 413 | }, 414 | "node_modules/deepmerge": { 415 | "version": "4.2.2", 416 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 417 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 418 | "dev": true, 419 | "engines": { 420 | "node": ">=0.10.0" 421 | } 422 | }, 423 | "node_modules/diff": { 424 | "version": "5.0.0", 425 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 426 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 427 | "dev": true, 428 | "engines": { 429 | "node": ">=0.3.1" 430 | } 431 | }, 432 | "node_modules/emoji-regex": { 433 | "version": "8.0.0", 434 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 435 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 436 | "dev": true 437 | }, 438 | "node_modules/escalade": { 439 | "version": "3.1.1", 440 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 441 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 442 | "dev": true, 443 | "engines": { 444 | "node": ">=6" 445 | } 446 | }, 447 | "node_modules/escape-string-regexp": { 448 | "version": "4.0.0", 449 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 450 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 451 | "dev": true, 452 | "engines": { 453 | "node": ">=10" 454 | }, 455 | "funding": { 456 | "url": "https://github.com/sponsors/sindresorhus" 457 | } 458 | }, 459 | "node_modules/estree-walker": { 460 | "version": "1.0.1", 461 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 462 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 463 | "dev": true 464 | }, 465 | "node_modules/fill-range": { 466 | "version": "7.0.1", 467 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 468 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 469 | "dev": true, 470 | "dependencies": { 471 | "to-regex-range": "^5.0.1" 472 | }, 473 | "engines": { 474 | "node": ">=8" 475 | } 476 | }, 477 | "node_modules/find-up": { 478 | "version": "5.0.0", 479 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 480 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 481 | "dev": true, 482 | "dependencies": { 483 | "locate-path": "^6.0.0", 484 | "path-exists": "^4.0.0" 485 | }, 486 | "engines": { 487 | "node": ">=10" 488 | }, 489 | "funding": { 490 | "url": "https://github.com/sponsors/sindresorhus" 491 | } 492 | }, 493 | "node_modules/flat": { 494 | "version": "5.0.2", 495 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 496 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 497 | "dev": true, 498 | "bin": { 499 | "flat": "cli.js" 500 | } 501 | }, 502 | "node_modules/fs.realpath": { 503 | "version": "1.0.0", 504 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 505 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 506 | "dev": true 507 | }, 508 | "node_modules/fsevents": { 509 | "version": "2.3.2", 510 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 511 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 512 | "dev": true, 513 | "hasInstallScript": true, 514 | "optional": true, 515 | "os": [ 516 | "darwin" 517 | ], 518 | "engines": { 519 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 520 | } 521 | }, 522 | "node_modules/function-bind": { 523 | "version": "1.1.1", 524 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 525 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 526 | "dev": true 527 | }, 528 | "node_modules/get-caller-file": { 529 | "version": "2.0.5", 530 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 531 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 532 | "dev": true, 533 | "engines": { 534 | "node": "6.* || 8.* || >= 10.*" 535 | } 536 | }, 537 | "node_modules/get-func-name": { 538 | "version": "2.0.0", 539 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", 540 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", 541 | "engines": { 542 | "node": "*" 543 | } 544 | }, 545 | "node_modules/glob": { 546 | "version": "7.1.6", 547 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 548 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 549 | "dev": true, 550 | "dependencies": { 551 | "fs.realpath": "^1.0.0", 552 | "inflight": "^1.0.4", 553 | "inherits": "2", 554 | "minimatch": "^3.0.4", 555 | "once": "^1.3.0", 556 | "path-is-absolute": "^1.0.0" 557 | }, 558 | "engines": { 559 | "node": "*" 560 | }, 561 | "funding": { 562 | "url": "https://github.com/sponsors/isaacs" 563 | } 564 | }, 565 | "node_modules/glob-parent": { 566 | "version": "5.1.2", 567 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 568 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 569 | "dev": true, 570 | "dependencies": { 571 | "is-glob": "^4.0.1" 572 | }, 573 | "engines": { 574 | "node": ">= 6" 575 | } 576 | }, 577 | "node_modules/growl": { 578 | "version": "1.10.5", 579 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 580 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 581 | "dev": true, 582 | "engines": { 583 | "node": ">=4.x" 584 | } 585 | }, 586 | "node_modules/has": { 587 | "version": "1.0.3", 588 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 589 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 590 | "dev": true, 591 | "dependencies": { 592 | "function-bind": "^1.1.1" 593 | }, 594 | "engines": { 595 | "node": ">= 0.4.0" 596 | } 597 | }, 598 | "node_modules/has-flag": { 599 | "version": "4.0.0", 600 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 601 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 602 | "dev": true, 603 | "engines": { 604 | "node": ">=8" 605 | } 606 | }, 607 | "node_modules/he": { 608 | "version": "1.2.0", 609 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 610 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 611 | "dev": true, 612 | "bin": { 613 | "he": "bin/he" 614 | } 615 | }, 616 | "node_modules/inflight": { 617 | "version": "1.0.6", 618 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 619 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 620 | "dev": true, 621 | "dependencies": { 622 | "once": "^1.3.0", 623 | "wrappy": "1" 624 | } 625 | }, 626 | "node_modules/inherits": { 627 | "version": "2.0.4", 628 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 629 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 630 | "dev": true 631 | }, 632 | "node_modules/is-binary-path": { 633 | "version": "2.1.0", 634 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 635 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 636 | "dev": true, 637 | "dependencies": { 638 | "binary-extensions": "^2.0.0" 639 | }, 640 | "engines": { 641 | "node": ">=8" 642 | } 643 | }, 644 | "node_modules/is-core-module": { 645 | "version": "2.5.0", 646 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", 647 | "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", 648 | "dev": true, 649 | "dependencies": { 650 | "has": "^1.0.3" 651 | }, 652 | "funding": { 653 | "url": "https://github.com/sponsors/ljharb" 654 | } 655 | }, 656 | "node_modules/is-extglob": { 657 | "version": "2.1.1", 658 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 659 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 660 | "dev": true, 661 | "engines": { 662 | "node": ">=0.10.0" 663 | } 664 | }, 665 | "node_modules/is-fullwidth-code-point": { 666 | "version": "2.0.0", 667 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 668 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 669 | "dev": true, 670 | "engines": { 671 | "node": ">=4" 672 | } 673 | }, 674 | "node_modules/is-glob": { 675 | "version": "4.0.1", 676 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 677 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 678 | "dev": true, 679 | "dependencies": { 680 | "is-extglob": "^2.1.1" 681 | }, 682 | "engines": { 683 | "node": ">=0.10.0" 684 | } 685 | }, 686 | "node_modules/is-module": { 687 | "version": "1.0.0", 688 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 689 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", 690 | "dev": true 691 | }, 692 | "node_modules/is-number": { 693 | "version": "7.0.0", 694 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 695 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 696 | "dev": true, 697 | "engines": { 698 | "node": ">=0.12.0" 699 | } 700 | }, 701 | "node_modules/is-plain-obj": { 702 | "version": "2.1.0", 703 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 704 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 705 | "dev": true, 706 | "engines": { 707 | "node": ">=8" 708 | } 709 | }, 710 | "node_modules/isexe": { 711 | "version": "2.0.0", 712 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 713 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 714 | "dev": true 715 | }, 716 | "node_modules/js-yaml": { 717 | "version": "4.0.0", 718 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", 719 | "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", 720 | "dev": true, 721 | "dependencies": { 722 | "argparse": "^2.0.1" 723 | }, 724 | "bin": { 725 | "js-yaml": "bin/js-yaml.js" 726 | } 727 | }, 728 | "node_modules/lezer": { 729 | "version": "0.13.5", 730 | "resolved": "https://registry.npmjs.org/lezer/-/lezer-0.13.5.tgz", 731 | "integrity": "sha512-cAiMQZGUo2BD8mpcz7Nv1TlKzWP7YIdIRrX41CiP5bk5t4GHxskOxWUx2iAOuHlz8dO+ivbuXr0J1bfHsWD+lQ==", 732 | "dev": true, 733 | "dependencies": { 734 | "lezer-tree": "^0.13.2" 735 | } 736 | }, 737 | "node_modules/lezer-generator": { 738 | "version": "0.13.4", 739 | "resolved": "https://registry.npmjs.org/lezer-generator/-/lezer-generator-0.13.4.tgz", 740 | "integrity": "sha512-pTWxEgw6U41jM/IwMbhPBPonrcQV5YYL3XoY4QPR7ibOjgo2RaF4wVrdabN1ILtBbGvtHZekTGyrbsqfKnMHMA==", 741 | "dev": true, 742 | "dependencies": { 743 | "lezer": "^0.13.2" 744 | }, 745 | "bin": { 746 | "lezer-generator": "dist/lezer-generator.cjs" 747 | } 748 | }, 749 | "node_modules/lezer-tree": { 750 | "version": "0.13.2", 751 | "resolved": "https://registry.npmjs.org/lezer-tree/-/lezer-tree-0.13.2.tgz", 752 | "integrity": "sha512-15ZxW8TxVNAOkHIo43Iouv4zbSkQQ5chQHBpwXcD2bBFz46RB4jYLEEww5l1V0xyIx9U2clSyyrLes+hAUFrGQ==", 753 | "dev": true 754 | }, 755 | "node_modules/locate-path": { 756 | "version": "6.0.0", 757 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 758 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 759 | "dev": true, 760 | "dependencies": { 761 | "p-locate": "^5.0.0" 762 | }, 763 | "engines": { 764 | "node": ">=10" 765 | }, 766 | "funding": { 767 | "url": "https://github.com/sponsors/sindresorhus" 768 | } 769 | }, 770 | "node_modules/log-symbols": { 771 | "version": "4.0.0", 772 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", 773 | "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", 774 | "dev": true, 775 | "dependencies": { 776 | "chalk": "^4.0.0" 777 | }, 778 | "engines": { 779 | "node": ">=10" 780 | } 781 | }, 782 | "node_modules/minimatch": { 783 | "version": "3.0.4", 784 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 785 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 786 | "dev": true, 787 | "dependencies": { 788 | "brace-expansion": "^1.1.7" 789 | }, 790 | "engines": { 791 | "node": "*" 792 | } 793 | }, 794 | "node_modules/mocha": { 795 | "version": "8.4.0", 796 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", 797 | "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", 798 | "dev": true, 799 | "dependencies": { 800 | "@ungap/promise-all-settled": "1.1.2", 801 | "ansi-colors": "4.1.1", 802 | "browser-stdout": "1.3.1", 803 | "chokidar": "3.5.1", 804 | "debug": "4.3.1", 805 | "diff": "5.0.0", 806 | "escape-string-regexp": "4.0.0", 807 | "find-up": "5.0.0", 808 | "glob": "7.1.6", 809 | "growl": "1.10.5", 810 | "he": "1.2.0", 811 | "js-yaml": "4.0.0", 812 | "log-symbols": "4.0.0", 813 | "minimatch": "3.0.4", 814 | "ms": "2.1.3", 815 | "nanoid": "3.1.20", 816 | "serialize-javascript": "5.0.1", 817 | "strip-json-comments": "3.1.1", 818 | "supports-color": "8.1.1", 819 | "which": "2.0.2", 820 | "wide-align": "1.1.3", 821 | "workerpool": "6.1.0", 822 | "yargs": "16.2.0", 823 | "yargs-parser": "20.2.4", 824 | "yargs-unparser": "2.0.0" 825 | }, 826 | "bin": { 827 | "_mocha": "bin/_mocha", 828 | "mocha": "bin/mocha" 829 | }, 830 | "engines": { 831 | "node": ">= 10.12.0" 832 | }, 833 | "funding": { 834 | "type": "opencollective", 835 | "url": "https://opencollective.com/mochajs" 836 | } 837 | }, 838 | "node_modules/ms": { 839 | "version": "2.1.3", 840 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 841 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 842 | "dev": true 843 | }, 844 | "node_modules/nanoid": { 845 | "version": "3.1.20", 846 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", 847 | "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", 848 | "dev": true, 849 | "bin": { 850 | "nanoid": "bin/nanoid.cjs" 851 | }, 852 | "engines": { 853 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 854 | } 855 | }, 856 | "node_modules/normalize-path": { 857 | "version": "3.0.0", 858 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 859 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 860 | "dev": true, 861 | "engines": { 862 | "node": ">=0.10.0" 863 | } 864 | }, 865 | "node_modules/once": { 866 | "version": "1.4.0", 867 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 868 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 869 | "dev": true, 870 | "dependencies": { 871 | "wrappy": "1" 872 | } 873 | }, 874 | "node_modules/p-limit": { 875 | "version": "3.1.0", 876 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 877 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 878 | "dev": true, 879 | "dependencies": { 880 | "yocto-queue": "^0.1.0" 881 | }, 882 | "engines": { 883 | "node": ">=10" 884 | }, 885 | "funding": { 886 | "url": "https://github.com/sponsors/sindresorhus" 887 | } 888 | }, 889 | "node_modules/p-locate": { 890 | "version": "5.0.0", 891 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 892 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 893 | "dev": true, 894 | "dependencies": { 895 | "p-limit": "^3.0.2" 896 | }, 897 | "engines": { 898 | "node": ">=10" 899 | }, 900 | "funding": { 901 | "url": "https://github.com/sponsors/sindresorhus" 902 | } 903 | }, 904 | "node_modules/path-exists": { 905 | "version": "4.0.0", 906 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 907 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 908 | "dev": true, 909 | "engines": { 910 | "node": ">=8" 911 | } 912 | }, 913 | "node_modules/path-is-absolute": { 914 | "version": "1.0.1", 915 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 916 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 917 | "dev": true, 918 | "engines": { 919 | "node": ">=0.10.0" 920 | } 921 | }, 922 | "node_modules/path-parse": { 923 | "version": "1.0.7", 924 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 925 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 926 | "dev": true 927 | }, 928 | "node_modules/pathval": { 929 | "version": "1.1.1", 930 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", 931 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", 932 | "engines": { 933 | "node": "*" 934 | } 935 | }, 936 | "node_modules/picomatch": { 937 | "version": "2.3.0", 938 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", 939 | "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", 940 | "dev": true, 941 | "engines": { 942 | "node": ">=8.6" 943 | }, 944 | "funding": { 945 | "url": "https://github.com/sponsors/jonschlinkert" 946 | } 947 | }, 948 | "node_modules/randombytes": { 949 | "version": "2.1.0", 950 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 951 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 952 | "dev": true, 953 | "dependencies": { 954 | "safe-buffer": "^5.1.0" 955 | } 956 | }, 957 | "node_modules/readdirp": { 958 | "version": "3.5.0", 959 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", 960 | "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", 961 | "dev": true, 962 | "dependencies": { 963 | "picomatch": "^2.2.1" 964 | }, 965 | "engines": { 966 | "node": ">=8.10.0" 967 | } 968 | }, 969 | "node_modules/require-directory": { 970 | "version": "2.1.1", 971 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 972 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 973 | "dev": true, 974 | "engines": { 975 | "node": ">=0.10.0" 976 | } 977 | }, 978 | "node_modules/resolve": { 979 | "version": "1.20.0", 980 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", 981 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", 982 | "dev": true, 983 | "dependencies": { 984 | "is-core-module": "^2.2.0", 985 | "path-parse": "^1.0.6" 986 | }, 987 | "funding": { 988 | "url": "https://github.com/sponsors/ljharb" 989 | } 990 | }, 991 | "node_modules/rollup": { 992 | "version": "2.56.2", 993 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.2.tgz", 994 | "integrity": "sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ==", 995 | "dev": true, 996 | "bin": { 997 | "rollup": "dist/bin/rollup" 998 | }, 999 | "engines": { 1000 | "node": ">=10.0.0" 1001 | }, 1002 | "optionalDependencies": { 1003 | "fsevents": "~2.3.2" 1004 | } 1005 | }, 1006 | "node_modules/safe-buffer": { 1007 | "version": "5.2.1", 1008 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1009 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1010 | "dev": true, 1011 | "funding": [ 1012 | { 1013 | "type": "github", 1014 | "url": "https://github.com/sponsors/feross" 1015 | }, 1016 | { 1017 | "type": "patreon", 1018 | "url": "https://www.patreon.com/feross" 1019 | }, 1020 | { 1021 | "type": "consulting", 1022 | "url": "https://feross.org/support" 1023 | } 1024 | ] 1025 | }, 1026 | "node_modules/serialize-javascript": { 1027 | "version": "5.0.1", 1028 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", 1029 | "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", 1030 | "dev": true, 1031 | "dependencies": { 1032 | "randombytes": "^2.1.0" 1033 | } 1034 | }, 1035 | "node_modules/string-width": { 1036 | "version": "2.1.1", 1037 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", 1038 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", 1039 | "dev": true, 1040 | "dependencies": { 1041 | "is-fullwidth-code-point": "^2.0.0", 1042 | "strip-ansi": "^4.0.0" 1043 | }, 1044 | "engines": { 1045 | "node": ">=4" 1046 | } 1047 | }, 1048 | "node_modules/strip-ansi": { 1049 | "version": "4.0.0", 1050 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 1051 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 1052 | "dev": true, 1053 | "dependencies": { 1054 | "ansi-regex": "^3.0.0" 1055 | }, 1056 | "engines": { 1057 | "node": ">=4" 1058 | } 1059 | }, 1060 | "node_modules/strip-json-comments": { 1061 | "version": "3.1.1", 1062 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1063 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1064 | "dev": true, 1065 | "engines": { 1066 | "node": ">=8" 1067 | }, 1068 | "funding": { 1069 | "url": "https://github.com/sponsors/sindresorhus" 1070 | } 1071 | }, 1072 | "node_modules/supports-color": { 1073 | "version": "8.1.1", 1074 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1075 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1076 | "dev": true, 1077 | "dependencies": { 1078 | "has-flag": "^4.0.0" 1079 | }, 1080 | "engines": { 1081 | "node": ">=10" 1082 | }, 1083 | "funding": { 1084 | "url": "https://github.com/chalk/supports-color?sponsor=1" 1085 | } 1086 | }, 1087 | "node_modules/to-regex-range": { 1088 | "version": "5.0.1", 1089 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1090 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1091 | "dev": true, 1092 | "dependencies": { 1093 | "is-number": "^7.0.0" 1094 | }, 1095 | "engines": { 1096 | "node": ">=8.0" 1097 | } 1098 | }, 1099 | "node_modules/type-detect": { 1100 | "version": "4.0.8", 1101 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 1102 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", 1103 | "engines": { 1104 | "node": ">=4" 1105 | } 1106 | }, 1107 | "node_modules/which": { 1108 | "version": "2.0.2", 1109 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1110 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1111 | "dev": true, 1112 | "dependencies": { 1113 | "isexe": "^2.0.0" 1114 | }, 1115 | "bin": { 1116 | "node-which": "bin/node-which" 1117 | }, 1118 | "engines": { 1119 | "node": ">= 8" 1120 | } 1121 | }, 1122 | "node_modules/wide-align": { 1123 | "version": "1.1.3", 1124 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 1125 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 1126 | "dev": true, 1127 | "dependencies": { 1128 | "string-width": "^1.0.2 || 2" 1129 | } 1130 | }, 1131 | "node_modules/workerpool": { 1132 | "version": "6.1.0", 1133 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", 1134 | "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", 1135 | "dev": true 1136 | }, 1137 | "node_modules/wrap-ansi": { 1138 | "version": "7.0.0", 1139 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1140 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1141 | "dev": true, 1142 | "dependencies": { 1143 | "ansi-styles": "^4.0.0", 1144 | "string-width": "^4.1.0", 1145 | "strip-ansi": "^6.0.0" 1146 | }, 1147 | "engines": { 1148 | "node": ">=10" 1149 | }, 1150 | "funding": { 1151 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1152 | } 1153 | }, 1154 | "node_modules/wrap-ansi/node_modules/ansi-regex": { 1155 | "version": "5.0.0", 1156 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1157 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 1158 | "dev": true, 1159 | "engines": { 1160 | "node": ">=8" 1161 | } 1162 | }, 1163 | "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { 1164 | "version": "3.0.0", 1165 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1166 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1167 | "dev": true, 1168 | "engines": { 1169 | "node": ">=8" 1170 | } 1171 | }, 1172 | "node_modules/wrap-ansi/node_modules/string-width": { 1173 | "version": "4.2.2", 1174 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1175 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1176 | "dev": true, 1177 | "dependencies": { 1178 | "emoji-regex": "^8.0.0", 1179 | "is-fullwidth-code-point": "^3.0.0", 1180 | "strip-ansi": "^6.0.0" 1181 | }, 1182 | "engines": { 1183 | "node": ">=8" 1184 | } 1185 | }, 1186 | "node_modules/wrap-ansi/node_modules/strip-ansi": { 1187 | "version": "6.0.0", 1188 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1189 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1190 | "dev": true, 1191 | "dependencies": { 1192 | "ansi-regex": "^5.0.0" 1193 | }, 1194 | "engines": { 1195 | "node": ">=8" 1196 | } 1197 | }, 1198 | "node_modules/wrappy": { 1199 | "version": "1.0.2", 1200 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1201 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1202 | "dev": true 1203 | }, 1204 | "node_modules/y18n": { 1205 | "version": "5.0.8", 1206 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1207 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1208 | "dev": true, 1209 | "engines": { 1210 | "node": ">=10" 1211 | } 1212 | }, 1213 | "node_modules/yargs": { 1214 | "version": "16.2.0", 1215 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1216 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1217 | "dev": true, 1218 | "dependencies": { 1219 | "cliui": "^7.0.2", 1220 | "escalade": "^3.1.1", 1221 | "get-caller-file": "^2.0.5", 1222 | "require-directory": "^2.1.1", 1223 | "string-width": "^4.2.0", 1224 | "y18n": "^5.0.5", 1225 | "yargs-parser": "^20.2.2" 1226 | }, 1227 | "engines": { 1228 | "node": ">=10" 1229 | } 1230 | }, 1231 | "node_modules/yargs-parser": { 1232 | "version": "20.2.4", 1233 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 1234 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1235 | "dev": true, 1236 | "engines": { 1237 | "node": ">=10" 1238 | } 1239 | }, 1240 | "node_modules/yargs-unparser": { 1241 | "version": "2.0.0", 1242 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1243 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1244 | "dev": true, 1245 | "dependencies": { 1246 | "camelcase": "^6.0.0", 1247 | "decamelize": "^4.0.0", 1248 | "flat": "^5.0.2", 1249 | "is-plain-obj": "^2.1.0" 1250 | }, 1251 | "engines": { 1252 | "node": ">=10" 1253 | } 1254 | }, 1255 | "node_modules/yargs/node_modules/ansi-regex": { 1256 | "version": "5.0.0", 1257 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1258 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 1259 | "dev": true, 1260 | "engines": { 1261 | "node": ">=8" 1262 | } 1263 | }, 1264 | "node_modules/yargs/node_modules/is-fullwidth-code-point": { 1265 | "version": "3.0.0", 1266 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1267 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1268 | "dev": true, 1269 | "engines": { 1270 | "node": ">=8" 1271 | } 1272 | }, 1273 | "node_modules/yargs/node_modules/string-width": { 1274 | "version": "4.2.2", 1275 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1276 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1277 | "dev": true, 1278 | "dependencies": { 1279 | "emoji-regex": "^8.0.0", 1280 | "is-fullwidth-code-point": "^3.0.0", 1281 | "strip-ansi": "^6.0.0" 1282 | }, 1283 | "engines": { 1284 | "node": ">=8" 1285 | } 1286 | }, 1287 | "node_modules/yargs/node_modules/strip-ansi": { 1288 | "version": "6.0.0", 1289 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1290 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1291 | "dev": true, 1292 | "dependencies": { 1293 | "ansi-regex": "^5.0.0" 1294 | }, 1295 | "engines": { 1296 | "node": ">=8" 1297 | } 1298 | }, 1299 | "node_modules/yocto-queue": { 1300 | "version": "0.1.0", 1301 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1302 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1303 | "dev": true, 1304 | "engines": { 1305 | "node": ">=10" 1306 | }, 1307 | "funding": { 1308 | "url": "https://github.com/sponsors/sindresorhus" 1309 | } 1310 | } 1311 | }, 1312 | "dependencies": { 1313 | "@rollup/plugin-node-resolve": { 1314 | "version": "9.0.0", 1315 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz", 1316 | "integrity": "sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==", 1317 | "dev": true, 1318 | "requires": { 1319 | "@rollup/pluginutils": "^3.1.0", 1320 | "@types/resolve": "1.17.1", 1321 | "builtin-modules": "^3.1.0", 1322 | "deepmerge": "^4.2.2", 1323 | "is-module": "^1.0.0", 1324 | "resolve": "^1.17.0" 1325 | } 1326 | }, 1327 | "@rollup/pluginutils": { 1328 | "version": "3.1.0", 1329 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 1330 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 1331 | "dev": true, 1332 | "requires": { 1333 | "@types/estree": "0.0.39", 1334 | "estree-walker": "^1.0.1", 1335 | "picomatch": "^2.2.2" 1336 | } 1337 | }, 1338 | "@types/estree": { 1339 | "version": "0.0.39", 1340 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 1341 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 1342 | "dev": true 1343 | }, 1344 | "@types/node": { 1345 | "version": "16.6.1", 1346 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", 1347 | "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==", 1348 | "dev": true 1349 | }, 1350 | "@types/resolve": { 1351 | "version": "1.17.1", 1352 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 1353 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 1354 | "dev": true, 1355 | "requires": { 1356 | "@types/node": "*" 1357 | } 1358 | }, 1359 | "@ungap/promise-all-settled": { 1360 | "version": "1.1.2", 1361 | "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", 1362 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", 1363 | "dev": true 1364 | }, 1365 | "ansi-colors": { 1366 | "version": "4.1.1", 1367 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 1368 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 1369 | "dev": true 1370 | }, 1371 | "ansi-regex": { 1372 | "version": "3.0.0", 1373 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", 1374 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", 1375 | "dev": true 1376 | }, 1377 | "ansi-styles": { 1378 | "version": "4.3.0", 1379 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1380 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1381 | "dev": true, 1382 | "requires": { 1383 | "color-convert": "^2.0.1" 1384 | } 1385 | }, 1386 | "anymatch": { 1387 | "version": "3.1.2", 1388 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 1389 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 1390 | "dev": true, 1391 | "requires": { 1392 | "normalize-path": "^3.0.0", 1393 | "picomatch": "^2.0.4" 1394 | } 1395 | }, 1396 | "argparse": { 1397 | "version": "2.0.1", 1398 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 1399 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 1400 | "dev": true 1401 | }, 1402 | "assertion-error": { 1403 | "version": "1.1.0", 1404 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", 1405 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" 1406 | }, 1407 | "balanced-match": { 1408 | "version": "1.0.2", 1409 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1410 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1411 | "dev": true 1412 | }, 1413 | "binary-extensions": { 1414 | "version": "2.2.0", 1415 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 1416 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 1417 | "dev": true 1418 | }, 1419 | "brace-expansion": { 1420 | "version": "1.1.11", 1421 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1422 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1423 | "dev": true, 1424 | "requires": { 1425 | "balanced-match": "^1.0.0", 1426 | "concat-map": "0.0.1" 1427 | } 1428 | }, 1429 | "braces": { 1430 | "version": "3.0.2", 1431 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 1432 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 1433 | "dev": true, 1434 | "requires": { 1435 | "fill-range": "^7.0.1" 1436 | } 1437 | }, 1438 | "browser-stdout": { 1439 | "version": "1.3.1", 1440 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 1441 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 1442 | "dev": true 1443 | }, 1444 | "builtin-modules": { 1445 | "version": "3.2.0", 1446 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", 1447 | "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", 1448 | "dev": true 1449 | }, 1450 | "camelcase": { 1451 | "version": "6.2.0", 1452 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", 1453 | "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", 1454 | "dev": true 1455 | }, 1456 | "chai": { 1457 | "version": "4.3.4", 1458 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", 1459 | "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", 1460 | "requires": { 1461 | "assertion-error": "^1.1.0", 1462 | "check-error": "^1.0.2", 1463 | "deep-eql": "^3.0.1", 1464 | "get-func-name": "^2.0.0", 1465 | "pathval": "^1.1.1", 1466 | "type-detect": "^4.0.5" 1467 | } 1468 | }, 1469 | "chalk": { 1470 | "version": "4.1.2", 1471 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1472 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1473 | "dev": true, 1474 | "requires": { 1475 | "ansi-styles": "^4.1.0", 1476 | "supports-color": "^7.1.0" 1477 | }, 1478 | "dependencies": { 1479 | "supports-color": { 1480 | "version": "7.2.0", 1481 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1482 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1483 | "dev": true, 1484 | "requires": { 1485 | "has-flag": "^4.0.0" 1486 | } 1487 | } 1488 | } 1489 | }, 1490 | "check-error": { 1491 | "version": "1.0.2", 1492 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", 1493 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" 1494 | }, 1495 | "chokidar": { 1496 | "version": "3.5.1", 1497 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", 1498 | "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", 1499 | "dev": true, 1500 | "requires": { 1501 | "anymatch": "~3.1.1", 1502 | "braces": "~3.0.2", 1503 | "fsevents": "~2.3.1", 1504 | "glob-parent": "~5.1.0", 1505 | "is-binary-path": "~2.1.0", 1506 | "is-glob": "~4.0.1", 1507 | "normalize-path": "~3.0.0", 1508 | "readdirp": "~3.5.0" 1509 | } 1510 | }, 1511 | "cliui": { 1512 | "version": "7.0.4", 1513 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 1514 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 1515 | "dev": true, 1516 | "requires": { 1517 | "string-width": "^4.2.0", 1518 | "strip-ansi": "^6.0.0", 1519 | "wrap-ansi": "^7.0.0" 1520 | }, 1521 | "dependencies": { 1522 | "ansi-regex": { 1523 | "version": "5.0.0", 1524 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1525 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 1526 | "dev": true 1527 | }, 1528 | "is-fullwidth-code-point": { 1529 | "version": "3.0.0", 1530 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1531 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1532 | "dev": true 1533 | }, 1534 | "string-width": { 1535 | "version": "4.2.2", 1536 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1537 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1538 | "dev": true, 1539 | "requires": { 1540 | "emoji-regex": "^8.0.0", 1541 | "is-fullwidth-code-point": "^3.0.0", 1542 | "strip-ansi": "^6.0.0" 1543 | } 1544 | }, 1545 | "strip-ansi": { 1546 | "version": "6.0.0", 1547 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1548 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1549 | "dev": true, 1550 | "requires": { 1551 | "ansi-regex": "^5.0.0" 1552 | } 1553 | } 1554 | } 1555 | }, 1556 | "color-convert": { 1557 | "version": "2.0.1", 1558 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1559 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1560 | "dev": true, 1561 | "requires": { 1562 | "color-name": "~1.1.4" 1563 | } 1564 | }, 1565 | "color-name": { 1566 | "version": "1.1.4", 1567 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1568 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1569 | "dev": true 1570 | }, 1571 | "concat-map": { 1572 | "version": "0.0.1", 1573 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1574 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 1575 | "dev": true 1576 | }, 1577 | "debug": { 1578 | "version": "4.3.1", 1579 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", 1580 | "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", 1581 | "dev": true, 1582 | "requires": { 1583 | "ms": "2.1.2" 1584 | }, 1585 | "dependencies": { 1586 | "ms": { 1587 | "version": "2.1.2", 1588 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1589 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1590 | "dev": true 1591 | } 1592 | } 1593 | }, 1594 | "decamelize": { 1595 | "version": "4.0.0", 1596 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 1597 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 1598 | "dev": true 1599 | }, 1600 | "deep-eql": { 1601 | "version": "3.0.1", 1602 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", 1603 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", 1604 | "requires": { 1605 | "type-detect": "^4.0.0" 1606 | } 1607 | }, 1608 | "deepmerge": { 1609 | "version": "4.2.2", 1610 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 1611 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 1612 | "dev": true 1613 | }, 1614 | "diff": { 1615 | "version": "5.0.0", 1616 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 1617 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 1618 | "dev": true 1619 | }, 1620 | "emoji-regex": { 1621 | "version": "8.0.0", 1622 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1623 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 1624 | "dev": true 1625 | }, 1626 | "escalade": { 1627 | "version": "3.1.1", 1628 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 1629 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 1630 | "dev": true 1631 | }, 1632 | "escape-string-regexp": { 1633 | "version": "4.0.0", 1634 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 1635 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 1636 | "dev": true 1637 | }, 1638 | "estree-walker": { 1639 | "version": "1.0.1", 1640 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 1641 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 1642 | "dev": true 1643 | }, 1644 | "fill-range": { 1645 | "version": "7.0.1", 1646 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 1647 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 1648 | "dev": true, 1649 | "requires": { 1650 | "to-regex-range": "^5.0.1" 1651 | } 1652 | }, 1653 | "find-up": { 1654 | "version": "5.0.0", 1655 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1656 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1657 | "dev": true, 1658 | "requires": { 1659 | "locate-path": "^6.0.0", 1660 | "path-exists": "^4.0.0" 1661 | } 1662 | }, 1663 | "flat": { 1664 | "version": "5.0.2", 1665 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 1666 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 1667 | "dev": true 1668 | }, 1669 | "fs.realpath": { 1670 | "version": "1.0.0", 1671 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1672 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 1673 | "dev": true 1674 | }, 1675 | "fsevents": { 1676 | "version": "2.3.2", 1677 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1678 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1679 | "dev": true, 1680 | "optional": true 1681 | }, 1682 | "function-bind": { 1683 | "version": "1.1.1", 1684 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 1685 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 1686 | "dev": true 1687 | }, 1688 | "get-caller-file": { 1689 | "version": "2.0.5", 1690 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 1691 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 1692 | "dev": true 1693 | }, 1694 | "get-func-name": { 1695 | "version": "2.0.0", 1696 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", 1697 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" 1698 | }, 1699 | "glob": { 1700 | "version": "7.1.6", 1701 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 1702 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 1703 | "dev": true, 1704 | "requires": { 1705 | "fs.realpath": "^1.0.0", 1706 | "inflight": "^1.0.4", 1707 | "inherits": "2", 1708 | "minimatch": "^3.0.4", 1709 | "once": "^1.3.0", 1710 | "path-is-absolute": "^1.0.0" 1711 | } 1712 | }, 1713 | "glob-parent": { 1714 | "version": "5.1.2", 1715 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1716 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1717 | "dev": true, 1718 | "requires": { 1719 | "is-glob": "^4.0.1" 1720 | } 1721 | }, 1722 | "growl": { 1723 | "version": "1.10.5", 1724 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 1725 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 1726 | "dev": true 1727 | }, 1728 | "has": { 1729 | "version": "1.0.3", 1730 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 1731 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 1732 | "dev": true, 1733 | "requires": { 1734 | "function-bind": "^1.1.1" 1735 | } 1736 | }, 1737 | "has-flag": { 1738 | "version": "4.0.0", 1739 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1740 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1741 | "dev": true 1742 | }, 1743 | "he": { 1744 | "version": "1.2.0", 1745 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1746 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1747 | "dev": true 1748 | }, 1749 | "inflight": { 1750 | "version": "1.0.6", 1751 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1752 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1753 | "dev": true, 1754 | "requires": { 1755 | "once": "^1.3.0", 1756 | "wrappy": "1" 1757 | } 1758 | }, 1759 | "inherits": { 1760 | "version": "2.0.4", 1761 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1762 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1763 | "dev": true 1764 | }, 1765 | "is-binary-path": { 1766 | "version": "2.1.0", 1767 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1768 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1769 | "dev": true, 1770 | "requires": { 1771 | "binary-extensions": "^2.0.0" 1772 | } 1773 | }, 1774 | "is-core-module": { 1775 | "version": "2.5.0", 1776 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", 1777 | "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", 1778 | "dev": true, 1779 | "requires": { 1780 | "has": "^1.0.3" 1781 | } 1782 | }, 1783 | "is-extglob": { 1784 | "version": "2.1.1", 1785 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1786 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 1787 | "dev": true 1788 | }, 1789 | "is-fullwidth-code-point": { 1790 | "version": "2.0.0", 1791 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 1792 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 1793 | "dev": true 1794 | }, 1795 | "is-glob": { 1796 | "version": "4.0.1", 1797 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 1798 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 1799 | "dev": true, 1800 | "requires": { 1801 | "is-extglob": "^2.1.1" 1802 | } 1803 | }, 1804 | "is-module": { 1805 | "version": "1.0.0", 1806 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 1807 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", 1808 | "dev": true 1809 | }, 1810 | "is-number": { 1811 | "version": "7.0.0", 1812 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1813 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1814 | "dev": true 1815 | }, 1816 | "is-plain-obj": { 1817 | "version": "2.1.0", 1818 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1819 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1820 | "dev": true 1821 | }, 1822 | "isexe": { 1823 | "version": "2.0.0", 1824 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1825 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1826 | "dev": true 1827 | }, 1828 | "js-yaml": { 1829 | "version": "4.0.0", 1830 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", 1831 | "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", 1832 | "dev": true, 1833 | "requires": { 1834 | "argparse": "^2.0.1" 1835 | } 1836 | }, 1837 | "lezer": { 1838 | "version": "0.13.5", 1839 | "resolved": "https://registry.npmjs.org/lezer/-/lezer-0.13.5.tgz", 1840 | "integrity": "sha512-cAiMQZGUo2BD8mpcz7Nv1TlKzWP7YIdIRrX41CiP5bk5t4GHxskOxWUx2iAOuHlz8dO+ivbuXr0J1bfHsWD+lQ==", 1841 | "dev": true, 1842 | "requires": { 1843 | "lezer-tree": "^0.13.2" 1844 | } 1845 | }, 1846 | "lezer-generator": { 1847 | "version": "0.13.4", 1848 | "resolved": "https://registry.npmjs.org/lezer-generator/-/lezer-generator-0.13.4.tgz", 1849 | "integrity": "sha512-pTWxEgw6U41jM/IwMbhPBPonrcQV5YYL3XoY4QPR7ibOjgo2RaF4wVrdabN1ILtBbGvtHZekTGyrbsqfKnMHMA==", 1850 | "dev": true, 1851 | "requires": { 1852 | "lezer": "^0.13.2" 1853 | } 1854 | }, 1855 | "lezer-tree": { 1856 | "version": "0.13.2", 1857 | "resolved": "https://registry.npmjs.org/lezer-tree/-/lezer-tree-0.13.2.tgz", 1858 | "integrity": "sha512-15ZxW8TxVNAOkHIo43Iouv4zbSkQQ5chQHBpwXcD2bBFz46RB4jYLEEww5l1V0xyIx9U2clSyyrLes+hAUFrGQ==", 1859 | "dev": true 1860 | }, 1861 | "locate-path": { 1862 | "version": "6.0.0", 1863 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1864 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1865 | "dev": true, 1866 | "requires": { 1867 | "p-locate": "^5.0.0" 1868 | } 1869 | }, 1870 | "log-symbols": { 1871 | "version": "4.0.0", 1872 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", 1873 | "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", 1874 | "dev": true, 1875 | "requires": { 1876 | "chalk": "^4.0.0" 1877 | } 1878 | }, 1879 | "minimatch": { 1880 | "version": "3.0.4", 1881 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1882 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1883 | "dev": true, 1884 | "requires": { 1885 | "brace-expansion": "^1.1.7" 1886 | } 1887 | }, 1888 | "mocha": { 1889 | "version": "8.4.0", 1890 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", 1891 | "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", 1892 | "dev": true, 1893 | "requires": { 1894 | "@ungap/promise-all-settled": "1.1.2", 1895 | "ansi-colors": "4.1.1", 1896 | "browser-stdout": "1.3.1", 1897 | "chokidar": "3.5.1", 1898 | "debug": "4.3.1", 1899 | "diff": "5.0.0", 1900 | "escape-string-regexp": "4.0.0", 1901 | "find-up": "5.0.0", 1902 | "glob": "7.1.6", 1903 | "growl": "1.10.5", 1904 | "he": "1.2.0", 1905 | "js-yaml": "4.0.0", 1906 | "log-symbols": "4.0.0", 1907 | "minimatch": "3.0.4", 1908 | "ms": "2.1.3", 1909 | "nanoid": "3.1.20", 1910 | "serialize-javascript": "5.0.1", 1911 | "strip-json-comments": "3.1.1", 1912 | "supports-color": "8.1.1", 1913 | "which": "2.0.2", 1914 | "wide-align": "1.1.3", 1915 | "workerpool": "6.1.0", 1916 | "yargs": "16.2.0", 1917 | "yargs-parser": "20.2.4", 1918 | "yargs-unparser": "2.0.0" 1919 | } 1920 | }, 1921 | "ms": { 1922 | "version": "2.1.3", 1923 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1924 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1925 | "dev": true 1926 | }, 1927 | "nanoid": { 1928 | "version": "3.1.20", 1929 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", 1930 | "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", 1931 | "dev": true 1932 | }, 1933 | "normalize-path": { 1934 | "version": "3.0.0", 1935 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1936 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1937 | "dev": true 1938 | }, 1939 | "once": { 1940 | "version": "1.4.0", 1941 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1942 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1943 | "dev": true, 1944 | "requires": { 1945 | "wrappy": "1" 1946 | } 1947 | }, 1948 | "p-limit": { 1949 | "version": "3.1.0", 1950 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1951 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1952 | "dev": true, 1953 | "requires": { 1954 | "yocto-queue": "^0.1.0" 1955 | } 1956 | }, 1957 | "p-locate": { 1958 | "version": "5.0.0", 1959 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1960 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1961 | "dev": true, 1962 | "requires": { 1963 | "p-limit": "^3.0.2" 1964 | } 1965 | }, 1966 | "path-exists": { 1967 | "version": "4.0.0", 1968 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1969 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1970 | "dev": true 1971 | }, 1972 | "path-is-absolute": { 1973 | "version": "1.0.1", 1974 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1975 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1976 | "dev": true 1977 | }, 1978 | "path-parse": { 1979 | "version": "1.0.7", 1980 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1981 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1982 | "dev": true 1983 | }, 1984 | "pathval": { 1985 | "version": "1.1.1", 1986 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", 1987 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==" 1988 | }, 1989 | "picomatch": { 1990 | "version": "2.3.0", 1991 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", 1992 | "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", 1993 | "dev": true 1994 | }, 1995 | "randombytes": { 1996 | "version": "2.1.0", 1997 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1998 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1999 | "dev": true, 2000 | "requires": { 2001 | "safe-buffer": "^5.1.0" 2002 | } 2003 | }, 2004 | "readdirp": { 2005 | "version": "3.5.0", 2006 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", 2007 | "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", 2008 | "dev": true, 2009 | "requires": { 2010 | "picomatch": "^2.2.1" 2011 | } 2012 | }, 2013 | "require-directory": { 2014 | "version": "2.1.1", 2015 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 2016 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 2017 | "dev": true 2018 | }, 2019 | "resolve": { 2020 | "version": "1.20.0", 2021 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", 2022 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", 2023 | "dev": true, 2024 | "requires": { 2025 | "is-core-module": "^2.2.0", 2026 | "path-parse": "^1.0.6" 2027 | } 2028 | }, 2029 | "rollup": { 2030 | "version": "2.56.2", 2031 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.2.tgz", 2032 | "integrity": "sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ==", 2033 | "dev": true, 2034 | "requires": { 2035 | "fsevents": "~2.3.2" 2036 | } 2037 | }, 2038 | "safe-buffer": { 2039 | "version": "5.2.1", 2040 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 2041 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 2042 | "dev": true 2043 | }, 2044 | "serialize-javascript": { 2045 | "version": "5.0.1", 2046 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", 2047 | "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", 2048 | "dev": true, 2049 | "requires": { 2050 | "randombytes": "^2.1.0" 2051 | } 2052 | }, 2053 | "string-width": { 2054 | "version": "2.1.1", 2055 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", 2056 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", 2057 | "dev": true, 2058 | "requires": { 2059 | "is-fullwidth-code-point": "^2.0.0", 2060 | "strip-ansi": "^4.0.0" 2061 | } 2062 | }, 2063 | "strip-ansi": { 2064 | "version": "4.0.0", 2065 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 2066 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 2067 | "dev": true, 2068 | "requires": { 2069 | "ansi-regex": "^3.0.0" 2070 | } 2071 | }, 2072 | "strip-json-comments": { 2073 | "version": "3.1.1", 2074 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 2075 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 2076 | "dev": true 2077 | }, 2078 | "supports-color": { 2079 | "version": "8.1.1", 2080 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 2081 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 2082 | "dev": true, 2083 | "requires": { 2084 | "has-flag": "^4.0.0" 2085 | } 2086 | }, 2087 | "to-regex-range": { 2088 | "version": "5.0.1", 2089 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 2090 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 2091 | "dev": true, 2092 | "requires": { 2093 | "is-number": "^7.0.0" 2094 | } 2095 | }, 2096 | "type-detect": { 2097 | "version": "4.0.8", 2098 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 2099 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" 2100 | }, 2101 | "which": { 2102 | "version": "2.0.2", 2103 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 2104 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 2105 | "dev": true, 2106 | "requires": { 2107 | "isexe": "^2.0.0" 2108 | } 2109 | }, 2110 | "wide-align": { 2111 | "version": "1.1.3", 2112 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 2113 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 2114 | "dev": true, 2115 | "requires": { 2116 | "string-width": "^1.0.2 || 2" 2117 | } 2118 | }, 2119 | "workerpool": { 2120 | "version": "6.1.0", 2121 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", 2122 | "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", 2123 | "dev": true 2124 | }, 2125 | "wrap-ansi": { 2126 | "version": "7.0.0", 2127 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 2128 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 2129 | "dev": true, 2130 | "requires": { 2131 | "ansi-styles": "^4.0.0", 2132 | "string-width": "^4.1.0", 2133 | "strip-ansi": "^6.0.0" 2134 | }, 2135 | "dependencies": { 2136 | "ansi-regex": { 2137 | "version": "5.0.0", 2138 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 2139 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 2140 | "dev": true 2141 | }, 2142 | "is-fullwidth-code-point": { 2143 | "version": "3.0.0", 2144 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 2145 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 2146 | "dev": true 2147 | }, 2148 | "string-width": { 2149 | "version": "4.2.2", 2150 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 2151 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 2152 | "dev": true, 2153 | "requires": { 2154 | "emoji-regex": "^8.0.0", 2155 | "is-fullwidth-code-point": "^3.0.0", 2156 | "strip-ansi": "^6.0.0" 2157 | } 2158 | }, 2159 | "strip-ansi": { 2160 | "version": "6.0.0", 2161 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2162 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2163 | "dev": true, 2164 | "requires": { 2165 | "ansi-regex": "^5.0.0" 2166 | } 2167 | } 2168 | } 2169 | }, 2170 | "wrappy": { 2171 | "version": "1.0.2", 2172 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2173 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 2174 | "dev": true 2175 | }, 2176 | "y18n": { 2177 | "version": "5.0.8", 2178 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 2179 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 2180 | "dev": true 2181 | }, 2182 | "yargs": { 2183 | "version": "16.2.0", 2184 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 2185 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 2186 | "dev": true, 2187 | "requires": { 2188 | "cliui": "^7.0.2", 2189 | "escalade": "^3.1.1", 2190 | "get-caller-file": "^2.0.5", 2191 | "require-directory": "^2.1.1", 2192 | "string-width": "^4.2.0", 2193 | "y18n": "^5.0.5", 2194 | "yargs-parser": "^20.2.2" 2195 | }, 2196 | "dependencies": { 2197 | "ansi-regex": { 2198 | "version": "5.0.0", 2199 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 2200 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 2201 | "dev": true 2202 | }, 2203 | "is-fullwidth-code-point": { 2204 | "version": "3.0.0", 2205 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 2206 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 2207 | "dev": true 2208 | }, 2209 | "string-width": { 2210 | "version": "4.2.2", 2211 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 2212 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 2213 | "dev": true, 2214 | "requires": { 2215 | "emoji-regex": "^8.0.0", 2216 | "is-fullwidth-code-point": "^3.0.0", 2217 | "strip-ansi": "^6.0.0" 2218 | } 2219 | }, 2220 | "strip-ansi": { 2221 | "version": "6.0.0", 2222 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2223 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2224 | "dev": true, 2225 | "requires": { 2226 | "ansi-regex": "^5.0.0" 2227 | } 2228 | } 2229 | } 2230 | }, 2231 | "yargs-parser": { 2232 | "version": "20.2.4", 2233 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 2234 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 2235 | "dev": true 2236 | }, 2237 | "yargs-unparser": { 2238 | "version": "2.0.0", 2239 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 2240 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 2241 | "dev": true, 2242 | "requires": { 2243 | "camelcase": "^6.0.0", 2244 | "decamelize": "^4.0.0", 2245 | "flat": "^5.0.2", 2246 | "is-plain-obj": "^2.1.0" 2247 | } 2248 | }, 2249 | "yocto-queue": { 2250 | "version": "0.1.0", 2251 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 2252 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 2253 | "dev": true 2254 | } 2255 | } 2256 | } 2257 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lezer-snowsql", 3 | "version": "0.1.0", 4 | "description": "lezer-based SnowSQL grammar", 5 | "main": "dist/index.cjs", 6 | "type": "module", 7 | "exports": { 8 | "import": "./dist/index.es.js", 9 | "require": "./dist/index.cjs" 10 | }, 11 | "module": "dist/index.es.js", 12 | "types": "dist/index.d.ts", 13 | "author": "", 14 | "license": "Apache-2.0", 15 | "devDependencies": { 16 | "@rollup/plugin-node-resolve": "^9.0.0", 17 | "lezer": "^0.13.5", 18 | "lezer-generator": "^0.13.1", 19 | "mocha": "^8.1.3", 20 | "rollup": "^2.27.1" 21 | }, 22 | "peerDependencies": { 23 | "lezer": "^0.13.5" 24 | }, 25 | "repository": { 26 | "type": "git", 27 | "url": "git+https://github.com/Snowflake-Labs/lezer-snowsql#lezer-snowsql-wip.git" 28 | }, 29 | "scripts": { 30 | "build": "bash ./build.sh", 31 | "prepare": "npm run build", 32 | "test": "mocha test/test-*.js", 33 | "test-case": "sh -c 'mocha test/custom-test.js --env=$0'" 34 | }, 35 | "keywords": [ 36 | "lezer", 37 | "snowsql" 38 | ], 39 | "bugs": { 40 | "url": "https://github.com/Snowflake-Labs/lezer-snowsql/issues" 41 | }, 42 | "homepage": "https://github.com/Snowflake-Labs/lezer-snowsql#readme", 43 | "dependencies": { 44 | "chai": "^4.3.4" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import { nodeResolve } from "@rollup/plugin-node-resolve" 2 | 3 | export default { 4 | input: "./src/parser.js", 5 | output: [{ 6 | format: "cjs", 7 | file: "./dist/index.cjs" 8 | }, { 9 | format: "es", 10 | file: "./dist/index.es.js" 11 | }], 12 | external(id) { return !/^[.\/]/.test(id) }, 13 | plugins: [ 14 | nodeResolve() 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/snowsql.grammar: -------------------------------------------------------------------------------- 1 | @top SnowSQL { 2 | 3 | Stmts 4 | 5 | } 6 | 7 | 8 | @precedence { 9 | 10 | uminus @right, 11 | pow @left, 12 | mul @left, 13 | plus @left, 14 | is, 15 | isnull, 16 | notnull, 17 | arb, 18 | in, 19 | between, 20 | escape, 21 | any, 22 | like, 23 | regexp, 24 | comp @left, 25 | eql @left, 26 | bitOr @left, 27 | bitXor @left, 28 | bitAnd @left, 29 | not @right, 30 | and @left, 31 | or @left, 32 | intersect @left, 33 | union @left 34 | 35 | } 36 | 37 | 38 | Stmts { 39 | 40 | (Stmt (Smc+ Stmt)*)? Smc* 41 | 42 | } 43 | 44 | 45 | Stmt { 46 | 47 | SelectStmt | 48 | DescribeStmt | 49 | DropStmt | 50 | InsertStmt | 51 | CreateManagedAccount | 52 | CreateStmt | 53 | CreateStreamStmt | 54 | CreateMaterializedView | 55 | CreateResourceMonitor | 56 | CreateRowAccessPolicy | 57 | CreateIntegrationStmt | 58 | CreateViewStmt | 59 | CreatePipeStmt | 60 | CreateTaskStmt | 61 | CommitStmt | 62 | RollbackStmt | 63 | TruncateStmt | 64 | UseStmt | 65 | GrantRoleStmt | 66 | GrantPrivilegesStmt | 67 | CreateTableStmt | 68 | GetStmt | 69 | ShowStmt | 70 | CopyStmt | 71 | AlterViewStmt | 72 | AlterTaskStmt 73 | 74 | } 75 | 76 | 77 | DropStmt { 78 | 79 | Drop DropTargetSimple ObjName | 80 | 81 | Drop (Function | Procedure) ObjName UdfTypeSig | 82 | 83 | Drop DropTargetWithIfExists IfExists? ObjName | 84 | 85 | Drop DropTargetWithOptions IfExists? ObjName DropOptions? 86 | 87 | } 88 | 89 | 90 | DropTargetSimple { 91 | 92 | Share | 93 | Resource Monitor | 94 | Managed Account | 95 | Masking Policy 96 | 97 | } 98 | 99 | 100 | DropTargetWithIfExists { 101 | 102 | Connection | 103 | File Format | 104 | (Row Access | Network | Session) Policy | 105 | Materialized? View | 106 | Pipe | 107 | Tag | 108 | Task | 109 | User | 110 | Stream | 111 | Stage | 112 | Role | 113 | (API | Notification | Security | Storage)? Integration | 114 | Warehouse 115 | 116 | } 117 | 118 | 119 | DropTargetWithOptions { 120 | 121 | Database | 122 | External? Table | 123 | Sequence | 124 | Schema 125 | 126 | } 127 | 128 | 129 | GrantPrivilegesStmt { 130 | 131 | Grant (PrivilegePrefix PrivilegeSuffix?) (Comma PrivilegePrefix PrivilegeSuffix?)* 132 | 133 | On PrivilegeObj To (Share | Role)? ObjName (With Grant Option)? ((Revoke| Copy) Current Grants)? | 134 | 135 | Grant Imported Privileges On PrivilegeObj To (Share | Role)? ObjName 136 | 137 | } 138 | 139 | 140 | GrantRoleStmt { 141 | 142 | Grant Role ObjName (Comma ObjName)* To (Role | User) ObjName 143 | 144 | } 145 | 146 | 147 | PrivilegeObjectTypePlural { 148 | 149 | Tables | 150 | External Tables | 151 | Views | 152 | Materialized Views | 153 | Masking Policies | 154 | Row Access Policies | 155 | Sequences | 156 | Functions | 157 | Procedures | 158 | File Formats | 159 | Stages | 160 | Schemas | 161 | Pipes | 162 | Streams | 163 | Tasks | 164 | Integrations | 165 | Databases 166 | 167 | } 168 | 169 | 170 | PrivilegeObjectType { 171 | 172 | Table | 173 | Schema | 174 | Database| 175 | External Table | 176 | View | 177 | Integration | 178 | Materialized View | 179 | Masking Policy | 180 | Row Access Policy | 181 | Sequence | 182 | Function | 183 | Procedure | 184 | File Format | 185 | Stage | 186 | Pipe | 187 | Stream | 188 | Task 189 | 190 | } 191 | 192 | 193 | PrivilegeObj { 194 | 195 | Account | 196 | System | 197 | PrivilegeObjectType (ObjName UdfTypeSig | ObjName) | 198 | ObjName | 199 | All PrivilegeObjectTypePlural In (Schema | Database ) ObjName | 200 | Future PrivilegeObjectTypePlural In ( Schema | Database ) ObjName 201 | 202 | } 203 | 204 | 205 | CreateStmt { 206 | 207 | Create Account Identifier Admin_name Eql Identifier Admin_password Eql StringLiteral (First_name Eql Identifier)? (Last_name Eql Identifier)? 208 | Email Eql EmailAddr (Must_change_password Eql (True | False))? Edition Eql (Standard | Enterprise | Business_critical) AccountOptional | 209 | 210 | //create clone 211 | Create OptOrReplace? (Stage | File Format | Sequence) IfNotExists? Identifier Clone Identifier | 212 | 213 | //create database 214 | Create OptOrReplace? (Transient)? Database IfNotExists? Identifier 215 | (Clone Identifier ((At | Before) ((Timestamp Eql Identifier | Offset Eql Identifier | Statement Eql Identifier)))?)? DbOp | 216 | 217 | Create Database Identifier From Share Identifier Dot Identifier | 218 | 219 | 220 | Create Database Identifier As Replica Of Identifier Dot Identifier 221 | Auto_refresh_materialized_views_on_secondary Eql (True | False) | 222 | 223 | //create network policy 224 | Create Network Policy Identifier Allowed_IP_List Eql Lparen Sqt IpA Sqt (Comma Sqt IpA Sqt)* Rparen 225 | (Blocked_IP_List Eql Lparen Sqt IpA Sqt (Comma Sqt IpA Sqt)* Rparen)? | 226 | 227 | //Create Role 228 | Create OptOrReplace? Role IfNotExists? Identifier (Comment Eql StringLiteral)? | 229 | 230 | //Create share 231 | Create OptOrReplace? Share Identifier (Comment Eql StringLiteral)? 232 | 233 | } 234 | 235 | 236 | CreateStreamStmt { 237 | 238 | Create OptOrReplace? Stream IfNotExists? ObjName 239 | 240 | ((Copy Grants)? On (External? Table ObjName) TimeTravelClause? | 241 | 242 | CloneDefintion (Copy Grants)?)? PropsList? 243 | 244 | } 245 | 246 | 247 | CloneDefintion { 248 | 249 | Clone IfExists? ObjName TimeTravelClause? 250 | 251 | } 252 | 253 | 254 | UseStmt { 255 | 256 | Use ObjName | 257 | Use Schema ObjName | 258 | Use Database ObjName | 259 | Use Warehouse ObjName | 260 | Use Role ObjName 261 | 262 | } 263 | 264 | 265 | AlterTaskStmt { 266 | 267 | 268 | Alter Task IfExists? ObjName (Suspend | Resume) 269 | 270 | } 271 | 272 | 273 | TimeTravelClause { 274 | 275 | (At | Before)? Lparen (Timestamp | Offset | Statement) Darw ScalarExpression Rparen 276 | 277 | } 278 | 279 | 280 | ShowInClause { 281 | 282 | In Account | 283 | In (Schema | Database)? ObjName 284 | 285 | } 286 | 287 | 288 | ShowLimitClause { 289 | 290 | Limit IntegerLiteral (From StringLiteral)? 291 | 292 | } 293 | 294 | 295 | ShowStmt { 296 | 297 | Show Terse? (Tasks | Views) (Like StringLiteral)? ShowInClause? (Starts With StringLiteral)? ShowLimitClause? | 298 | 299 | Show Terse? (Tables|Schemas) History? (Like StringLiteral)? ShowInClause? (Starts With StringLiteral)? ShowLimitClause? | 300 | 301 | Show Pipes (Like StringLiteral)? ShowInClause? 302 | 303 | } 304 | 305 | 306 | ObjName { 307 | 308 | IdentifierKW Lparen IdentifierVar Rparen | 309 | 310 | ObjectLiteral | 311 | 312 | IdentifierExt Ddot IdentifierExt | 313 | 314 | IdentifierExt (Dot IdentifierExt)* 315 | 316 | } 317 | 318 | 319 | SourceObjName { 320 | 321 | objName 322 | 323 | } 324 | 325 | 326 | ColListCmt { 327 | 328 | (Identifier (Comment StringLiteral)? )(Comma Identifier (Comment StringLiteral)? )* 329 | 330 | } 331 | 332 | 333 | CreateIntegrationStmt { 334 | 335 | Create OptOrReplace? System? IntegrationTypes Integration IfNotExists? ObjName ((With)? KeyValueProperty (Comma? KeyValueProperty)*)? 336 | 337 | } 338 | 339 | 340 | IntegrationTypes { 341 | 342 | (Security | Storage | Notification | Api) 343 | 344 | } 345 | 346 | 347 | SelectStmt { 348 | 349 | SelectDefinition | //without parenthesis 350 | ParenSelect //with parenthisis 351 | 352 | } 353 | 354 | 355 | SelectDefinition { 356 | 357 | SelectBase | 358 | WithClause SelectClause 359 | 360 | } 361 | 362 | 363 | ParenSelect { 364 | 365 | Lparen ParenSelect Rparen | 366 | Lparen SelectDefinition Rparen 367 | 368 | } 369 | 370 | 371 | SelectClause { 372 | 373 | SelectBase | 374 | ParenSelect 375 | 376 | } 377 | 378 | 379 | SelectBase { 380 | 381 | Select 382 | 383 | (All | Distinct)? (Top IntegerLiteral)? SelectTargetList 384 | 385 | (Into ObjName)? FromClause? WhereClause? 386 | 387 | GroupByClause? OrderByClause? LimitClause? 388 | 389 | HavingClause? QualifyClause? ConnectByClause? | 390 | 391 | SelectClause !union Union (All|Distinct)? SelectClause | 392 | 393 | SelectClause !intersect (Except | Intersect) (All)? SelectClause 394 | 395 | } 396 | 397 | 398 | SelectTargetList{ 399 | 400 | SelectTarget (Comma SelectTarget)* 401 | 402 | } 403 | 404 | 405 | ConnectByClause { 406 | 407 | (Start With Where ScalarExpression)? 408 | Connect By ScalarExpression 409 | (Start With ScalarExpression)? 410 | 411 | } 412 | 413 | 414 | WhereClause { 415 | 416 | Where ScalarExpression 417 | 418 | } 419 | 420 | 421 | GroupByClause { 422 | 423 | Group By GroupByExpression (Comma GroupByExpression)* 424 | 425 | } 426 | 427 | 428 | GroupByExpression { 429 | 430 | (Grouping Sets| Rollup | Cube) Lparen GroupingSet (Comma GroupingSet)* Rparen | 431 | 432 | // Rollup Lparen GroupingSet (Comma GroupingSet)* Rparen | 433 | 434 | // Cube Lparen GroupingSet (Comma GroupingSet)* Rparen | 435 | 436 | ScalarExpression 437 | 438 | } 439 | 440 | 441 | GroupingSet { 442 | 443 | Lparen (ScalarExpression (Comma ScalarExpression)*)? Rparen 444 | 445 | } 446 | 447 | 448 | HavingClause { 449 | 450 | Having ScalarExpression 451 | 452 | } 453 | 454 | 455 | QualifyClause { 456 | 457 | Qualify ScalarExpression 458 | 459 | } 460 | 461 | 462 | FromClause { 463 | 464 | From FromExpression (Comma FromExpression)* 465 | 466 | } 467 | 468 | 469 | FromExpression { 470 | 471 | sampleExpression JoinExpression* | 472 | 473 | Lcly Oj sampleExpression JoinExpression* Rcly 474 | 475 | } 476 | 477 | 478 | JoinExpression { 479 | 480 | CrossAndNaturalJoinKW sampleExpression | 481 | !plus JoinKW ( joinExprRepeat JoinSpecification | sampleExpression ) 482 | 483 | } 484 | 485 | 486 | joinExprRepeat { 487 | 488 | sampleExpression JoinExpression* 489 | 490 | } 491 | 492 | 493 | JoinSpecification { 494 | 495 | On ExpressionA | 496 | Using Lparen ColumnNames Rparen 497 | 498 | } 499 | 500 | 501 | CreatePipeStmt { 502 | 503 | Create OptOrReplace? Pipe IfNotExists? ObjName PipeOption* PipeSpecification 504 | 505 | } 506 | 507 | 508 | PipeSpecification { 509 | 510 | As CopyStmt 511 | 512 | } 513 | 514 | PipeOption { 515 | 516 | IfNotExists | 517 | CopyGrants | 518 | WithKeyValueProperty 519 | 520 | 521 | } 522 | 523 | WithKeyValueProperty { 524 | 525 | With? KeyValueProperty (Comma KeyValueProperty)* 526 | 527 | } 528 | 529 | CopyGrants { 530 | 531 | Copy Grants 532 | 533 | } 534 | 535 | CopyStmt { 536 | 537 | Copy Into 538 | ( ObjName (Lparen ColumnNameList Rparen)? (From URLDefinition)? PropsList? 539 | | ObjName (Lparen ColumnNameList Rparen)? (From Lparen QueryStatementExpression Rparen) PropsList? 540 | | URLDefinition From 541 | ( 542 | ObjName (Partition By ScalarExpression)? PropsList? | 543 | Lparen QueryStatementExpression Rparen (Partition By ScalarExpression)? PropsList?) 544 | ) 545 | 546 | } 547 | 548 | 549 | ColumnNames { 550 | 551 | Identifier (Dot Identifier)? (Comma (Identifier (Dot Identifier)?))* 552 | 553 | } 554 | 555 | 556 | CrossAndNaturalJoinKW { 557 | 558 | (Natural | Cross) JoinKW 559 | 560 | } 561 | 562 | 563 | JoinKW { 564 | 565 | Join | 566 | Inner Join | 567 | Left Join | 568 | Left Outer Join | 569 | Right Join | 570 | Right Outer Join | 571 | Full Outer? Join | 572 | Left Semi Join 573 | 574 | } 575 | 576 | 577 | sampleExpression { 578 | 579 | (LateralView | BaseFromExpression AliasClause?) 580 | 581 | ((Sample | Tablesample) (Bernoulli | Block | Row | System)? Lparen 582 | (NumberLiteral | IntegerLiteral| BindVariable ) Rows? Rparen SampleSeedExpression?)? 583 | 584 | } 585 | 586 | 587 | SampleSeedExpression { 588 | 589 | ((Seed | Repeatable) Lparen (NumberLiteral | IntegerLiteral | BindVariable) Rparen) 590 | 591 | } 592 | 593 | 594 | AliasExpression { 595 | 596 | BaseFromExpression 597 | 598 | } 599 | 600 | 601 | 602 | BaseFromExpression { 603 | 604 | TableObjectName | 605 | ValuesDef | 606 | ParenSelect 607 | 608 | } 609 | 610 | tableFunctionArgumentList { 611 | 612 | NamedExpression ( Comma NamedExpression )* 613 | 614 | } 615 | 616 | 617 | TableObjectName { 618 | 619 | ObjectLiteral | 620 | IdentifierExt (Dot IdentifierExt)+ | 621 | IdentifierExt Dot Dot IdentifierExt | 622 | IdentifierExt 623 | 624 | } 625 | 626 | 627 | ValuesDef { 628 | 629 | Values ValueList (!plus Comma ValueList)* 630 | 631 | } 632 | 633 | 634 | ValueList { 635 | 636 | Lparen ScalarExpression (Comma ScalarExpression)* Rparen 637 | 638 | } 639 | 640 | 641 | TableFunctionSource { 642 | 643 | Table Lparen TableFunction Rparen 644 | 645 | } 646 | 647 | 648 | TableFunction { 649 | 650 | TableFunctionName Lparen (TableFunctionArgumentList)? Rparen TableFunctionOverClause? 651 | 652 | } 653 | 654 | TableFunctionOverClause { 655 | 656 | Over Lparen (Partition By PartitionByList)? OrderByClause? Rparen 657 | 658 | } 659 | 660 | 661 | TableFunctionName { 662 | 663 | TableFunctionIdentifier | ObjectLiteral 664 | 665 | } 666 | 667 | 668 | TableFunctionIdentifier { 669 | 670 | IdentifierExt Dot IdentifierExt Dot IdentifierExt | 671 | 672 | IdentifierExt Dot Dot IdentifierExt | 673 | 674 | IdentifierExt Dot IdentifierExt | 675 | 676 | IdentifierExt 677 | 678 | } 679 | 680 | 681 | TableFunctionArgumentList { 682 | 683 | NamedExpression (Comma NamedExpression)* 684 | 685 | } 686 | 687 | 688 | NamedExpression { 689 | 690 | (IdentifierExt Darw)? ScalarExpression | 691 | 692 | URLIdentifier 693 | 694 | } 695 | 696 | 697 | NamedQueryStatementExpression { 698 | 699 | (IdentifierExt Darw)? QueryStatementExpression 700 | 701 | } 702 | 703 | 704 | PivotUnpivotMatchRecognizeClause { 705 | 706 | (AliasClause)? (UnpivotClause) 707 | 708 | } 709 | 710 | 711 | AliasClause { 712 | 713 | As? IdentifierExt (Lparen AliasList Rparen)? 714 | 715 | } 716 | 717 | 718 | UnpivotClause { 719 | 720 | Unpivot Lparen ObjName For ObjName 721 | In Lparen Identifier (Comma Identifier)* Rparen Rparen 722 | 723 | } 724 | 725 | 726 | LateralView { 727 | 728 | Lateral TableFunction AliasClause? 729 | // Lateral ParenthesizedFromExpression AliasClause? 730 | 731 | 732 | } 733 | 734 | 735 | ParenthesizedFromExpression { 736 | 737 | Lparen FromExpression Rparen | 738 | 739 | Lparen QueryStatementExpression Rparen 740 | 741 | } 742 | 743 | 744 | SelectTarget { 745 | 746 | (IdentifierExt Dot)? Star | 747 | (Connect_by_root? ScalarExpression) (As? IdentifierExt)? 748 | 749 | } 750 | 751 | 752 | ColIdentifier { 753 | 754 | Identifier 755 | 756 | } 757 | 758 | 759 | WithClause { 760 | 761 | With Recursive? WithItem (Comma WithItem)* 762 | 763 | } 764 | 765 | 766 | WithItem { 767 | 768 | WithIdentifier As WithExpression 769 | 770 | } 771 | 772 | 773 | WithIdentifier { 774 | 775 | IdentifierExt WithItemColumnList? 776 | 777 | } 778 | 779 | 780 | WithItemColumnList { 781 | 782 | Lparen AliasList Rparen 783 | 784 | } 785 | 786 | 787 | AliasList { 788 | 789 | IdentifierExt (Comma IdentifierExt)* 790 | 791 | } 792 | 793 | 794 | WithExpression { 795 | 796 | Lparen (QueryStatementExpression | ScalarExpression) Rparen 797 | 798 | } 799 | 800 | 801 | CreateTaskStmt { 802 | 803 | Create OptOrReplace Task IfNotExists? ObjName PropsList? AfterTask? (TaskCondition? TaskSpecification | CloneProvision)? 804 | } 805 | 806 | 807 | TaskCondition { 808 | 809 | When ScalarExpression 810 | 811 | } 812 | 813 | 814 | TaskSpecification { 815 | 816 | As Stmt 817 | 818 | } 819 | 820 | 821 | AfterTask{ 822 | 823 | After ObjName 824 | 825 | } 826 | 827 | 828 | CloneProvision { 829 | 830 | Clone IfExists? ObjName TimeTravelClause? 831 | 832 | } 833 | 834 | 835 | CreateManagedAccount { 836 | 837 | Create Managed Account Identifier Admin_name Eql Identifier Comma Admin_password StringLiteral Comma 838 | Type Eql Reader (Comma Comment Eql StringLiteral)? 839 | 840 | } 841 | 842 | 843 | CreateMaskingPolicy { 844 | 845 | Create OptOrReplace? Masking Policy IfNotExists? Identifier As Val Identifier Returns Identifier Arr Identifier (Comment Eql StringLiteral)? 846 | 847 | } 848 | 849 | 850 | CreateMaterializedView { 851 | 852 | Create OptOrReplace? (Secure)? Materialized View IfNotExists? Identifier (Copy Grants)? 853 | (Lparen ColListCmt Rparen)? 854 | (Comment Eql StringLiteral)? 855 | (Cluster By Lparen (Identifier (Comma Identifier)*) Rparen)? 856 | As QueryStatementExpression 857 | 858 | 859 | } 860 | 861 | 862 | CreateProcedureStmt { 863 | 864 | Create OptOrReplace? (Temporary | Temp)? Secure? Procedure IfNotExists? Identifier UdfSig 865 | (CreateFunctionReturns CreateFunctionReturnNullable?)? 866 | CreateFunctionLanguage? 867 | CreateFunctionNullHandling? 868 | CreateFunctionVolatility? 869 | WithProvision? 870 | InvocationPrivilegeType? 871 | FuncBody? 872 | 873 | } 874 | 875 | 876 | CreateResourceMonitor { 877 | 878 | Create OptOrReplace? Resource Monitor Identifier With 879 | (Credit_quota Eql NumberLiteral)? 880 | (Frequency Eql (Monthly | Daily | Weekly | Yearly | Never))? 881 | (Start_timestamp Eql (Identifier | Immediately))? 882 | (End_timestamp Eql Identifier)? 883 | (Triggers (On NumberLiteral Percent Do (Suspend | Suspend_immediate | Notify))*) 884 | 885 | } 886 | 887 | 888 | CreateRowAccessPolicy { 889 | 890 | Create OptOrReplace? Row Access Policy IfNotExists? Identifier As 891 | Lparen Identifier+ Rparen Returns Boolean Arr Identifier (Comment Eql StringLiteral)? 892 | 893 | } 894 | 895 | 896 | CreateSchema { 897 | 898 | Create OptOrReplace? (Transient)? Schema IfNotExists? Identifier 899 | (Clone Identifier ((At | Before) ((Timestamp Eqa Identifier | Offset Eqa Identifier | Statement Eqa Identifier)))?)? 900 | (With Managed Access)? 901 | (Data_retention_time_in_days Eql Identifier)? 902 | (Max_data_extension_time_in_days Eql Identifier)? 903 | (Default_ddl_collation Eql Identifier)? 904 | (Comment Eql StringLiteral)? 905 | 906 | } 907 | 908 | 909 | AccountOptional { 910 | 911 | (Region_group Eql Identifier)? (Region Eql Identifier)? (Comment Eql StringLiteral)? 912 | 913 | } 914 | 915 | 916 | DbOp { 917 | 918 | (Data_retention_time_in_days Eql Identifier)? 919 | (Max_data_extension_time_in_days Eql Identifier)? 920 | (Default_ddl_collation Eql Identifier)? 921 | (Comment Eql StringLiteral)? 922 | 923 | } 924 | 925 | 926 | CreateViewStmt { 927 | 928 | Create OptOrReplace? Force? Secure? Recursive? TemporaryType? View IfNotExists? 929 | 930 | ObjName 931 | 932 | ViewOption* ViewSpecification 933 | 934 | } 935 | 936 | 937 | ViewSpecification { 938 | 939 | (ViewColumnSpecificationsWithConstraints | 940 | 941 | ViewOutOfLineConstraints ViewOption* )? 942 | 943 | As SelectStmt 944 | 945 | } 946 | 947 | ViewOption { 948 | 949 | CommonCreateOption | 950 | 951 | WithRowAccessPolicyClause 952 | 953 | } 954 | 955 | 956 | CommonCreateOption { 957 | 958 | IfNotExists | 959 | CopyGrants | 960 | WithKeyValueProperty | 961 | WithTagClause 962 | 963 | } 964 | 965 | 966 | 967 | 968 | WithTagClause { 969 | 970 | With? Tag Lparen TagValuePairsList Rparen 971 | 972 | } 973 | 974 | 975 | TagValuePairsList { 976 | 977 | TagValuePair (Comma TagValuePair)* 978 | 979 | } 980 | 981 | 982 | TagValuePair { 983 | 984 | ObjName Eql KeyValue 985 | 986 | } 987 | 988 | 989 | TagNamesList { 990 | 991 | ObjName (Comma ObjName)* 992 | 993 | } 994 | 995 | 996 | ViewOutOfLineConstraints { 997 | 998 | Lparen OutOfLineViewConstraintList Rparen 999 | 1000 | } 1001 | 1002 | 1003 | ViewColumnSpecifications { 1004 | 1005 | Lparen ViewColumnSpecificationList Rparen 1006 | 1007 | } 1008 | 1009 | 1010 | ViewColumnSpecificationsWithConstraints { 1011 | 1012 | Lparen ViewColumnSpecification (Comma ViewColumnSpecification)* 1013 | (Comma OutOfLineViewConstraintList)? Rparen 1014 | 1015 | } 1016 | 1017 | 1018 | OutOfLineViewConstraintList { 1019 | 1020 | OutOfLineViewConstraint (Comma OutOfLineViewConstraint)* 1021 | 1022 | } 1023 | 1024 | 1025 | ViewColumnSpecificationList { 1026 | 1027 | ViewColumnSpecification (Comma ViewColumnSpecification)* 1028 | 1029 | } 1030 | 1031 | 1032 | ViewColumnSpecification { 1033 | 1034 | IdentifierExt ColumnWithMaskingPolicyClause? WithTagClause? CommentClause? (InlineViewConstraint)* 1035 | 1036 | } 1037 | 1038 | 1039 | OutOfLineTableConstraint { 1040 | 1041 | (Constraint IdentifierExt)? Unique Lparen ColumnNameOnlyList Rparen 1042 | OutOfLineTableConstraintProperties* | 1043 | 1044 | (Constraint IdentifierExt)? Primary Key Lparen ColumnNameOnlyList 1045 | Rparen OutOfLineTableConstraintProperties* | 1046 | 1047 | (Constraint IdentifierExt)? Foreign Key Lparen 1048 | ColumnNameOnlyList Rparen References ObjName 1049 | (Lparen ColumnNameOnlyList Rparen)? ForeignKeyMatch? ForeignKeyDeleteUpdateRule? 1050 | OutOfLineTableConstraintProperties* 1051 | 1052 | } 1053 | 1054 | 1055 | InlineViewConstraint { 1056 | 1057 | (Constraint IdentifierExt)? Unique ViewConstraintProperties? | 1058 | (Constraint IdentifierExt)? Primary Key ViewConstraintProperties? | 1059 | (Constraint IdentifierExt)? References 1060 | ObjName (Lparen IdentifierExt Rparen)? 1061 | ViewConstraintProperties? 1062 | } 1063 | 1064 | 1065 | ForeignKeyMatch { 1066 | 1067 | Match (Full | Partial | Simple) 1068 | 1069 | } 1070 | 1071 | 1072 | ForeignKeyUpdateRule { 1073 | 1074 | On Update (Cascade | Set Null | Set Default | 1075 | Restrict | No Action) 1076 | } 1077 | 1078 | 1079 | ForeignKeyDeleteRule { 1080 | 1081 | On Delete (Cascade | Set Null | Set Default | 1082 | Restrict | No Action) 1083 | 1084 | } 1085 | 1086 | 1087 | TableConstraintProperties { 1088 | 1089 | ConstraintDeferrableProp | 1090 | (Initiallly (Deferred | Immediate)) | 1091 | (Rely | Norely) | 1092 | ConstraintEnableProp (Validate | Novalidate)? 1093 | 1094 | } 1095 | 1096 | 1097 | OutOfLineTableConstraintProperties { 1098 | 1099 | TableConstraintProperties | CommentClause 1100 | 1101 | } 1102 | 1103 | 1104 | OutOfLineTableConstraintList { 1105 | 1106 | OutOfLineTableConstraint (Comma OutOfLineTableConstraint)* 1107 | 1108 | } 1109 | 1110 | 1111 | OutOfLineViewConstraint { 1112 | 1113 | OutOfLineTableConstraint 1114 | 1115 | } 1116 | 1117 | 1118 | WithRowAccessPolicyClause { 1119 | 1120 | With? Row Access Policy ObjName On Lparen ColumnNameOnlyList? Rparen 1121 | 1122 | } 1123 | 1124 | 1125 | ColumnWithMaskingPolicyClause { 1126 | 1127 | With? Masking Policy ObjName (Using Lparen ColumnNameOnlyList Rparen)? 1128 | 1129 | } 1130 | 1131 | 1132 | ColumnNameOnlyList { 1133 | 1134 | IdentifierExt (Comma IdentifierExt)* 1135 | 1136 | } 1137 | 1138 | 1139 | ViewConstraintProperties { 1140 | 1141 | (Rely | Norely)? (Disable | Not Enforced) 1142 | 1143 | } 1144 | 1145 | 1146 | AlterViewStmt { 1147 | 1148 | Alter View IfExists? ObjName Set 1149 | 1150 | (Comment Eql StringLiteral | 1151 | 1152 | Secure ) 1153 | 1154 | } 1155 | 1156 | 1157 | GetStmt { 1158 | 1159 | Get URLDefinitionSource URLDefinitionDest WithProvision? 1160 | 1161 | } 1162 | 1163 | 1164 | URLDefinitionSource { 1165 | 1166 | urldefinition 1167 | 1168 | } 1169 | 1170 | URLDefinitionDest { 1171 | 1172 | urldefinition 1173 | 1174 | } 1175 | 1176 | 1177 | URLPath { 1178 | 1179 | (Tilde | Divide Tilde)? URLPathComponent (Divide URLPathComponent)* 1180 | 1181 | } 1182 | 1183 | 1184 | URLDefinition { 1185 | 1186 | URLIdentifier | 1187 | StringLiteral 1188 | 1189 | } 1190 | 1191 | 1192 | urldefinition { 1193 | 1194 | URLIdentifier | 1195 | StringLiteral 1196 | 1197 | } 1198 | 1199 | 1200 | URLIdentifier { 1201 | 1202 | StorageUrlIdentifier | 1203 | StageNameIdentifier | 1204 | StagePathIdentifier 1205 | 1206 | } 1207 | 1208 | 1209 | IdentifierExt { 1210 | 1211 | Identifier | QuotedString 1212 | 1213 | } 1214 | 1215 | 1216 | StorageUrlIdentifier { 1217 | 1218 | StorageURLFile URLPath 1219 | 1220 | } 1221 | 1222 | 1223 | StageNameIdentifier { 1224 | 1225 | Atr Tilde? URLPathComponent 1226 | 1227 | } 1228 | 1229 | 1230 | StagePathIdentifier { 1231 | 1232 | StageNameIdentifier (Divide URLPathComponent)+ 1233 | 1234 | } 1235 | 1236 | 1237 | ColumnNameList { 1238 | 1239 | (IdentifierExt (Dot IdentifierExt)?) (Comma (IdentifierExt (Dot Identifier)?))* 1240 | 1241 | 1242 | } 1243 | 1244 | 1245 | PrivilegePrefix { 1246 | 1247 | All Privileges? | 1248 | Attach | 1249 | Create | 1250 | Delete | 1251 | Import | 1252 | Execute | 1253 | Insert | 1254 | Manage | 1255 | Monitor | 1256 | Modify | 1257 | Override | 1258 | Ownership | 1259 | Operate | 1260 | Select | 1261 | Truncate | 1262 | Update | 1263 | Usage | 1264 | References | 1265 | Execute | 1266 | Apply 1267 | 1268 | } 1269 | 1270 | 1271 | PrivilegeSuffix { 1272 | 1273 | Account | 1274 | Data Exchange | 1275 | Database | 1276 | Execution | 1277 | External Table | 1278 | File Format | 1279 | Function | 1280 | Integration | 1281 | Procedure | 1282 | Materialized View | 1283 | Pipe | 1284 | Resource Monitor | 1285 | Stream | 1286 | Task | 1287 | Replication | 1288 | Role | 1289 | Security | 1290 | Sequence | 1291 | Schema | 1292 | Share | 1293 | Share Restrictions | 1294 | Stage | 1295 | System | 1296 | Support | 1297 | Table | 1298 | User | 1299 | Usage | 1300 | View | 1301 | Warehouse | 1302 | Organization | 1303 | Network Policy | 1304 | Masking Policy | 1305 | Application | 1306 | Row Access Policy | 1307 | Tag | 1308 | Session Policy 1309 | 1310 | } 1311 | 1312 | 1313 | IfExists { 1314 | 1315 | If Exists 1316 | 1317 | } 1318 | 1319 | 1320 | IfNotExists { 1321 | 1322 | If Not Exists 1323 | 1324 | } 1325 | 1326 | 1327 | DropOptions { 1328 | 1329 | Restrict | Cascade 1330 | 1331 | } 1332 | 1333 | 1334 | TempKWs { 1335 | 1336 | Temp | Temporary | Volatile 1337 | 1338 | } 1339 | 1340 | 1341 | TemporaryType { 1342 | 1343 | (Local | Global)? TempKWs 1344 | 1345 | } 1346 | 1347 | 1348 | ForeignKeyDeleteUpdateRule { 1349 | 1350 | ForeignKeyUpdateRule ForeignKeyDeleteRule? | 1351 | ForeignKeyDeleteRule ForeignKeyUpdateRule? 1352 | 1353 | } 1354 | 1355 | 1356 | ConstraintDeferrableProp { 1357 | 1358 | Not Deferrable | 1359 | Deferrable 1360 | 1361 | } 1362 | 1363 | SessionVariableIdentifier { 1364 | 1365 | (Dlr) (Letter | Uscr) (Letter | Digit | Uscr)* 1366 | 1367 | } 1368 | 1369 | 1370 | IdentifierNoString { 1371 | 1372 | Identifier 1373 | 1374 | } 1375 | 1376 | 1377 | BindVariable { 1378 | 1379 | Colon IdentifierNoString | 1380 | Colon IntegerLiteral | 1381 | Qsm | 1382 | Dlr (Letter | Uscr) (Letter | Uscr | Digit)* 1383 | 1384 | } 1385 | 1386 | 1387 | ConstraintEnableProp { 1388 | 1389 | Not Enforced | 1390 | Enforced | 1391 | Enable | 1392 | Disable 1393 | 1394 | } 1395 | 1396 | 1397 | ColumnIdentifier { 1398 | 1399 | Identifier | 1400 | QuotedString 1401 | 1402 | } 1403 | 1404 | 1405 | KeyValueProperty { 1406 | 1407 | KeyName Eql KeyValue 1408 | 1409 | } 1410 | 1411 | 1412 | KeyName { 1413 | 1414 | Identifier | 1415 | Auto_ingest | 1416 | Enabled | 1417 | Api_provider | 1418 | Api_aws_role_arn | 1419 | Api_key | 1420 | Api_allowed_prefixes | 1421 | Api_blocked_prefixes | 1422 | Api_provider | 1423 | Azure_tenant_id | 1424 | Azure_ad_application_id | 1425 | Google_audience | 1426 | Type | 1427 | Comment 1428 | 1429 | } 1430 | 1431 | 1432 | KeyNameList { 1433 | 1434 | KeyName (Comma KeyName)* | 1435 | Enabled Eql (True | False) 1436 | 1437 | } 1438 | 1439 | 1440 | KeyValue { 1441 | 1442 | ListableKeyValue | 1443 | QualifiedObjectName | 1444 | All | 1445 | Properties | 1446 | KeyValueList | 1447 | Lparen Properties (Comma Properties)* Rparen | 1448 | URLIdentifier 1449 | 1450 | } 1451 | 1452 | 1453 | Properties { 1454 | 1455 | Lparen PropsList Rparen | 1456 | Lparen LiteralKeyPropsList Rparen 1457 | 1458 | } 1459 | 1460 | 1461 | PropsList { 1462 | 1463 | KeyValueProperty (Comma? KeyValueProperty)* 1464 | 1465 | } 1466 | 1467 | 1468 | KeyValueList { 1469 | 1470 | Lparen ListableKeyValue (Comma ListableKeyValue)* Rparen | 1471 | Lparen Rparen 1472 | 1473 | } 1474 | 1475 | 1476 | CreateFunctionStmt { 1477 | 1478 | Create OptOrReplace? (Temporary | Temp)? Secure? Function IfNotExists? Identifier UdfSig 1479 | (CreateFunctionReturns CreateFunctionReturnNullable?)? 1480 | CreateFunctionLanguage? 1481 | CreateFunctionNullHandling? 1482 | CreateFunctionVolatility? 1483 | WithProvision? 1484 | InvocationPrivilegeType? 1485 | FuncBody? 1486 | 1487 | } 1488 | 1489 | 1490 | OptOrReplace { 1491 | 1492 | Or Replace 1493 | 1494 | } 1495 | 1496 | 1497 | DescribeStmt { 1498 | 1499 | (Describe | Desc) DescribeTargetSimple ObjName | 1500 | 1501 | (Describe | Desc) External? Table ObjName (Type Eql (Columns | Stage))? | 1502 | 1503 | (Describe | Desc) (Function | Procedure) Identifier UdfSig 1504 | 1505 | } 1506 | 1507 | 1508 | DescribeTargetSimple { 1509 | 1510 | (Masking | Network | Row Access | Session) Policy | 1511 | File Format | 1512 | (Api | Storage | Security | Notification)? Integration | 1513 | Materialized? View | 1514 | Pipe | 1515 | Sequence | 1516 | Share | 1517 | Stage | 1518 | Stream | 1519 | Task | 1520 | User 1521 | 1522 | } 1523 | 1524 | 1525 | UdfParam { 1526 | 1527 | UdfParamIdentifier | 1528 | IdentifierExtended Types | 1529 | NonUserDefinedType 1530 | 1531 | } 1532 | 1533 | 1534 | IdentifierExtended { 1535 | 1536 | Identifier | 1537 | QuotedString | 1538 | Type | 1539 | Text| 1540 | Enabled| 1541 | Channel 1542 | 1543 | } 1544 | 1545 | 1546 | InsertStmt { 1547 | 1548 | Insert Overwrite? 1549 | 1550 | (Into ObjName (Lparen ColumnNameList Rparen)? InsertSource | 1551 | 1552 | (All | First) MultiInsertInto* MultiInsertCase* QueryStatementExpression) 1553 | 1554 | 1555 | } 1556 | 1557 | 1558 | MultiInsertCase { 1559 | 1560 | MultiInsertCondition MultiInsertInto+ 1561 | 1562 | } 1563 | 1564 | 1565 | MultiInsertCondition { 1566 | 1567 | (When ScalarExpression Then) | 1568 | Else 1569 | 1570 | } 1571 | 1572 | 1573 | MultiInsertInto { 1574 | 1575 | Into ObjName !plus (Lparen ColumnNameList Rparen)? (Values ValueList)? 1576 | 1577 | } 1578 | 1579 | 1580 | InsertSource { 1581 | 1582 | QueryStatementExpression | 1583 | ValuesDef 1584 | 1585 | } 1586 | 1587 | 1588 | FuncBody { 1589 | 1590 | As (QuotedString| StringLiteralDlr) | 1591 | 1592 | As AnonymousBlock 1593 | 1594 | } 1595 | 1596 | 1597 | UdfSig { 1598 | 1599 | Lparen (UdfParam (Comma UdfParam)* )? Rparen 1600 | 1601 | } 1602 | 1603 | 1604 | UdfTypeSig { 1605 | 1606 | Lparen (Types (Comma Types)* )? Rparen 1607 | 1608 | } 1609 | 1610 | 1611 | WithProvision { 1612 | 1613 | With? PropsList 1614 | 1615 | } 1616 | 1617 | 1618 | CreateFunctionReturns { 1619 | 1620 | Returns Table UdfSig | 1621 | Returns Types 1622 | 1623 | } 1624 | 1625 | 1626 | CreateFunctionLanguage { 1627 | 1628 | Language Identifier 1629 | 1630 | } 1631 | 1632 | 1633 | CreateFunctionReturnNullable { 1634 | 1635 | Null | 1636 | Not Null 1637 | 1638 | } 1639 | 1640 | 1641 | CreateFunctionNullHandling { 1642 | 1643 | Returns Null On Null Input | 1644 | Strict | 1645 | Called On Null Input 1646 | 1647 | } 1648 | 1649 | 1650 | CreateFunctionVolatility { 1651 | 1652 | Volatile | 1653 | Immutable 1654 | 1655 | } 1656 | 1657 | 1658 | Declaration { 1659 | 1660 | Identifier Cursor For Identifier Smc+ 1661 | 1662 | } 1663 | 1664 | 1665 | DeclareList { 1666 | 1667 | Declare Declaration+ 1668 | 1669 | } 1670 | 1671 | 1672 | AnonymousBlock { 1673 | 1674 | DeclareList? BeginEndBlock 1675 | 1676 | } 1677 | 1678 | 1679 | InvocationPrivilegeType { 1680 | 1681 | Execute As Owner | 1682 | Execute As Caller 1683 | 1684 | } 1685 | 1686 | 1687 | Then_part { 1688 | 1689 | Then (Stmt+) 1690 | 1691 | } 1692 | 1693 | 1694 | Exception_handler { 1695 | 1696 | When Identifier (Or Identifier)* Then_part 1697 | 1698 | } 1699 | 1700 | 1701 | CommentClause { 1702 | 1703 | Comment Eql StringLiteral 1704 | 1705 | } 1706 | 1707 | 1708 | Exception_clause { 1709 | 1710 | Exception Exception_handler+ 1711 | 1712 | } 1713 | 1714 | 1715 | BeginEndBlock { 1716 | 1717 | BeginEndBlockWithoutLabel (Label)? 1718 | 1719 | } 1720 | 1721 | 1722 | BeginEndBlockWithoutLabel { 1723 | 1724 | Begin 1725 | (Stmt )+ 1726 | Exception_clause? 1727 | End 1728 | 1729 | } 1730 | 1731 | 1732 | QualifiedObjectName { 1733 | 1734 | (Identifier Dot (Identifier Dot (Identifier Dot)?)?) Identifier 1735 | 1736 | } 1737 | 1738 | 1739 | LiteralKeyName { 1740 | 1741 | StringLiteral 1742 | 1743 | } 1744 | 1745 | 1746 | LiteralKeyValueProperty { 1747 | 1748 | LiteralKeyName Eql KeyValue 1749 | 1750 | } 1751 | 1752 | 1753 | LiteralKeyPropsList { 1754 | 1755 | LiteralKeyValueProperty (Comma? LiteralKeyValueProperty)* 1756 | 1757 | } 1758 | 1759 | 1760 | CommitStmt { 1761 | 1762 | Commit 1763 | 1764 | } 1765 | 1766 | 1767 | RollbackStmt { 1768 | 1769 | Rollback 1770 | 1771 | } 1772 | 1773 | 1774 | TruncateStmt { 1775 | 1776 | 1777 | Truncate (Table | Materialized View)? IfExists? ObjName 1778 | 1779 | } 1780 | 1781 | 1782 | ListableKeyValue { 1783 | 1784 | NegatableNumberLiteral | 1785 | StringLiteral | 1786 | BinaryLiteral | 1787 | NegatableIntegerLiteral | 1788 | BooleanValue | 1789 | Null | 1790 | IdentifierExtended | 1791 | KeyValuesExtended | 1792 | BindVariable 1793 | 1794 | } 1795 | 1796 | 1797 | BooleanValue { 1798 | 1799 | True | False 1800 | 1801 | } 1802 | 1803 | 1804 | NegatableIntegerLiteral { 1805 | 1806 | IntegerLiteral | 1807 | Minus IntegerLiteral 1808 | 1809 | } 1810 | 1811 | 1812 | NegatableNumberLiteral { 1813 | 1814 | NumberLiteral | 1815 | Minus NumberLiteral 1816 | 1817 | } 1818 | 1819 | 1820 | BinaryLiteral { 1821 | 1822 | X StringLiteral 1823 | 1824 | } 1825 | 1826 | 1827 | CreateTableStmt { 1828 | 1829 | Create OptOrReplace? (((Local | Global)? Temporary? | Volatile) | Transient)? 1830 | Table (If Not Exists)? Identifier CTP (Cluster By (Identifier (Comma Identifier)*))? 1831 | StageFileFormat 1832 | CreateTableExtra1 1833 | CreateTableExtra2 1834 | 1835 | } 1836 | 1837 | 1838 | CTP { 1839 | 1840 | (Lparen Identifier Identifier (Collate Identifier )? 1841 | (Default Identifier | (Autoincrement | Identity) ((Identifier Comma Identifier) | 1842 | Start Identifier Increment Identifier)?)? (Not Null)? 1843 | (Identifier Identifier (Comma Identifier Identifier)*)? 1844 | Outoflineconstraint? Rparen)* 1845 | 1846 | } 1847 | 1848 | 1849 | Outoflineconstraint { 1850 | 1851 | ((Constraint Identifier)? Unique (Lparen Identifier (Comma Identifier)* Rparen)? LineParams | 1852 | (Constraint Identifier)? Primary Key (Lparen Identifier (Comma Identifier)* Rparen)? LineParams | 1853 | ((Constraint Identifier)? (Foreign Key)? (Lparen Identifier (Comma Identifier)* Rparen)? 1854 | References Identifier (Lparen Identifier (Comma Identifier)* Rparen)? FkParams LineParams)) 1855 | 1856 | } 1857 | 1858 | 1859 | StageFileFormat { 1860 | 1861 | (Stage_file_format Eql ((Format_name Eql Identifier) | 1862 | (Type Eql Csv (FormattypeoptionsCsv)?) | 1863 | (Type Eql Json (FormattypeoptionsJson)?) | 1864 | (Type Eql Avro (FormattypeoptionsAvro)?) | 1865 | (Type Eql Orc (FormattypeoptionsOrc)?) | 1866 | (Type Eql Parquet (FormattypeoptionsParquet)?) | 1867 | (Type Eql Xml (FormattypeoptionsXml)?)))? 1868 | 1869 | } 1870 | 1871 | 1872 | CreateTableExtra1{ 1873 | 1874 | (Stage_copy_options Eql (CopyOptions))? 1875 | (Data_retention_time_in_days Eql Identifier)? 1876 | (Max_data_extension_time_in_days Eql Identifier)? 1877 | 1878 | } 1879 | 1880 | 1881 | CreateTableExtra2 { 1882 | 1883 | (Change_tracking Eql (True | False))? 1884 | (Default_ddl_collation Eql Identifier )? 1885 | (Copy Grants)? 1886 | (Comment Eql Identifier )? 1887 | 1888 | } 1889 | 1890 | 1891 | LineParams { 1892 | 1893 | (Enforced | Not Enforced)? 1894 | (Deferrable | Not Deferrable)? 1895 | (Initially (Deferred | Immediate))? 1896 | (Enable | Disable)? 1897 | (Validate | Novalidate)? 1898 | (Rely | Norely)? 1899 | 1900 | } 1901 | 1902 | 1903 | FkParams { 1904 | 1905 | (Match (Full | Simple | Partial))? 1906 | (On (Update (Cascade | Set Null | Set Default | Restrict | No Action))? 1907 | (Delete (Cascade | Set Null | Set Default | Restrict | No Action))?)? 1908 | 1909 | } 1910 | 1911 | 1912 | FormattypeoptionsCsv { 1913 | 1914 | Compression Eql Auto | Gzip | Bz2 | Brotli | Zstd | Deflate | Raw_deflate | None 1915 | Record_delimiter Eql Identifier | None 1916 | Field_delimiter Eql Identifier | None 1917 | File_extension Eql Identifier 1918 | Skip_header Eql Identifier Skip_blank_lines Eql True | False 1919 | Date_format Eql Identifier | Auto 1920 | Time_format Eql Identifier | Auto 1921 | Timestamp_format Eql Identifier | Auto 1922 | Binary_format Eql Hex | Base64 | Utf8 1923 | Escape Eql Identifier | None 1924 | Escape_unenclosed_field Eql Identifier | None 1925 | Trim_space Eql True | False 1926 | Field_optionally_enclosed_by Eql Identifier | None 1927 | Null_if Eql (Identifier (Comma Identifier)*) 1928 | Error_on_column_count_mismatch Eql True | False 1929 | Replace_invalid_characters Eql True | False 1930 | Validate_utf8 Eql True | False 1931 | Empty_field_as_null Eql True | False 1932 | Skip_byte_order_mark Eql True | False 1933 | Encoding Eql Identifier | Utf8 1934 | 1935 | } 1936 | 1937 | 1938 | FormattypeoptionsJson { 1939 | 1940 | Compression Eql Auto | Gzip | Bz2 | Brotli | Zstd | Deflate | Raw_deflate | None 1941 | Date_format Eql Identifier | Auto 1942 | Time_format Eql Identifier | Auto 1943 | Timestamp_format Eql Identifier | Auto 1944 | Binary_format Eql Hex | Base64 | Utf8 1945 | Trim_space Eql True | False 1946 | Null_if Eql (Identifier (Comma Identifier)*) 1947 | File_extension Eql Identifier 1948 | Enable_octal Eql True | False 1949 | Allow_duplicate Eql True | False 1950 | Strip_outer_array Eql True | False 1951 | Strip_null_values Eql True | False 1952 | Replace_invalid_characters Eql True | False 1953 | Ignore_utf8_errors Eql True | False 1954 | Skip_byte_order_mark Eql True | False 1955 | 1956 | } 1957 | 1958 | 1959 | FormattypeoptionsAvro { 1960 | 1961 | Compression Eql Auto | Gzip | Bz2 | Brotli | Zstd | Deflate | Raw_deflate | None 1962 | Trim_space Eql True | False 1963 | Null_if Eql (Identifier (Comma Identifier )*) 1964 | 1965 | } 1966 | 1967 | 1968 | FormattypeoptionsOrc { 1969 | 1970 | Trim_space Eql True | False 1971 | Null_if Eql (Identifier (Comma Identifier )*) 1972 | 1973 | } 1974 | 1975 | 1976 | FormattypeoptionsParquet { 1977 | 1978 | Compression Eql Auto | Lzo | Snappy | None 1979 | Snappy_compression Eql True | False 1980 | Binary_as_text Eql True | False 1981 | Trim_space Eql True | False 1982 | Null_if Eql (Identifier (Comma Identifier )*) 1983 | 1984 | } 1985 | 1986 | 1987 | FormattypeoptionsXml { 1988 | 1989 | Compression Eql Auto | Gzip | Bz2 | Brotli | Zstd | Deflate | Raw_deflate | None 1990 | Ignore_utf8_errors Eql True | False 1991 | Preserve_space Eql True | False 1992 | Strip_outer_element Eql True | False 1993 | Disable_snowflake_data Eql True | False 1994 | Disable_auto_convert Eql True | False 1995 | Skip_byte_order_mark Eql True | False 1996 | 1997 | } 1998 | 1999 | 2000 | CopyOptions { 2001 | 2002 | On_error Eql (Continue | Skip_file | Skip_file Identifier | Skip_file Identifier | 2003 | ) 2004 | Size_limit Eql Identifier Purge Eql True | False 2005 | Return_failed_only Eql True | False 2006 | Match_by_column_name Eql Case_sensitive | Case_insensitive | None 2007 | Enforce_length Eql True | False 2008 | Truncatecolumns Eql True | False 2009 | Force Eql True | False 2010 | 2011 | } 2012 | 2013 | 2014 | UdfParamIdentifier { 2015 | 2016 | Identifier | 2017 | QuotedString 2018 | 2019 | } 2020 | 2021 | 2022 | Types { 2023 | 2024 | UserDefinedType | 2025 | NonUserDefinedType 2026 | 2027 | } 2028 | 2029 | 2030 | UserDefinedType { 2031 | 2032 | Identifier | 2033 | IntervalType 2034 | 2035 | } 2036 | 2037 | 2038 | IntervalType { 2039 | 2040 | Interval 2041 | IntervalPeriod (Lparen IntegerLiteral (Comma IntegerLiteral)? Rparen)? 2042 | (To IntervalPeriod (Lparen IntegerLiteral Rparen)?)? 2043 | 2044 | } 2045 | 2046 | 2047 | IntervalLiteral { 2048 | 2049 | Interval Minus? StringLiteral IntervalPeriod (To IntervalPeriod)? 2050 | 2051 | } 2052 | 2053 | 2054 | IntervalPeriod { 2055 | 2056 | Year | 2057 | Month | 2058 | Day | 2059 | Hour| 2060 | Minute | 2061 | Second 2062 | 2063 | } 2064 | 2065 | 2066 | NonUserDefinedType { 2067 | 2068 | PrimitiveType | 2069 | StringType | 2070 | BinaryType | 2071 | NumberType | 2072 | TimestampType | 2073 | ArrayType | 2074 | ObjectType | 2075 | VariantType 2076 | 2077 | } 2078 | 2079 | 2080 | PrimitiveType { 2081 | 2082 | Boolean | 2083 | Float (Lparen NegatableIntegerLiteral? Rparen) | 2084 | Real (Lparen NegatableIntegerLiteral? Rparen) | 2085 | Double Precision | 2086 | ByteInt | 2087 | TinyInt | 2088 | SmallInt | 2089 | Int | 2090 | BigInt | 2091 | Integer | 2092 | Date | 2093 | Time (Lparen NegatableIntegerLiteral Rparen)?| 2094 | Bit Varying? 2095 | 2096 | } 2097 | 2098 | 2099 | StringType { 2100 | 2101 | Varchar | 2102 | Character | 2103 | Char | 2104 | String | 2105 | Text 2106 | 2107 | } 2108 | 2109 | BinaryType { 2110 | 2111 | Binary (Lparen NegatableIntegerLiteral Rparen)? Varbinary 2112 | 2113 | } 2114 | 2115 | NumberType { 2116 | 2117 | NumberAlias (Lparen NegatableIntegerLiteral (Comma NegatableIntegerLiteral)? Rparen)? 2118 | 2119 | } 2120 | 2121 | 2122 | NumberAlias { 2123 | 2124 | Decimal | 2125 | Dec | 2126 | Number | 2127 | Numeric 2128 | 2129 | } 2130 | 2131 | 2132 | TimestampType { 2133 | 2134 | Timestamp (Lparen NegatableIntegerLiteral Rparen)? | 2135 | 2136 | Timestampltz (Lparen NegatableIntegerLiteral Rparen)? | 2137 | Timestamp_ltz (Lparen NegatableIntegerLiteral Rparen)? | 2138 | Timestamp With Local Time Zone (Lparen NegatableIntegerLiteral Rparen)? | 2139 | 2140 | Timestampntz (Lparen NegatableIntegerLiteral Rparen)? | 2141 | Timestamp_ntz (Lparen NegatableIntegerLiteral Rparen)? | 2142 | Timestamp Without Time Zone (Lparen NegatableIntegerLiteral Rparen)? | 2143 | Datetime (Lparen NegatableIntegerLiteral Rparen)? | 2144 | 2145 | Timestamptz (Lparen NegatableIntegerLiteral Rparen)? | 2146 | Timestamp_tz (Lparen NegatableIntegerLiteral Rparen)? | 2147 | Timestamp With Time Zone (Lparen NegatableIntegerLiteral Rparen)? 2148 | 2149 | } 2150 | 2151 | 2152 | ArrayType { 2153 | 2154 | Array 2155 | 2156 | } 2157 | 2158 | 2159 | ObjectType { 2160 | 2161 | Object 2162 | 2163 | } 2164 | 2165 | 2166 | VariantType { 2167 | 2168 | Variant (With Template StringLiteral)? 2169 | 2170 | } 2171 | 2172 | 2173 | KeyValuesExtended { 2174 | Azure | 2175 | Gcs | 2176 | S3 | 2177 | Aws_api_gateway | 2178 | Aws_private_api_gateway | 2179 | Azure_api_management | 2180 | Google_api_gateway 2181 | 2182 | } 2183 | 2184 | 2185 | ScalarExpression { 2186 | 2187 | ExpressionA 2188 | 2189 | } 2190 | 2191 | 2192 | ExpressionA { 2193 | 2194 | 2195 | Lparen ExpressionA Rparen | 2196 | 2197 | expressionB | 2198 | 2199 | !uminus Plus ExpressionA | 2200 | 2201 | !uminus Minus ExpressionA | 2202 | 2203 | ExpressionA !plus Plus ExpressionA | 2204 | 2205 | ExpressionA !plus Minus ExpressionA | 2206 | 2207 | ExpressionA !mul Mul ExpressionA | 2208 | 2209 | ExpressionA !mul Divide ExpressionA | 2210 | 2211 | ExpressionA !mul Mod ExpressionA | 2212 | 2213 | ExpressionA !bitXor BitwiseXOR ExpressionA | 2214 | 2215 | ExpressionA !bitOr BitwiseOR ExpressionA | 2216 | 2217 | ExpressionA !bitAnd BitwiseAnd ExpressionA | 2218 | 2219 | ExpressionA !or Or ExpressionA | 2220 | 2221 | ExpressionA !and And ExpressionA | 2222 | 2223 | ExpressionA !comp Gtr ExpressionA | 2224 | 2225 | ExpressionA !comp Lss ExpressionA | 2226 | 2227 | ExpressionA !comp Lte ExpressionA | 2228 | 2229 | ExpressionA !comp Gte ExpressionA | 2230 | 2231 | ExpressionA !eql Eql ExpressionA | 2232 | 2233 | ExpressionA !eql Neq ExpressionA | 2234 | 2235 | ExpressionA !eql Concat ExpressionA | 2236 | 2237 | ExpressionA !is Is Not? Null | 2238 | 2239 | ExpressionA !not Not? (!like (Like All? | Ilike | Rlike) |!regexp Regexp ) ExpressionA | 2240 | 2241 | ExpressionA !like (Like | Ilike) !any Any ExpressionA | 2242 | 2243 | ExpressionA !not Not? !like (Like| Ilike) ExpressionA !escape Escape ExpressionA | 2244 | 2245 | ExpressionA !is Is !not Not? (Null | False | True ) | 2246 | 2247 | ExpressionA !not Not? !in In Inexpression | 2248 | 2249 | // !not Not? !between Between ExpressionA !and And ExpressionA | 2250 | 2251 | !not Not ExpressionA 2252 | 2253 | } 2254 | 2255 | 2256 | 2257 | expressionB { 2258 | 2259 | CaseExpression | 2260 | 2261 | CastExpression | 2262 | 2263 | FunctionCall | 2264 | 2265 | IntervalLiteral | 2266 | 2267 | SqrIdentifier | 2268 | 2269 | constant | 2270 | 2271 | ObjName | 2272 | 2273 | !plus ParenSelect | 2274 | 2275 | expressionB (Colon IdentifierExt (Dot IdentifierExt)* | 2276 | 2277 | Lsqr ExpressionA Rsqr (Dot IdentifierExt)* | 2278 | 2279 | Over Lparen (Partition By PartitionByList)? OrderByClause? WindowFrameClause? Rparen | 2280 | 2281 | Dcolon Types) 2282 | 2283 | } 2284 | 2285 | 2286 | 2287 | Inexpression { 2288 | 2289 | 2290 | ParenSelect | 2291 | ScalarExpressionList 2292 | 2293 | } 2294 | 2295 | SqrIdentifier { 2296 | 2297 | Lsqr ObjName (Comma ObjName)* Rsqr 2298 | 2299 | } 2300 | 2301 | 2302 | ParenQuery{ 2303 | 2304 | Lparen QueryStatementExpression Rparen 2305 | 2306 | 2307 | } 2308 | 2309 | 2310 | EqualCompOperator { 2311 | 2312 | Eql | Neq | Lte | Lss | Gte | Gtr 2313 | 2314 | } 2315 | 2316 | 2317 | EqualNegatableOperator { 2318 | 2319 | Not (Like | Ilike | Rlike | Regexp) | 2320 | Like (All | Any)? | 2321 | Ilike Any? | 2322 | Rlike | 2323 | Regexp 2324 | 2325 | } 2326 | 2327 | 2328 | OperatorQuantifierClause { 2329 | 2330 | (CompOperatorQuantifier)? BitwiseOrExpression 2331 | 2332 | } 2333 | 2334 | 2335 | CompOperatorQuantifier { 2336 | 2337 | All | Any 2338 | 2339 | } 2340 | 2341 | 2342 | EscapeExpression { 2343 | 2344 | Escape EscapeConstant | 2345 | Lcly Escape EscapeConstant Rcly 2346 | 2347 | } 2348 | 2349 | 2350 | EscapeConstant { 2351 | 2352 | Null | 2353 | StringLiteral | 2354 | BindVariable 2355 | 2356 | } 2357 | 2358 | 2359 | ScalarExpressionList { 2360 | 2361 | Lparen ScalarExpression (Comma ScalarExpression)* Rparen 2362 | 2363 | } 2364 | 2365 | 2366 | IsNullOperator { 2367 | 2368 | Is Not? Null 2369 | 2370 | } 2371 | 2372 | 2373 | IsDistinctFromOperator { 2374 | 2375 | Is Not? Distinct From 2376 | 2377 | } 2378 | 2379 | FunctionOrderingClause { 2380 | 2381 | Order By ColumnRefOrder (Comma ColumnRefOrder)* 2382 | 2383 | } 2384 | 2385 | 2386 | OrderByClause { 2387 | 2388 | Order By ColumnRefOrder (Comma ColumnRefOrder)* 2389 | 2390 | } 2391 | 2392 | 2393 | ColumnRefOrder { 2394 | 2395 | ScalarExpression (Asc | Desc)? (Nulls (First | Last))? 2396 | 2397 | } 2398 | 2399 | 2400 | WindowFrameClause { 2401 | 2402 | (Rows | Range) WindowFrameExtent 2403 | 2404 | } 2405 | 2406 | 2407 | WindowFrameExtent { 2408 | 2409 | WindowFrameBound | WindowFrameBetween 2410 | 2411 | } 2412 | 2413 | 2414 | WindowFrameBound { 2415 | 2416 | Current Row | 2417 | Unbounded Preceding | 2418 | IntegerLiteral Preceding | 2419 | SessionVariableIdentifier Preceding | 2420 | Unbounded Following | 2421 | IntegerLiteral Following | 2422 | SessionVariableIdentifier Following 2423 | 2424 | } 2425 | 2426 | 2427 | WindowFrameBetween { 2428 | 2429 | Between WindowFrameBound And WindowFrameBound 2430 | 2431 | } 2432 | 2433 | 2434 | PartitionByList { 2435 | 2436 | ScalarExpression (Comma ScalarExpression)* | Lparen Rparen 2437 | 2438 | } 2439 | 2440 | 2441 | RunningFinalFunctionCall { 2442 | 2443 | (Running | Final) FunctionCall 2444 | 2445 | } 2446 | 2447 | 2448 | AnyUnquotedIdentifier { 2449 | 2450 | Identifier 2451 | 2452 | } 2453 | 2454 | 2455 | AnyIdentifier { 2456 | 2457 | AnyUnquotedIdentifier | 2458 | QuotedString 2459 | 2460 | } 2461 | 2462 | 2463 | objName { 2464 | 2465 | IdentifierKW Lparen IdentifierVar Rparen | 2466 | 2467 | ObjectLiteral | 2468 | 2469 | IdentifierExt Ddot IdentifierExt | 2470 | 2471 | IdentifierExt (Dot IdentifierExt)* 2472 | 2473 | } 2474 | 2475 | 2476 | ScalarObjectName { 2477 | 2478 | Prior ScalarIdentifier (Dot IdentifierExt)* | 2479 | 2480 | ObjectLiteral | 2481 | 2482 | IdentifierExt (Dot IdentifierExt)* | 2483 | 2484 | IdentifierExt Dot Dot IdentifierExt Dot IdentifierExt 2485 | 2486 | } 2487 | 2488 | 2489 | ScalarIdentifier { 2490 | 2491 | Identifier | 2492 | QuotedString 2493 | 2494 | } 2495 | 2496 | constant { 2497 | 2498 | Null | 2499 | NumberLiteral | 2500 | StringLiteral | 2501 | BinaryLiteral | 2502 | IntegerLiteral | 2503 | BooleanValue | 2504 | BindVariable 2505 | 2506 | } 2507 | 2508 | 2509 | ObjectLiteral { 2510 | 2511 | IdentifierKW Lparen (StringLiteral | BindVariable | IntegerLiteral) Rparen 2512 | 2513 | } 2514 | 2515 | 2516 | AnsiLiteral { 2517 | 2518 | (Date | Time | Timestamp | Interval) StringLiteral 2519 | 2520 | } 2521 | 2522 | 2523 | ParenExpression { 2524 | 2525 | Lparen ScalarExpression (Comma ScalarExpression)* Rparen 2526 | 2527 | } 2528 | 2529 | 2530 | ScalarExpressionOrList { 2531 | 2532 | Lparen ScalarExpression (Comma ScalarExpression)* Rparen 2533 | 2534 | } 2535 | 2536 | 2537 | CastExpression { 2538 | 2539 | (Cast | Try_cast) Lparen ScalarExpression As Type Rparen 2540 | 2541 | } 2542 | 2543 | 2544 | CaseExpression { 2545 | 2546 | Case ScalarExpression? (When ScalarExpression Then ScalarExpression)+ (Else ScalarExpression)? End 2547 | 2548 | } 2549 | 2550 | 2551 | ExplicitRowConstructorExpression { 2552 | 2553 | Row Lparen ScalarExpression (Comma ScalarExpression)* Rparen 2554 | 2555 | } 2556 | 2557 | 2558 | LimitClause { 2559 | 2560 | (Offset LimitBoundary (Row | Rows)?)? 2561 | Fetch (First | Next)? LimitBoundary (Row | Rows)? Only? | 2562 | Limit LimitBoundary (Offset LimitBoundary)? 2563 | 2564 | } 2565 | 2566 | 2567 | LimitBoundary { 2568 | 2569 | StringLiteral | 2570 | ConstantBoundary | 2571 | Null 2572 | 2573 | } 2574 | 2575 | 2576 | ConstantBoundary { 2577 | 2578 | NumberLiteral | 2579 | IntegerLiteral | 2580 | BindVariable 2581 | 2582 | } 2583 | 2584 | 2585 | QueryStatementExpression { 2586 | 2587 | SelectStmt 2588 | 2589 | } 2590 | 2591 | 2592 | UnionOperator { 2593 | 2594 | Union (All | Distinct)? | 2595 | Except All? | 2596 | Minus All? 2597 | 2598 | } 2599 | 2600 | 2601 | IntersectionOperator { 2602 | 2603 | Intersect All? 2604 | 2605 | } 2606 | 2607 | 2608 | OdbcEscapeAtom { 2609 | 2610 | Lcly D StringLiteral Rcly | 2611 | Lcly T StringLiteral Rcly | 2612 | Lcly Ts StringLiteral Rcly | 2613 | Lcly Fn OdbcFunctionNameIdentifier Lparen (ScalarExpression (Comma ScalarExpression)*)? Rparen Rcly | 2614 | Lcly Fn Position Lparen BitwiseOrExpression In ScalarExpression Rparen Rcly | 2615 | Lcly Fn Extract Lparen IdentifierExt From ScalarExpression Rparen Rcly 2616 | 2617 | } 2618 | 2619 | 2620 | OdbcFunctionNameIdentifier { 2621 | 2622 | Identifier 2623 | 2624 | } 2625 | 2626 | FunctionCall { 2627 | 2628 | 2629 | ObjName Lparen DistinctAll? FunctionArgs? Rparen 2630 | 2631 | 2632 | } 2633 | 2634 | 2635 | DistinctAll { 2636 | 2637 | Distinct | All 2638 | 2639 | } 2640 | 2641 | 2642 | FunctionArgs { 2643 | 2644 | (IdentifierExt Dot)? Star | 2645 | FunctionArgExpression (Comma FunctionArgExpression)* 2646 | 2647 | } 2648 | 2649 | FunctionObjectName { 2650 | 2651 | ObjectLiteral | 2652 | FunctionNameIdentifier | 2653 | FunctionQualifiedNameIdentifier (Dot FunctionQualifiedNameIdentifier)+ | 2654 | FunctionQualifiedNameIdentifier Dot Dot FunctionQualifiedNameIdentifier 2655 | 2656 | } 2657 | 2658 | 2659 | FunctionArgExpression { 2660 | 2661 | ScalarExpression | 2662 | StageNameIdentifier 2663 | 2664 | } 2665 | 2666 | FunctionQualifiedNameIdentifier { 2667 | 2668 | Identifier | 2669 | QuotedString 2670 | 2671 | } 2672 | 2673 | FunctionNameIdentifier { 2674 | 2675 | Identifier | 2676 | QuotedString 2677 | 2678 | } 2679 | 2680 | @skip { whitespace | LineComment | BlockComment} 2681 | 2682 | 2683 | @tokens { 2684 | 2685 | whitespace { std.whitespace+ } 2686 | 2687 | LineComment { 2688 | ( "//" | "--") ![\n]* 2689 | } 2690 | 2691 | 2692 | URLPathComponent { 2693 | 2694 | (Letter | Digit | Uscr | 2695 | Star | Qsm | Minus | Dot | Eql | 2696 | Lsqr | Rsqr | Dqt | Bslash| 2697 | Exclm | Atr | Mod | BitwiseXOR | Plus | Colon)+ 2698 | 2699 | 2700 | } 2701 | 2702 | IdentifierKW { "identifier" | "IDENTIFIER"} 2703 | 2704 | BlockComment { "/*" BlockCommentRest } 2705 | 2706 | BlockCommentRest { ![*] BlockCommentRest | "*" BlockCommentAfterStar } 2707 | 2708 | BlockCommentAfterStar { "/" | "*" BlockCommentAfterStar | ![/*] BlockCommentRest } 2709 | 2710 | NumberLiteral { 2711 | ( 2712 | (std.digit+ ("." std.digit*)? | "." std.digit+) (("e" | "E") ("+" | "-")? std.digit+)? | 2713 | "0x" (std.digit | $[a-fA-F])+ | 2714 | $[nN]$[aA]$[nN] | 2715 | $[iI]$[nN]$[fF] 2716 | ) 2717 | 2718 | } 2719 | 2720 | Letter { 2721 | 2722 | std.asciiLetter 2723 | 2724 | } 2725 | 2726 | 2727 | Digit { 2728 | 2729 | std.digit 2730 | 2731 | } 2732 | 2733 | 2734 | RegexDef { 2735 | 2736 | Letter | Digit | Uscr | Plus | Star | Qsm | Mns | 2737 | Dot | Lparen | Rparen | Lsqr | Rsqr | Lcly | Rcly | BitwiseOR | Dlr 2738 | 2739 | } 2740 | 2741 | 2742 | IntegerLiteral { 2743 | 2744 | std.digit+ 2745 | 2746 | } 2747 | 2748 | 2749 | StorageURLFile { 2750 | 2751 | ('sfc://' | 'file://' | 's3://' | 'S3://') 2752 | 2753 | } 2754 | 2755 | 2756 | StringLiteral { 2757 | 2758 | QuotedString | StringLiteralDlr 2759 | 2760 | } 2761 | 2762 | 2763 | StringLiteralDlr { 2764 | 2765 | Dlr Dlr ( Dlr ![\$] | ![\$] )* Dlr Dlr 2766 | 2767 | } 2768 | 2769 | 2770 | QuotedString { 2771 | 2772 | '"' (![\\\n"] | "\\" _)* '"'? | 2773 | "'" (![\\\n'] | "\\" _)* "'"? | 2774 | '"' (![\\"] | "\\" _)* '"'? | 2775 | "'" (![\\'] | "\\" _)* "'"? 2776 | 2777 | } 2778 | 2779 | Identifier { 2780 | 2781 | Dlr std.digit+ | 2782 | (std.asciiLetter | Uscr) (std.asciiLetter | std.digit | Uscr | "\\ ")* (Dlr (std.asciiLetter|std.digit | Uscr | "\\ " )*)? | 2783 | "`" RegexDef+ "`" 2784 | 2785 | } 2786 | 2787 | 2788 | IdentifierVar { 2789 | 2790 | Dlr std.asciiLetter+ 2791 | 2792 | } 2793 | 2794 | 2795 | EmailAddr { 2796 | 2797 | (std.asciiLetter | std.digit)+ Atr (std.asciiLetter | std.digit)+ Dot (std.asciiLetter | std.digit)+ 2798 | 2799 | } 2800 | 2801 | IpA {(std.digit? std.digit? std.digit ".") (std.digit? std.digit? std.digit ".") (std.digit? std.digit? std.digit ".") 2802 | ("/" std.digit | std.digit"/"std.digit | std.digit"/"std.digit std.digit | std.digit| std.digit std.digit | std.digit std.digit std.digit) } 2803 | 2804 | 2805 | // Operator 2806 | Smc {";"} 2807 | Uscr {"_"} 2808 | Star {"*"} 2809 | Mns {"-"} 2810 | Plus {"+"} 2811 | Minus {"-"} 2812 | Mul { "*" } 2813 | Mod { "%" } 2814 | Exclm {"!"} 2815 | Divide { "/" } 2816 | Eql { "=" | "==" } 2817 | Neq { "!=" | "<>" } 2818 | Lte { "<=" } 2819 | Darw { "=>" } 2820 | Lss { "<" } 2821 | Gte { ">=" } 2822 | Gtr { ">" } 2823 | Sqt {"'"} 2824 | Dqt {"\""} 2825 | Tilde {"~"} 2826 | BitwiseXOR { "^" } 2827 | Lparen {"("} 2828 | Rparen {")"} 2829 | Lcly {"{"} 2830 | Rcly {"}"} 2831 | Ddot {".."} 2832 | Lsqr {"["} 2833 | Rsqr {"]"} 2834 | Dot {"."} 2835 | Arr{"->"} 2836 | Dlr {"$"} 2837 | Colon {":"} 2838 | Qsm {"?"} 2839 | Bslash {"\\"} 2840 | BitwiseOR {"|"} 2841 | BitwiseAnd{"&"} 2842 | Concat{"||"} 2843 | Dcolon{"::"} 2844 | Comma {","} 2845 | Atr { "@" } 2846 | 2847 | 2848 | @precedence { BlockComment, LineComment } 2849 | 2850 | @precedence { BlockComment, LineComment, Minus} 2851 | 2852 | @precedence { NumberLiteral, Plus, Minus} 2853 | 2854 | @precedence { IdentifierKW, Identifier} 2855 | 2856 | @precedence { NumberLiteral, Identifier} 2857 | 2858 | @precedence { StorageURLFile, Identifier} 2859 | 2860 | @precedence {URLPathComponent, StringLiteral} 2861 | 2862 | @precedence {URLPathComponent, URLPath, StringLiteral} 2863 | 2864 | @precedence {URLPathComponent, LineComment} 2865 | 2866 | @precedence {URLPathComponent, Atr} 2867 | 2868 | @precedence {Divide, LineComment} 2869 | 2870 | @precedence {IdentifierVar, Dlr} 2871 | 2872 | @precedence {StringLiteral, QuotedString} 2873 | 2874 | @precedence {StringLiteral, Identifier, Dlr} 2875 | 2876 | @precedence {IntegerLiteral, NumberLiteral} 2877 | 2878 | @precedence {Identifier, Letter, Uscr, Dlr} 2879 | 2880 | } 2881 | 2882 | 2883 | @external specialize {Identifier} specializeIdentifier from "./tokens" { 2884 | 2885 | Access, Admin_name, Admin_password, After, All, Allow_duplicate, Allowed_IP_List, And, Any, Api_allowed_prefixes, Api_aws_role_arn, Api_blocked_prefixes, 2886 | Api_key, Api_provider, API, Api, Apply, Array, As, Asc, At, Attach, Auto_ingest, Auto_refresh_materialized_views_on_secondary, Auto, Autoincrement, Avro, 2887 | Aws_api_gateway, Aws_private_api_gateway, Azure_ad_application_id, Azure_api_management, Azure_tenant_id, Base64, Before, Begin, Bernoulli, Between, BigInt, 2888 | Binary_as_text, Binary_format, Binary, Bit, Block, Blocked_IP_List, Boolean, Brotli, Business_critical, By, ByteInt, Bz2, Called, Caller, Cascade, 2889 | Case_insensitive, Case_sensitive, Case, Cast, Change_tracking, Char, Character, Clone, Cluster, Collate, Compression, Connect_by_root, Connect, Connection, 2890 | Constraint, Continue, Copy, Create, Credit_quota, Cross, Csv, Cube, Current, Cursor, Daily, Data_retention_time_in_days, Databases, Date_format, Date, 2891 | Datetime, Dec, Decimal, Declare, Default, Deferrable, Deferred, Deflate, Delete, Desc, Describe, Disable_auto_convert, Disable_snowflake_data, Disable, 2892 | Distinct, Do, Double, Drop, Edition, Else, Empty_field_as_null, Enable_octal, Enable, Encoding, End_timestamp, End, Enforce_length, Enforced, Enterprise, 2893 | Error_on_column_count_mismatch, Escape_unenclosed_field, Escape, Except, Exception, Exchange, Execute, Execution, Exists, External, Extract, False, Fetch, 2894 | Field_delimiter, Field_optionally_enclosed_by, File_extension, File, First, Float, Fn, Following, For, Force, Foreign, Format_name, Format, Formats, Frequency, 2895 | From, Full, Function, Functions, Future, Get, Global, Google_api_gateway, Google_audience, Grant, Grants, Group, Grouping, Gzip, Having, Hex, History, If, 2896 | Ignore_utf8_errors, Immediate, Immediately, Immutable, Import, Imported, In, Increment, Initiallly, Initially, Inner, Insert, Int, Integer, Integrations, 2897 | Intersect, Interval, Into, Is, Join, Json, Label, Language, Last, Lateral, Like, Limit, List, Local, Lzo, Manage, Managed, Masking, Match_by_column_name, 2898 | Match, Max_data_extension_time_in_days, Modify, Monitor, Monthly, Must, Natural, Network, Networks, Never, Next, No, None, Norely, Not, Notification, Notify, 2899 | Novalidate, Null_if, Nulls, Number, Numeric, Object, Of, Offset, Oj, On_error, On, Only, Operate, Option, Or, Orc, Order, Outer, Over, Override, Overwrite, 2900 | Ownership, Parquet, Partial, Partition, Pipe, Pipes, Position, Preceding, Precision, Preserve_space, Primary, Prior, Privileges, Procedure, Procedures, Purge, 2901 | Qualify, Range, Raw_deflate, Read, Reader, Real, Record_delimiter, Recursive, References, Region_group, Rely, Repeatable, Replace_invalid_characters, Replace, 2902 | Replica, Replication, Resource, Restrict, Restrictions, Return_failed_only,Returns, Revoke, Right, Rlike, Rollback, Rollup, Row, Rows, Sample, Schemas, Second, 2903 | Secure, Seed, Select, Semi, Sequence, Sequences, Session, Set, Sets, Share, Show, Simple, Size_limit, Skip_blank_lines, Skip_byte_order_mark, Skip_file, Skip_header, 2904 | SmallInt, Snappy_compression, Snappy, Stage_copy_options, Stage_file_format, Stages, Standard, Start_timestamp, Start, Starts, Statement, Storage, Stream, Streams, 2905 | Strict, String, Strip_null_values, Strip_outer_array, Strip_outer_element, Support, Suspend_immediate, Suspend, System, T, Table, Tables, Tablesample, Task, Tasks, 2906 | Temp, Template, Temporary, Terse, Then, Time_format, Time, Timestamp_format, Timestamp_ltz, Timestamp_ntz, Timestamp_tz, Timestampltz, Timestampntz, Timestamptz, 2907 | TinyInt, To, Top, Triggers, Trim_space, True, Truncate, Truncatecolumns, Try_cast, Ts, Unbounded, Union, Unique, Unpivot, Update, Usage, Use, Using, Utf8, 2908 | Validate_utf8, Validate, Values, Varbinary, Varchar,Variant, Varying, Volatile, Weekly, When, Where, With, Without, Xml, Yearly, Zone, Zstd 2909 | 2910 | } 2911 | 2912 | 2913 | @external extend {Identifier} extendIdentifier from "./tokens" { 2914 | 2915 | Account, Action, Alter, Application, Azure, Channel, Columns, Comment, Commit, D, Data, Database, Day, Default_ddl_collation, Email, Enabled, First_name, Gcs, 2916 | Hour, Identity, Ilike, Input, Integration, Key, Last_name, Left, Stage, Materialized, Month, Must_change_password, Null, Organization, Owner, Percent, Policies, 2917 | Policy, Regexp, Region, Resume, Role, S3, Schema, Minute, Security, Tag, Text, Timestamp, Transient, Type, Url, User, View, Views, Warehouse, X, Year 2918 | 2919 | } 2920 | -------------------------------------------------------------------------------- /src/tokens.js: -------------------------------------------------------------------------------- 1 | import { 2 | Access, 3 | Account, 4 | Action, 5 | Admin_name, 6 | Admin_password, 7 | After, 8 | All, 9 | Allow_duplicate, 10 | Allowed_IP_List, 11 | Alter, 12 | And, 13 | Any, 14 | Api_allowed_prefixes, 15 | Api_aws_role_arn, 16 | Api_blocked_prefixes, 17 | Api_key, 18 | Api_provider, 19 | Api, 20 | Application, 21 | Apply, 22 | As, 23 | Asc, 24 | At, 25 | Attach, 26 | Auto_ingest, 27 | Auto_refresh_materialized_views_on_secondary, 28 | Auto, 29 | Autoincrement, 30 | Avro, 31 | Aws_api_gateway, 32 | Aws_private_api_gateway, 33 | Azure_ad_application_id, 34 | Azure_api_management, 35 | Azure_tenant_id, 36 | Azure, 37 | Base64, 38 | Before, 39 | Bernoulli, 40 | Between, 41 | Binary_as_text, 42 | Binary_format, 43 | Binary, 44 | Block, 45 | Blocked_IP_List, 46 | Boolean, 47 | Brotli, 48 | Business_critical, 49 | By, 50 | Bz2, 51 | Called, 52 | Caller, 53 | Cascade, 54 | Case_insensitive, 55 | Case_sensitive, 56 | Case, 57 | Cast, 58 | Change_tracking, 59 | Channel, 60 | Char, 61 | Character, 62 | Clone, 63 | Cluster, 64 | Collate, 65 | Columns, 66 | Comment, 67 | Commit, 68 | Compression, 69 | Connect_by_root, 70 | Connect, 71 | Connection, 72 | Constraint, 73 | Continue, 74 | Copy, 75 | Create, 76 | Credit_quota, 77 | Cross, 78 | Csv, 79 | Cube, 80 | Current, 81 | D, 82 | Daily, 83 | Data_retention_time_in_days, 84 | Data, 85 | Database, 86 | Databases, 87 | Date_format, 88 | Datetime, 89 | Day, 90 | Dec, 91 | Decimal, 92 | Default_ddl_collation, 93 | Default, 94 | Deferrable, 95 | Deferred, 96 | Deflate, 97 | Delete, 98 | Desc, 99 | Describe, 100 | Disable_auto_convert, 101 | Disable_snowflake_data, 102 | Disable, 103 | Distinct, 104 | Do, 105 | Drop, 106 | Edition, 107 | Else, 108 | Email, 109 | Empty_field_as_null, 110 | Enable_octal, 111 | Enable, 112 | Enabled, 113 | Encoding, 114 | End_timestamp, 115 | End, 116 | Enforce_length, 117 | Enforced, 118 | Enterprise, 119 | Error_on_column_count_mismatch, 120 | Escape_unenclosed_field, 121 | Escape, 122 | Except, 123 | Exchange, 124 | Execute, 125 | Execution, 126 | Exists, 127 | External, 128 | Extract, 129 | False, 130 | Fetch, 131 | Field_delimiter, 132 | Field_optionally_enclosed_by, 133 | File_extension, 134 | File, 135 | First_name, 136 | First, 137 | Fn, 138 | Following, 139 | For, 140 | Force, 141 | Foreign, 142 | Format_name, 143 | Format, 144 | Formats, 145 | Frequency, 146 | From, 147 | Full, 148 | Function, 149 | Functions, 150 | Future, 151 | Gcs, 152 | Get, 153 | Global, 154 | Google_api_gateway, 155 | Google_audience, 156 | Grant, 157 | Grants, 158 | Group, 159 | Grouping, 160 | Gzip, 161 | Having, 162 | Hex, 163 | History, 164 | Hour, 165 | Identity, 166 | If, 167 | Ignore_utf8_errors, 168 | Ilike, 169 | Immediate, 170 | Immediately, 171 | Immutable, 172 | Import, 173 | Imported, 174 | In, 175 | Increment, 176 | Initiallly, 177 | Inner, 178 | Input, 179 | Insert, 180 | Integration, 181 | Integrations, 182 | Intersect, 183 | Into, 184 | Is, 185 | Join, 186 | Json, 187 | Key, 188 | Language, 189 | Last_name, 190 | Last, 191 | Lateral, 192 | Left, 193 | Like, 194 | Limit, 195 | List, 196 | Local, 197 | Lzo, 198 | Manage, 199 | Managed, 200 | Masking, 201 | Match_by_column_name, 202 | Match, 203 | Materialized, 204 | Max_data_extension_time_in_days, 205 | Minute, 206 | Modify, 207 | Monitor, 208 | Month, 209 | Monthly, 210 | Must_change_password, 211 | Must, 212 | Natural, 213 | Network, 214 | Networks, 215 | Never, 216 | Next, 217 | No, 218 | None, 219 | Norely, 220 | Not, 221 | Notification, 222 | Notify, 223 | Novalidate, 224 | Null_if, 225 | Null, 226 | Nulls, 227 | Number, 228 | Numeric, 229 | Of, 230 | Offset, 231 | Oj, 232 | On_error, 233 | On, 234 | Only, 235 | Operate, 236 | Option, 237 | Or, 238 | Orc, 239 | Order, 240 | Organization, 241 | Outer, 242 | Over, 243 | Override, 244 | Overwrite, 245 | Owner, 246 | Ownership, 247 | Parquet, 248 | Partial, 249 | Partition, 250 | Percent, 251 | Pipe, 252 | Pipes, 253 | Policies, 254 | Policy, 255 | Preceding, 256 | Precision, 257 | Preserve_space, 258 | Primary, 259 | Prior, 260 | Privileges, 261 | Procedure, 262 | Procedures, 263 | Purge, 264 | Qualify, 265 | Range, 266 | Raw_deflate, 267 | Read, 268 | Reader, 269 | Record_delimiter, 270 | Recursive, 271 | References, 272 | Regexp, 273 | Region_group, 274 | Region, 275 | Rely, 276 | Repeatable, 277 | Replace_invalid_characters, 278 | Replace, 279 | Replica, 280 | Replication, 281 | Resource, 282 | Restrict, 283 | Restrictions, 284 | Resume, 285 | Return_failed_only, 286 | Returns, 287 | Revoke, 288 | Right, 289 | Role, 290 | Rollback, 291 | Rollup, 292 | Row, 293 | Rows, 294 | S3, 295 | Sample, 296 | Schema, 297 | Schemas, 298 | Second, 299 | Secure, 300 | Security, 301 | Seed, 302 | Select, 303 | Semi, 304 | Sequence, 305 | Sequences, 306 | Session, 307 | Set, 308 | Sets, 309 | Share, 310 | Show, 311 | Simple, 312 | Size_limit, 313 | Skip_blank_lines, 314 | Skip_byte_order_mark, 315 | Skip_file, 316 | Skip_header, 317 | Snappy_compression, 318 | Snappy, 319 | Stage_copy_options, 320 | Stage_file_format, 321 | Stage, 322 | Stages, 323 | Standard, 324 | Start_timestamp, 325 | Start, 326 | Starts, 327 | Statement, 328 | Storage, 329 | Stream, 330 | Streams, 331 | Strict, 332 | String, 333 | Strip_null_values, 334 | Strip_outer_array, 335 | Strip_outer_element, 336 | Support, 337 | Suspend_immediate, 338 | Suspend, 339 | System, 340 | T, 341 | Table, 342 | Tables, 343 | Tablesample, 344 | Tag, 345 | Task, 346 | Tasks, 347 | Temp, 348 | Template, 349 | Temporary, 350 | Terse, 351 | Text, 352 | Then, 353 | Time_format, 354 | Timestamp_format, 355 | Timestamp_ltz, 356 | Timestamp_ntz, 357 | Timestamp_tz, 358 | Timestamp, 359 | Timestampltz, 360 | Timestampntz, 361 | Timestamptz, 362 | To, 363 | Top, 364 | Transient, 365 | Triggers, 366 | Trim_space, 367 | True, 368 | Truncate, 369 | Truncatecolumns, 370 | Try_cast, 371 | Ts, 372 | Type, 373 | Unbounded, 374 | Union, 375 | Unique, 376 | Unpivot, 377 | Update, 378 | Url, 379 | Usage, 380 | Use, 381 | User, 382 | Using, 383 | Utf8, 384 | Validate_utf8, 385 | Validate, 386 | Values, 387 | Varbinary, 388 | Varchar, 389 | Varying, 390 | View, 391 | Views, 392 | Volatile, 393 | Warehouse, 394 | Weekly, 395 | When, 396 | Where, 397 | With, 398 | Without, 399 | X, 400 | Xml, 401 | Year, 402 | Yearly, 403 | Zone, 404 | Zstd, 405 | } from "./parser.terms.js"; 406 | 407 | const keywordTokens = { 408 | access: Access, 409 | admin_name: Admin_name, 410 | admin_password: Admin_password, 411 | after: After, 412 | all: All, 413 | allow_duplicate: Allow_duplicate, 414 | allowed_ip_list: Allowed_IP_List, 415 | and: And, 416 | any: Any, 417 | api_allowed_prefixes: Api_allowed_prefixes, 418 | api_aws_role_arn: Api_aws_role_arn, 419 | api_blocked_prefixes: Api_blocked_prefixes, 420 | api_key: Api_key, 421 | api_provider: Api_provider, 422 | api: Api, 423 | apply: Apply, 424 | as: As, 425 | asc: Asc, 426 | at: At, 427 | attach: Attach, 428 | auto_ingest: Auto_ingest, 429 | auto_refresh_materialized_views_on_secondary: 430 | Auto_refresh_materialized_views_on_secondary, 431 | auto: Auto, 432 | autoincrement: Autoincrement, 433 | avro: Avro, 434 | aws_api_gateway: Aws_api_gateway, 435 | aws_private_api_gateway: Aws_private_api_gateway, 436 | azure_ad_application_id: Azure_ad_application_id, 437 | azure_api_management: Azure_api_management, 438 | azure_tenant_id: Azure_tenant_id, 439 | base64: Base64, 440 | before: Before, 441 | bernoulii: Bernoulli, 442 | between: Between, 443 | binary_as_text: Binary_as_text, 444 | binary_format: Binary_format, 445 | binary: Binary, 446 | block: Block, 447 | blocked_ip_list: Blocked_IP_List, 448 | boolean: Boolean, 449 | brotli: Brotli, 450 | business_critical: Business_critical, 451 | by: By, 452 | bz2: Bz2, 453 | called: Called, 454 | caller: Caller, 455 | cascade: Cascade, 456 | case_insensitive: Case_insensitive, 457 | case_sensitive: Case_sensitive, 458 | case: Case, 459 | cast: Cast, 460 | change_tracking: Change_tracking, 461 | char: Char, 462 | character: Character, 463 | clone: Clone, 464 | cluster: Cluster, 465 | collate: Collate, 466 | compression: Compression, 467 | connect_by_root: Connect_by_root, 468 | connect: Connect, 469 | connection: Connection, 470 | constraint: Constraint, 471 | continue: Continue, 472 | copy: Copy, 473 | create: Create, 474 | credit_quota: Credit_quota, 475 | cross: Cross, 476 | csv: Csv, 477 | cube: Cube, 478 | current: Current, 479 | daily: Daily, 480 | data_retention_time_in_days: Data_retention_time_in_days, 481 | databases: Databases, 482 | date_format: Date_format, 483 | datetieme: Datetime, 484 | dec: Dec, 485 | decimal: Decimal, 486 | default: Default, 487 | deferrable: Deferrable, 488 | Deferred: Deferred, 489 | deflate: Deflate, 490 | delete: Delete, 491 | desc: Desc, 492 | describe: Describe, 493 | disable_auto_convert: Disable_auto_convert, 494 | disable_snowflake_data: Disable_snowflake_data, 495 | disable: Disable, 496 | distinct: Distinct, 497 | do: Do, 498 | drop: Drop, 499 | edition: Edition, 500 | else: Else, 501 | empty_field_as_null: Empty_field_as_null, 502 | enable_octal: Enable_octal, 503 | enable: Enable, 504 | encoding: Encoding, 505 | end_timestamp: End_timestamp, 506 | end: End, 507 | enforce_length: Enforce_length, 508 | enforced: Enforced, 509 | enterprise: Enterprise, 510 | error_on_column_count_mismatch: Error_on_column_count_mismatch, 511 | escape_unenclosed_field: Escape_unenclosed_field, 512 | escape: Escape, 513 | except: Except, 514 | exchange: Exchange, 515 | execute: Execute, 516 | execution: Execution, 517 | exists: Exists, 518 | extact: Extract, 519 | external: External, 520 | false: False, 521 | fetch: Fetch, 522 | field_delimiter: Field_delimiter, 523 | field_optionally_enclosed_by: Field_optionally_enclosed_by, 524 | file_extension: File_extension, 525 | file: File, 526 | first: First, 527 | fn: Fn, 528 | following: Following, 529 | for: For, 530 | force: Force, 531 | foreign: Foreign, 532 | format_name: Format_name, 533 | format: Format, 534 | formats: Formats, 535 | frequency: Frequency, 536 | from: From, 537 | full: Full, 538 | function: Function, 539 | functions: Functions, 540 | future: Future, 541 | get: Get, 542 | global: Global, 543 | google_api_gateway: Google_api_gateway, 544 | google_audience: Google_audience, 545 | grant: Grant, 546 | grants: Grants, 547 | group: Group, 548 | group: Group, 549 | grouping: Grouping, 550 | gzip: Gzip, 551 | having: Having, 552 | hex: Hex, 553 | history: History, 554 | if: If, 555 | ignore_utf8_errors: Ignore_utf8_errors, 556 | immediate: Immediate, 557 | immediate: Immediate, 558 | immediately: Immediately, 559 | immutable: Immutable, 560 | import: Import, 561 | imported: Imported, 562 | in: In, 563 | increment: Increment, 564 | initiallly: Initiallly, 565 | inner: Inner, 566 | insert: Insert, 567 | integrations: Integrations, 568 | intersect: Intersect, 569 | into: Into, 570 | is: Is, 571 | join: Join, 572 | json: Json, 573 | language: Language, 574 | last: Last, 575 | lateral: Lateral, 576 | like: Like, 577 | limit: Limit, 578 | list: List, 579 | local: Local, 580 | lzo: Lzo, 581 | manage: Manage, 582 | managed: Managed, 583 | masking: Masking, 584 | match_by_column_name: Match_by_column_name, 585 | match: Match, 586 | max_data_extension_time_in_days: Max_data_extension_time_in_days, 587 | modify: Modify, 588 | monitor: Monitor, 589 | monthly: Monthly, 590 | must: Must, 591 | natural: Natural, 592 | network: Network, 593 | networks: Networks, 594 | never: Never, 595 | next: Next, 596 | no: No, 597 | none: None, 598 | norely: Norely, 599 | not: Not, 600 | notification: Notification, 601 | notify: Notify, 602 | novalidate: Novalidate, 603 | null_if: Null_if, 604 | nulls: Nulls, 605 | number: Number, 606 | numeric: Numeric, 607 | of: Of, 608 | offset: Offset, 609 | oj: Oj, 610 | on_error: On_error, 611 | on: On, 612 | only: Only, 613 | operate: Operate, 614 | option: Option, 615 | or: Or, 616 | orc: Orc, 617 | outer: Outer, 618 | over: Over, 619 | override: Override, 620 | overwrite: Overwrite, 621 | ownership: Ownership, 622 | parquet: Parquet, 623 | partial: Partial, 624 | partition: Partition, 625 | pipe: Pipe, 626 | pipes: Pipes, 627 | Preceding: Preceding, 628 | precsion: Precision, 629 | preserve_space: Preserve_space, 630 | primary: Primary, 631 | prior: Prior, 632 | privileges: Privileges, 633 | procedure: Procedure, 634 | procedures: Procedures, 635 | purge: Purge, 636 | qualify: Qualify, 637 | range: Range, 638 | raw_deflate: Raw_deflate, 639 | read: Read, 640 | reader: Reader, 641 | record_delimiter: Record_delimiter, 642 | recursive: Recursive, 643 | references: References, 644 | region_group: Region_group, 645 | rely: Rely, 646 | repeatable: Repeatable, 647 | replace_invalid_characters: Replace_invalid_characters, 648 | replace: Replace, 649 | replica: Replica, 650 | replication: Replication, 651 | resource: Resource, 652 | restrict: Restrict, 653 | restrictions: Restrictions, 654 | restrictions: Restrictions, 655 | return_failed_only: Return_failed_only, 656 | returns: Returns, 657 | revoke: Revoke, 658 | right: Right, 659 | rollback: Rollback, 660 | rollup: Rollup, 661 | row: Row, 662 | rows: Rows, 663 | s3: S3, 664 | sample: Sample, 665 | schemas: Schemas, 666 | second: Second, 667 | seed: Seed, 668 | select: Select, 669 | semi: Semi, 670 | sequence: Sequence, 671 | sequences: Sequences, 672 | session: Session, 673 | set: Set, 674 | sets: Sets, 675 | share: Share, 676 | show: Show, 677 | simple: Simple, 678 | size_limit: Size_limit, 679 | skip_blank_lines: Skip_blank_lines, 680 | skip_byte_order_mark: Skip_byte_order_mark, 681 | skip_file: Skip_file, 682 | skip_header: Skip_header, 683 | snappy_compression: Snappy_compression, 684 | snappy: Snappy, 685 | stage_copy_options: Stage_copy_options, 686 | stage_file_format: Stage_file_format, 687 | stages: Stages, 688 | standard: Standard, 689 | start_timestamp: Start_timestamp, 690 | start: Start, 691 | starts: Starts, 692 | statement: Statement, 693 | storage: Storage, 694 | stream: Stream, 695 | streams: Streams, 696 | strict: Strict, 697 | string: String, 698 | strip_null_values: Strip_null_values, 699 | strip_outer_array: Strip_outer_array, 700 | strip_outer_element: Strip_outer_element, 701 | support: Support, 702 | suspend_immediate: Suspend_immediate, 703 | suspend: Suspend, 704 | system: System, 705 | t: T, 706 | table: Table, 707 | tables: Tables, 708 | tablesample: Tablesample, 709 | task: Task, 710 | tasks: Tasks, 711 | temp: Temp, 712 | template: Template, 713 | temporary: Temporary, 714 | terse: Terse, 715 | text: Text, 716 | then: Then, 717 | time_format: Time_format, 718 | timestamp_format: Timestamp_format, 719 | timestamp_ltz: Timestamp_ltz, 720 | timestamp_ntz: Timestamp_ntz, 721 | timestamp_tz: Timestamp_tz, 722 | timestampltz: Timestampltz, 723 | timestampntz: Timestampntz, 724 | timestamptz: Timestamptz, 725 | to: To, 726 | top: Top, 727 | triggers: Triggers, 728 | trim_space: Trim_space, 729 | true: True, 730 | truncate: Truncate, 731 | truncatecolumns: Truncatecolumns, 732 | try_cast: Try_cast, 733 | ts: Ts, 734 | undbounded: Unbounded, 735 | union: Union, 736 | unique: Unique, 737 | unpivot: Unpivot, 738 | update: Update, 739 | usage: Usage, 740 | use: Use, 741 | using: Using, 742 | utf8: Utf8, 743 | validate_utf8: Validate_utf8, 744 | validate: Validate, 745 | values: Values, 746 | values: Values, 747 | varbinary: Varbinary, 748 | varchar: Varchar, 749 | varying: Varying, 750 | volatile: Volatile, 751 | weekly: Weekly, 752 | when: When, 753 | where: Where, 754 | with: With, 755 | without: Without, 756 | xml: Xml, 757 | yearly: Yearly, 758 | zone: Zone, 759 | zstd: Zstd 760 | }; 761 | 762 | export const specializeIdentifier = (value, stack) => { 763 | return keywordTokens[value.toLowerCase()] || -1; 764 | }; 765 | 766 | const contextualKeywordTokens = { 767 | account: Account, 768 | action: Action, 769 | alter: Alter, 770 | application: Application, 771 | azure: Azure, 772 | channel: Channel, 773 | columns: Columns, 774 | comment: Comment, 775 | commit: Commit, 776 | d: D, 777 | data: Data, 778 | database: Database, 779 | day: Day, 780 | default_ddl_collation: Default_ddl_collation, 781 | email: Email, 782 | enabled: Enabled, 783 | first_name: First_name, 784 | gcs: Gcs, 785 | hour: Hour, 786 | identity: Identity, 787 | ilike: Ilike, 788 | input: Input, 789 | integration: Integration, 790 | key: Key, 791 | last_name: Last_name, 792 | left: Left, 793 | materialized: Materialized, 794 | minute: Minute, 795 | month: Month, 796 | must_change_password: Must_change_password, 797 | null: Null, 798 | order: Order, 799 | organization: Organization, 800 | owner: Owner, 801 | percent: Percent, 802 | policies: Policies, 803 | policy: Policy, 804 | regexp: Regexp, 805 | region: Region, 806 | resume: Resume, 807 | role: Role, 808 | schema: Schema, 809 | secure: Secure, 810 | security: Security, 811 | stage: Stage, 812 | tag: Tag, 813 | text: Text, 814 | timestamp: Timestamp, 815 | transient: Transient, 816 | type: Type, 817 | url: Url, 818 | user: User, 819 | view: View, 820 | views: Views, 821 | warehouse: Warehouse, 822 | x: X, 823 | year: Year 824 | }; 825 | 826 | export const extendIdentifier = (value, stack) => { 827 | return contextualKeywordTokens[value.toLowerCase()] || -1; 828 | }; 829 | -------------------------------------------------------------------------------- /test/create.txt: -------------------------------------------------------------------------------- 1 | # Create materialized view 2 | 3 | create materialized view foobar as select foo from bar; 4 | 5 | ==> 6 | 7 | SnowSQL(Stmts(Stmt(CreateMaterializedView(Create,Materialized,View,Identifier,As,QueryStatementExpression(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))))),Smc)) 8 | 9 | 10 | # Create database 11 | 12 | create database mytestdb; 13 | 14 | ==> 15 | 16 | SnowSQL(Stmts(Stmt(CreateStmt(Create,Database,Identifier,DbOp)),Smc)) 17 | 18 | 19 | # Create account 20 | 21 | create account foobar admin_name = foo admin_password = 'TestPassword1' email = myemail@myorg.org edition = enterprise; 22 | 23 | ==> 24 | 25 | SnowSQL(Stmts(Stmt(CreateStmt(Create,Account,Identifier,Admin_name,Eql,Identifier,Admin_password,Eql,StringLiteral,Email,Eql,EmailAddr,Edition,Eql,Enterprise,AccountOptional)),Smc)) 26 | 27 | 28 | # Create network policy 29 | 30 | create network policy foo allowed_ip_list=('1.1.1.0/24'); 31 | 32 | ==> 33 | 34 | SnowSQL(Stmts(Stmt(CreateStmt(Create,Network,Policy,Identifier,Allowed_IP_List,Eql,Lparen,Sqt,IpA,Sqt,Rparen)),Smc)) 35 | 36 | 37 | # Create network policy with blocked ip list 38 | 39 | create network policy foo allowed_ip_list=('1.1.1.0/24') blocked_ip_list=('1.1.1.1'); 40 | 41 | ==> 42 | 43 | SnowSQL(Stmts(Stmt(CreateStmt(Create,Network,Policy,Identifier,Allowed_IP_List,Eql,Lparen,Sqt,IpA,Sqt,Rparen,Blocked_IP_List,Eql,Lparen,Sqt,IpA,Sqt,Rparen)),Smc)) 44 | 45 | 46 | # Create storage integration 47 | 48 | create storage integration gcs_int type = external_stage storage_provider = gcs enabled = true storage_allowed_locations = ('gcs://mybucket1/path1/', 'gcs://mybucket2/path2/'); 49 | 50 | ==> 51 | 52 | SnowSQL(Stmts(Stmt(CreateIntegrationStmt(Create,IntegrationTypes(Storage),Integration,ObjName(IdentifierExt(Identifier)),KeyValueProperty(KeyName(Type),Eql,KeyValue(ListableKeyValue(IdentifierExtended(Identifier)))),KeyValueProperty(KeyName(Identifier),Eql,KeyValue(ListableKeyValue(IdentifierExtended(Identifier)))),KeyValueProperty(KeyName(Enabled),Eql,KeyValue(ListableKeyValue(BooleanValue(True)))),KeyValueProperty(KeyName(Identifier),Eql,KeyValue(KeyValueList(Lparen,ListableKeyValue(StringLiteral),Comma,ListableKeyValue(StringLiteral),Rparen))))),Smc)) 53 | 54 | 55 | # Create storage integration with mutliple storage_allowed_locations 56 | 57 | 58 | CREATE STORAGE INTEGRATION IF NOT EXISTS azure_log_azeastus2prod_storage_integration TYPE=EXTERNAL_STAGE ENABLED=TRUE AZURE_TENANT_ID='DDD' STORAGE_ALLOWED_LOCATIONS=( 59 | 'AAA', 60 | 'BBB', 61 | 'CCC' 62 | ) 63 | ; 64 | 65 | ==> 66 | 67 | SnowSQL(Stmts(Stmt(CreateIntegrationStmt(Create,IntegrationTypes(Storage),Integration,IfNotExists(If,Not,Exists),ObjName(IdentifierExt(Identifier)),KeyValueProperty(KeyName(Type),Eql,KeyValue(ListableKeyValue(IdentifierExtended(Identifier)))),KeyValueProperty(KeyName(Enabled),Eql,KeyValue(ListableKeyValue(BooleanValue(True)))),KeyValueProperty(KeyName(Azure_tenant_id),Eql,KeyValue(ListableKeyValue(StringLiteral))),KeyValueProperty(KeyName(Identifier),Eql,KeyValue(KeyValueList(Lparen,ListableKeyValue(StringLiteral),Comma,ListableKeyValue(StringLiteral),Comma,ListableKeyValue(StringLiteral),Rparen))))),Smc)) 68 | 69 | 70 | # Create api integration 71 | 72 | create or replace api integration demonstration_external_api_integration_01 api_provider=aws_api_gateway api_aws_role_arn='arn:aws:iam::123456789012:role/my_cloud_account_role' api_allowed_prefixes=('https://xyz.execute-api.us-west-2.amazonaws.com/production') enabled=true; 73 | 74 | ==> 75 | 76 | SnowSQL(Stmts(Stmt(CreateIntegrationStmt(Create,OptOrReplace(Or,Replace),IntegrationTypes(Api),Integration,ObjName(IdentifierExt(Identifier)),KeyValueProperty(KeyName(Api_provider),Eql,KeyValue(ListableKeyValue(KeyValuesExtended(Aws_api_gateway)))),KeyValueProperty(KeyName(Api_aws_role_arn),Eql,KeyValue(ListableKeyValue(StringLiteral))),KeyValueProperty(KeyName(Api_allowed_prefixes),Eql,KeyValue(KeyValueList(Lparen,ListableKeyValue(StringLiteral),Rparen))),KeyValueProperty(KeyName(Enabled),Eql,KeyValue(ListableKeyValue(BooleanValue(True)))))),Smc)) 77 | 78 | 79 | # Create view 80 | 81 | create view myview comment='Test view' as select col1, col2 from mytable; 82 | 83 | ==> 84 | 85 | SnowSQL(Stmts(Stmt(CreateViewStmt(Create,View,ObjName(IdentifierExt(Identifier)),ViewOption(CommonCreateOption(WithKeyValueProperty(KeyValueProperty(KeyName(Comment),Eql,KeyValue(ListableKeyValue(StringLiteral)))))),ViewSpecification(As,SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))))),Smc)) 86 | 87 | 88 | # Create stream 89 | 90 | create stream foo on table bar; 91 | 92 | ==> 93 | 94 | SnowSQL(Stmts(Stmt(CreateStreamStmt(Create,Stream,ObjName(IdentifierExt(Identifier)),On,Table,ObjName(IdentifierExt(Identifier)))),Smc)) 95 | 96 | # Create stream with time travel 97 | 98 | create stream mystream on table mytable before (timestamp => to_timestamp(40*365*86400)); 99 | 100 | ==> 101 | 102 | SnowSQL(Stmts(Stmt(CreateStreamStmt(Create,Stream,ObjName(IdentifierExt(Identifier)),On,Table,ObjName(IdentifierExt(Identifier)),TimeTravelClause(Before,Lparen,Timestamp,Darw,ScalarExpression(ExpressionA(FunctionCall(ObjName(IdentifierExt(Identifier)),Lparen,FunctionArgs(FunctionArgExpression(ScalarExpression(ExpressionA(ExpressionA(ExpressionA(IntegerLiteral),Mul,ExpressionA(IntegerLiteral)),Mul,ExpressionA(IntegerLiteral))))),Rparen))),Rparen))),Smc)) 103 | 104 | # Create pipe 105 | 106 | create pipe foobar as copy into tablefoo from @mystage; 107 | 108 | ==> 109 | 110 | SnowSQL(Stmts(Stmt(CreatePipeStmt(Create,Pipe,ObjName(IdentifierExt(Identifier)),PipeSpecification(As,CopyStmt(Copy,Into,ObjName(IdentifierExt(Identifier)),From,URLDefinition(URLIdentifier(StageNameIdentifier(Atr,URLPathComponent))))))),Smc)) -------------------------------------------------------------------------------- /test/custom-test.js: -------------------------------------------------------------------------------- 1 | import { parser } from "../dist/index.es.js"; 2 | import { fileTests } from "lezer-generator/dist/test"; 3 | import * as fs from "fs"; 4 | import * as path from "path"; 5 | import { fileURLToPath } from "url"; 6 | let caseDir = path.dirname(fileURLToPath(import.meta.url)); 7 | 8 | const argsAll = process.argv.slice(2); 9 | var envArg = argsAll.slice(-1).pop(); 10 | 11 | const substr = "--env="; 12 | 13 | if (envArg.includes(substr)) { 14 | var fname = envArg.split("--env=")[1]; 15 | } 16 | var file = fname + ".txt"; 17 | 18 | try { 19 | fs.readFileSync(path.join(caseDir, file)); 20 | } catch (err) { 21 | throw Error("Test file not found!"); 22 | } 23 | var name = /^[^\.]*/.exec(file)[0]; 24 | describe(name, () => { 25 | for (let { name, run } of fileTests( 26 | fs.readFileSync(path.join(caseDir, file), "utf8"), 27 | file 28 | )) { 29 | it(name, () => run(parser)); 30 | } 31 | }); 32 | -------------------------------------------------------------------------------- /test/describe.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Describe table 4 | 5 | describe table foo; 6 | 7 | ==> 8 | 9 | SnowSQL(Stmts(Stmt(DescribeStmt(Describe,Table,ObjName(IdentifierExt(Identifier)))),Smc)) 10 | 11 | # Describe stream 12 | 13 | describe stream foo; 14 | 15 | ==> 16 | 17 | SnowSQL(Stmts(Stmt(DescribeStmt(Describe,DescribeTargetSimple(Stream),ObjName(IdentifierExt(Identifier)))),Smc)) 18 | 19 | 20 | # Describe function 21 | 22 | desc function multiply(number, number); 23 | 24 | ==> 25 | 26 | SnowSQL(Stmts(Stmt(DescribeStmt(Desc,Function,Identifier,UdfSig(Lparen,UdfParam(NonUserDefinedType(NumberType(NumberAlias(Number)))),Comma,UdfParam(NonUserDefinedType(NumberType(NumberAlias(Number)))),Rparen))),Smc)) 27 | 28 | # Describe view 29 | 30 | describe view foo; 31 | 32 | ==> 33 | 34 | SnowSQL(Stmts(Stmt(DescribeStmt(Describe,DescribeTargetSimple(View),ObjName(IdentifierExt(Identifier)))),Smc)) 35 | 36 | 37 | # Describe integration 38 | 39 | describe api integration foo; 40 | 41 | ==> 42 | 43 | SnowSQL(Stmts(Stmt(DescribeStmt(Describe,DescribeTargetSimple(Api,Integration),ObjName(IdentifierExt(Identifier)))),Smc)) 44 | 45 | 46 | # Describe network policy 47 | 48 | describe network policy foo; 49 | 50 | ==> 51 | 52 | SnowSQL(Stmts(Stmt(DescribeStmt(Describe,DescribeTargetSimple(Network,Policy),ObjName(IdentifierExt(Identifier)))),Smc)) 53 | 54 | 55 | # Describe file format 56 | 57 | describe file format foo; 58 | 59 | ==> 60 | 61 | SnowSQL(Stmts(Stmt(DescribeStmt(Describe,DescribeTargetSimple(File,Format),ObjName(IdentifierExt(Identifier)))),Smc)) 62 | 63 | 64 | # Describe with desc keyword 65 | 66 | desc file format foo; 67 | 68 | ==> 69 | 70 | SnowSQL(Stmts(Stmt(DescribeStmt(Desc,DescribeTargetSimple(File,Format),ObjName(IdentifierExt(Identifier)))),Smc)) 71 | -------------------------------------------------------------------------------- /test/drop.txt: -------------------------------------------------------------------------------- 1 | 2 | # Drop sequence 3 | 4 | drop sequence if exists foo; 5 | 6 | ==> 7 | 8 | SnowSQL(Stmts(Stmt(DropStmt(Drop,DropTargetWithOptions(Sequence),IfExists(If,Exists),ObjName(IdentifierExt(Identifier)))),Smc)) 9 | 10 | 11 | # Drop table 12 | 13 | drop table if exists foo cascade; 14 | 15 | ==> 16 | 17 | SnowSQL(Stmts(Stmt(DropStmt(Drop,DropTargetWithOptions(Table),IfExists(If,Exists),ObjName(IdentifierExt(Identifier)),DropOptions(Cascade))),Smc)) 18 | 19 | 20 | # Drop managed account 21 | 22 | drop managed account foo_bar; 23 | 24 | ==> 25 | 26 | SnowSQL(Stmts(Stmt(DropStmt(Drop,DropTargetSimple(Managed,Account),ObjName(IdentifierExt(Identifier)))),Smc)) 27 | 28 | 29 | # Drop warehouse 30 | 31 | drop warehouse foo; 32 | 33 | ==> 34 | 35 | SnowSQL(Stmts(Stmt(DropStmt(Drop,DropTargetWithIfExists(Warehouse),ObjName(IdentifierExt(Identifier)))),Smc)) 36 | 37 | 38 | # Drop procedure 39 | 40 | drop procedure add_accounting_user(varchar); 41 | 42 | ==> 43 | 44 | SnowSQL(Stmts(Stmt(DropStmt(Drop,Procedure,ObjName(IdentifierExt(Identifier)),UdfTypeSig(Lparen,Types(NonUserDefinedType(StringType(Varchar))),Rparen))),Smc)) 45 | 46 | 47 | # Drop tag if exists 48 | 49 | drop tag if exists foobar ; 50 | 51 | ==> 52 | 53 | SnowSQL(Stmts(Stmt(DropStmt(Drop,DropTargetWithIfExists(Tag),IfExists(If,Exists),ObjName(IdentifierExt(Identifier)))),Smc)) 54 | 55 | 56 | # Drop schema, with cascade option 57 | 58 | drop schema myschema cascade; 59 | 60 | ==> 61 | 62 | SnowSQL(Stmts(Stmt(DropStmt(Drop,DropTargetWithOptions(Schema),ObjName(IdentifierExt(Identifier)),DropOptions(Cascade))),Smc)) 63 | 64 | 65 | # Drop sequence, with restrict option 66 | 67 | 68 | drop schema myschema cascade; 69 | 70 | ==> 71 | 72 | SnowSQL(Stmts(Stmt(DropStmt(Drop,DropTargetWithOptions(Schema),ObjName(IdentifierExt(Identifier)),DropOptions(Cascade))),Smc)) 73 | 74 | -------------------------------------------------------------------------------- /test/select.txt: -------------------------------------------------------------------------------- 1 | # Simple select statement 2 | 3 | select * from foo; 4 | 5 | ==> 6 | 7 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc)) 8 | 9 | 10 | # Select with fields 11 | 12 | select foo, bar from foobar; 13 | 14 | ==> 15 | 16 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc)) 17 | 18 | 19 | # Select with where 20 | 21 | select foo from foobar where foobar = 11; 22 | 23 | ==> 24 | 25 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Eql,ExpressionA(IntegerLiteral)))))))),Smc)) 26 | 27 | 28 | # Select with basic arithmetic expression 29 | 30 | select foo,bar from foobar where (foo + bar) > 3; 31 | 32 | ==> 33 | 34 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(Lparen,ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Plus,ExpressionA(ObjName(IdentifierExt(Identifier)))),Rparen),Gtr,ExpressionA(IntegerLiteral)))))))),Smc)) 35 | 36 | 37 | # Select number 38 | 39 | select 1; 40 | 41 | ==> 42 | 43 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(IntegerLiteral)))))))),Smc)) 44 | 45 | 46 | # Select with basic arithmetic expression without parentheses 47 | 48 | select foo,bar from foobar where foo + bar > 3; 49 | 50 | ==> 51 | 52 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Plus,ExpressionA(ObjName(IdentifierExt(Identifier)))),Gtr,ExpressionA(IntegerLiteral)))))))),Smc)) 53 | 54 | 55 | # Select with where and string 56 | 57 | select foo, bar from foobar; 58 | 59 | ==> 60 | 61 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc)) 62 | 63 | 64 | # Select with where and gte operator 65 | 66 | select foo from foobar where foo >= 50; 67 | 68 | ==> 69 | 70 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Gte,ExpressionA(IntegerLiteral)))))))),Smc)) 71 | 72 | 73 | # Select with union 74 | 75 | select colA from foo 76 | union all 77 | select colA from bar 78 | group by val; 79 | 80 | ==> 81 | 82 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))),Union,All,SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),GroupByClause(Group,By,GroupByExpression(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))))))))),Smc)) 83 | 84 | 85 | # Select with intersect 86 | 87 | select colA from foo 88 | intersect 89 | select colA from bar 90 | order by id; 91 | 92 | ==> 93 | 94 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))),Intersect,SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),OrderByClause(Order,By,ColumnRefOrder(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))))))))),Smc)) 95 | 96 | 97 | # Nested select statement 98 | 99 | select foo,bar from foobar where bar in (select foobar from foo WHERE barfoo = 'foobar'); 100 | 101 | ==> 102 | 103 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),In,Inexpression(ParenSelect(Lparen,SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Eql,ExpressionA(StringLiteral)))))),Rparen))))))))),Smc)) 104 | 105 | 106 | # With clause 107 | 108 | with 109 | foo as (select count(*) num, val 110 | from emp 111 | group by val) 112 | select dname d, loc l, num n 113 | from bar, foo 114 | where bar.val = foo.val; 115 | 116 | ==> 117 | 118 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(WithClause(With,WithItem(WithIdentifier(IdentifierExt(Identifier)),As,WithExpression(Lparen,QueryStatementExpression(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(FunctionCall(ObjName(IdentifierExt(Identifier)),Lparen,FunctionArgs(Star),Rparen))),IdentifierExt(Identifier)),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),GroupByClause(Group,By,GroupByExpression(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))))))),Rparen))),SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))),IdentifierExt(Identifier)),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))),IdentifierExt(Identifier)),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))),IdentifierExt(Identifier))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier)))),Comma,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier),Dot,IdentifierExt(Identifier))),Eql,ExpressionA(ObjName(IdentifierExt(Identifier),Dot,IdentifierExt(Identifier))))))))))),Smc)) 119 | 120 | 121 | # Basic RCTE 122 | 123 | with cte 124 | as (select 1 as n 125 | union all 126 | select n + 1 127 | from cte 128 | where n < 50 129 | ) 130 | select n 131 | from cte; 132 | 133 | ==> 134 | 135 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(WithClause(With,WithItem(WithIdentifier(IdentifierExt(Identifier)),As,WithExpression(Lparen,QueryStatementExpression(SelectStmt(SelectDefinition(SelectBase(SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(IntegerLiteral)),As,IdentifierExt(Identifier))))),Union,All,SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Plus,ExpressionA(IntegerLiteral))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Lss,ExpressionA(IntegerLiteral)))))))))),Rparen))),SelectClause(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier)))))))))),Smc)) 136 | 137 | 138 | # Join with using 139 | 140 | SELECT a.id, b.id 141 | FROM my_table a 142 | JOIN my_other_table b USING (q, w); 143 | 144 | ==> 145 | 146 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier),Dot,IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier),Dot,IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))),AliasClause(IdentifierExt(Identifier)),JoinExpression(JoinKW(Join),BaseFromExpression(TableObjectName(IdentifierExt(Identifier))),AliasClause(IdentifierExt(Identifier)),JoinSpecification(Using,Lparen,ColumnNames(Identifier,Comma,Identifier),Rparen)))))))),Smc)) 147 | 148 | 149 | # Join on condition 150 | 151 | select * from foobar join barfoo on true; 152 | 153 | ==> 154 | 155 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))),JoinExpression(JoinKW(Join),BaseFromExpression(TableObjectName(IdentifierExt(Identifier))),JoinSpecification(On,ExpressionA(BooleanValue(True)))))))))),Smc)) 156 | 157 | 158 | # limit clause 159 | 160 | select * 161 | from foo 162 | order by bar desc 163 | limit 99; 164 | 165 | ==> 166 | 167 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),OrderByClause(Order,By,ColumnRefOrder(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))),Desc)),LimitClause(Limit,LimitBoundary(ConstantBoundary(IntegerLiteral))))))),Smc)) 168 | 169 | 170 | # having clause 171 | 172 | select a, b, c, d, e 173 | from foobar 174 | group by d 175 | having count(d) < 59; 176 | 177 | ==> 178 | 179 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),GroupByClause(Group,By,GroupByExpression(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),HavingClause(Having,ScalarExpression(ExpressionA(ExpressionA(FunctionCall(ObjName(IdentifierExt(Identifier)),Lparen,FunctionArgs(FunctionArgExpression(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),Rparen)),Lss,ExpressionA(IntegerLiteral)))))))),Smc)) 180 | 181 | 182 | # Select Max Aggregate function 183 | 184 | select max(val) from foobar; 185 | 186 | ==> 187 | 188 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(FunctionCall(ObjName(IdentifierExt(Identifier)),Lparen,FunctionArgs(FunctionArgExpression(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),Rparen))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc)) 189 | 190 | 191 | # Order by clause 192 | 193 | select * from tablefoo order by id; 194 | 195 | ==> 196 | 197 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),OrderByClause(Order,By,ColumnRefOrder(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))))))),Smc)) -------------------------------------------------------------------------------- /test/statements.txt: -------------------------------------------------------------------------------- 1 | # Commit 2 | 3 | commit; 4 | 5 | ==> 6 | 7 | SnowSQL(Stmts(Stmt(CommitStmt(Commit)),Smc)) 8 | 9 | 10 | # Rollback 11 | 12 | rollback; 13 | 14 | ==> 15 | 16 | SnowSQL(Stmts(Stmt(RollbackStmt(Rollback)),Smc)) 17 | 18 | 19 | # Truncate table 20 | 21 | truncate table if exists foobar; 22 | 23 | ==> 24 | 25 | SnowSQL(Stmts(Stmt(TruncateStmt(Truncate,Table,IfExists(If,Exists),ObjName(IdentifierExt(Identifier)))),Smc)) 26 | 27 | 28 | # Truncate materialized view 29 | 30 | truncate materialized view val; 31 | 32 | ==> 33 | 34 | SnowSQL(Stmts(Stmt(TruncateStmt(Truncate,Materialized,View,ObjName(IdentifierExt(Identifier)))),Smc)) 35 | 36 | 37 | # Use database with variable 38 | 39 | use database identifier($database); 40 | 41 | ==> 42 | 43 | SnowSQL(Stmts(Stmt(UseStmt(Use,Database,ObjName(IdentifierKW,Lparen,IdentifierVar,Rparen))),Smc)) 44 | 45 | 46 | # Use database 47 | 48 | use database foobar; 49 | 50 | ==> 51 | 52 | SnowSQL(Stmts(Stmt(UseStmt(Use,Database,ObjName(IdentifierExt(Identifier)))),Smc)) 53 | 54 | 55 | # Use role 56 | 57 | Use role foobar; 58 | 59 | ==> 60 | 61 | SnowSQL(Stmts(Stmt(UseStmt(Use,Role,ObjName(IdentifierExt(Identifier)))),Smc)) 62 | 63 | 64 | # Use Schema 65 | 66 | use schema foo; 67 | 68 | ==> 69 | 70 | SnowSQL(Stmts(Stmt(UseStmt(Use,Schema,ObjName(IdentifierExt(Identifier)))),Smc)) 71 | 72 | 73 | # Use schema with db 74 | 75 | use foo.bar; 76 | 77 | ==> 78 | 79 | SnowSQL(Stmts(Stmt(UseStmt(Use,ObjName(IdentifierExt(Identifier),Dot,IdentifierExt(Identifier)))),Smc)) 80 | 81 | 82 | # Use warehouse 83 | 84 | use warehouse foo; 85 | 86 | ==> 87 | 88 | SnowSQL(Stmts(Stmt(UseStmt(Use,Warehouse,ObjName(IdentifierExt(Identifier)))),Smc)) 89 | 90 | 91 | # Grant ownership on 92 | 93 | 94 | grant ownership on integration foo_bar_foobar_barfoo TO ROLE foobar_foo_bar_barfoos; 95 | 96 | ==> 97 | 98 | SnowSQL(Stmts(Stmt(GrantPrivilegesStmt(Grant,PrivilegePrefix(Ownership),On,PrivilegeObj(PrivilegeObjectType(Integration),ObjName(IdentifierExt(Identifier))),To,Role,ObjName(IdentifierExt(Identifier)))),Smc)) 99 | 100 | # Grant usage on 101 | 102 | GRANT USAGE ON INTEGRATION gcp_security_logs TO ROLE security_engineer; 103 | 104 | ==> 105 | 106 | SnowSQL(Stmts(Stmt(GrantPrivilegesStmt(Grant,PrivilegePrefix(Usage),On,PrivilegeObj(PrivilegeObjectType(Integration),ObjName(IdentifierExt(Identifier))),To,Role,ObjName(IdentifierExt(Identifier)))),Smc)) 107 | 108 | # Grant all privlegs on function 109 | 110 | grant all privileges on function mydb.myschema.add5(number) to role analyst; 111 | 112 | ==> 113 | 114 | SnowSQL(Stmts(Stmt(GrantPrivilegesStmt(Grant,PrivilegePrefix(All,Privileges),On,PrivilegeObj(PrivilegeObjectType(Function),ObjName(IdentifierExt(Identifier),Dot,IdentifierExt(Identifier),Dot,IdentifierExt(Identifier)),UdfTypeSig(Lparen,Types(NonUserDefinedType(NumberType(NumberAlias(Number)))),Rparen)),To,Role,ObjName(IdentifierExt(Identifier)))),Smc)) 115 | 116 | # Grant all privlegs on function 117 | 118 | grant all privileges on function mydb.myschema.add5(number) to role analyst; 119 | 120 | ==> 121 | 122 | SnowSQL(Stmts(Stmt(GrantPrivilegesStmt(Grant,PrivilegePrefix(All,Privileges),On,PrivilegeObj(PrivilegeObjectType(Function),ObjName(IdentifierExt(Identifier),Dot,IdentifierExt(Identifier),Dot,IdentifierExt(Identifier)),UdfTypeSig(Lparen,Types(NonUserDefinedType(NumberType(NumberAlias(Number)))),Rparen)),To,Role,ObjName(IdentifierExt(Identifier)))),Smc)) 123 | 124 | 125 | 126 | # Show terse 127 | 128 | show terse schemas in database foobar; 129 | 130 | ==> 131 | 132 | SnowSQL(Stmts(Stmt(ShowStmt(Show,Terse,Schemas,ShowInClause(In,Database,ObjName(IdentifierExt(Identifier))))),Smc)) 133 | 134 | 135 | # Show with like 136 | 137 | show tables like 'myrole'; 138 | 139 | ==> 140 | 141 | SnowSQL(Stmts(Stmt(ShowStmt(Show,Tables,Like,StringLiteral)),Smc)) 142 | 143 | # Show with starts with option 144 | 145 | show tables history like 'foo' in account starts with 'bar'; 146 | 147 | ==> 148 | 149 | SnowSQL(Stmts(Stmt(ShowStmt(Show,Tables,History,Like,StringLiteral,ShowInClause(In,ObjName(IdentifierExt(Identifier))),Starts,With,StringLiteral)),Smc)) 150 | 151 | # Multiple queries 152 | 153 | select * from foo; 154 | select foo, bar from foobar; 155 | select foo from foobar where foobar = 11; 156 | 157 | ==> 158 | 159 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc,Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc,Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Eql,ExpressionA(IntegerLiteral)))))))),Smc)) 160 | 161 | 162 | # Insert into 163 | 164 | insert into foobar (colA, colB, colC) values 165 | ('PosA', 'ObjA', 22), 166 | ('PosB', 'ObjB', 99), 167 | ('PosC', 'ObjC', 91); 168 | 169 | ==> 170 | 171 | SnowSQL(Stmts(Stmt(InsertStmt(Insert,Into,ObjName(IdentifierExt(Identifier)),Lparen,ColumnNameList(IdentifierExt(Identifier),Comma,IdentifierExt(Identifier),Comma,IdentifierExt(Identifier)),Rparen,InsertSource(ValuesDef(Values,ValueList(Lparen,ScalarExpression(ExpressionA(StringLiteral)),Comma,ScalarExpression(ExpressionA(StringLiteral)),Comma,ScalarExpression(ExpressionA(IntegerLiteral)),Rparen),Comma,ValueList(Lparen,ScalarExpression(ExpressionA(StringLiteral)),Comma,ScalarExpression(ExpressionA(StringLiteral)),Comma,ScalarExpression(ExpressionA(IntegerLiteral)),Rparen),Comma,ValueList(Lparen,ScalarExpression(ExpressionA(StringLiteral)),Comma,ScalarExpression(ExpressionA(StringLiteral)),Comma,ScalarExpression(ExpressionA(IntegerLiteral)),Rparen))))),Smc)) 172 | 173 | 174 | # Insert and select 175 | 176 | insert into foobar (a, b) select a, b from barfoo; 177 | 178 | ==> 179 | 180 | SnowSQL(Stmts(Stmt(InsertStmt(Insert,Into,ObjName(IdentifierExt(Identifier)),Lparen,ColumnNameList(IdentifierExt(Identifier),Comma,IdentifierExt(Identifier)),Rparen,InsertSource(QueryStatementExpression(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier))))),Comma,SelectTarget(ScalarExpression(ExpressionA(ObjName(IdentifierExt(Identifier)))))),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier)))))))))))),Smc)) 181 | 182 | 183 | # Copy from stage 184 | 185 | copy into foobar from @foo_bar_stage; 186 | 187 | ==> 188 | 189 | SnowSQL(Stmts(Stmt(CopyStmt(Copy,Into,ObjName(IdentifierExt(Identifier)),From,URLDefinition(URLIdentifier(StageNameIdentifier(Atr,URLPathComponent))))),Smc)) 190 | 191 | # Continues on new Line 192 | 193 | select 194 | * 195 | from 196 | foobar 197 | where 198 | foo 199 | < 200 | 4; 201 | 202 | ==> 203 | 204 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))),WhereClause(Where,ScalarExpression(ExpressionA(ExpressionA(ObjName(IdentifierExt(Identifier))),Lss,ExpressionA(IntegerLiteral)))))))),Smc)) 205 | 206 | # Statement without a semicolon 207 | 208 | describe table val 209 | 210 | ==> 211 | 212 | SnowSQL(Stmts(Stmt(DescribeStmt(Describe,Table,ObjName(IdentifierExt(Identifier)))))) 213 | 214 | # Empty statement 215 | 216 | ; 217 | 218 | ==> 219 | 220 | SnowSQL(Stmts(Smc)) 221 | 222 | 223 | # Line comment 224 | 225 | -- a comment here 226 | 227 | ==> 228 | 229 | SnowSQL(Stmts,LineComment) 230 | 231 | # Block comment 232 | 233 | /* 234 | a 235 | comment 236 | here 237 | */ 238 | 239 | ==> 240 | 241 | SnowSQL(Stmts,BlockComment) 242 | 243 | 244 | 245 | # Comments between statments 246 | 247 | select * from foobar; 248 | -- a comment here 249 | select * from val; 250 | -- a comment here 251 | 252 | 253 | ==> 254 | 255 | SnowSQL(Stmts(Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc,LineComment,Stmt(SelectStmt(SelectDefinition(SelectBase(Select,SelectTargetList(SelectTarget(Star)),FromClause(From,FromExpression(BaseFromExpression(TableObjectName(IdentifierExt(Identifier))))))))),Smc),LineComment) -------------------------------------------------------------------------------- /test/test-errorNodes.js: -------------------------------------------------------------------------------- 1 | import { Tree, stringInput, TreeCursor } from "lezer-tree"; 2 | import { parser } from "../dist/index.es.js"; 3 | import { expect } from "chai"; 4 | 5 | function parse(d, fragments) { 6 | let parse = parser.startParse(stringInput(d), 0, { fragments }), 7 | result; 8 | while (!(result = parse.advance())) {} 9 | return result; 10 | } 11 | 12 | export function testNodes(doc1) { 13 | var cursor = parse(doc1); 14 | var errorNodeCount = 0; 15 | 16 | if (!(cursor instanceof TreeCursor)) 17 | cursor = cursor instanceof Tree ? cursor.cursor() : cursor.cursor; 18 | 19 | for (;;) { 20 | if (cursor.type.isError == true) errorNodeCount += 1; 21 | const isLeaf = !cursor.firstChild(); 22 | if (!isLeaf) continue; 23 | 24 | for (;;) { 25 | if (cursor.nextSibling()) break; 26 | if (!cursor.parent()) return errorNodeCount; 27 | } 28 | } 29 | } 30 | 31 | describe("Error Node Test", function () { 32 | it("Should return zero if the query is valid", function () { 33 | expect(testNodes("select * from val;")).to.equal(0); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/test-snowsql.js: -------------------------------------------------------------------------------- 1 | import { parser } from "../dist/index.es.js"; 2 | import {fileTests} from "lezer-generator/dist/test" 3 | 4 | import * as fs from "fs" 5 | import * as path from "path" 6 | import { fileURLToPath } from 'url'; 7 | let caseDir = path.dirname(fileURLToPath(import.meta.url)) 8 | 9 | for (let file of fs.readdirSync(caseDir)) { 10 | if (!/\.txt$/.test(file)) continue 11 | 12 | let name = /^[^\.]*/.exec(file)[0] 13 | describe(name, () => { 14 | for (let {name, run} of fileTests(fs.readFileSync(path.join(caseDir, file), "utf8"), file)) { 15 | it(name, () => run(parser))} 16 | }) 17 | 18 | } 19 | 20 | 21 | --------------------------------------------------------------------------------