The project is no longer supported. Please refer to the Kotlin Language Specification to get the most relevant Kotlin grammar version.
ANTLR4 grammar for Kotlin written only in ANTLR's special syntax. Developed to facilitate the implementation of the language in other projects.
The primary files are in the grammars folder:
- KotlinParser.g4 - parser rules
- KotlinLexer.g4 - lexer rules
- UnicodeClasses.g4 - lexer grammar containing made Unicode classes from the source
Lexer and parser grammars are divided for the use of lexer modes.
All issues are described in TODO.txt.
After generating lexer and parser with ANTLR4 tool you can test the grammar running testing\Test.java. Test data can be taken from the JetBrains's repo.
Some other usages of generated files are in the examples folder.
Licensed under the Apache 2.0
Anastasiya Shadrina [email protected]