CS712/CS812
Homework 3
Spring 2006
Due Date: Monday May 1


Given the grammar from Homework 2:

  1. Is the grammar LR(0)? Why or why not?

  2. Is the grammar SLR(1)? Why or why not?

  3. Is the grammar LALR(1)? Why or why not?

  4. Is the grammar LR(1)? Why or why not?

  5. Show the parse tables (ACTION and GOTO) that would be produced by an LR(1) parser generator. If there are shift-reduce errors, you should choose shift over reduce. If there are reduce-reduce errors, you should choose the reduction whose production appears first in the grammar. Support your answers to this question by computing and providing the LR(1) configuration sets with the associated context/lookahead information.

Please turn-in your homework in class on Monday May 1. If you cannot be in class that day, please make arrangements to give me your paper in advance. No late papers will be accepted.

You are expected to do your own work on this assignment.


Last modified on April 17, 2006.

Comments and questions should be directed to hatcher@unh.edu