Skip to content

sanchewy/Compilers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semester-long ANTLR-4 compiler project for CSCI-468

Introduction

This project consists of implementing a simple compiler for the so called LITTLE programming language . The LITTLE language is a toy programming language designed solely for this course and it's based (however different!) on the MICRO language described in the recommended text book.

Project Assistance

GTA will be answering questions about the project steps during "open" lab hours or by appointment. You can post questions on the D2L discussion forum (never post/share code!). GTA will answer those questions during the office hours (see "Course Details" for the office hours).

Project Steps

Project steps are as follows:

Step 1 - Scanner (~2 weeks) Step 2 - Parser (~3 weeks) Step 3 - Symbol Table (~3 weeks) Step 4 - Semantic actions and Code generation (~4 weeks) Building your compiler

While in the real world, you can write your compiler in any language you would like, using any toolkits you have access to, we use a dedicated online compiler generator framework called OCF (http://oxiago.com/compiler/msu/) in the course. OCF uses ANTLR (http://www.antlr.org) as its back-end. ANTLR is a state-of-the-art Java-based compiler generation toolkit (ANTLR can also be used with some other languages including python). Regardless of the programming language you choose to build your compiler, GTA will only provide conceptual help regarding implementation (i.e. no technical support for debugging any code).

OCF has test cases (inputs/outputs) for each step built-in. You will know how your code works on-the-fly!

Project Report + Portfolio

The report should detail the implementation of the compiler. It should have the structure of a typical scientific paper composed of an introduction, background, Methodology (data/method/tools etc), Results and discussion, Future work, References, etc. It should consist of 10-15 pages. Recommended template for the project report is given under the "Report template" tab. You are expected to work together and submit just one final report per group.

Project report is worth 100 points. It should be written in a progressive manner. The latest version of the report should be uploaded during each step. For example, at the end of step 1, the section on "Scanner" (3.a) should be complete (mandatory page limit requirement for 3.a is min. 2 pages). Failure to do so may lead to deduction of points.

The portfolio is a mandatory requirement by the department (for all capstone courses). It is due along with the final version of your report (at step 4 deadline). Template for the portfolio is given under the "Portfolio template" tab. There is no specified length. You are expected to work together and submit just one portfolio per group.

Submission Instructions

Code: there is nothing to submit. When you complete your program/code on OCF, they will be auto-graded by the system. OCF uses the Unix "diff -b" command to compare the output from your code with the expected outputs.

Report and portfolio: use the D2L assignments folders for submission.

Grading Policy

All the points from the Steps 1-4 steps add up to 400 points are worth total 80% of the project's total grade. Any submission may be tested against a set of hidden datasets. The final report is worth 20% of the project's grade.

About

ANTLR-4 Compiler for the 'Little' Language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published