CS365 Project


Project Assignments

  1. Lexical Analyzer.
  2. Parser.
  • Formula Interpreter. Due Fri. Mar 30 at 11:59PM. Hints for implementing project 3.

  • Spreadsheet Interpreter. Due Fri. April 13 at 11:59PM.

  • Spreadsheet Interface. Due Sun. April 29 at 11:59PM. If you want to use my parser and interpreter files for this part of the project, look at my documentation.


    Late Policy

    Your team will lose 10 points for each day that your project is late up to 3 days. After 3 days you will receive a 0 for that assignment.


    Project Description

    Your team is going to build a spreadsheet application. The spreadsheet will have numbered rows and labeled columns. For example, the columns might be labeled "student", "midterm1", "midterm2", "final", "weighted_grade" and the rows will be numbered 1, 2, 3, etc.

    Formulas may consist of ordinary, parenthesized arithmetic expressions that are found in C or Java. Formulas may also have simple conditional expressions and may call a summation function.

    Formulas will be entered in a labeled text box and will look like an assignment statement. For example:

    weighted_grade = .3 * (midterm1 + midterm2) + .4 * final
    
    The results will be displayed in the appropriate cell in the spreadsheet. A user will be able to view the formula associated with a cell by mouse clicking on the cell. Doing so will cause the cell's formula to be displayed in the formula text box.

    Your group will design and implement the spreadsheet via the following project assignments:

    1. Write a lexical scanner in JLex that produces tokens from the user-entered formulas,
    2. Write a parser in JCup that parses the user-entered formulas and converts the formula expressions to expression trees,
    3. Implement a graphical user interface for the cells and the formula text box,
    4. Write an interpreter that interprets the expression trees, and
    5. Write a formula solver that automatically re-evaluates all formulas that directly or indirectly depend on a changed cell.