University of Nevada Las Vegas
Howard R. Hughes College of Engineering
Department of Computer Science
My Home Page
Course Page

CSC 456/656 Assignment 4

Due date: Monday, October 15, 2018, 11:30 PM.


Do not turn this assignment in. But be sure to work it and bring it to class on Monday.

  1. Fill out the Action and Goto tables for the language generated by the gammar given here, which is a more extensive algebraic language. Don't forget that the same symbol denotes both subtraction and negation, which are different operations.
    Exponentiation is right-associative.
  2. The grammar shown on Page 2 of this document is unambiguous. Fill out the Action and Goto tables on that page.
  3. The grammar shown on Page 3 of this document models the if-then-else ambiguity of programming. It also models lists of statements. Fill out the Action and Goto tables on that page. Note that b, n are delimeters that model the C++ delimeters {,}.
  4. Fill out the Action and Goto tables here.
Do not look at these answers until you at least try to work the problems out on your own.
  1. ambiguous programming example
    Correct. I checked the tables very carefully and found no errors.
  2. unambiguous algebraic example
    Correct. I checked the tables very carefully and found no errors.
  3. ambiguous algebraic example with more operators.
    Corrected. There were two errors in the Action table. Action(0,-) = s8 and Action(9,^) = s10.

Back to Course Page