From 4fbb85dfba0eda860306b77c80b095a827331a6d Mon Sep 17 00:00:00 2001 From: Hayden Date: Tue, 28 Nov 2023 21:28:20 +0800 Subject: [PATCH] chore: clean comment (#220) * build: add clean comment script * chore: clean comment to hide sensitive information --- package.json | 4 +- pnpm-lock.yaml | 95 ++++++++++++++++++++++ scripts/antlr4.js | 4 +- scripts/cleanComment.js | 37 +++++++++ scripts/cleanCommentCli.js | 3 + src/lib/flinksql/FlinkSqlLexer.ts | 2 +- src/lib/flinksql/FlinkSqlParser.ts | 2 +- src/lib/flinksql/FlinkSqlParserListener.ts | 2 +- src/lib/flinksql/FlinkSqlParserVisitor.ts | 2 +- src/lib/hive/HiveSqlLexer.ts | 2 +- src/lib/hive/HiveSqlParser.ts | 2 +- src/lib/hive/HiveSqlParserListener.ts | 2 +- src/lib/hive/HiveSqlParserVisitor.ts | 2 +- src/lib/impala/ImpalaSqlLexer.ts | 2 +- src/lib/impala/ImpalaSqlParser.ts | 2 +- src/lib/impala/ImpalaSqlParserListener.ts | 2 +- src/lib/impala/ImpalaSqlParserVisitor.ts | 2 +- src/lib/mysql/MySqlLexer.ts | 2 +- src/lib/mysql/MySqlParser.ts | 2 +- src/lib/mysql/MySqlParserListener.ts | 2 +- src/lib/mysql/MySqlParserVisitor.ts | 2 +- src/lib/pgsql/PostgreSQLLexer.ts | 2 +- src/lib/pgsql/PostgreSQLParser.ts | 2 +- src/lib/pgsql/PostgreSQLParserListener.ts | 2 +- src/lib/pgsql/PostgreSQLParserVisitor.ts | 2 +- src/lib/plsql/PlSqlLexer.ts | 2 +- src/lib/plsql/PlSqlParser.ts | 2 +- src/lib/plsql/PlSqlParserListener.ts | 2 +- src/lib/plsql/PlSqlParserVisitor.ts | 2 +- src/lib/spark/SparkSqlLexer.ts | 2 +- src/lib/spark/SparkSqlParser.ts | 2 +- src/lib/spark/SparkSqlParserListener.ts | 2 +- src/lib/spark/SparkSqlParserVisitor.ts | 2 +- src/lib/trinosql/TrinoSqlLexer.ts | 2 +- src/lib/trinosql/TrinoSqlListener.ts | 2 +- src/lib/trinosql/TrinoSqlParser.ts | 2 +- src/lib/trinosql/TrinoSqlVisitor.ts | 2 +- 37 files changed, 173 insertions(+), 34 deletions(-) create mode 100644 scripts/cleanComment.js create mode 100644 scripts/cleanCommentCli.js diff --git a/package.json b/package.json index c513589..0b2a742 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "test": "NODE_OPTIONS=--max_old_space_size=4096 && jest", "release": "node ./scripts/release.js", "lint": "prettier --check '**/*.ts' --config ./.prettierrc", - "lint-fix": "prettier --write '**/*.ts' --config ./.prettierrc" + "lint-fix": "prettier --write '**/*.ts' --config ./.prettierrc", + "cleanComment": "node ./scripts/cleanCommentCli.js" }, "author": "dt-insight-front", "license": "MIT", @@ -41,6 +42,7 @@ "antlr4ts-cli": "^0.5.0-alpha.4", "chalk": "4.1.2", "commitizen": "^4.3.0", + "glob": "^10.3.10", "husky": "^8.0.3", "inquirer": "^8.2.2", "jest": "^29.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98207e4..a75663b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,6 +13,7 @@ specifiers: antlr4ts-cli: ^0.5.0-alpha.4 chalk: 4.1.2 commitizen: ^4.3.0 + glob: ^10.3.10 husky: ^8.0.3 inquirer: ^8.2.2 jest: ^29.5.0 @@ -37,6 +38,7 @@ devDependencies: antlr4ts-cli: 0.5.0-alpha.4 chalk: 4.1.2 commitizen: 4.3.0_@swc+core@1.3.60 + glob: 10.3.10 husky: 8.0.3 inquirer: 8.2.6 jest: 29.5.0_@types+node@18.16.16 @@ -590,6 +592,18 @@ packages: engines: {node: '>=6.9.0'} dev: true + /@isaacs/cliui/8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width/4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi/6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi/7.0.0 + dev: true + /@istanbuljs/load-nyc-config/1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -878,6 +892,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@pkgjs/parseargs/0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: true + optional: true + /@sinclair/typebox/0.25.24: resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} dev: true @@ -1363,6 +1384,12 @@ packages: concat-map: 0.0.1 dev: true + /brace-expansion/2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + /braces/3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -2153,6 +2180,14 @@ packages: resolve-dir: 1.0.1 dev: true + /foreground-child/3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: true + /fs-extra/11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} @@ -2254,6 +2289,18 @@ packages: ini: 1.3.8 dev: true + /glob/10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.6 + minimatch: 9.0.3 + minipass: 7.0.4 + path-scurry: 1.10.1 + dev: true + /glob/7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -2601,6 +2648,15 @@ packages: istanbul-lib-report: 3.0.0 dev: true + /jackspeak/2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: true + /jest-changed-files/29.5.0: resolution: {integrity: sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3255,6 +3311,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /lru-cache/10.1.0: + resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} + engines: {node: 14 || >=16.14} + dev: true + /lru-cache/5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -3344,6 +3405,13 @@ packages: brace-expansion: 1.1.11 dev: true + /minimatch/9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist-options/4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -3361,6 +3429,11 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true + /minipass/7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + /modify-values/1.0.1: resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} engines: {node: '>=0.10.0'} @@ -3578,6 +3651,14 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true + /path-scurry/1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.1.0 + minipass: 7.0.4 + dev: true + /path-type/3.0.0: resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} engines: {node: '>=4'} @@ -3875,6 +3956,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true + /signal-exit/4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + /sisteransi/1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: true @@ -4351,6 +4437,15 @@ packages: strip-ansi: 6.0.1 dev: true + /wrap-ansi/8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: true + /wrappy/1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true diff --git a/scripts/antlr4.js b/scripts/antlr4.js index f4bc40b..3d5f84f 100644 --- a/scripts/antlr4.js +++ b/scripts/antlr4.js @@ -4,6 +4,7 @@ const fs = require('fs'); const argv = require('yargs-parser')(process.argv.slice(2)); const inquirer = require('inquirer'); const chalk = require('chalk'); +const { cleanComment } = require('./cleanComment'); const grammarsPath = path.resolve(__dirname, '../src/grammar'); const outputPath = path.resolve(__dirname, '../src/lib'); @@ -29,7 +30,8 @@ function compile(language) { chalk.gray(err) ); } else { - console.log(chalk.greenBright(`\nCompile ${language} succeeded!`)); + cleanComment(language); + console.log(chalk.greenBright(`Compile ${language} succeeded!`)); } }); } diff --git a/scripts/cleanComment.js b/scripts/cleanComment.js new file mode 100644 index 0000000..2064b3e --- /dev/null +++ b/scripts/cleanComment.js @@ -0,0 +1,37 @@ +const fs = require('fs'); +const path = require('path'); +const { globSync } = require('glob'); +const chalk = require('chalk'); + +const basePath = path.resolve(__dirname, '../src/lib'); + +function processFile(filePath) { + try { + const content = fs.readFileSync(filePath, 'utf-8'); + const firstLineIdx = + content.indexOf('\r\n') === -1 ? content.indexOf('\n') : content.indexOf('\r\n'); + if (firstLineIdx === -1) return; + + let firstLineContent = content.slice(0, firstLineIdx); + const restContent = content.slice(firstLineIdx); + + const slices = firstLineContent.split('/src/grammar/'); + if (slices.length !== 2) return; + firstLineContent = `// Generated from dt-sql-parser/src/grammar/` + slices[1]; + + fs.writeFileSync(filePath, firstLineContent + restContent, 'utf-8'); + } catch (error) { + console.error(error); + } +} + +function main(language) { + const base = basePath + (language ? `/${language}` : ''); + console.info(chalk.green(`\nCleaning comment in:`, chalk.gray(`${base}/**/*.ts`))); + const filePaths = globSync(`${base}/**/*.ts`, { absolute: true, nodir: true }); + filePaths.forEach(processFile); +} + +module.exports = { + cleanComment: main, +}; diff --git a/scripts/cleanCommentCli.js b/scripts/cleanCommentCli.js new file mode 100644 index 0000000..6e8de32 --- /dev/null +++ b/scripts/cleanCommentCli.js @@ -0,0 +1,3 @@ +const { cleanComment } = require('./cleanComment'); + +cleanComment(); diff --git a/src/lib/flinksql/FlinkSqlLexer.ts b/src/lib/flinksql/FlinkSqlLexer.ts index 7a69ac4..4352b42 100644 --- a/src/lib/flinksql/FlinkSqlLexer.ts +++ b/src/lib/flinksql/FlinkSqlLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/flinksql/FlinkSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/flinksql/FlinkSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/flinksql/FlinkSqlParser.ts b/src/lib/flinksql/FlinkSqlParser.ts index e5be211..4c3e09a 100644 --- a/src/lib/flinksql/FlinkSqlParser.ts +++ b/src/lib/flinksql/FlinkSqlParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/flinksql/FlinkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/flinksql/FlinkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/flinksql/FlinkSqlParserListener.ts b/src/lib/flinksql/FlinkSqlParserListener.ts index 68c3399..058c267 100644 --- a/src/lib/flinksql/FlinkSqlParserListener.ts +++ b/src/lib/flinksql/FlinkSqlParserListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/flinksql/FlinkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/flinksql/FlinkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; diff --git a/src/lib/flinksql/FlinkSqlParserVisitor.ts b/src/lib/flinksql/FlinkSqlParserVisitor.ts index 12883f6..d455f20 100644 --- a/src/lib/flinksql/FlinkSqlParserVisitor.ts +++ b/src/lib/flinksql/FlinkSqlParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/flinksql/FlinkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/flinksql/FlinkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; diff --git a/src/lib/hive/HiveSqlLexer.ts b/src/lib/hive/HiveSqlLexer.ts index 5299dd7..3b5c930 100644 --- a/src/lib/hive/HiveSqlLexer.ts +++ b/src/lib/hive/HiveSqlLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/hive/HiveSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/hive/HiveSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/hive/HiveSqlParser.ts b/src/lib/hive/HiveSqlParser.ts index 9cb7f54..6cb3f53 100644 --- a/src/lib/hive/HiveSqlParser.ts +++ b/src/lib/hive/HiveSqlParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/hive/HiveSqlParserListener.ts b/src/lib/hive/HiveSqlParserListener.ts index e810b13..2a826da 100644 --- a/src/lib/hive/HiveSqlParserListener.ts +++ b/src/lib/hive/HiveSqlParserListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; diff --git a/src/lib/hive/HiveSqlParserVisitor.ts b/src/lib/hive/HiveSqlParserVisitor.ts index d93031c..4aab5a1 100644 --- a/src/lib/hive/HiveSqlParserVisitor.ts +++ b/src/lib/hive/HiveSqlParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/hive/HiveSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; diff --git a/src/lib/impala/ImpalaSqlLexer.ts b/src/lib/impala/ImpalaSqlLexer.ts index 61355a3..449ee95 100644 --- a/src/lib/impala/ImpalaSqlLexer.ts +++ b/src/lib/impala/ImpalaSqlLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/shuangxu/Documents/workspace/dt-sql-parser/src/grammar/impala/ImpalaSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/impala/ImpalaSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/impala/ImpalaSqlParser.ts b/src/lib/impala/ImpalaSqlParser.ts index 09d4df0..dc4ca1d 100644 --- a/src/lib/impala/ImpalaSqlParser.ts +++ b/src/lib/impala/ImpalaSqlParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/shuangxu/Documents/workspace/dt-sql-parser/src/grammar/impala/ImpalaSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/impala/ImpalaSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/impala/ImpalaSqlParserListener.ts b/src/lib/impala/ImpalaSqlParserListener.ts index d49081f..6cd267f 100644 --- a/src/lib/impala/ImpalaSqlParserListener.ts +++ b/src/lib/impala/ImpalaSqlParserListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/shuangxu/Documents/workspace/dt-sql-parser/src/grammar/impala/ImpalaSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/impala/ImpalaSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; diff --git a/src/lib/impala/ImpalaSqlParserVisitor.ts b/src/lib/impala/ImpalaSqlParserVisitor.ts index afc4b5a..b9b898a 100644 --- a/src/lib/impala/ImpalaSqlParserVisitor.ts +++ b/src/lib/impala/ImpalaSqlParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/shuangxu/Documents/workspace/dt-sql-parser/src/grammar/impala/ImpalaSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/impala/ImpalaSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; diff --git a/src/lib/mysql/MySqlLexer.ts b/src/lib/mysql/MySqlLexer.ts index 3a083d8..cc63b02 100644 --- a/src/lib/mysql/MySqlLexer.ts +++ b/src/lib/mysql/MySqlLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/liuyi/Desktop/Projects/dtstack/dt-sql-parser/src/grammar/mysql/MySqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/mysql/MySqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/mysql/MySqlParser.ts b/src/lib/mysql/MySqlParser.ts index 4cf2cb1..41b1c17 100644 --- a/src/lib/mysql/MySqlParser.ts +++ b/src/lib/mysql/MySqlParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/liuyi/Desktop/Projects/dtstack/dt-sql-parser/src/grammar/mysql/MySqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/mysql/MySqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/mysql/MySqlParserListener.ts b/src/lib/mysql/MySqlParserListener.ts index 078c3f1..a443a01 100644 --- a/src/lib/mysql/MySqlParserListener.ts +++ b/src/lib/mysql/MySqlParserListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/liuyi/Desktop/Projects/dtstack/dt-sql-parser/src/grammar/mysql/MySqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/mysql/MySqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; diff --git a/src/lib/mysql/MySqlParserVisitor.ts b/src/lib/mysql/MySqlParserVisitor.ts index cbb5261..d7b527a 100644 --- a/src/lib/mysql/MySqlParserVisitor.ts +++ b/src/lib/mysql/MySqlParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/liuyi/Desktop/Projects/dtstack/dt-sql-parser/src/grammar/mysql/MySqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/mysql/MySqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; diff --git a/src/lib/pgsql/PostgreSQLLexer.ts b/src/lib/pgsql/PostgreSQLLexer.ts index ec76681..8e8faa2 100644 --- a/src/lib/pgsql/PostgreSQLLexer.ts +++ b/src/lib/pgsql/PostgreSQLLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/xuxiaoqi/Documents/work/daishu-code/dt-sql-parser/src/grammar/pgsql/PostgreSQLLexer.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/pgsql/PostgreSQLLexer.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/pgsql/PostgreSQLParser.ts b/src/lib/pgsql/PostgreSQLParser.ts index ae88257..4b56b03 100644 --- a/src/lib/pgsql/PostgreSQLParser.ts +++ b/src/lib/pgsql/PostgreSQLParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/xuxiaoqi/Documents/work/daishu-code/dt-sql-parser/src/grammar/pgsql/PostgreSQLParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/pgsql/PostgreSQLParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/pgsql/PostgreSQLParserListener.ts b/src/lib/pgsql/PostgreSQLParserListener.ts index c62b5dc..c0b8cff 100644 --- a/src/lib/pgsql/PostgreSQLParserListener.ts +++ b/src/lib/pgsql/PostgreSQLParserListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/xuxiaoqi/Documents/work/daishu-code/dt-sql-parser/src/grammar/pgsql/PostgreSQLParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/pgsql/PostgreSQLParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; diff --git a/src/lib/pgsql/PostgreSQLParserVisitor.ts b/src/lib/pgsql/PostgreSQLParserVisitor.ts index 04ff5c9..466dd3a 100644 --- a/src/lib/pgsql/PostgreSQLParserVisitor.ts +++ b/src/lib/pgsql/PostgreSQLParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/xuxiaoqi/Documents/work/daishu-code/dt-sql-parser/src/grammar/pgsql/PostgreSQLParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/pgsql/PostgreSQLParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; diff --git a/src/lib/plsql/PlSqlLexer.ts b/src/lib/plsql/PlSqlLexer.ts index 2455aae..71ce5b0 100644 --- a/src/lib/plsql/PlSqlLexer.ts +++ b/src/lib/plsql/PlSqlLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/ziv/github.com/dt-sql-parser/src/grammar/plsql/PlSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/plsql/PlSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT import PlSqlBaseLexer from "./PlSqlBaseLexer"; diff --git a/src/lib/plsql/PlSqlParser.ts b/src/lib/plsql/PlSqlParser.ts index 969a7d5..edab52d 100644 --- a/src/lib/plsql/PlSqlParser.ts +++ b/src/lib/plsql/PlSqlParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/ziv/github.com/dt-sql-parser/src/grammar/plsql/PlSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/plsql/PlSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import PlSqlBaseParser from './PlSqlBaseParser'; diff --git a/src/lib/plsql/PlSqlParserListener.ts b/src/lib/plsql/PlSqlParserListener.ts index a657a35..ed8376d 100644 --- a/src/lib/plsql/PlSqlParserListener.ts +++ b/src/lib/plsql/PlSqlParserListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/ziv/github.com/dt-sql-parser/src/grammar/plsql/PlSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/plsql/PlSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import PlSqlBaseParser from './PlSqlBaseParser'; diff --git a/src/lib/plsql/PlSqlParserVisitor.ts b/src/lib/plsql/PlSqlParserVisitor.ts index 117470d..41aa3b0 100644 --- a/src/lib/plsql/PlSqlParserVisitor.ts +++ b/src/lib/plsql/PlSqlParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/ziv/github.com/dt-sql-parser/src/grammar/plsql/PlSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/plsql/PlSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import PlSqlBaseParser from './PlSqlBaseParser'; diff --git a/src/lib/spark/SparkSqlLexer.ts b/src/lib/spark/SparkSqlLexer.ts index bedacf3..4da7a98 100644 --- a/src/lib/spark/SparkSqlLexer.ts +++ b/src/lib/spark/SparkSqlLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/spark/SparkSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/spark/SparkSqlLexer.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/spark/SparkSqlParser.ts b/src/lib/spark/SparkSqlParser.ts index 72f3dbb..d47bd66 100644 --- a/src/lib/spark/SparkSqlParser.ts +++ b/src/lib/spark/SparkSqlParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/spark/SparkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/spark/SparkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/spark/SparkSqlParserListener.ts b/src/lib/spark/SparkSqlParserListener.ts index e85c015..00d4a0c 100644 --- a/src/lib/spark/SparkSqlParserListener.ts +++ b/src/lib/spark/SparkSqlParserListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/spark/SparkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/spark/SparkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; diff --git a/src/lib/spark/SparkSqlParserVisitor.ts b/src/lib/spark/SparkSqlParserVisitor.ts index 85a8b2e..800def7 100644 --- a/src/lib/spark/SparkSqlParserVisitor.ts +++ b/src/lib/spark/SparkSqlParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/spark/SparkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/spark/SparkSqlParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; diff --git a/src/lib/trinosql/TrinoSqlLexer.ts b/src/lib/trinosql/TrinoSqlLexer.ts index 539a7ad..62d164d 100644 --- a/src/lib/trinosql/TrinoSqlLexer.ts +++ b/src/lib/trinosql/TrinoSqlLexer.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/trinosql/TrinoSqlListener.ts b/src/lib/trinosql/TrinoSqlListener.ts index cfbcc62..f119705 100644 --- a/src/lib/trinosql/TrinoSqlListener.ts +++ b/src/lib/trinosql/TrinoSqlListener.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; diff --git a/src/lib/trinosql/TrinoSqlParser.ts b/src/lib/trinosql/TrinoSqlParser.ts index 6daf82a..2414db3 100644 --- a/src/lib/trinosql/TrinoSqlParser.ts +++ b/src/lib/trinosql/TrinoSqlParser.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; diff --git a/src/lib/trinosql/TrinoSqlVisitor.ts b/src/lib/trinosql/TrinoSqlVisitor.ts index ea6cfe4..1de4e51 100644 --- a/src/lib/trinosql/TrinoSqlVisitor.ts +++ b/src/lib/trinosql/TrinoSqlVisitor.ts @@ -1,4 +1,4 @@ -// Generated from /Users/hayden/Desktop/dt-works/dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from dt-sql-parser/src/grammar/trinosql/TrinoSql.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";