Chapter 6: Bottom-Up Parsing


Getting Started (5 minutes)

In each of the following sections, go as far as you can in the time allotted, but move on to the next section so you'll have a chance to work on each section while in studio.

Warm Up: (10 minutes)

  1. Read/review the following
  2. Open the CUP User Manual for quick reference.
  3. Follow the instructions for ant builds.
    Not much will be working at this point, and most runs will die in CUP showing Java Error: 100.

    • As you work on each of the problems below, simply rerun the ant build, and the results will be displayed on the console. (Recall you can click on the toolbox green button to rerun the build.)
    • If things seem to be messed up, run the clean task followed by the default (run) build, and that should fix any problems.
    • If you need to see the states computed by parser construction, look for the relevant file in the outermost autogen folder of your project,

Main Problems

This is a short grammar you'll type in yourself by now, having followed the warm-up instructions above.
Follow the instructions in the grammar file -- be sure to check your work with another group and the TA or prof.
Follow the instructions, ask questions as needed, check your answers with other groups and the TA or prof.
Some lines of this file are NOT to be modified -- check this out before you start changing things. Follow the instructions, but ask questions and check your work as you go with others.
Same deal -- ambiguous, not? Figure it out and fix it up

What to submit

Finishing Up

Submit your work as directed by your instructor.

Copyright 2010 by Ron K. Cytron
Last modified 14:32:05 CDT 13 August 2010