Due: Friday, September 15, 2017, 11:00 am (Session A) 1:00 pm (Session B) (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

© 2017 Ying Li. Page last modified: .