Home
  Contact
  Short Vita
  Research
  Teaching
  LSDIS Lab
  Links

Programming Project: Part 2 [85 pts.]

Due: April 2, 2010

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

  1. Implement a parser for Micro-Pascal. [due: February 28; 35 pts]

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

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

  2. Implement a semantic analyzer for Micro-Pascal. [due: April 2; 50 pts]

    You should implement a symbol table and add semantic verification actions to your existing parser, constructed in point A. Testing will be done on a variety of correct and incorrect Micro Pascal programs, emphasizing syntactically correct, but semantically incorrect programs.

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

Submit (using submit) the directory containing your parser, including all source files, executables, and explanations. In case you are implementing your project in Java, you must provide a shell script invoking the Java interpreter with proper arguments (in this case, the shell script must be called upc).

You should submit it to the user csx570.

Late programs WILL NOT be accepted.