Skip to content

Rinha interpreter for "Rinha de Compiladores" using Kotlin Native

License

Notifications You must be signed in to change notification settings

lucasnlm/rinha-compiler-kotlin

Repository files navigation

banner

Kotlin Rinha Interpreter

About

Rinha interpreter is an interpreter for the "Rinha de Compiladores". You can read more about it here.

How to build

This project was built using Kotlin Native and better-parse to implement the Rinha grammar.

To build the project, you can use the following command:

./gradlew nativeBinaries

You can edit / build it using IntelliJ IDEA.

How to use

To run the interpreter, you can use the following command:

./rinhak files/print.rinha # or print.json to use the AST file

You can also run the interpreter directly using REPL:

./rinhak repl

Help

You can use the following command to see the help:

./rinhak help
Kotlin Rinha Interpreter
  Usage: rinhak [options] [source file]
  Options:
      help          Show this help message and exit.
      repl          Run the REPL.
      rinha         Run on Rinha mode.
      <file.json>   Run from AST file. E.g: rinhak test.json
      <file.rinha>  Run from Rinha file. E.g: rinhak test.rinha

Tests

To run the tests, you can use the following command:

./gradlew allTests

Docker

You can also use the docker image to run the interpreter.

docker build -t "rinha:Dockerfile" .
docker run -it rinha:Dockerfile

About

Rinha interpreter for "Rinha de Compiladores" using Kotlin Native

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages