UMBC CMSC431, Compiler Design Principles, Fall 2009


Project 4

Due: Monday, October 26, 2009, 12:00pm (noon)


Objective

This project continues to expand the features available in your programming language. You will add conditional statements and control structures to your language.


Assignment

Add the following features to your programming language:
  1. A Boolean type for variables and Boolean constants for true and false.
  2. Boolean operations (and, or, not).
  3. Relational operators (less than, less than or equal to, equals, not equals, greater than or equal to, greater than) for integer and floating point expressions.
  4. If statements.
  5. While loops.


Implementation Notes


Submitting Your Project

We will use a new repository for Project 4. You should first use CVS to check-out Project 4. cvs -d /afs/umbc.edu/users/c/h/chang/pub/cs431f09/Proj4 checkout -d MyProj4 user1 Then, use cvs add and cvs commit to check-in any files that you have copied over from Project 3 (and any other files that you want to submit). Since your programming language is looking more like a real programming language and less like a calculator, this is a good time to rename your expr.l and expr.y files.

Include in your submission some test programs that demonstrate your implementation of Boolean expressions, if statements and while loops. Your test programs should show that your compiler can handle multiply nested if statements and while loops.


Last Modified: 22 Jul 2024 11:27:41 EDT by Richard Chang
to Fall 2009 CMSC 431 Homepage