Projects:

Project 2: RPal Parser

Remember:

Goals:

The objective of this second project is to implement the sub-tree (partial) standardizer, and the 13-rule CSE machine. The specifications are in the class notes, and have been discussed in detail in class. You can simply extend your previous project. Make sure your previous project works on all the test cases!

Regarding grading and submission

  1. Put in a BUGS file all comments of known errors (if any) of your project. It is MUCH better for you to list the limitations of your software than to let us discover them. The more time it takes for us to find what's wrong with your program, the larger the portion of credit WE (and not you) earn. In short, you must make it easy for us to examine your program.
  2. Your output should match the corresponding output for each one of the test programs.
  3. Grading strategy: To grade your project, we will run your program on each of the test programs, and we will compare your output with the correct one. Full credit will be given a perfect match in every case.
  4. Executable Name: p2. Include a make file in your submission.

    You must provide a makefile to build this project. We will compile your program by invoking: make

    we will then test p2 by invoking it as follows:

    p2 testprog1

    p2 testprog2

    ..

    Notice that the input is NOT standard input (stdin), but instead a command-line parameter.

    Examples:

    p2 -l /cis/homes/manuel/systems/pal/tests.rpal/trees

    p2 -ast /cis/homes/manuel/systems/pal/tests.rpal/Treepicture

  5. p2 (without switches) should produce the result of the program.

    Required switches: -ast This switch prints the abstract syntax tree, and nothing else. No headers or footers. The AST must match exactly, character for character, the AST produced by rpal.

    Optional switches: -l This produces a listing of the input.

  6. It must be possible to run p2 from ANY directory: ~user/cop5555/p2 testfile

We won't be checking your standardized tree. We assume that if your interpreter correctly executes the RPAL program, the standardizer is correct.

Electronically submit a single jar or zip file by CourseWorX. The deadline for this project is TBA at midnight. Make sure you submit before TBA. Any questions about the homework or CourseWorX, email any TA.