https://github.com/avan1235/latte-compiler
Latte language native compiler written in Kotlin for Compilers Construction course
https://github.com/avan1235/latte-compiler
compilers compilers-design kotlin studies
Last synced: 8 months ago
JSON representation
Latte language native compiler written in Kotlin for Compilers Construction course
- Host: GitHub
- URL: https://github.com/avan1235/latte-compiler
- Owner: avan1235
- Created: 2021-12-26T18:05:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T11:23:57.000Z (over 3 years ago)
- Last Synced: 2025-04-14T00:49:16.539Z (about 1 year ago)
- Topics: compilers, compilers-design, kotlin, studies
- Language: Kotlin
- Homepage: https://procyk.in/tags/latte
- Size: 411 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Latte Compiler
[](https://img.shields.io/github/actions/workflow/status/avan1235/latte-compiler/test.yaml?branch=master)
[](https://img.shields.io/github/actions/workflow/status/avan1235/latte-compiler/build-native.yaml?branch=master)
[](https://github.com/avan1235/latte-compiler/releases/latest)
[Latte](https://latte-lang.org/) is originally a JVM language that is fully interoperable with Java.
This project implements a native x86 compiler for this language with no support for interoperability with other
languages but tries to provide an optimized version of native version of this language.
## Building project
### Project requirements
To build project you need:
- [Java 11](https://adoptopenjdk.net/) to build compiler from Kotlin sources and run Gradle in Java 11 environment
- [gcc](https://gcc.gnu.org/) with `gcc-multilib` to compile [runtime.c](./lib/runtime.c) library file in x86 version
### Build commands
#### Make
- `make latte` compiles project and produces `latc_x86` binary in project directory
- `make test` runs unit tests defined in project
- `make clean` cleans build files
#### Gradle
- `./gradlew nativeImage` compiles project and produces `latc_x86` binary in project directory
- `./gradlew test` runs unit tests defined in project
## Compile-time dependencies
- [junit](https://junit.org/junit5/) as testing framework for tests launching and model
- [antlr](https://www.antlr.org/) as parser generator framework (with Gradle plugin)
- [gradle-graal](https://github.com/palantir/gradle-graal) for using GraalVM from Gradle to generate native binaries