The Amy Reference Compiler
We provide you with a reference compiler for the Amy language that you can use to explore the expected behavior of your own compiler.
The reference compiler is available here.
You can run it as follows:
java -cp amyc_2.12-1.6.jar amyc.Main [options] [input files]
To see the list of available options do
java -cp amyc_2.12-1.6.jar amyc.Main --help
The easiest way to execute a program is to run it in
-interpret mode. If you want to generate WebAssembly binary code, you should follow these steps:
- Make sure the
wat2wasmexecutable is visible, i.e. it is in the system path or, for Linux or Mac, you are at the toplevel of the
amycdirectory (we don't have a compiled version for Windows yet, so you would have to download and compile it yourself for now)
npm install deasyncat the directory you plan to run
amycwithout options. You will get a few output files.
nodejs <output file>.js
We welcome bug reports! Please use the forum on Moodle for this purpose.