[kotlin] Clarify license for grammar

This commit is contained in:
Andreas Dangel
2022-06-30 15:27:09 +02:00
parent bd1f7271ce
commit b38c8969ac
6 changed files with 32 additions and 2 deletions

View File

@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
/**
* Kotlin syntax grammar in ANTLR4 notation
*/

View File

@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
/**
* Kotlin lexical grammar in ANTLR4 notation
*/

View File

@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
ShebangLine=1
DelimitedComment=2
LineComment=3

View File

@ -1,8 +1,33 @@
# Kotlin Grammar
Release: <https://github.com/Kotlin/kotlin-spec/releases/tag/v1.6-rfc%2B0.1>
Source: <https://github.com/Kotlin/kotlin-spec/tree/v1.6-rfc%2B0.1/grammar/src/main/antlr>
The grammar files for Kotlin are taken from <https://github.com/Kotlin/kotlin-spec>, released under the
Apache License, Version 2.0:
```
Copyright 2000-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
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.
```
The grammar files still use the Apache License, but are slightly modified.
All other files in this PMD module are licensed under BSD.
## Currently used version
* Release: <https://github.com/Kotlin/kotlin-spec/releases/tag/v1.6-rfc%2B0.1>
* Source: <https://github.com/Kotlin/kotlin-spec/tree/v1.6-rfc%2B0.1/grammar/src/main/antlr>
### Modifications
Some modifications are made in KotlinParser.g4:

View File

@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
/**
* Kotlin lexical grammar in ANTLR4 notation (Unicode classes)
*

View File

@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
UNICODE_CLASS_LL=1
UNICODE_CLASS_LM=2
UNICODE_CLASS_LO=3