Due: Friday, September 16, 2016, 10:00 am (start of the class)

  1. Using each of the following grammars, draw a parse tree for 3 + 4 * 5.

    1. Expr -> Expr + Term | Expr * Term | Term
      Term -> 0 | ... | 9
    2. Expr -> Term + Expr | Term * Expr | Term
      Term -> 0 | ... | 9
    3. Expr -> Expr + Term | Term
      Term -> Term * Factor | Factor
      Factor -> 0 | ... | 9

© 2016 Ying Li. Page last modified: .