Skip to content

mschoema/AmyCompiler

Repository files navigation

AmyCompiler

Computer Language Processing Project

This is a compiler for the Amy language with the addition of arrays and range types to the language.

A report of the final project can be found here

Getting Started

Prerequisites

To run the code, you will need Java 8 running on your system and a build tool for scala.

sbt, the default build tool for scala can be downloaded here.

To run the compiled code, you will need to download nodejs here. Make sure you have nodejs 8 or later by running nodejs --version Make sure the wat2wasm executable is visible, i.e. it is in the system path or in AmyDirectory/bin/ and you are in AmyDirectory.

Running the code

After downloading the code, go to AmyCompiler directory and start sbt. Now you can compile any Amy program by typing the following code inside sbt:

run extraDirectory\extraFileName.scala programDirectory\programName.scala

You can add as much extra files as needed.

To run the compiled code, simply write the following code in another teminal (not in sbt):

nodejs wasmout\programName.js

Example programs

Example Amy programs can be found under examples and Amy libraries used in some of these programs can be found under library

A few examples demonstrate the use of the added features:

Authors

About

Computer Language Processing Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages