This is the provided git repository for the WACC compilers lab. You should work in this repository regularly committing and pushing your work back to GitLab.
test line.
The project directory contains the build.properties
and plugins.sbt
files
used by SBT:
build.properties
: sets which version of SBT will be used for the projectplugins.sbt
: adds plugins to SBT, by default you probably wantsbt-assembly
, which can be used to compile "Fat Runnable Jars", and then I've addedsbt-git
as well, which is handy in that it allows you to rungit
commands directly in a runningsbt
session. Using a fat jar is useful, as it doesn't require any classpath magic when running the program -- all dependencies are packaged within the jar.
The src/main directory is where you code for your compiler should go, and just contains a README and a stub hello world file with a simple calculator inside.
The src/test directory is where you should put the code for your tests, which
can be ran via sbt test
. The suggested framework is scalatest
, the dependency
for which has already been included.
The build.sbt
is the definition of your project's build requirements. By default,
this template has added the latest stable versions of both scalatest
and parsley
to the build: you should check regularly to see if your parsley
needs updating
during the course of WACC!
The compile script can be edited to change the frontend interface to your WACC compiler. You are free to change the language used in this script, but do not change its name.
Your Makefile should be edited so that running 'make' in the root directory
builds your WACC compiler. Currently running 'make' will call the sbt compile
and then sbt assembly
commands, which will build a wacc-42-compiler.jar
in the root directory of the project.