Home
  Contact
  Short Vita
  Research
  Teaching
  LSDIS Lab
  Links

Programming Project: Part 2 [85 pts.]

Due: March 2, 2011; April 2, 2011

In this assignment you will implement a parser and a semantic analyzer for µ-C. The assignment is split into two parts, as explained below.

A. Implement a parser for µ-C. [due: March 2; 35 pts]

Create a YACC (or Bison) specification for µ-C. Implement a parser for µ-C (using your own Lex/Flex scanner for µ-C).

You should start with a parser which handles only correct programs and then add a mechanism for error detection and recovery. Testing will be done on a mix of syntactically correct and incorrect programs.

B. Implement a semantic analyzer for µ-C. [due: April 2; 50 pts]

Enhance your parser created in part a) by adding the semantic analyzer. You must implement a symbol table mechanism and add semantic verification actions to your existing parser. Testing will be done on any Micro C programs, emphasizing syntactically correct but semantically incorrect programs.

Your executable program MUST be called ucc and it MUST accept the source program file name from the command line. The source program file name MUST have the suffix .c.

Submit (using submit) the directory containing your parser on odin to user csx570.