Homework 3 Solution


Question 1:

expr → expr OR term
     | term
term → term item
     | item
item → item STAR
     | item PLUS
     | LTR
     | EPS
     | LPAR expr RPAR

Note: the solution is not unique.


Question 2: