Due: November 4
In this course you will be developing an interpreter for a high-level
language, called HL, which manipulates polynomials symbolically.
In this assignment you will be using JavaCC and JJTree
to build HL's parser.
This should familiarize you with the use of compiler generators
and the LL(1) parsing process.
Part 1 - Grammar Manipulation
Grammar for the HL language
to make it LL(k).
Since you will ultimately build an interpreter for HL rather than a compiler,
the starting non-terminal for this grammar is either a statement or an expression
rather than an entire program.
Note that you will encounter some difficult challenges in this process.
They are nearly all manageable by manipulating the grammar.
However, there are a few problems that make it impossible to make the grammar LL(k).
You will deal with these problems in part 2.
Testing the assignment
Please check the
Assignment 2 Test Page
for a description of how your assignment will be tested and marked.
How to submit the assignment
- Zip up together HL.jjt into A2.zip.
We are using a script to grade you, please use exact names listed here, including A2.zip
- If you have modified any .java files, also include them in A2.zip
with the proper directory structure.
Make sure that the test scripts described in the
Assignment 2 Test Page works with no modifications.
- Submit electronically A2.zip
- Print, fill out, and hand in the marking sheet (
This page is maintained by
Wednesday, 02-Nov-2016 01:43:47 EDT