feat: declare copyright ownership

This commit is contained in:
hayden 2023-09-27 17:28:41 +08:00 committed by Hayden
parent 623a004cd1
commit b8c47d0ac9
10 changed files with 70 additions and 12 deletions

View File

@ -23,6 +23,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
/**
* This file is an adaptation of antlr's grammars-v4/sql/mysql/Positive-Technologies/MySqlLexer.g4 grammar.
* Reference: https://github.com/antlr/grammars-v4/blob/master/sql/mysql/Positive-Technologies/MySqlLexer.g4
*/
lexer grammar SqlLexer; lexer grammar SqlLexer;
channels { MYSQLCOMMENT, ERRORCHANNEL } channels { MYSQLCOMMENT, ERRORCHANNEL }

View File

@ -23,6 +23,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
/**
* This file is an adaptation of antlr's grammars-v4/sql/mysql/Positive-Technologies/MySqlParser.g4 grammar.
* Reference: https://github.com/antlr/grammars-v4/blob/master/sql/mysql/Positive-Technologies/MySqlParser.g4
*/
parser grammar SqlParser; parser grammar SqlParser;
options { tokenVocab=SqlLexer; } options { tokenVocab=SqlLexer; }

View File

@ -14,6 +14,12 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/**
* This file is an adaptation of antlr's grammars-v4/sql/hive/v4/HiveLexer.g4 grammar.
* Reference: https://github.com/antlr/grammars-v4/blob/master/sql/hive/v4/HiveLexer.g4
*/
lexer grammar HiveSqlLexer; lexer grammar HiveSqlLexer;
// unsupported option caseInsensitive in antlr4@4.9 // unsupported option caseInsensitive in antlr4@4.9

View File

@ -14,6 +14,12 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/**
* This file is an adaptation of antlr/grammars-v4's sql/hive/v4/HiveParser.g4 grammar.
* Reference: https://github.com/antlr/grammars-v4/blob/master/sql/hive/v4/HiveParser.g4
*/
parser grammar HiveSqlParser; parser grammar HiveSqlParser;
options options

View File

@ -1,8 +1,3 @@
/*
based on
https://github.com/tunnelvisionlabs/antlr4-grammar-postgresql/blob/master/src/com/tunnelvisionlabs/postgresql/PostgreSqlLexer.g4
*/
/* /*
* [The "MIT license"] Copyright (C) 2014 Sam Harwell, Tunnel Vision Laboratories, LLC * [The "MIT license"] Copyright (C) 2014 Sam Harwell, Tunnel Vision Laboratories, LLC
* *
@ -23,8 +18,16 @@
* other dealings in this Software without prior written authorization from Tunnel Vision * other dealings in this Software without prior written authorization from Tunnel Vision
* Laboratories, LLC. * Laboratories, LLC.
*/ */
/**
* This file is an adaptation of tunnelvisionlabs's antlr4-grammar-postgresql/src/com/tunnelvisionlabs/postgresql/PostgreSqlLexer.g4 grammar.
* Reference: https://github.com/tunnelvisionlabs/antlr4-grammar-postgresql/blob/master/src/com/tunnelvisionlabs/postgresql/PostgreSqlLexer.g4
*/
lexer grammar PostgreSQLLexer; lexer grammar PostgreSQLLexer;
/* Reference: http://www.postgresql.org/docs/9.3/static/sql-syntax-lexical.html
/**
* Reference Doc: http://www.postgresql.org/docs/9.3/static/sql-syntax-lexical.html
*/ */
options { options {

View File

@ -18,6 +18,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* This file is an adaptation of antlr's grammars-v4/sql/plsql/PlSqlLexer.g4 grammar.
* Reference: https://github.com/antlr/grammars-v4/blob/master/sql/plsql/PlSqlLexer.g4
*/
lexer grammar PlSqlLexer; lexer grammar PlSqlLexer;
options { options {

View File

@ -18,6 +18,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* This file is an adaptation of antlr's grammars-v4/sql/plsql/PlSqlParser.g4 grammar.
* Reference: https://github.com/antlr/grammars-v4/blob/master/sql/plsql/PlSqlParser.g4
*/
parser grammar PlSqlParser; parser grammar PlSqlParser;
options { options {

View File

@ -1,5 +1,3 @@
// Grammar file from: https://github.com/apache/spark/blob/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseLexer.g4
/* /*
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -13,7 +11,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
* *
* This file is an adaptation of Presto's presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 grammar. */
/**
* This file is an adaptation of spark's spark/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseLexer.g4 grammar.
* Reference: https://github.com/apache/spark/blob/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseLexer.g4
*/ */
lexer grammar SparkSqlLexer; lexer grammar SparkSqlLexer;

View File

@ -1,5 +1,3 @@
// Grammar file from: https://github.com/apache/spark/blob/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4
/* /*
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -13,7 +11,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
* *
* This file is an adaptation of Presto's presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 grammar. */
/**
* This file is an adaptation of spark's spark/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4 grammar.
* Reference: https://github.com/apache/spark/blob/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4
*/ */
parser grammar SparkSqlParser; parser grammar SparkSqlParser;

View File

@ -1,3 +1,22 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This file is an adaptation of trino's trino/core/trino-parser/src/main/antlr4/io/trino/sql/parser/SqlBase.g4 grammar.
* Reference: https://github.com/trinodb/trino/blob/385/core/trino-parser/src/main/antlr4/io/trino/sql/parser/SqlBase.g4
*/
grammar TrinoSql; grammar TrinoSql;
tokens { tokens {