Skip to content

Latte language native compiler written in Kotlin for Compilers Construction course

Notifications You must be signed in to change notification settings

avan1235/latte-compiler

Repository files navigation

Latte Compiler

Tests badge Build badge Github All Releases

Latte 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 to build compiler from Kotlin sources and run Gradle in Java 11 environment
  • gcc with gcc-multilib to compile 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 as testing framework for tests launching and model
  • antlr as parser generator framework (with Gradle plugin)
  • gradle-graal for using GraalVM from Gradle to generate native binaries