Compilers and Language Design Course at the University of Notre Dame
To ensure a consistent environment between development and grading,
please use the standard CSE student machines (RHEL8) to build and test your code.
These machines are using gcc-8.5.0, flex-2.6.1, and bison-3.0.4.
Use which gcc
to double check that you are using the standard /usr/bin/gcc
and have not otherwise modified your PATH for another class.
To ensure that you get off on the right fit (and we are able to understand your code)
you will be required to use the standard starter code
which defines structures like decl
, expr
and so forth. You are welcome to add files,
fields, and functions as you like, as long as the general purpose of these structures remains.
Your code must include a Makefile
such that when you type make
, the entire compiler (so far)
is built and produces a program called bminor
. Each assignment page will specify what arguments are required to call it.
Likewise, make clean
should remove all intermediate object files, automatically generated code, and so forth.
Git is a version control tool that allows you to save and collaborate on programming projects. In Git, your code is saved in two different locations–the local copy and the remote copy.
Step One: Remote Copy. 1) First make sure you are logged into Github then go to the starter code and click the green “use this template” button. If you don’t see the button you likely aren’t logged in.
2) Use your netid followed by whatever you’d like as the repository name. Here is an example: nziems2-compiler
3) Make sure your repository is PRIVATE not public, then click the green “Create repository from template” button.
5) Go into your repository settings on the right side of the screen then click on “Collaborators”. Add both me and Dr. Thain as contributors. Our usernames are dthain
and ziems
.
7) Go back to the repository main page and click the green “code” button then copy the URL under the “SSH” tab. The URL should look something like this:
git@github.com:Ziems/nziems2-compiler.git
. If you see a yellow box asking you to create public ssh keys, follow the instructions to do so.
6) Open slack and reply to Noah’s post in the class channel with a link to your repository(the url you copied)
Step Two: Local Copy. 1) In a terminal, navigate where you’d like the project directory to be.
2) Using the url you copied run the following command. Because the repository is private you will have to enter your GitHub username and password:
git clone <url>
3) Navigate into the directory and open the README.md file with your favorite text editor. Make a change to the title then save the file.
4) In your terminal run git add README.md
5) Run git commit -m "Edit readme"
6) Run git push -u origin master
1) Make sure that all files that you have changed are added with git add
, committed with git commit
, and pushed with git push
.
2) Go back to the link of your github repository. Make sure you refresh your page. If everything went well you should see all of your changes.
3) On the righthand side under “Releases”, click “Create new release”
3) Click “Choose a new tag”, type “scan” (or “parse”, “print”, “typecheck” or “codegen” for later assignments) then click “Create new tag”
4) Click “Publish release” at the bottom and you’re done!
There are two ways to check your submission: on GitHub and locally.
To double check your submission on GitHub, you can navigate to the repository on GitHub and make sure the files you changed locally are also changed on GitHub.
To double check your submission locally:
1) Copy the url of your GitHub repository
2) In a terminal, navigate where you’d like the clean project directory to be
3) With a new name for the repository, run git clone <url>
. If a directory with the repository name already exists, you’ll have to run git clone <url> <name>
where <name>
is a different from the original repository name.
4) Navigate into your newly cloned repository and double check that your code builds, runs, and passes all the tests.