- Use
cp -rf *.*
to copy all of the files and directories in this repository to the starter repository for this assignment - Change into the directory for the starter repository
- Update the header (
#
) to only give the name of the assignment - Update the text below according to the
UPDATE
comment tags - Comment out or delete this task list, and any other development notes
- Create the assignment in the GitHub Classroom, noting the URL
- Test the assignment by accepting it with your own GitHub account
- Check to ensure that your GitHub repository is created correctly
- Share the assignment link with all of the students using email or Slack
- Contact Gregory M. Kapfhammer by email or Slack
- Raise an issue in the GitHub repository
Designed for use with GitHub Classroom, this repository contains an example assignment for use with GatorGrader and GatorGradle. Since the Travis builds for this repository will initially fail (as evidenced by a red ✗ appearing in the commit logs instead of a green ✔), the programmer is responsible for completing all of the steps needed to satisfy the requirements for the assignment, thus causing a ✔ to instead appear in the commit logs.
For this lab assignment you will extend your Decaf compiler to handle the syntax analysis phase, the second task of the front-end, by using bison to create a parser. The parser will read Decaf source programs and construct a parse tree. If no syntax errors are encountered, your code will print the completed parse tree as flat text. At this stage, you are not responsible for verifying meaning, just structure.
The goal of this lab is to familiarize you with the tools and give you experience in solving typical problems one encounters when using them to generate a parser. By conducting experiments using a compiler known to you, and by conducting a comparitive analysis of those results, you will learn how to handle the errors in your own compiler.
When you use the git commit
command to transfer your source code to your
GitHub repository, Travis CI will initialize a build
of your assignment, checking to see if it meets all of the requirements. If both
your source code and writing meet all of the established requirements, then you
will see a green ✔ in the listing of commits in GitHub. If your
submission does not meet the requirements, a red ✗ will appear instead.
The instructor will reduce a programmer's grade for this assignment if the red
✗ appears on the last commit in GitHub immediately before the
assignment's due date.
A carefully formatted assignment sheet for this project provides more details about the steps that a computer scientist should take to complete this assignment. You can view this assignment sheet by visiting the listing of laboratories on the course web site.
If you have not done so already, please read all of the relevant GitHub Guides that explain how to use many of the features that GitHub provides. In particular, please make sure that you have read the following GitHub guides: Mastering Markdown, Hello World, and Documenting Your Projects on GitHub. Each of these guides will help you to understand how to use both GitHub and GitHub Classroom.
To get started in using the GatorGrader tool, you must change into the directory
for this assignment. Then, if you want to perform all of the checks that will
automatically evaluate your assignment, you can type the command gradle grade
.
Running this command will produce a lot of output that you should carefully inspect. If the last line of the output indicates that GatorGrader judges that there are no mistakes in the assignment, then this means that your source code and writing are passing all of the automated checks. However, if the last line of the output indicates that there are mistakes, then you will need to understand what they are and then try to fix them.
You can also complete several other important Java programming tasks by using
the gradle
tool. For instance, you can compile (i.e., create bytecode from the
program's source code if it is a correct program) the program using the command
gradle build
. There are also additional commands that you can type:
gradle clean
: clean the project of all the derived filesgradle check
: check the quality of the code using Checkstylegradle build
: create the bytecode from the Java source codegradle run
: run the Java program in the command-linegradle cleanTest
: clean the JUnit test suite of derived filesgradle test
: run the JUnit test suite and produce reportgradle tasks
: display details about the Gradle system
To run one of these commands, you must be in the home directory for this
assignment where the build.gradle
file is located. Then, you can type the
command in the terminal and study the output.
Typing the command gradle run
in the terminal window produces the following
output for the instructor's version of samplelab.SampleLabMain
.
Some sample output should be included here.
In addition to making the checks that are mentioned in the introduction to this document, your final submission must meet the following requirements.
The checks enabled in config/gatorgrader.yml
should be detailed here.
If the course instructor updates the provided material for this assignment and you would like to receive these updates, then you can type this command in the main directory for this assignment:
git remote add download git@github.com:GatorEducator/cpp-assignment-starter.git
You should only need to type this command once; typing the command additional times may yield an error message but will not negatively influence the state of your repository. Now, you are ready to download the updates provided by the course instructor by typing:
git pull download master
This second command can be run whenever the course instructor needs to provide you with new source code for this assignment. However, please note that, if you have edited the files that the course instructor updated, running the previous command may lead to Git merge conflicts. If this happens, you may need to manually resolve them with the help of the instructor or a teaching assistant.
This assignment uses Travis CI to automatically run the grading checks every time you commit to your GitHub repository. The checking will start as soon as you have accepted the assignment, thus creating your own private repository, and the course instructor enables Travis for it. If you are using Travis for the first time, you will need to authorize Travis CI to access the private repositories that you created on GitHub.
Submit your entire parser using your git repository for this course. Be sure to include your Reflection file, which is your chance to explain your design decisions and why you believe your program to be correct and robust, as well as describe what to expect from your submission and its error handling.
If you have found a problem with this assignment's provided source code, then you can go to the GatorGrader Sample Assignment repository and create an issue by clicking the "Issues" tab and then clicking the green "New Issue" button. If you have found a problem with the GatorGrader tool and the way that it checks your assignment, then you can follow the aforementioned steps to create an issue in its repository. To ensure that your issue is properly resolved, please provide as many details as is possible about the problem that you experienced. If you discover a problem with the laboratory assignment sheet, then please raise an issue in the course-sheets repository and mention this assignment.
Students who find, and use the appropriate GitHub issue tracker to correctly document, a mistake in any aspect of this laboratory assignment will receive free laptop stickers and extra credit towards their grade for it.
If you are having trouble completing any part of this project, then please talk with either the course instructor or a teaching assistant during the laboratory session. Alternatively, you may ask questions in the Slack team for this course. Finally, you can schedule a meeting during the course instructor's office hours.