CSCI 4627
Homework exercise 2

Due: Jan 29 in class.

  1. Page 138, exercise 3.1. (The tokens are 's' and ';'). A leftmost derivation requires you to rewrite the leftmost nonterminal at each step. A rightmost derivation requires you to rewrite the rightmost nonterminal at each step.
  2. Page 138, exercise 3.2.
  3. Page 138, exercise 3.3(c). (Give a leftmost derivation, a parse tree and an abstract syntax tree.)
  4. Page 139, exercise 3.5.
  5. Page 139, exercise 3.9.